# Non-automated smoke test. Run interactively; inspect output in a browser. library(animejs) svg_src <- ' ' anime_timeline( duration = 800, ease = "outElastic", loop = TRUE ) |> # 1. anime_from_to: staggered entrance of circles anime_add( selector = anime_target_class("dot"), props = list( translateY = anime_from_to(-60, 0), opacity = anime_from_to(0, 1) ), stagger = anime_stagger(150, from = "first"), offset = "+=0" ) |> # 2. anime_keyframes: bounce c2 up and back anime_add( selector = anime_target_id("c2"), props = list( translateY = anime_keyframes(0, -40, 0), r = anime_keyframes( list(to = 20), list(to = 30, ease = "outQuad"), list(to = 20, ease = "inQuad", duration = 200) ) ), offset = "+=300" ) |> # 3. anime_from_to with unit: grow bar widths anime_add( selector = anime_target_class("bar"), props = list(width = anime_from_to(0, 120, unit = "px")), stagger = anime_stagger(100, from = "first"), ease = "outCubic", offset = "+=0" ) |> # 4. Playback controls + autoplay anime_playback( autoplay = TRUE, loop = TRUE, alternate = TRUE, controls = TRUE ) |> anime_render(svg = svg_src)