Audio · function
createSpatialSource
Place a sound in the world. See SpatialSource for when this is the right tool and when it is not.
Explained in Your first game.
function createSpatialSource(listener: AudioListenerGraph, buffer: AudioBuffer, options?: SpatialOptions): SpatialSourceimport { createSpatialSource } from '@driftengine/audio';Parameters
| Parameter | Type | Description |
|---|---|---|
listener | AudioListenerGraph | |
buffer | AudioBuffer | |
options? | SpatialOptions |