erikwatson / snowfall.js

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

Improve the edge detection and flake placement #36

Closed erikwatson closed 2 months ago

erikwatson commented 2 months ago

The snowflakes wrap around to the other side of the screen when they reach the edge. This is good. The problem is that they are moved when half of the snowflake is still on screen, and they're placed on the other side with half of the snowflake already showing.

It's not very noticeable if you're not paying close attention, but when you do notice it it's really annoying.

Fix it vertical and horizontal.