@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / AudioSystem
Class: AudioSystem
Defined in: systems/AudioSystem.ts:46
Reconciles AudioComponent state with the underlying THREE.js audio objects each frame.
Playback — drives play(), pause(), and stop() on the THREE.js audio node based on the isPlaying / isPaused flags set by AudioComponent.play(), .pause(), and .stop().
Option sync — detects changes to loop, pitch, volume, refDistance, distanceModel, and rolloffFactor and applies them live. Changes take effect on the next frame, so scripts and inspector edits during runtime are reflected without reloading the scene.
Only active in preview mode (isEditor: true makes every update a no-op so the editor is unaffected).
Implements
Constructors
Constructor
new AudioSystem(__namedParameters?): AudioSystem;Defined in: systems/AudioSystem.ts:53
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { isEditor?: boolean; } |
__namedParameters.isEditor? | boolean |
Returns
AudioSystem
Methods
update()
update(world, _deltaTime): void;Defined in: systems/AudioSystem.ts:57
Parameters
| Parameter | Type |
|---|---|
world | World |
_deltaTime | number |
Returns
void
Implementation of
dispose()
dispose(_world): void;Defined in: systems/AudioSystem.ts:157
Parameters
| Parameter | Type |
|---|---|
_world | World |
Returns
void

