Skip to main content

Interface: AudioCone

Defined in: webxr-environment/src/audio.ts:96

A directional sound, in this package's own terms.

Angles are RADIANS, like every other angle here, and are the FULL width of the cone rather than a half-angle. Both current hosts want degrees, because both are wrapping the same Web Audio panner underneath - IWSDK reaches it through a component, three.js through setDirectionalCone - and each adapter converts. That is the whole point of naming it here: the app says one thing, and what the platform happens to want is the adapter's problem.

Properties​

PropertyModifierTypeDescriptionDefined in
innerreadonlynumberFull width of the cone inside which the sound is at full volume.webxr-environment/src/audio.ts:98
outerreadonlynumberFull width of the cone by which it has faded to outsideGain.webxr-environment/src/audio.ts:100
outsideGainreadonlynumberHow loud it still is outside the outer cone, 0..1.webxr-environment/src/audio.ts:102