Convenience function to add a rectangle to the scene.
Usage
add_rectangle(
scene,
width = 2,
height = 1,
position = c(0, 0, 0),
color = "#FFFFFF",
fill_color = NULL,
stroke_width = 2,
fill_opacity = 0.5
)Examples
if (FALSE) { # \dontrun{
scene("rect_demo") %>%
add_rectangle(width = 4, height = 2, fill_color = "green") %>%
grow_from_center() %>%
render()
} # }