@onerjs/core 8.34.7 → 8.34.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -388,7 +388,7 @@ export class ThinParticleSystem extends BaseParticleSystem {
388
388
  this._scene = sceneOrEngine || EngineStore.LastCreatedScene;
389
389
  this._engine = this._scene.getEngine();
390
390
  this.uniqueId = this._scene.getUniqueId();
391
- this._scene.particleSystems.push(this);
391
+ this._scene.addParticleSystem(this);
392
392
  }
393
393
  else {
394
394
  this._engine = sceneOrEngine;
@@ -1891,11 +1891,7 @@ export class ThinParticleSystem extends BaseParticleSystem {
1891
1891
  }
1892
1892
  // Remove from scene
1893
1893
  if (this._scene) {
1894
- const index = this._scene.particleSystems.indexOf(this);
1895
- if (index > -1) {
1896
- this._scene.particleSystems.splice(index, 1);
1897
- }
1898
- this._scene._activeParticleSystems.dispose();
1894
+ this._scene.removeParticleSystem(this);
1899
1895
  }
1900
1896
  // Callback
1901
1897
  this.onDisposeObservable.notifyObservers(this);