|
@@ -141,6 +141,7 @@ THREE.Material.prototype = {
|
|
|
// standard Material serialization
|
|
|
data.uuid = this.uuid;
|
|
|
data.type = this.type;
|
|
|
+
|
|
|
if ( this.name !== '' ) data.name = this.name;
|
|
|
|
|
|
if ( this.color instanceof THREE.Color ) data.color = this.color.getHex();
|
|
@@ -192,8 +193,9 @@ THREE.Material.prototype = {
|
|
|
|
|
|
if ( this.vertexColors !== undefined && this.vertexColors !== THREE.NoColors ) data.vertexColors = this.vertexColors;
|
|
|
if ( this.shading !== undefined && this.shading !== THREE.SmoothShading ) data.shading = this.shading;
|
|
|
- if ( this.blending !== undefined && this.blending !== THREE.NormalBlending ) data.blending = this.blending;
|
|
|
- if ( this.side !== undefined && this.side !== THREE.FrontSide ) data.side = this.side;
|
|
|
+ if ( this.blending !== THREE.NormalBlending ) data.blending = this.blending;
|
|
|
+
|
|
|
+ if ( this.side !== THREE.FrontSide ) data.side = this.side;
|
|
|
|
|
|
if ( this.opacity < 1 ) data.opacity = this.opacity;
|
|
|
if ( this.transparent === true ) data.transparent = this.transparent;
|