Procházet zdrojové kódy

Merge pull request #15886 from Itee/buffergeometryutil-fix

BufferGeometryUtil: Replace for-of loop by a for loop
Mr.doob před 6 roky
rodič
revize
c71cdb3461
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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' ];
 
 		// initialize the arrays
-		for ( var name of attributeNames ) {
+		for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {
+			var name = attributeNames[ i ];
 
 			attrArrays[ name ] = [];