canvas-draw -- path based canvas animation

The canvas-draw module drives a <canvas> with an FPS-controlled requestAnimationFrame loop: every path is a queue of 2D-context operations (fillStyle, arc, fill, functions...) whose parameters can be functions evaluated on each frame. Click Start / Stop, move the sliders, toggle the groups, add planets, or click a body on the canvas to recolour it (hit detection with path.coords(x, y)).

Scene (CanvasDraw(canvas, { fps: 40 }))
frame 0 · loading the module...
Animation loop
Log