rapid1337.com

Plasma

2026-06-25 · [ code ] · by staff

The classic demoscene plasma — four sine fields summed into a palette.

<-- A 100-Line Static Site Generator | [ Code ]

[ read in diskmag ]


The oldest trick in the book and still one of the prettiest. Plasma sums a few sine waves over the x/y coordinates (and time), then maps the result through a cycling colour palette. No textures, no shaders — just Math.sin and a putImageData.

The live version above runs entirely in a sandboxed <iframe>; the source is a single self-contained HTML file in assets/effects/.

#canvas #demoscene


<-- A 100-Line Static Site Generator | [ Code ] | Starfield -->