export type HydraOptions = { /** * The canvas to render into. */ canvas: HTMLCanvasElement | null; /** * Whether the engine runs its own loop (the element overrides it). */ autoLoop: boolean; /** * Whether to publish Hydra globals on `window`. */ makeGlobal: boolean; /** * Whether to enable audio analysis. */ detectAudio: boolean; /** * Number of source buffers. */ numSources: number; /** * Number of output buffers. */ numOutputs: number; /** * Custom GLSL transforms. */ extendTransforms: Array; /** * Shader precision. */ precision: 'highp' | 'mediump' | 'lowp' | null; /** * An `rtc-patch-bay` instance. */ pb: any; /** * Device-pixel-ratio cap. */ dpr: number; }; /** * Options for creating a Hydra instance, as folded from element attributes. * @typedef {Object} HydraOptions * @property {HTMLCanvasElement | null} canvas The canvas to render into. * @property {boolean} autoLoop Whether the engine runs its own loop (the element overrides it). * @property {boolean} makeGlobal Whether to publish Hydra globals on `window`. * @property {boolean} detectAudio Whether to enable audio analysis. * @property {number} numSources Number of source buffers. * @property {number} numOutputs Number of output buffers. * @property {Array} extendTransforms Custom GLSL transforms. * @property {'highp'|'mediump'|'lowp'|null} precision Shader precision. * @property {any} pb An `rtc-patch-bay` instance. * @property {number} dpr Device-pixel-ratio cap. */ /** @type {HydraOptions} Default options for creating a Hydra instance. */ export declare const DEFAULT_OPTIONS: HydraOptions; export type AttrParser = (options: HydraOptions, value: string | null) => HydraOptions; /** Attributes observed by the element: layout attrs plus the parsed ones. */ export declare const OBSERVED_ATTRIBUTES: string[]; /** * Folds the parsed attribute value into the options. * @param {HydraOptions} options * @param {string} attrName * @param {string|null} newValue * @returns {HydraOptions} */ export declare function foldOptions(options: HydraOptions, attrName: string, newValue: string | null): HydraOptions;