/** * rgui WebGPU renderer — first increment: background + readable-grid * dots/field on the GPU. * * The grid is the one element whose instance count scales without bound * (every readable grid point on screen, ×2 levels, plus field tails), so it * moves to instanced SDF quads first. Graph content keeps rendering on the * 2D canvas above with a transparent background; later increments can move * wires and node blocks behind this same seam. */ import { type ViewTransform } from "../core/grid.js"; import { type RgRule } from "../core/rule.js"; import { type RgTheme } from "../core/theme.js"; import type { FieldSource } from "./canvas2d.js"; export interface WebGPUGridRenderer { /** resolves true when the pipeline is live, false when unavailable */ ready: Promise; render(t: ViewTransform): void; resize(): void; destroy(): void; } export declare function createWebGPUGridRenderer(canvas: HTMLCanvasElement, rule?: RgRule, field?: () => FieldSource[], /** z of the field arrows: +1 = at the viewer (⊙), -1 = into the screen (⊗) */ zDir?: () => number, /** global lateral field direction from the viewport 3-D rotation */ fieldTilt?: () => readonly [number, number], maxDpr?: number, /** live theme object (mutated by viewer.setTheme); colors read per frame */ theme?: RgTheme, /** * background clear; false = transparent underlay (page shows through); * a getter re-reads per frame. Default: the theme background. */ background?: string | false | (() => string | false)): WebGPUGridRenderer; //# sourceMappingURL=webgpu.d.ts.map