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): SpatialSource
import { createSpatialSource } from '@driftengine/audio';

Parameters

ParameterTypeDescription
listenerAudioListenerGraph
bufferAudioBuffer
options?SpatialOptions