copy method
recursive
-- If set to true
, descendants of the object are copied next to the existing ones.
If set to false
, descendants are left unchanged. Default is true
.
Copies the given object into this object. Note: Event listeners and user-defined callbacks (onAfterRender and onBeforeRender) are not copied.
Implementation
@override
Scene copy(Object3D source, [bool? recursive]) {
source as Scene;
super.copy(source);
if ( source.background != null ) background = source.background.clone();
if ( source.environment != null ) environment = source.environment?.clone();
if ( source.fog != null ) fog = source.fog?.clone();
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 ) overrideMaterial = source.overrideMaterial?.clone();
//autoUpdate = source.autoUpdate;
matrixAutoUpdate = source.matrixAutoUpdate;
return this;
}