|
@@ -18,6 +18,8 @@ class Scene extends Object3D {
|
|
|
this.backgroundBlurriness = 0;
|
|
|
this.backgroundIntensity = 1;
|
|
|
this.backgroundRotation = new Euler();
|
|
|
+
|
|
|
+ this.environmentIntensity = 1;
|
|
|
this.environmentRotation = new Euler();
|
|
|
|
|
|
this.overrideMaterial = null;
|
|
@@ -41,6 +43,8 @@ class Scene extends Object3D {
|
|
|
this.backgroundBlurriness = source.backgroundBlurriness;
|
|
|
this.backgroundIntensity = source.backgroundIntensity;
|
|
|
this.backgroundRotation.copy( source.backgroundRotation );
|
|
|
+
|
|
|
+ this.environmentIntensity = source.environmentIntensity;
|
|
|
this.environmentRotation.copy( source.environmentRotation );
|
|
|
|
|
|
if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();
|
|
@@ -56,10 +60,12 @@ class Scene extends Object3D {
|
|
|
const data = super.toJSON( meta );
|
|
|
|
|
|
if ( this.fog !== null ) data.object.fog = this.fog.toJSON();
|
|
|
+
|
|
|
if ( this.backgroundBlurriness > 0 ) data.object.backgroundBlurriness = this.backgroundBlurriness;
|
|
|
if ( this.backgroundIntensity !== 1 ) data.object.backgroundIntensity = this.backgroundIntensity;
|
|
|
-
|
|
|
data.object.backgroundRotation = this.backgroundRotation.toArray();
|
|
|
+
|
|
|
+ if ( this.environmentIntensity !== 1 ) data.object.environmentIntensity = this.environmentIntensity;
|
|
|
data.object.environmentRotation = this.environmentRotation.toArray();
|
|
|
|
|
|
return data;
|