@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
29 lines (28 loc) • 1.44 kB
TypeScript
import type { Constructor } from '../../../../../types/GlobalTypes';
import type { RootManagerNode } from '../../Root';
import type { AudioListenerObjNode } from '../../../obj/AudioListener';
export declare function RootAudioParamConfig<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
/** @param set if a audio icon is shown in the viewer to toggle sound on/off */
displayAudioIcon: import("../../../utils/params/ParamsConfig").ParamTemplate<import("../../../../index_all").ParamType.BOOLEAN>;
/** @param icon color */
audioIconColor: import("../../../utils/params/ParamsConfig").ParamTemplate<import("../../../../index_all").ParamType.COLOR>;
/** @param icon style properties */
audioIconStyle: import("../../../utils/params/ParamsConfig").ParamTemplate<import("../../../../index_all").ParamType.STRING>;
};
} & TBase;
type onToggleSoundCallback = (soundOn: boolean) => void;
export declare class RootAudioController {
protected node: RootManagerNode;
constructor(node: RootManagerNode);
toggleSound(): Promise<void>;
soundOn(): boolean;
update(): void;
audioListeners(): AudioListenerObjNode[];
private _updateViewers;
static update(node: RootManagerNode): void;
private _callbacksByName;
onToggleSound(callbackName: string, callback: onToggleSoundCallback): void;
private _runOnToggleSoundCallbacks;
}
export {};