Explorar el Código

PlaneGeometry: Uint32Array support.

Mr.doob hace 11 años
padre
commit
1fa3bdef51
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/extras/geometries/PlaneGeometry.js

+ 1 - 1
src/extras/geometries/PlaneGeometry.js

@@ -56,7 +56,7 @@ THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments )
 
 	offset = 0;
 
-	var indices = new Uint16Array( gridX * gridY * 6 );
+	var indices = new ( vertices.length > 65535 ? Uint32Array : Uint16Array )( gridX * gridY * 6 );
 
 	for ( var iy = 0; iy < gridY; iy ++ ) {