Skip to content

HTMLTexture: Support new WICG HTML-in-Canvas API signatures#33788

Merged
mrdoob merged 1 commit into
mrdoob:devfrom
ewewraw:html-in-canvas
Jun 12, 2026
Merged

HTMLTexture: Support new WICG HTML-in-Canvas API signatures#33788
mrdoob merged 1 commit into
mrdoob:devfrom
ewewraw:html-in-canvas

Conversation

@ewewraw

@ewewraw ewewraw commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

HTMLTexture: Support new WICG HTML-in-Canvas API signatures introduced in Chromium 150+

This change is necessary to align with the new standard signatures introduced in Chromium 150+ (see in WICG html-in-canvas PR #128).
To maintain backward compatibility with older browser versions during transition:

  • WebGL: Check the number of argument with texElementImage2D.length. If 3, it use the new streamlined signature (gl.TEXTURE_2D, gl.RGBA8, element). Otherwise, fall back to the old 6-argument signature.
  • WebGPU: Check the number of argument with copyElementImageToTexture.length. If 2, it group inputs into the new source and destination dictionaries. Otherwise, fall back to the old 4-argument signature.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.5
86.83
365.58
86.85
+83 B
+22 B
WebGPU 664.54
184.14
664.77
184.19
+225 B
+57 B
WebGPU Nodes 662.58
183.83
662.81
183.89
+225 B
+55 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 507.46
123.35
507.54
123.38
+83 B
+24 B
WebGPU 744.45
200.46
744.68
200.52
+225 B
+58 B
WebGPU Nodes 694.77
188.06
694.99
188.12
+225 B
+59 B

@mrdoob mrdoob added this to the r185 milestone Jun 12, 2026
@mrdoob mrdoob merged commit bb74f20 into mrdoob:dev Jun 12, 2026
10 checks passed
@mrdoob

mrdoob commented Jun 13, 2026

Copy link
Copy Markdown
Owner

ff95cea

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