/PlasmaFractal

Old-school plasma fractal with palette animation effect

Primary LanguageJavaScriptOtherNOASSERTION

PlasmaFractal

Old-school plasma fractal with palette animation effect running in a browser. Pure JavaScript, no WebGL.

Basic algorithm:

  • Grayscale image is generated once using Perlin Noise algorithm (multiple iterations per pixel to produce fractal).
  • For each frame:
    • Palette is animated by rotating the palette entries and by blending between random colors.
    • Grayscale image is mapped to RGB by using pixel values as palette indices.
  • Single-click to randomize fractal.
  • Double-click to toggle fullscreen.
  • Press the "gear" button in the top-left corner to adjust plasma parameters and palette.
  • Tested with Chrome 76.0.3809.100 and Firefox 68.0.2 (seems to run smoother in Chrome).

Experimental Version

  • PlasmaFractal2
    • This is a playground for doing great stuff using new APIs that may have less browser support (yet).

Credits

This project uses the following open source libraries. Each library comes with its own license terms, which can be found in the source code included in this project.

Special thanks to

  • stackoverflow
    • So many helpful answers, too many to credit them individually. Kudos to this awesome community!