Interface SpatialSoundOptions
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;
}
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;
}
Properties
Optionalattached To
Follow a world transform's position and/or rotation.
Optionalattachment Type
Which transform components to follow. Defaults to "positionAndRotation".
Optionalcone Inner Angle
coneInnerAngle?: number
Cone inner angle, in radians. Defaults to 2π.
Optionalcone Outer Angle
coneOuterAngle?: number
Cone outer angle, in radians. Defaults to 2π.
Optionalcone Outer Volume
coneOuterVolume?: number
Volume outside the cone outer angle. Defaults to 0.
Optionaldistance Model
distanceModel?: DistanceModelType
Distance attenuation model. Defaults to "linear".
Optionalmax Distance
maxDistance?: number
Max distance (linear model). Defaults to 10000.
Optionalmin Distance
minDistance?: number
Reference distance for attenuation. Defaults to 1.
Optionalorientation
Facing direction of the source. Defaults to (1, 0, 0).
Optionalpanning Enabled
panningEnabled?: boolean
Pan between left/right channels. Defaults to true.
Optionalpanning Model
panningModel?: PanningModelType
Panning algorithm. Defaults to "equalpower".
Optionalposition
World position of the source. Defaults to (0, 0, 0).
Optionalrolloff Factor
rolloffFactor?: number
Attenuation roll-off factor. Defaults to 1.
Optionalrotation Quaternion
Source rotation as a quaternion. When set, drives orientation.
Spatial (3D) options for a sound or bus. All fields optional; defaults match Babylon.js.