Skip to content

Commit ff9aee8

Browse files
committed
BufferGeometryExporter: Convert TypeArray to Array in a less clever (thus safer) way.
1 parent 21a9fbb commit ff9aee8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/js/exporters/BufferGeometryExporter.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,18 @@ THREE.BufferGeometryExporter.prototype = {
2828

2929
var attribute = attributes[ key ];
3030

31+
var array = [], typeArray = attribute.array;
32+
33+
for ( var i = 0, l = typeArray.length; i < l; i ++ ) {
34+
35+
array[ i ] = typeArray[ i ];
36+
37+
}
38+
3139
output.attributes[ key ] = {
3240
itemSize: attribute.itemSize,
3341
type: attribute.array.constructor.name,
34-
array: Array.apply( [], attribute.array )
42+
array: array
3543
}
3644

3745
}

0 commit comments

Comments
 (0)