import { Group } from './group'; import { CanvasFactory } from './types'; /** * Scene with named layers on a single canvas: each layer is a root group, * layer order = order of first access (z-order). The scene graph is retained, * so any change simply redraws the whole canvas once per frame. */ export declare class Scene { private logicalWidth; private logicalHeight; private readonly canvas; private readonly layers; private dirty; constructor(factory: CanvasFactory, logicalWidth: number, logicalHeight: number); get width(): number; get height(): number; /** Root group of the layer; created on first access. */ layer(name: string): Group; /** Marks the scene for redraw (layer names are accepted for call-site clarity; the canvas is redrawn whole). */ markDirty(..._names: string[]): void; measureText(text: string, font: string): number; resize(width: number, height: number): void; /** Redraws the canvas if anything changed since the last render. */ render(): void; /** Rendered image source (PNG export). */ composite(draw: (image: unknown) => void): void; destroy(): void; }