Visualization
One drawing.
Instances hold their own state, so a visualisation with particles or trails keeps them between frames and clears them in reset. Create one per use rather than sharing.
draw is declared on DrawScope so a body reads like ordinary canvas code. Call it as with(visualization) { draw(state) } from inside a canvas.
Inheritors
Properties
Radians per second the surviving frame turns by. Echoes spiral instead of expanding straight.
How much the surviving frame grows before the new one is drawn on top. 1 leaves it alone.
The form on screen and the count of its changes, or null for a drawing with no named forms.
What this drawing does with the audio, in a form a test and a menu can read.
Different settings for calm and lively music. Overrides trail, feedbackZoom, feedbackSpin.
True for drawings that paint every pixel themselves, such as the full-screen shaders.
The ways this drawing can arrive. The director picks among these and what suits the music. A drawing with no trail has no echoes to inherit, so the hand-off is only on offer to drawings that feed their frames back.
Functions
How much of the trail's budget the wide copies take, for this mood.
Drawn after the echo layer, straight on the canvas, for things that must stay sharp.
How the last frame comes back this frame. The default reads the zoom, spin and drift for the mood, and settles all three towards neutral as the music goes quiet.
The feedback spin for this mood.
The feedback zoom for this mood.
The echo layer as it stood a frame ago, handed over just before draw, or null when there is no echo buffer yet. Most drawings ignore it; one that breaks the picture apart cuts its pieces from it.
How long the trail takes to fade to half, in seconds, for this mood.