|
@@ -1063,12 +1063,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
|
|
|
|
|
|
var attribute = attributes[ key ];
|
|
|
|
|
|
- var attributeData = {
|
|
|
- itemSize: attribute.itemSize,
|
|
|
- type: attribute.array.constructor.name,
|
|
|
- array: Array.prototype.slice.call( attribute.array ),
|
|
|
- normalized: attribute.normalized
|
|
|
- };
|
|
|
+ var attributeData = attribute.toJSON();
|
|
|
|
|
|
if ( attribute.name !== '' ) attributeData.name = attribute.name;
|
|
|
|
|
@@ -1089,12 +1084,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
|
|
|
|
|
|
var attribute = attributeArray[ i ];
|
|
|
|
|
|
- var attributeData = {
|
|
|
- itemSize: attribute.itemSize,
|
|
|
- type: attribute.array.constructor.name,
|
|
|
- array: Array.prototype.slice.call( attribute.array ),
|
|
|
- normalized: attribute.normalized
|
|
|
- };
|
|
|
+ var attributeData = attribute.toJSON();
|
|
|
|
|
|
if ( attribute.name !== '' ) attributeData.name = attribute.name;
|
|
|
|