/** * Options of the `sound` component accepted by {@link SoundComponentSystem} that differ from the * properties of {@link SoundComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type SoundComponentOptionsOverrides = { /** * - * Same as {@link SoundComponent#slots}, also accepting the plain {@link SoundSlot} settings of each * slot. */ slots?: { [name: string]: SoundSlot | { volume?: number; pitch?: number; loop?: boolean; startTime?: number; duration?: number; overlap?: boolean; autoPlay?: boolean; asset?: number; }; }; }; /** * Manages the {@link SoundComponent}s of an application. Reach it through `app.systems.sound`; * components are created with {@link Entity#addComponent}, never by calling the system directly. * * @category Sound */ export class SoundComponentSystem extends ComponentSystem { id: string; ComponentType: typeof SoundComponent; /** * Gets / sets the sound manager. * * @type {SoundManager} */ manager: SoundManager; /** * Sets the volume for the entire Sound system. All sounds will have their volume multiplied by * this value. Valid range is between 0 and 1. Defaults to 1. * * @type {number} */ set volume(volume: number); /** * Gets the volume for the entire Sound system. * * @type {number} */ get volume(): number; /** * Gets the AudioContext currently used by the sound manager. * * @type {AudioContext|null} */ get context(): AudioContext | null; initializeComponentData(component: any, data: any): void; cloneComponent(entity: any, clone: any): import("../component.js").Component; onUpdate(dt: any): void; onBeforeRemove(entity: any, component: any): void; } import type { SoundSlot } from './slot.js'; import { ComponentSystem } from '../system.js'; import { SoundComponent } from './component.js'; import type { SoundManager } from '../../../platform/sound/manager.js';