Parcourir la source

Merge pull request #15886 from Itee/buffergeometryutil-fix

BufferGeometryUtil: Replace for-of loop by a for loop
Mr.doob il y a 6 ans
Parent
commit
c71cdb3461
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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 ] = [];