Skip to main content
100%

Fork of Svelte + D3: Canvas & renderless components

✓ Published0🌍 Public
Rrudi.oreillymeehan@gmail.com
Last edited Oct 1, 2024
Created on Oct 1, 2024

Ten thousand tweened circles animate across a full-screen canvas, cycling through new random positions and radii every two seconds with a magma color scale. The Svelte example pairs a renderless Canvas component with a Circle component that registers draw functions via Svelte’s context API, using `d3.scaleLinear`, `scaleSequential`, and `interpolateMagma` for mapping. Each circle’s attributes transition smoothly through `tweened` stores with `cubicOut` easing, while `requestAnimationFrame` batches canvas redraws for efficient animation.

AI-generated description
MIT Licensed

Similar vizzes