|
@@ -34,7 +34,7 @@ function LatheGeometry( points, segments, phiStart, phiLength ) {
|
|
LatheGeometry.prototype = Object.create( Geometry.prototype );
|
|
LatheGeometry.prototype = Object.create( Geometry.prototype );
|
|
LatheGeometry.prototype.constructor = LatheGeometry;
|
|
LatheGeometry.prototype.constructor = LatheGeometry;
|
|
|
|
|
|
-import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
|
|
|
|
|
|
+import { Float32BufferAttribute } from '../core/BufferAttribute';
|
|
import { BufferGeometry } from '../core/BufferGeometry';
|
|
import { BufferGeometry } from '../core/BufferGeometry';
|
|
import { Vector3 } from '../math/Vector3';
|
|
import { Vector3 } from '../math/Vector3';
|
|
import { Vector2 } from '../math/Vector2';
|
|
import { Vector2 } from '../math/Vector2';
|
|
@@ -62,7 +62,7 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
|
|
phiLength = phiLength || Math.PI * 2;
|
|
phiLength = phiLength || Math.PI * 2;
|
|
|
|
|
|
// clamp phiLength so it's in range of [ 0, 2PI ]
|
|
// clamp phiLength so it's in range of [ 0, 2PI ]
|
|
-
|
|
|
|
|
|
+
|
|
phiLength = _Math.clamp( phiLength, 0, Math.PI * 2 );
|
|
phiLength = _Math.clamp( phiLength, 0, Math.PI * 2 );
|
|
|
|
|
|
|
|
|
|
@@ -135,7 +135,7 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
|
|
|
|
|
|
// build geometry
|
|
// build geometry
|
|
|
|
|
|
- this.setIndex( new ( Math.max.apply( Math, indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
|
|
|
|
|
|
+ this.setIndexArray( indices );
|
|
this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
|
|
this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
|
|
this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
|
|
this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
|
|
|
|
|