react-particles-js
react-particles-js copied to clipboard
Possible to change parameters without a full re-render?
I am using this library to create a dynamic background, and am trying to get it so the color of the particles shifts every few seconds. Currently it seems changing the parameters on the <Particles />
component causes a full re-render and causes the particles to appear to "jump".
I've created a sandbox demo that shows that here
Would it be reasonable to have certain parameters (like color) not cause a full re-render?
I've poked through the code a bit, but was curious if you had an opinion @Wufe.
Unfortunately it is not possible to change parameters without a full re-render.
A while ago I was thinking about implementing a more complex way of defining particles to be able to add, remove and change particles at runtime without causing a full reload.
This idea did require a lot of work, and I made an experimental branch and a little website showing this ( https://www.timeon.space/ ).
However this experimental branch is not usable: it was a draft.
If taken seriously, this idea would require tackling more challenges, like defining the entity "particle system" which should be capable of orchestrating single particles.
Trying to change the behavior of the library for certain parameters only, seems to me like exception-driven development.
Let me know what you think about it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@Wufe Do you have particle config for this effect (https://www.timeon.space/)?
@rainstormza the website timeon.space is not powered by the current version of react-particles-js. It is an experimental branch you can find it here but it is not usable, it was just a prototype.