Augmented snowstorm

Upload your latest creations here, and download the latest creations here! This is where the creative tool shop resides.
Post Reply
Alyxes
Posts: 2
Joined: Tue Jul 16, 2019 8:26 pm

Augmented snowstorm

Post by Alyxes » Wed Jul 17, 2019 12:21 am

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. :)
Attachments
yoss_candyspray.js
(6.39 KiB) Downloaded 419 times

Dr. Madskull
Posts: 20
Joined: Tue Jun 04, 2019 11:35 am

Re: Augmented snowstorm

Post by Dr. Madskull » Wed Jul 17, 2019 4:15 pm

Me too, I got the rotation to work by rotating around the center, like this:

Code: Select all

    ctx.translate(ScreenWidth / 2, ScreenHeight / 2);
    ctx.rotate(degrees * Math.PI / 180);
    ctx.translate(-ScreenWidth / 2, -ScreenHeight / 2);
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.
Attachments
yoss_colorstorm.js
(6.42 KiB) Downloaded 437 times

Post Reply