Skip to content

Improved HTMLTexture support.#33400

Merged
mrdoob merged 1 commit into
devfrom
htmltexture-improvements
Apr 16, 2026
Merged

Improved HTMLTexture support.#33400
mrdoob merged 1 commit into
devfrom
htmltexture-improvements

Conversation

@mrdoob

@mrdoob mrdoob commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Related issue: #31233

Description

  • Fixed texElement2D API check to use the spec-correct texElementImage2D
  • Added HTMLTexture support to the WebGL fallback backend (webgl-fallback/utils/WebGLTextureUtils.js)
  • Centralized onpaint callback handling in common Textures.js for both WebGPU and WebGL fallback paths
  • Added three-html-render polyfill fallback to both examples
  • Fixed onpaint handler to only update textures whose elements actually changed (via event.changedElements)
  • Fixed multiple HTMLTexture support — shared onpaint handler iterates over all registered textures
  • Added HTMLTexture examples to the e2e exception list (requires HTML-in-Canvas API)
  • Updated screenshots

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mrdoob mrdoob added this to the r184 milestone Apr 16, 2026
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 364.99
86.71
365
86.71
+5 B
+0 B
WebGPU 637.49
177.06
637.56
177.1
+74 B
+37 B
WebGPU Nodes 635.61
176.77
635.68
176.8
+74 B
+37 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 497.51
121.39
497.51
121.39
+5 B
+1 B
WebGPU 709.24
191.88
709.32
191.9
+74 B
+18 B
WebGPU Nodes 658.46
179.18
658.54
179.19
+74 B
+17 B

@mrdoob mrdoob merged commit 87374ef into dev Apr 16, 2026
10 checks passed
@mrdoob mrdoob deleted the htmltexture-improvements branch April 16, 2026 15:24
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.

1 participant