Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • AudioSceneComponent

Implements

Index

Constructors

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

    Parameters

    • Optional scene: Nullable<Scene>

      Defines the scene to register the component in

    Returns AudioSceneComponent

Properties

audioListenerPositionProvider: Nullable<(() => Vector3)>

Gets or Sets a custom listener position for all sounds in the scene By default, this is the position of the first active camera

audioListenerRotationProvider: Nullable<(() => Vector3)>

Gets or Sets a custom listener rotation for all sounds in the scene By default, this is the rotation of the first active camera

audioPositioningRefreshRate: number

Gets or sets a refresh rate when using 3D audio positioning

name: "Audio" = "Audio"

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

scene: Scene

The scene the component belongs to.

Accessors

  • get audioEnabled(): boolean
  • Gets whether audio is enabled or not. Please use related enable/disable method to switch state.

    Returns boolean

  • get headphone(): boolean
  • Gets whether audio is outputting to headphone or not. Please use the according Switch methods to change output.

    Returns boolean

Methods

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

    Returns void

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

    Returns void

  • rebuild(): void
  • Rebuilds the elements related to this component in case of context lost for instance.

    Returns void

  • register(): void
  • removeFromContainer(container: AbstractScene, dispose?: boolean): void
  • Removes all the elements in the container from the scene

    Parameters

    • container: AbstractScene

      contains the elements to remove

    • Optional dispose: boolean

      if the removed element should be disposed (default: false)

    Returns void

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

    Parameters

    • serializationObject: any

      The object to serialize to

    Returns void

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

    Returns void

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

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme