Skip to content

docs: add HTML Textures (HTML-in-Canvas) feature page#1591

Draft
RaananW wants to merge 4 commits into
BabylonJS:masterfrom
RaananW:feat/html-texture-docs
Draft

docs: add HTML Textures (HTML-in-Canvas) feature page#1591
RaananW wants to merge 4 commits into
BabylonJS:masterfrom
RaananW:feat/html-texture-docs

Conversation

@RaananW

@RaananW RaananW commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a feature-deep-dive page for the new HTML-in-Canvas support:

  • HtmlTexture (core, Materials/Textures/HTML) rendering live DOM into a WebGL2 and WebGPU texture.
  • HtmlRaycastInteractionManager (any mesh, UV-based) and HtmlInteractionManager (planar overlay, native hit-testing) — both in core, tree-shaken unless imported.
  • The optional @babylonjs/addons polyfill installer (InstallHtmlInCanvasPolyfill, IsHtmlInCanvasSupportedNatively, UninstallHtmlInCanvasPolyfill) that lazily pulls in three-html-render.

Page lives at content/features/featuresDeepDive/materials/using/htmlTexture.md.

Notes

  • This documents the API from the companion Babylon.js PR (HTML-in-Canvas feature); it should land alongside that engine change.
  • No <Playground> embeds or images yet — examples are inline code blocks because the underlying API is experimental (native behind chrome://flags/#canvas-draw-element, or via the polyfill). A live Playground can be added once the API is broadly runnable.

Opening as draft pending the engine PR.

Document the core HtmlTexture (WebGL + WebGPU), the HtmlRaycastInteractionManager and HtmlInteractionManager interaction helpers, and the optional @babylonjs/addons polyfill installer for the WICG HTML-in-Canvas API.
@bjsplat

bjsplat commented Jun 22, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants