Motion system
Motion plans use native Element.animate() and geometry lengths from getTotalLength().
Presets
drawreveals path and primitive geometry, then restores the original artwork.fadefades the whole SVG.scalecombines opacity with a root scale from0.92to1.staggerfades visual leaves in document order without touchingdefs.pulsescales1 → 1.05 → 1; repetition followsiterations.
Timing
The defaults are duration: 1200, easing: "ease-in-out", one iteration and autoplay. stagger: "auto" distributes starts across at most 600ms. Explicit numeric stagger values are milliseconds.
animateSvg(svg, {
preset: "draw",
duration: 1600,
delay: 100,
easing: "cubic-bezier(.22,1,.36,1)",
direction: "alternate",
iterations: 2,
});
Controller
Controllers expose play, pause, reverse, restart, finish, cancel, seek(0..1) and destroy. cancel() restores the initial art; finish() presents the final frame; destroy() removes owned animations and temporary styles.