API

Interface SpatialSoundOptions

Spatial (3D) options for a sound or bus. All fields optional; defaults match Babylon.js.

interface SpatialSoundOptions {
    attachedTo?: SpatialTarget;
    attachmentType?: SpatialAttachmentType;
    coneInnerAngle?: number;
    coneOuterAngle?: number;
    coneOuterVolume?: number;
    distanceModel?: DistanceModelType;
    maxDistance?: number;
    minDistance?: number;
    orientation?: Vec3;
    panningEnabled?: boolean;
    panningModel?: PanningModelType;
    position?: Vec3;
    rolloffFactor?: number;
    rotationQuaternion?: Quat;
}
Index
attachedTo?: SpatialTarget

Follow a world transform's position and/or rotation.

attachmentType?: SpatialAttachmentType

Which transform components to follow. Defaults to "positionAndRotation".

coneInnerAngle?: number

Cone inner angle, in radians. Defaults to 2π.

coneOuterAngle?: number

Cone outer angle, in radians. Defaults to 2π.

coneOuterVolume?: number

Volume outside the cone outer angle. Defaults to 0.

distanceModel?: DistanceModelType

Distance attenuation model. Defaults to "linear".

maxDistance?: number

Max distance (linear model). Defaults to 10000.

minDistance?: number

Reference distance for attenuation. Defaults to 1.

orientation?: Vec3

Facing direction of the source. Defaults to (1, 0, 0).

panningEnabled?: boolean

Pan between left/right channels. Defaults to true.

panningModel?: PanningModelType

Panning algorithm. Defaults to "equalpower".

position?: Vec3

World position of the source. Defaults to (0, 0, 0).

rolloffFactor?: number

Attenuation roll-off factor. Defaults to 1.

rotationQuaternion?: Quat

Source rotation as a quaternion. When set, drives orientation.