erikwatson / snowfall.js

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

Vary wind direction over time #38

Closed erikwatson closed 2 months ago

erikwatson commented 2 months ago

The direction that the wind is blowing could vary over time. I think it would be weird if it just randomly switched from left to right all the time, but we could make it so that the chances of it switching side are low, so that it sticks to that side for a reasonable length of time. We might also want to include a minimum time between switches, because if there's a change it'll happen too frequently, then it will happen too frequently.

erikwatson commented 2 months ago

This is only accessible when we have gusts enabled at the moment. It gets triggered when the gust stops. I might change this in the future, but it's quite nice as it is.

There's a new config property { wind: { out: { changeChance: 0.75 } } } that changes the chance that the wind changes direction when the gust stops. 0.0 is never, 1.0 is always.