berkantay/gpucanvas

gpucanvas uses WebGPU to render a large number of live DOM or React nodes in a single pass, handling panning and zooming without touching the DOM, while clicks and input are still passed to the real elements. It includes a built-in editor (layer-by-layer selection, moving, scaling, snapping guides), WGSL shader effects, node snapshots with pixel comparison, GPU transitions, and an agent view for AI agents: describe() returns a JSON tree containing ids, roles, text, and coordinates, and it can also capture images of any region. The author's online demo simultaneously displays 5,000 live React pages, with the frame rate measured in real time within the demo.

gpucanvas uses WebGPU to render a large number of live DOM or React nodes in a single pass, handling panning and zooming without touching the DOM, while clicks and input are still passed to the real elements. It includes a built-in editor (layer-by-layer selection, moving, scaling, snapping guides), WGSL shader effects, node snapshots with pixel comparison, GPU transitions, and an agent view for AI agents: describe() returns a JSON tree containing ids, roles, text, and coordinates, and it can also capture images of any region. The author's online demo simultaneously displays 5,000 live React pages, with the frame rate measured in real time within the demo.

Why It Matters Components on the canvas remain real DOM elements that are clickable and accept input; agents read the text and position of each element through a JSON tree, and can also draw arrows and place comment pins.

Star count 508 (+26 / 24h)

Reasons

  • 26 new stars in 24 hours, total stars 508 (indicating attention only); MIT license
  • Includes an online demo and a side-by-side comparison recording with standard DOM solutions

Usage

  • npm install gpucanvas; you can first open the author's online demo in Chrome version 157 or higher, then run agentView.describe() in the console to see what the agent reads

Risks

  • The GPU path relies on WebGPU and HTML-in-Canvas, which are currently enabled by default only in desktop Chrome version 157 or higher; other browsers require manually enabling experimental features

Open

GitHub

Explore the latest AI Radar updates