AudioSceneComponent

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

Hierarchy

  • AudioSceneComponent

Implements

Index

Constructors

constructor

Find examples in Playground
  • 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

audioPositioningRefreshRate

Find examples in Playground
audioPositioningRefreshRate: number

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

Readonly name

Find examples in Playground
name: string

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

scene

Find examples in Playground
scene: Scene

The scene the component belongs to.

Accessors

audioEnabled

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

    Returns boolean

audioListenerPositionProvider

Find examples in Playground
  • get audioListenerPositionProvider(): Nullable<function>
  • set audioListenerPositionProvider(value: Nullable<function>): any
  • Gets the current audio listener position provider

    Returns Nullable<function>

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

    Parameters

    Returns any

headphone

Find examples in Playground
  • get headphone(): boolean
  • Gets whether audio is outputing to headphone or not. Please use the according Switch methods to change output.

    Returns boolean

Methods

addFromContainer

Find examples in Playground

disableAudio

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

    Returns void

dispose

Find examples in Playground
  • dispose(): void

enableAudio

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

    Returns void

rebuild

Find examples in Playground
  • rebuild(): void

register

Find examples in Playground
  • register(): void

removeFromContainer

Find examples in Playground
  • removeFromContainer(container: AbstractScene, dispose?: boolean): void

serialize

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

    Parameters

    • serializationObject: any

      The object to serialize to

    Returns void

switchAudioModeForHeadphones

Find examples in Playground
  • switchAudioModeForHeadphones(): void
  • Switch audio to headphone output.

    Returns void

switchAudioModeForNormalSpeakers

Find examples in Playground
  • switchAudioModeForNormalSpeakers(): void
  • Switch audio to normal speakers.

    Returns void

Generated using TypeDoc