Sfoglia il codice sorgente

BufferGeometry: Clean up.

Mr.doob 10 anni fa
parent
commit
3dc2476edc
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  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号