I thought there was too little colors in the snowstorm.js, so I've tampered a bit with it.
Here's the result.
If anyone figures out how to center the rotation successfully in this js I'd like to see it. I did a different effect instead which works pretty well.
Hoping somebody will have fun with this one.
Augmented snowstorm
Augmented snowstorm
- Attachments
-
- yoss_candyspray.js
- (6.39 KiB) Downloaded 419 times
-
- Posts: 20
- Joined: Tue Jun 04, 2019 11:35 am
Re: Augmented snowstorm
Me too, I got the rotation to work by rotating around the center, like this:
Frame by frame it rotates a tiny bit, smoothing when zoomin up, creating a pretty neat effect!
The variable degrees are oscillating between -10 to +10 adding to the effect.
Code: Select all
ctx.translate(ScreenWidth / 2, ScreenHeight / 2);
ctx.rotate(degrees * Math.PI / 180);
ctx.translate(-ScreenWidth / 2, -ScreenHeight / 2);
The variable degrees are oscillating between -10 to +10 adding to the effect.
- Attachments
-
- yoss_colorstorm.js
- (6.42 KiB) Downloaded 437 times