Listener
The Listener represents the position and orientation of the player. It is accessed via world.listener and is used for spatialization, occlusion rays, and reflection simulation.
Methods
Section titled “Methods”setPosition(position)
Section titled “setPosition(position)”listener.setPosition(position: Vector3Like): voidSets the listener position in world space.
setOrientation(orientation)
Section titled “setOrientation(orientation)”listener.setOrientation(orientation: QuaternionLike): voidSets the listener orientation as a quaternion.
setTransform(position, orientation)
Section titled “setTransform(position, orientation)”listener.setTransform( position: Vector3Like, orientation: QuaternionLike,): voidSets both position and orientation in one call, then updates the simulator and reflection worker.
setReverb(settings)
Section titled “setReverb(settings)”listener.setReverb(settings: false | ReverbSettings): voidEnables or disables listener-centric reverb. Requires the world to have been created with reflections enabled.
ReverbSettings
Section titled “ReverbSettings”enabled
: boolean — default true.
reverbScale
: ThreeBand — per-band reverb scale. Default: [1, 1, 1].