API

Interface IAudioEngineV2Options

Options for creating a v2 audio engine.

interface IAudioEngineV2Options {
    listenerAutoUpdate: boolean;
    listenerEnabled: boolean;
    listenerMinUpdateTime: number;
    listenerPosition: Vector3;
    listenerRotation: Vector3;
    listenerRotationQuaternion: Quaternion;
    parameterRampDuration: number;
    volume: number;
}

Hierarchy (View Summary)

Index
listenerAutoUpdate: boolean

Whether to automatically update the position and rotation of the listener. Defaults to true.

listenerEnabled: boolean

Set to true to enable the listener. Defaults to false.

listenerMinUpdateTime: number

The minimum update time in seconds of the listener if it is attached to a mesh, scene or transform node. Defaults to 0.

  • The listener's position and rotation will not update faster than this time, but they may update slower depending on the frame rate.
listenerPosition: Vector3

The listener position. Defaults to (0, 0, 0).

listenerRotation: Vector3

The listener rotation, as Euler angles. Defaults to (0, 0, 0).

listenerRotationQuaternion: Quaternion

The listener rotation, as a quaternion. Defaults to (0, 0, 0, 1).

parameterRampDuration: number

The smoothing duration to use when changing audio parameters, in seconds. Defaults to 0.01 (10 milliseconds).

volume: number

The initial output volume of the audio engine. Defaults to 1.