Explorar o código

BufferGeometry: Clean up.

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
3dc2476edc
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/core/BufferGeometry.js

+ 2 - 3
src/core/BufferGeometry.js

@@ -847,10 +847,9 @@ THREE.BufferGeometry.prototype = {
 
 			var array2 = new array.constructor( indices.length * itemSize );
 
-			var index = 0;
-			var index2 = 0;
+			var index = 0, index2 = 0;
 
-			for ( var i = 0; i < indices.length; i ++ ) {
+			for ( var i = 0, l = indices.length; i < l; i ++ ) {
 
 				index = indices[ i ] * itemSize;
 

粤ICP备19079148号