Skip to content

@modoki/engine / index / AudioListener

Variable: AudioListener

const AudioListener: Trait<{ enabled: boolean; }>

AudioListener — the "ears" of the scene. Put ONE on the active camera entity; audioSystem drives the Web Audio listener pose from this entity's world Transform each frame so spatial AudioSources attenuate correctly. Absent / disabled ⇒ the listener sits at the origin (non-spatial audio is unaffected).

Built with Modoki.