Back
SoundManager
Manages 3D sound sources using Web Audio Api.
More
Properties
scene
camera
bufferData
Methods
constructor
SoundManager
()
undefined
update
(
Object
Number )
undefined
addSource
(
Object
SoundSource )
undefined
removeSource
(
Object
SoundSource )
undefined
playAsset
(
Object
SoundSource,
Object
SoundAsset )
undefined
endAsset
(
Object
SoundSource,
Object
SoundAsset )
undefined
loadBufferData
(
Object
SoundAsset,
Object
Function )
Description
This falls back to playing the sound at different volumes when Web Audio Api is not available.
Property Description
scene
The scene associated with this manager.
camera
The camera associated with this manager.
bufferData
Cached asset buffer data.
Method Description
constructor
SoundManager
()
undefined
update
(
Object
Number )
undefined
addSource
(
Object
SoundSource )
Manage a new SoundSource. The SoundManager adds sources added to the associated scene by itself.
undefined
removeSource
(
Object
SoundSource )
Stop managing a SoundSource and remove references to it. The SoundManager removes sources removed from the associated scene by itself.
undefined
playAsset
(
Object
SoundSource,
Object
SoundAsset )
Start playing an asset from a sound source. This is automatically called when a added SoundSource starts playing an asset.
undefined
endAsset
(
Object
SoundSource,
Object
SoundAsset )
Stop playing a sound from an asset. This is automatically called when a added SoundSource stops playing an asset.
undefined
loadBufferData
(
Object
SoundAsset,
Object
Function )
Load asset data to an ArrayBuffer.