Explorar o código

BufferGeometryUtil: Replace for-of loop by a for loop

Tristan VALCKE %!s(int64=6) %!d(string=hai) anos
pai
achega
bdbea51b28
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/js/utils/BufferGeometryUtils.js

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

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