Hi, I want to create fireworks using Babylon SPS, but my code isn’t working correctly. I looked at the documentation and found the sps.dispose
function, but it doesn’t seem to remove anything from the scene. My expectation is that when I click the mouse, all the particle systems will be removed. However, when I check the scene object (whether I use “dispose” or not), I don’t see any data in the particleSystems
array. How can I resolve this? Here is my reproduction link:
You should add color to the scene before clicking the mouse
https://codesandbox.io/p/github/ozgencDev/Fireworks-Babylon/master?import=true
As I mentioned, my expectation is to recreate the particle system on every click because the properties related to the particles change, and instead of modifying them, it feels easier to create a new system from scratch. If you have a better suggestion, I’d be happy to hear it.