Skip to content

Commit 45df862

Browse files
authored
FBXLoader: Increase sampling for nurbs geometries. (#22202)
1 parent dc5aafe commit 45df862

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

examples/jsm/loaders/FBXLoader.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class FBXTreeParser {
639639

640640
}
641641
break;
642-
642+
643643
case 'NormalMap':
644644
case 'Maya|TEX_normal_map':
645645
parameters.normalMap = scope.getTexture( textureMap, child.ID );
@@ -2295,20 +2295,9 @@ class GeometryParser {
22952295
}
22962296

22972297
const curve = new NURBSCurve( degree, knots, controlPoints, startKnot, endKnot );
2298-
const vertices = curve.getPoints( controlPoints.length * 7 );
2299-
2300-
const positions = new Float32Array( vertices.length * 3 );
2301-
2302-
vertices.forEach( function ( vertex, i ) {
2303-
2304-
vertex.toArray( positions, i * 3 );
2305-
2306-
} );
2307-
2308-
const geometry = new BufferGeometry();
2309-
geometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) );
2298+
const points = curve.getPoints( controlPoints.length * 12 );
23102299

2311-
return geometry;
2300+
return new BufferGeometry().setFromPoints( points );
23122301

23132302
}
23142303

0 commit comments

Comments
 (0)