export type RendererCapabilityCanvas = { getContext(contextId: 'webgl2'): unknown; }; /** Mirrors `GPUPowerPreference` without pulling WebGPU ambient types into the declaration build. */ export type RendererPowerPreference = 'high-performance' | 'low-power'; type RendererGpuAdapter = { features?: Iterable; requestDevice(descriptor?: { requiredFeatures?: string[]; }): Promise; }; type RendererGpu = { requestAdapter(options?: Record): Promise; }; export type RendererCapability = { backend: 'webgpu'; device: unknown; status: 'supported'; } | { backend: 'webgl'; status: 'supported'; } | { error?: unknown; status: 'unsupported'; }; export type RendererBackendParameters = { device?: unknown; forceWebGL?: boolean; }; type InitializableRenderer = { dispose?: () => void; init: () => Promise; }; export type RendererInitializationResult = { backend: 'webgpu' | 'webgl'; renderer: Renderer; status: 'ready'; } | { error?: unknown; status: 'unsupported'; }; export declare function detectRendererCapability({ canvas, gpu, powerPreference, webgpuTimeoutMs, }?: { canvas?: RendererCapabilityCanvas | null; gpu?: RendererGpu | null; powerPreference?: RendererPowerPreference; webgpuTimeoutMs?: number; }): Promise; export declare function initializeGpuRenderer({ createRenderer, gpu, powerPreference, probeCanvas, webgpuTimeoutMs, }: { createRenderer: (parameters: RendererBackendParameters) => Renderer; gpu?: RendererGpu | null; powerPreference?: RendererPowerPreference; probeCanvas?: RendererCapabilityCanvas | null; webgpuTimeoutMs?: number; }): Promise>; export {}; //# sourceMappingURL=renderer-capability.d.ts.map