import * as rc from "./rive_advanced.mjs"; export type RuntimeCallback = (rive: rc.RiveCanvas) => void; export declare class RuntimeLoader { private static runtime; private static isLoading; private static callBackQueue; private static rive; private static wasmURL; private static wasmFallbackURL; private static wasmBinary; private static wasmThreadsURL; private static triedThreads; private static parallelParts; private static replayWorker; private static errorCallbackQueue; private constructor(); /** * When true, performance.mark / performance.measure entries are emitted for * WASM initialization. */ static enablePerfMarks: boolean; private static notifyError; private static loaded; private static loadRuntime; private static loadUnthreaded; static getInstance(callback: RuntimeCallback, onError?: (error: Error) => void): void; static awaitInstance(): Promise; static setWasmUrl(url: string): void; static getWasmUrl(): string; /** * Sets the URL used as a fallback when the primary WASM URL fails to load. * Pass `null` to disable the fallback entirely. * * Defaults to pulling from the jsdelivr CDN. */ static setWasmFallbackUrl(url: string | null): void; static getWasmFallbackUrl(): string | null; /** * Sets the URL of the threaded build's wasm, which * `@rive-app/webgl2-threads` loads on a cross origin isolated page. Pass * `null` to always load the build without threads. Other packages have no * threaded build and ignore it. * * Defaults to pulling from the unpkg CDN. */ static setWasmThreadsUrl(url: string | null): void; static getWasmThreadsUrl(): string | null; /** * Sets how many parts a script's parallel call gets on a page that runs * the threaded build, the page's thread and one worker thread for each * other part. 1 turns parallel calls off, and null leaves the runtime's * default of one part per core, up to 8. Set it before the first file * loads. */ static setParallelParts(parts: number | null): void; static getParallelParts(): number | null; private static applyParallelParts; /** * @experimental When the threaded build loads, instances with * `enableGPUCanvas` hand their canvas to one worker that replays every * instance's frames while the page records the next ones. Pass `false` * before the runtime loads to keep replay on the page's thread; a single * instance can opt out with `useReplayWorker: false`. Pages where the * browser cannot draw WebGL2 on a transferred canvas stay on the page's * thread regardless. * * True by default. */ static setReplayWorker(enabled: boolean): void; static getReplayWorker(): boolean; static setWasmBinary(value: ArrayBuffer | null): void; static getWasmBinary(): ArrayBuffer | null; }