Skip to main content

Function: createXRBlocksAudio()

function createXRBlocksAudio(listener: AudioListener, options?: AudioDirectorOptions & ThreeAudioPortOptions): XRBlocksAudioSetup;

Defined in: xrblocks-environment/src/index.ts:125

Wire an audio director to an XR Blocks scene.

XR Blocks has its own sound module, with its own category volumes and its own spatial audio. This uses the three.js AudioListener path instead, for one reason: an app that switches hosts keeps the same cue ids, the same bus mix and the same retrigger policy. An app already invested in XR Blocks' sound module should keep it and not use this.

Parameters

ParameterType
listenerAudioListener
optionsAudioDirectorOptions & ThreeAudioPortOptions

Returns

XRBlocksAudioSetup