Skip to content

Small JS demo with some cool raining effect that can work with any background image.

License

Notifications You must be signed in to change notification settings

penance316/pixel-rain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixel Rain 👾

A small demo javascript experiment which shows falling pixels with their speed mapped to the original images brightness.

We split the image into coloured RGBA pixels and use these values to calculate a human percieved lightness value which is then used to adjust the speed of a travelling pixel.

Getting started

To run this just clone the project and open the index.html file.

TODO

Some thoughts for the future 🤔

  • Add some buttons to show different effects (there are some very interesting changing when tweaking the "magic" numbers).
  • Need to tweak the logic so it can work with any image. (transparent images cause issues.)
  • Ability to upload a new image.

About

Small JS demo with some cool raining effect that can work with any background image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published