Skip to content

Conversation

@ilex0208
Copy link
Contributor

fix some FBX models cannot display colors properly.

fix some FBX models cannot display colors properly.
parameters.color = new THREE.Color().fromArray( materialNode.Diffuse.value );

} else if ( materialNode.DiffuseColor && materialNode.DiffuseColor.type === 'Color' ) {
} else if ( (materialNode.DiffuseColor && (materialNode.DiffuseColor.type === 'Color' || materialNode.DiffuseColor.type === 'ColorRGB') ) {
Copy link
Owner

Choose a reason for hiding this comment

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

I think you have one parenthesis too many. Shouldn't it be like this?

} else if ( materialNode.DiffuseColor && ( materialNode.DiffuseColor.type === 'Color' || materialNode.DiffuseColor.type === 'ColorRGB' ) ) {

@mrdoob mrdoob added this to the r123 milestone Nov 12, 2020
Remove the extra brackets
@mrdoob mrdoob changed the title Update FBXLoader.js FBXLoader: Support ColorRGB DiffuseColor types. Nov 13, 2020
@mrdoob mrdoob merged commit dbeaa93 into mrdoob:dev Nov 13, 2020
@mrdoob
Copy link
Owner

mrdoob commented Nov 13, 2020

Thanks!

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