SnapDOMGitHub★ 8K

SnapDOM Labs

Plugin demos, playable instruments and rendering engines. Explore capture and export hooks, then try SVG alongside SnapDOM's experimental html-in-canvas engine.

SnapDOM v3.x.x automatically reuses eligible captures of an unchanged element and checks for changes before reuse. This demo compares forced full captures with memoization enabled. The numbers are measured in your browser.

Pikachu
Pikachu 35 HP

⚡ Electric · caught × 0

—
—
—
—
new capture reused capture

Pikachu artwork via PokeAPI. Pokémon © Nintendo / Game Freak.

SnapDOM has two rendering engines. SVG is the default; engine: 'html-in-canvas' paints the captured clone through the browser's native canvas API. Both exports below are PNG images.

The second engine is experimental and still needs a compatible browser with its canvas drawing flag enabled. For local development, run SNAPDOM_CANVAS_ENGINE=1 npm run site to include it in the build. Unsupported captures fall back to SVG.

Target for html-in-canvas

One target, two SnapDOM rendering engines.

—
—