drawElementImage() API to copy rendered DOM content into a canvas. That canvas can become a Three.js texture or the input to a shader effect.
Use it when the visual treatment depends on both real HTML and GPU effects—for example, an interface inside a 3D device or a DOM scene passing through a distortion shader. It is an advanced, browser-dependent technique.
Start with a proven block
The fastest path is to install a Catalog block that already handles capability detection and fallback behavior:html-in-canvas only when you want to compare the full set:
Browser support
drawElementImage() is an experimental Chromium feature. The feature flag only works in browser builds that contain the API.
HyperFrames enables CanvasDrawElement when it launches Chrome and checks whether the API is actually available. The render engine can fall back to its normal capture path when the fast-capture API is unavailable or unsafe for a composition.
To refresh the browser used by the CLI:
chrome://flags/#canvas-draw-element in a compatible Chrome or Brave build and restart it. Keep a visual fallback because collaborators may open the composition in a browser without the feature.
Minimal pattern
captureCanvas like any other canvas texture:
texture.needsUpdate = true.
Know the limits
The browser’s paint-record path does not reproduce every compositor effect. Filters, backdrop filters, some 3D transforms, masks, blend modes, and similar effects can force HyperFrames back to the normal capture path. That fallback protects the final result, but it also means HTML in Canvas is not a promise of universal CSS support or faster rendering. Test the actual composition:Related topics
Shader transitions
Apply built-in WebGL transitions between scenes.
Browse visual blocks
Start from a working effect instead of rebuilding its capture logic.