Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Mar 18, 2025

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.

Copy link

📦 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
12 checks passed
@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