|
@@ -626,7 +626,8 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
|
|
geometries: {},
|
|
geometries: {},
|
|
materials: {},
|
|
materials: {},
|
|
textures: {},
|
|
textures: {},
|
|
- images: {}
|
|
|
|
|
|
+ images: {},
|
|
|
|
+ shapes: {}
|
|
};
|
|
};
|
|
|
|
|
|
output.metadata = {
|
|
output.metadata = {
|
|
@@ -670,6 +671,31 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
|
|
|
|
|
|
object.geometry = serialize( meta.geometries, this.geometry );
|
|
object.geometry = serialize( meta.geometries, this.geometry );
|
|
|
|
|
|
|
|
+ var parameters = this.geometry.parameters;
|
|
|
|
+
|
|
|
|
+ if ( parameters !== undefined && parameters.shapes !== undefined ) {
|
|
|
|
+
|
|
|
|
+ var shapes = parameters.shapes;
|
|
|
|
+ var uuids = [];
|
|
|
|
+
|
|
|
|
+ if ( Array.isArray( shapes ) ) {
|
|
|
|
+
|
|
|
|
+ for ( var i = 0, l = shapes.length; i < l; i ++ ) {
|
|
|
|
+
|
|
|
|
+ var shape = shapes[ i ];
|
|
|
|
+
|
|
|
|
+ serialize( meta.shapes, shape );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ serialize( meta.shapes, shapes );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
if ( this.material !== undefined ) {
|
|
if ( this.material !== undefined ) {
|
|
@@ -714,11 +740,13 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
|
|
var materials = extractFromCache( meta.materials );
|
|
var materials = extractFromCache( meta.materials );
|
|
var textures = extractFromCache( meta.textures );
|
|
var textures = extractFromCache( meta.textures );
|
|
var images = extractFromCache( meta.images );
|
|
var images = extractFromCache( meta.images );
|
|
|
|
+ var shapes = extractFromCache( meta.shapes );
|
|
|
|
|
|
if ( geometries.length > 0 ) output.geometries = geometries;
|
|
if ( geometries.length > 0 ) output.geometries = geometries;
|
|
if ( materials.length > 0 ) output.materials = materials;
|
|
if ( materials.length > 0 ) output.materials = materials;
|
|
if ( textures.length > 0 ) output.textures = textures;
|
|
if ( textures.length > 0 ) output.textures = textures;
|
|
if ( images.length > 0 ) output.images = images;
|
|
if ( images.length > 0 ) output.images = images;
|
|
|
|
+ if ( shapes.length > 0 ) output.shapes = shapes;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|