Skip to content

GLTFExporter output file size regression #23995

@elalish

Description

@elalish

Describe the bug

Importing a glTF with jpeg textures and reexporting it is now causing a major bloat in file size compared to the original (~2.5x for DamagedHelmet). I'm pretty sure this is due to #23857, as we're now using the convertToBlob method of OffscreenCanvas instead of the toBlob method of Canvas. This feels like it might also be a Chrome bug? It is correctly outputting JPEGs of the proper dimensions, they are just much larger, like the quality setting is defaulting to something a lot higher than the usual 0.85. @donmccurdy @robertlong Thoughts? Our regression tests caught this in <model-viewer> when I tried to upgrade.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the model-viewer editor and select DamagedHelmet
  2. Click on "Download Scene"
  3. Open the zip and inspect DamagedHelmet.glb - note it is now 9.3MB

Expected behavior

The GLB should be ~4MB, similar to the 3.8MB original

Screenshots

If applicable, add screenshots to help explain your problem (drag and drop the image).

Platform:

  • Device: Desktop
  • OS: MacOS
  • Browser: Chrome
  • Three.js version: r140

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions