scottschiller / Snowstorm

Enterprise-grade JavaScript snow effect for the internets, setting CPUs on fire worldwide every winter since 2003.
http://www.schillmania.com/projects/snowstorm/
Other
538 stars 144 forks source link

dont randomize wind at each start #9

Closed DanielRuf closed 8 years ago

DanielRuf commented 11 years ago

we dont need line #461 of https://github.com/scottschiller/Snowstorm/blob/master/snowstorm.js when we want to have the same wind parameters and use the settings of vMaxX and vMaxY so these values are not overwritten by the s.randomizeWind(); at each start

DekiGk commented 7 years ago

When I get rid of the randomizeWind function my snow doesn`t work. Have you found a way to get rid of the random wind?

DanielRuf commented 7 years ago

@DekiGk This issue is quite old and I did not use Snowstorm since then. Do you have any errors in your browser console?

scottschiller commented 7 years ago

I should make this optional, but it's easy enough to have the individual velocity-setting just return the same values.

this.setVelocities = function() {
  s.vX = storm.vMaxX;
  s.vY = storm.vMaxY;
};
DekiGk commented 7 years ago

@scottschiller Thanks for this. I will try it out. @DanielRuf no errors, just couldn`t get rid of the random wind :D