AudioSceneComponent

Defines the sound scene component responsible to manage any sounds in a given scene.

Hierarchy

  • AudioSceneComponent

Implements

Index

Constructors

constructor

  • Creates a new instance of the component for the given scene

    Parameters

    • scene: Scene

      Defines the scene to register the component in

    Returns AudioSceneComponent

Properties

audioEnabled

audioEnabled: boolean

Gets whether audio is enabled or not. Please use related enable/disable method to switch state.

headphone

headphone: boolean

Gets whether audio is outputing to headphone or not. Please use the according Switch methods to change output.

name

name: string

The component name helpfull to identify the component in the list of scene components.

scene

scene: Scene

The scene the component belongs to.

Methods

addFromContainer

disableAudio

  • disableAudio(): void
  • Disables audio in the associated scene.

    Returns void

dispose

  • dispose(): void

enableAudio

  • enableAudio(): void
  • Enables audio in the associated scene.

    Returns void

rebuild

  • rebuild(): void

register

  • register(): void

removeFromContainer

serialize

  • serialize(serializationObject: any): void
  • Serializes the component data to the specified json object

    Parameters

    • serializationObject: any

      The object to serialize to

    Returns void

switchAudioModeForHeadphones

  • switchAudioModeForHeadphones(): void
  • Switch audio to headphone output.

    Returns void

switchAudioModeForNormalSpeakers

  • switchAudioModeForNormalSpeakers(): void
  • Switch audio to normal speakers.

    Returns void

Generated using TypeDoc