Rain
tuffstuff2k7.github.io/Rain
Rain is my first serious project, that I actually spent time on polishing up. It is heavily inspired by "Purple Rain in Processing" by Daniel Shiffman (see below).
It uses javascript with a library called p5. I have also used p5.play for sprite implementation.
The code creates 1000 raindrops (objects) and draws lines at those points. It updates the position and draws every frame. It also generates lightning and stores the positions in an array so as to display it for short burst of time with a rapidly changing stroke weight. This produces a "sparkle" effect.
Controls:
- press spacebar for fullscreen
- optional: play some relaxing lofi music in the background
Credits:
Daniel Shiffman - Purple Rain in Processing: https://youtu.be/KkyIDI6rQJI
The Coding Train Website - https://thecodingtrain.com/CodingChallenges/004-purplerain.html
Generative Lightning by dlatolley - https://editor.p5js.org/dlatolley/sketches/Bu3JRNqgF
p5.js - https://p5js.org/
p5.play - https://molleindustria.github.io/p5.play/
Man with umbrella - https://pngtree.com/freepng/a-handsome-man-with-an-umbrella_4495896.html