Prechádzať zdrojové kódy

Merge pull request #15886 from Itee/buffergeometryutil-fix

BufferGeometryUtil: Replace for-of loop by a for loop
Mr.doob 6 rokov pred
rodič
commit
c71cdb3461
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      examples/js/utils/BufferGeometryUtils.js

+ 2 - 1
examples/js/utils/BufferGeometryUtils.js

@@ -498,7 +498,8 @@ THREE.BufferGeometryUtils = {
 		var getters = [ 'getX', 'getY', 'getZ', 'getW' ];
 		var getters = [ 'getX', 'getY', 'getZ', 'getW' ];
 
 
 		// initialize the arrays
 		// initialize the arrays
-		for ( var name of attributeNames ) {
+		for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {
+			var name = attributeNames[ i ];
 
 
 			attrArrays[ name ] = [];
 			attrArrays[ name ] = [];