Skip to content

penance316/pixel-rain

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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