loktar00 / JQuery-Snowfall

Makes it snow on any web page or specific element.
http://loktar00.github.io/JQuery-Snowfall/
712 stars 221 forks source link

Add fps setting and equalize animation speed #29

Closed Silarn closed 8 years ago

Silarn commented 9 years ago

The speed of the snowflakes varies drastically between one machine/browser and the next, due to rendering speed capability. This code adds a frames per second config option and adjusts the speed of each snowflake to move the defined number of pixels at that framerate. (So if the speed is 1 and the fps is 30, each 30th of a second the snowflake will fall one pixel and make one full x-step in the 'wiggle' cosine function.)

loktar00 commented 9 years ago

Going to look into this tonight, really like this idea I recently purchased a 144hz monitor and the snow runs really fast and looks ridiculous so delta timing is something that would future proof it for sure.

Skaronator commented 8 years ago

any update on this pullrequest?

Silarn commented 8 years ago

I believe the recent pull request that uses css transforms accomplishes the same goal, unless you're trying to support IE 9 or earlier. Mind you Microsoft has officially stated they're dropping support for IE prior to 11 in 2016.

loktar00 commented 8 years ago

@Silarn is correct, closing this since it is no longer an issue.

Skaronator commented 8 years ago

alright, thanks for the quick response from both!