# NOT RUN {
if (interactive()) {
# Basic animation of an element's
# position (moving to a new `x` and
# `y` position)
SVG(width = 300, height = 300) %>%
svg_rect(
x = 50, y = 50,
width = 50, height = 50,
attrs = svg_attrs_pres(
stroke = "magenta",
fill = "lightblue"
),
anims = anims(
2.0 ~ anim_position(x = 100, y = 50)
)
)
}
# }
Run the code above in your browser using DataLab