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

DRACOLoader: Fixed "onError doesn't propagate" when parsing file #28383

Merged
merged 1 commit into from
May 14, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented May 14, 2024

Currently the onError doesn't propagate in here: (missing the 6th argument)

parse( buffer, onLoad, onError = ()=>{} ) {
this.decodeDracoFile( buffer, onLoad, null, null, SRGBColorSpace ).catch( onError );
}

while the onError is consumed here, see L101

decodeDracoFile( buffer, callback, attributeIDs, attributeTypes, vertexColorSpace = LinearSRGBColorSpace, onError = () => {} ) {
const taskConfig = {
attributeIDs: attributeIDs || this.defaultAttributeIDs,
attributeTypes: attributeTypes || this.defaultAttributeTypes,
useUniqueIDs: !! attributeIDs,
vertexColorSpace: vertexColorSpace,
};
return this.decodeGeometry( buffer, taskConfig ).then( callback ).catch( onError );
}

This PR fixed that by adding onError to the 6th argument of decodeDracoFile()

@Mugen87 Mugen87 added this to the r165 milestone May 14, 2024
@Mugen87 Mugen87 merged commit 362e4dc into mrdoob:dev May 14, 2024
11 checks passed
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.

None yet

2 participants