import { Entity } from '@lastolivegames/becsy'; import { API } from '../API'; export declare enum Pen { SELECT = "select", HAND = "hand", DRAW_POINT = "draw-point", DRAW_RECT = "draw-rect", DRAW_ELLIPSE = "draw-ellipse", DRAW_LINE = "draw-line", DRAW_ARROW = "draw-arrow", DRAW_ROUGH_RECT = "draw-rough-rect", DRAW_ROUGH_ELLIPSE = "draw-rough-ellipse", DRAW_ROUGH_LINE = "draw-rough-line", IMAGE = "image", TEXT = "text", PENCIL = "pencil", BRUSH = "brush", VECTOR_NETWORK = "vector-network", COMMENT = "comment", ERASER = "eraser", LASSO = "lasso", LASER_POINTER = "laser-pointer" } export declare class Canvas { /** * The canvas element. Pass in HTMLCanvasElement in the browser environment, OffscreenCanvas in the WebWorker environment, * and node-canvas in the Node.js environment. */ element: HTMLCanvasElement | OffscreenCanvas; /** * The HTML layer element, contains elements which will be affected by the camera. */ htmlLayer: HTMLDivElement; /** * The SVG layer element, contains elements like laser pointer which will not be affected by the camera. */ svgLayer: HTMLDivElement; /** * The width of the canvas. */ width: number; /** * The height of the canvas. */ height: number; /** * Set the renderer, optional values are webgl and webgpu, default value is webgl. */ renderer: 'webgl' | 'webgpu'; /** * Set the WebGPU shader compiler path. */ shaderCompilerPath: string; /** * Returns the ratio of the resolution in physical pixels to the resolution * in CSS pixels for the current display device. * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio */ devicePixelRatio: number; /** * TODO: multiple {@link Camera}s * @example * * camera1.write(Camera).canvas = canvas; * camera2.write(Camera).canvas = canvas; */ cameras: Entity[]; inputPoints: Entity[]; fonts: Entity[]; api: API; constructor(canvas?: Partial); }