import { CanvasTexture } from "three"; /** Canvas type that works both in main thread and workers */ export type UICanvas = HTMLCanvasElement | OffscreenCanvas; /** 2D rendering context type for UICanvas */ export type UICanvasRenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D; /** * Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement. * * @param width - Canvas width in pixels * @param height - Canvas height in pixels * @returns Canvas instance */ export declare function createCanvas(width: number, height: number): UICanvas; /** * Gets the 2D rendering context for a UICanvas. * * @param canvas - Canvas instance * @returns 2D rendering context or null */ export declare function getCanvas2DContext(canvas: UICanvas): UICanvasRenderingContext2D | null; /** * Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility. * - ClampToEdge wrapping (required for NPOT in WebGL1) * - Linear filtering without mipmaps (NPOT-safe) * - RGBA/UnsignedByte format (no extensions needed) * - sRGB colorspace only if supported * * @param canvas - Source canvas * @returns Configured CanvasTexture */ export declare function createCanvasTexture(canvas: UICanvas): CanvasTexture;