Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 7, 2023

Related issue: #27100

Description

When directly calling forceContextLoss() after the decompression, the renderer's canvas gets invalid before the export happens. Hence, decompress() creates a new canvas now and copies the contents from the renderer's DOM element. This is the same way the editor handles compressed textures in its renderToCanvas() helper function.

@Dadibom
Copy link
Contributor

Dadibom commented Nov 7, 2023

👍

Are these changes published somewhere so I can test?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 7, 2023

You can use rawgit for testing. The dev URLs are:

Export: https://rawcdn.githack.com/mrdoob/three.js/dev/examples/misc_exporter_gltf.html
Import: https://rawcdn.githack.com/mrdoob/three.js/dev/editor/index.html

Be aware that sometimes old code might be cached when using rawgit. If you want to be on the safe side, use commit hashes inside the URLs.

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