|
@@ -149,13 +149,17 @@ export class LensFlareSystemSceneComponent implements ISceneSerializableComponen
|
|
/**
|
|
/**
|
|
* Removes all the elements in the container from the scene
|
|
* Removes all the elements in the container from the scene
|
|
* @param container contains the elements to remove
|
|
* @param container contains the elements to remove
|
|
|
|
+ * @param dispose if the removed element should be disposed (default: false)
|
|
*/
|
|
*/
|
|
- public removeFromContainer(container: AbstractScene): void {
|
|
|
|
|
|
+ public removeFromContainer(container: AbstractScene, dispose?: boolean): void {
|
|
if (!container.lensFlareSystems) {
|
|
if (!container.lensFlareSystems) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
container.lensFlareSystems.forEach((o) => {
|
|
container.lensFlareSystems.forEach((o) => {
|
|
this.scene.removeLensFlareSystem(o);
|
|
this.scene.removeLensFlareSystem(o);
|
|
|
|
+ if(dispose){
|
|
|
|
+ o.dispose();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|