| anime_animate | R Documentation |
The R equivalent of Anime.js v4's animate(targets, parameters): one set
of property animations applied to one target selector, without a timeline.
Use anime_timeline() and anime_add() instead when several segments must
be sequenced.
anime_animate(
selector,
props,
duration = NULL,
ease = NULL,
delay = NULL,
loop = FALSE,
alternate = FALSE,
reversed = FALSE,
autoplay = TRUE,
stagger = NULL
)
selector |
CSS selector string identifying the SVG/HTML elements to
animate. Use |
props |
A named list of property animations. Values may be scalars,
two-element numeric vectors (from/to), |
duration |
Duration in milliseconds. |
ease |
Easing, an |
delay |
Delay in milliseconds before the animation starts. |
loop |
Logical or positive integer. |
alternate |
Logical. Alternate direction on each iteration. |
reversed |
Logical. Play in reverse from the end. |
autoplay |
Logical. Start playing immediately on load. |
stagger |
An |
Like a timeline, an anime_animation can be modified with
anime_playback() and anime_on(), and is rendered with anime_render().
An anime_animation object.
anime_animate(
selector = anime_target_class("circle"),
props = list(
translateY = anime_from_to(-40, 0),
opacity = anime_from_to(0, 1)
),
duration = 600,
ease = anime_easing_spring()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.