All examples · Post-processing

Shockwave

What this example shows

shockwave() is a ring that pushes the picture outwards as it passes: an explosion, a heavy landing, a spell. It does not grow on its own: radius is where the ring is now, and the game moves it. That keeps one effect good for any number of blasts, at any speed and with any easing.

center is where it starts, from [0, 0] (top left) to [1, 1]; radius, amplitude and wavelength are in game pixels; brightness lights the crest a little.

Click anywhere to start a blast there, ↑ ↓ for its strength and Space to switch it off.

Starting