Skip to content

Commit f2e0aed

Browse files
authored
FBXLoader: Fix vertex color check. (#31420)
1 parent 1d91bc3 commit f2e0aed

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

examples/jsm/loaders/FBXLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,7 @@ class GeometryParser {
17841784
geoInfo.vertexPositions = ( geoNode.Vertices !== undefined ) ? geoNode.Vertices.a : [];
17851785
geoInfo.vertexIndices = ( geoNode.PolygonVertexIndex !== undefined ) ? geoNode.PolygonVertexIndex.a : [];
17861786

1787-
if ( geoNode.LayerElementColor && geoNode.LayerElementColor.Color ) {
1787+
if ( geoNode.LayerElementColor && geoNode.LayerElementColor[ 0 ].Colors ) {
17881788

17891789
geoInfo.color = this.parseVertexColors( geoNode.LayerElementColor[ 0 ] );
17901790

examples/models/fbx/vCube.fbx

12.2 KB
Binary file not shown.

examples/webgl_loader_fbx.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
'Samba Dancing',
4848
'morph_test',
4949
'monkey',
50-
'monkey_embedded_texture'
50+
'monkey_embedded_texture',
51+
'vCube',
5152
];
5253

5354

0 commit comments

Comments
 (0)