Skip to content

Conversation

@marcofugaro
Copy link
Contributor

Related issue: #19118 #22031

Description

This PR adds parseAsync to GLTFExporter to make it conform to other loaders/classes.

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a suggestion to handle at errors where possible. Won't catch everything since parse doesn't have an error handler itself, but should catch most issues.

@marcofugaro
Copy link
Contributor Author

Thanks for the suggestion @donmccurdy, we should add an onError parameter to parse() and catch the errors in the promise as well.

But this is the job for another PR. Your solution looks good for now.

@mrdoob mrdoob added this to the r135 milestone Oct 30, 2021
@mrdoob mrdoob merged commit b884bfe into mrdoob:dev Oct 30, 2021
@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2021

Thanks!

@donmccurdy
Copy link
Collaborator

... we should add an onError parameter to parse() and catch the errors in the promise as well.
But this is the job for another PR. Your solution looks good for now.

Agreed! I think we could make that backwards-compatible by detecting when options are given as the 2nd argument instead and just printing a warning.

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.

4 participants