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

GLTFExporter: Better error handling when using invalid image data. #27700

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 7, 2024

Fixed #26992.

Description

Makes processImage() a bit more robust by improving the error handling when invalid image types are used.

@Mugen87 Mugen87 added this to the r162 milestone Feb 7, 2024
@Mugen87 Mugen87 merged commit 76bff1e into mrdoob:dev Feb 7, 2024
11 checks passed
@strunkie30
Copy link
Contributor

strunkie30 commented Mar 5, 2024

I'm using the CanvasTexture with an OffscreenCanvas image, and it works like a charm. However, this PR breaks the GLTF export because OffscreenCanvas isn't listed as a valid image source.

Adding this fix would resolve the issue for me:

( typeof OffscreenCanvas !== 'undefined' && image instanceof OffscreenCanvas )

I hope this change can be implemented :)

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Mar 5, 2024

Yes, this looks food. Are you interested in making a PR?

@strunkie30
Copy link
Contributor

I will try, it would be my first PR ever :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants