Sfoglia il codice sorgente

Merge branches 'dev' and 'dev' of https://github.com/mrdoob/three.js into dev

Mr.doob 8 anni fa
parent
commit
77a92108b8

+ 2 - 2
src/geometries/ParametricBufferGeometry.js

@@ -1,5 +1,5 @@
 import { BufferGeometry } from '../core/BufferGeometry';
-import { Float32Attribute, Uint16Attribute } from '../core/BufferAttribute';
+import { Float32Attribute, Uint16Attribute, Uint32Attribute } from '../core/BufferAttribute';
 
 /**
  * @author Mugen87 / https://github.com/Mugen87
@@ -72,7 +72,7 @@ function ParametricBufferGeometry( func, slices, stacks ) {
 
 	// build geometry
 
-	this.setIndex( Uint16Attribute( indices, 1 ) );
+	this.setIndex( ( indices.length > 65535 ? Uint32Attribute : Uint16Attribute )( indices, 1 ) );
 	this.addAttribute( 'position', Float32Attribute( vertices, 3 ) );
 	this.addAttribute( 'uv', Float32Attribute( uvs, 2 ) );
 

+ 1 - 1
src/geometries/PolyhedronBufferGeometry.js

@@ -1,5 +1,5 @@
 import { BufferGeometry } from '../core/BufferGeometry';
-import { Uint16Attribute, Uint32Attribute, Float32Attribute } from '../core/BufferAttribute';
+import { Float32Attribute } from '../core/BufferAttribute';
 import { Vector3 } from '../math/Vector3';
 import { Vector2 } from '../math/Vector2';
 import { Sphere } from '../math/Sphere';