export interface WebGLContextInitOptions { /** * Options passed to `canvas.getContext`. Defaults to antialias enabled to match the rerelease renderer's smoothing. */ readonly contextAttributes?: WebGLContextAttributes; /** * Extensions that must be present. Missing entries throw during construction so callers can fall back early. */ readonly requiredExtensions?: readonly string[]; /** * Extensions that will be queried if available. Missing optional extensions are ignored. */ readonly optionalExtensions?: readonly string[]; } export interface WebGLContextState { readonly gl: WebGL2RenderingContext; readonly extensions: Map; /** * Returns true once a `webglcontextlost` event has been observed. */ isLost(): boolean; /** * Registers a callback that fires on context loss. Returns an unsubscribe function. */ onLost(callback: () => void): () => void; /** * Registers a callback that fires on context restoration. Returns an unsubscribe function. */ onRestored(callback: () => void): () => void; /** * Remove event listeners and release references. */ dispose(): void; } export declare function createWebGLContext(canvas: HTMLCanvasElement, options?: WebGLContextInitOptions): WebGLContextState; //# sourceMappingURL=context.d.ts.map