| anime_keyframes | R Documentation |
Constructs a keyframes object for use in the props argument of
anime_add() or anime_animate(). Each positional argument is one
keyframe.
anime_keyframes(...)
... |
< |
An anime_keyframes object.
# Bare numeric keyframe values
anime_add(
anime_timeline(),
selector = ".circle",
props = list(
opacity = anime_keyframes(0, 1, 0.5),
translateY = anime_keyframes(-20, 0, 10)
)
)
# Per-keyframe lists with optional ease and duration overrides
anime_add(
anime_timeline(),
selector = ".circle",
props = list(
opacity = anime_keyframes(
list(to = 0),
list(to = 1, ease = anime_easing("Cubic"), duration = 400),
list(to = 0.5, ease = "linear", duration = 200)
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.