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
LOD copy(Object3D source, [bool? recursive = true]){
super.copy(source, false);
if(source is LOD){
final levels = source.levels;
for (int i = 0, l = levels.length; i < l; i ++ ) {
final level = levels[i];
addLevel(level.object?.clone(), level.distance );
}
}
autoUpdate = source.autoUpdate;
return this;
}