diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js index 423bbc5d2a5004878741d5843680bd5246c8dc64..75a47dc6c6edf1019a950df18e5f035506d9555c 100644 --- a/src/core/BufferGeometry.js +++ b/src/core/BufferGeometry.js @@ -1090,8 +1090,22 @@ THREE.BufferGeometry.prototype = { data.type = this.type; data.uuid = this.uuid; if ( this.name !== '' ) data.name = this.name; - data.data = {}; - data.data.attributes = {}; + + if ( this.parameters !== undefined ) { + + var parameters = this.parameters; + + for ( var key in parameters ) { + + if ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ]; + + } + + return data; + + } + + data.data = { attributes: {} }; var attributes = this.attributes; var offsets = this.offsets;