-
Notifications
You must be signed in to change notification settings - Fork 144
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
Canvas takes lots less CPU #21
Comments
Using a canvas is an interesting idea, but it seems like if you wanted to get the effect of the snow falling in front of everything, then you would have to position the canvas above every other element on the page. Then you would have to set the canvas to |
Good point! Hmmm… On Thu, Dec 3, 2015, 7:33 AM Joseph Tibbertsma [email protected]
Wout. |
Here's a polyfill for pointer-events:none On Thu, Dec 3, 2015 at 5:05 PM Wout Mertens [email protected] wrote:
Wout. |
Has anyone found a way to use this plugin with minimum impact on CPU? What can I do to reduce the CPU resources consumption? |
@DekiGk You could try using particlesJS. It uses a canvas element. It gives you a lot of control, so it would also solve #28. |
@jtibbertsma Thanks for the link. I will try it out. Maybe I can use this on the next project. :D |
I am fully late on replying to this, my apologies! I'm interested in It would be wise to revisit this and perhaps narrow the feature set a bit - i.e., assuming improved rendering, the overlay would be width/height: 100% at all times, and snow could "stick" to the bottom but would not be able to scroll the entire vertical length of the document. I just had a report of Firefox Quantum (57) showing a performance regression that appears to be from the "sticky" snow feature, which uses More thoughts here, I mulled on |
If you ever feel like a rewrite, here's one that is implemented using a canvas: http://thecodeplayer.com/walkthrough/html5-canvas-snow-effect
It uses way less CPU and is smooth on my phone. I simply create the canvas element on the fly with position absolute and it works great. Yours has more features though.
The text was updated successfully, but these errors were encountered: