I think there is a problem with SPS when it’s expandable and we have some invisible particles on it.
Here are the steps:
Create a SPS
Add a particle, and set isVisible = false on it
Build the SPS
Add another particle
Build the SPS
It is expected for the SPS to show just one particle (the visible one), but instead, it is showing the second particle, and another particle that appears to be the original mesh shape of the first particle.
It’s becase I’m using an expandable SPS, so when new particles are added/removed after the first build, it’s required do buildMesh() again for the SPS to draw the new particles.
In the example in the playground it’s ok to just call buildMesh() just once at the end, but in my real app, the particles are added/removed/hidden at different moments while the user interacts with the scene, so I need to rebuild the mesh after those interactions.