Where sounds are heard from: a game moves one listener to its camera or its party leader each frame, and every SoundSource is mixed against it.
SoundSource
import { AudioListener } from '@datamoc/mw_games/audio';const listener = new AudioListener({ x: 40, y: 12 });listener.moveTo(41, 12); // following the cameralistener.face(Math.PI / 2); // now facing the world's south Copy
import { AudioListener } from '@datamoc/mw_games/audio';const listener = new AudioListener({ x: 40, y: 12 });listener.moveTo(41, 12); // following the cameralistener.face(Math.PI / 2); // now facing the world's south
heading in radians: 0 faces +x, increasing clockwise on a y-down screen
Where sounds are heard from: a game moves one listener to its camera or its party leader each frame, and every
SoundSourceis mixed against it.Example