erikwatson / snowfall.js

Stay cool ☃️
https://erikwatson.github.io/snowfall.js/
MIT License
4 stars 2 forks source link

Change how the wiggling works #30

Closed erikwatson closed 2 months ago

erikwatson commented 2 years ago

So it looks pretty good right now when it's used like a snow effect, but the thing is when you change the gravity so it pulls the particles to the left/right instead of up/down then it looks wrong, because the snowflakes are kind of falling up and down given that "down" is now --> that way.

I need to angle the movement based on the direction they're travelling in I think. The particles "horizontal plane" needs to be perpendicular to the direction of travel.

Opening this up might give us more things to play with too, like we could reduce and amplify the wiggle effect based on the movement? Seems fun, might explode.