|
@@ -46,6 +46,8 @@ function Geometry() {
|
|
|
this.boundingBox = null;
|
|
|
this.boundingSphere = null;
|
|
|
|
|
|
+ this.userData = {};
|
|
|
+
|
|
|
// update flags
|
|
|
|
|
|
this.elementsNeedUpdate = false;
|
|
@@ -987,6 +989,7 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
data.uuid = this.uuid;
|
|
|
data.type = this.type;
|
|
|
if ( this.name !== '' ) data.name = this.name;
|
|
|
+ if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;
|
|
|
|
|
|
if ( this.parameters !== undefined ) {
|
|
|
|
|
@@ -1415,6 +1418,10 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // user data
|
|
|
+
|
|
|
+ this.userData = source.userData;
|
|
|
+
|
|
|
// update flags
|
|
|
|
|
|
this.elementsNeedUpdate = source.elementsNeedUpdate;
|