Skip to content

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.

listener.setCamera(camera: Camera | null): void

Sets the Three.js render camera used by perspective correction. Call it after the camera’s projection matrix or world matrix changes. Passing null disables the camera-dependent correction while leaving simulation unchanged. XR array cameras are ignored unless world was created with perspectiveCorrection.applyInXR.

listener.setPosition(position: Vector3Like): void

Sets the listener position in world space.

listener.setOrientation(orientation: QuaternionLike): void

Sets the listener orientation as a quaternion.

listener.setTransform(
position: Vector3Like,
orientation: QuaternionLike,
): void

Sets both position and orientation in one call, then updates the simulator and reflection worker.

listener.setReverb(settings: false | ReverbSettings): void

Enables or disables listener-centric reverb. Requires the world to have been created with reflections enabled.

reverbScale : ThreeBand — per-band reverb scale. Default: [1, 1, 1].