export declare const SUPPORTS_WEBGL2: boolean; export declare const SUPPORTS_IMAGE_BITMAP: boolean; export declare const SUPPORTS_RESIZE_OBSERVER: boolean; export declare const SUPPORTS_POINTER_EVENTS: boolean; export declare const SUPPORTS_WHEEL_EVENTS: boolean; export declare const SUPPORTS_MOUSE_EVENTS: boolean; export declare const SUPPORTS_TOUCH_EVENTS: boolean; export declare const SUPPORTS_CLICK_EVENTS: boolean; export declare const SUPPORTS_CREATE_IMAGE_BITMAP: boolean; export declare const SUPPORTS_AUDIO_CONTEXT: boolean; export declare const SUPPORTS_WEBKIT_AUDIO_CONTEXT: boolean; export declare const SUPPORTS_OFFLINE_AUDIO_CONTEXT: boolean; export declare const SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT: boolean; export declare const SUPPORTS_WEB_AUDIO: boolean; export declare const IN_BROWSER: boolean; export declare const IN_MAC_OS: boolean; export declare const DEVICE_PIXEL_RATIO: number; export declare const isElementNode: (node: unknown) => node is Element; export declare const isVideoElement: (node: unknown) => node is HTMLVideoElement; export declare const isImageElement: (node: unknown) => node is HTMLImageElement; export declare function isCanvasElement(node: unknown): node is HTMLCanvasElement; export declare function isWebgl2(gl: unknown): gl is WebGL2RenderingContext; export type CanvasFactory = (width?: number, height?: number) => HTMLCanvasElement; /** * Inject a canvas factory for non-browser environments (e.g. node-canvas's * `createCanvas`). Lets the engine create offscreen 2D canvases — used for * gradients, text/canvas textures and pixel output — without a DOM. * Pass `undefined` to clear it. */ export declare function setCanvasFactory(factory: CanvasFactory | undefined): void; export declare function getCanvasFactory(): CanvasFactory | undefined; export type GlContextProvider = (canvas: HTMLCanvasElement | undefined, options?: WebGLContextAttributes) => WebGL2RenderingContext | WebGLRenderingContext | undefined; /** * Inject a WebGL2 context provider for non-browser environments * (e.g. `headless-gl`, `gl`, or other off-DOM bindings). Lets the engine source * its main rendering context when `canvas.getContext('webgl2')` isn't viable — * the provider is consulted before falling back to the canvas's own getContext. * Pass `undefined` to clear. * * Note: callers can also keep passing a fully-constructed `gl` instance via * `new Engine({ view: gl })`; this provider is for the implicit case where the * engine creates its own canvas. */ export declare function setGlContextProvider(provider: GlContextProvider | undefined): void; export declare function getGlContextProvider(): GlContextProvider | undefined; /** * Create an (offscreen) canvas via the injected factory, falling back to * `document.createElement('canvas')` in the browser. Returns `undefined` when * neither is available (non-browser with no factory) — callers must guard. */ export declare function createHTMLCanvas(width?: number, height?: number): HTMLCanvasElement | undefined; export declare function determineCrossOrigin(url: string, loc?: Location | undefined): string; export declare function crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin: boolean | string | null): void;