API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classAudioBus
Hierarchical mixer node in the engine's audio routing graph. Each bus owns three Web Audio nodes (input gain, optional effect chain, stereo pan, output gain) and routes its output into its parent's input - the root bus connects to the destination. The three engine-built-in busses are constructed by AudioSystem: `master` (root), `music` (child of master), `sound` (child of master). User code creates additional busses via `new AudioBus(name, { parent })` and registers them via AudioSystem.registerBus. Volume is in 0..2 (1 = unity), pan is -1..1, mute is a boolean override. AudioBus.fadeIn / AudioBus.fadeOut produce smooth ramps over the output gain. Effect changes via AudioBus.addEffect / AudioBus.removeEffect rebuild the chain in place. Setup is deferred until the global `AudioContext` is unlocked (browser autoplay policy); operations that need live nodes are no-ops until that happens.
import { AudioBus } from '@codexo/exojs'Hierarchical mixer node in the engine's audio routing graph. Each bus owns three Web Audio nodes (input gain, optional effect chain, stereo pan, output gain) and routes its output into its parent's input - the root bus connects to the destination.
The three engine-built-in busses are constructed by AudioSystem: `master` (root), `music` (child of master), `sound` (child of master). User code creates additional busses via `new AudioBus(name, { parent })` and registers them via AudioSystem.registerBus.
Volume is in 0..2 (1 = unity), pan is -1..1, mute is a boolean override. AudioBus.fadeIn / AudioBus.fadeOut produce smooth ramps over the output gain. Effect changes via AudioBus.addEffect / AudioBus.removeEffect rebuild the chain in place.
Setup is deferred until the global `AudioContext` is unlocked (browser autoplay policy); operations that need live nodes are no-ops until that happens.
new(name: string, options: AudioBusOptionsConstruction options for AudioBus.): AudioBusdestroy(): voidfadeOut(duration: SecondsA length of time in seconds. The unit every duration in the public API is expressed in - frame deltas, the fixed step, elapsed totals, timer limits. It is a `n…, options: { stopAfter?: boolean }): thisgetInputNode(): GainNode | nullgetOutputNode(): GainNode | nullonceSetup(callback: () => void): () => voidname: stringinputNode: GainNode | nullmuted: booleanpan: numberparent: AudioBus | nullvolume: number