Skip to content

ImageUtils: Add optional type parameter to getDataURL().#30751

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev1
Mar 18, 2025
Merged

ImageUtils: Add optional type parameter to getDataURL().#30751
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev1

Conversation

@Mugen87

@Mugen87 Mugen87 commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

Related issue: -

Description

The PR adds an optional type parameter to ImageUtils.getDataURL() so it's possible to request other image formats than image/png.

Also uses ImageUtils.getDataURL() in GLTFExporter now.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.02
78.26
336.02
78.26
+0 B
+0 B
WebGPU 525.13
146.26
525.13
146.26
+0 B
+0 B
WebGPU Nodes 524.59
146.16
524.59
146.16
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.06
112.14
465.07
112.14
+4 B
+4 B
WebGPU 597.9
162.52
597.91
162.53
+4 B
+8 B
WebGPU Nodes 553.03
152
553.03
152.01
+4 B
+7 B

@Mugen87 Mugen87 added this to the r175 milestone Mar 18, 2025
@Mugen87 Mugen87 merged commit e6343e8 into mrdoob:dev Mar 18, 2025
@Mugen87 Mugen87 changed the title ImageUtils: Add optional type paramter to getDataURL(). ImageUtils: Add optional type parameter to getDataURL(). Mar 19, 2025
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