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

FBXLoader: Support ColorRGB DiffuseColor types. #20674

Merged
merged 3 commits into from
Nov 13, 2020
Merged

FBXLoader: Support ColorRGB DiffuseColor types. #20674

merged 3 commits into from
Nov 13, 2020

Conversation

ilex0208
Copy link
Contributor

fix some FBX models cannot display colors properly.

fix some FBX models cannot display colors properly.
@@ -495,7 +495,7 @@ THREE.FBXLoader = ( function () {

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
@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.

None yet

2 participants