Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to change parameters without a full re-render? #58

Open
ClayBenson94 opened this issue Sep 30, 2018 · 4 comments
Open

Possible to change parameters without a full re-render? #58

ClayBenson94 opened this issue Sep 30, 2018 · 4 comments
Labels

Comments

@ClayBenson94
Copy link

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.

@wufe
Copy link
Owner

wufe commented Oct 7, 2018

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.

@stale
Copy link

stale bot commented Nov 16, 2018

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.

@stale stale bot added the stale label Nov 16, 2018
@rainstormza
Copy link

@wufe Do you have particle config for this effect (https://www.timeon.space/)?

@stale stale bot removed the stale label Nov 17, 2018
@wufe
Copy link
Owner

wufe commented Nov 17, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants