Build a widget payload from a ggplot object. The current implementation
renders supported point, line, raster, and fixed-scale facet layouts through
the browser WebGL path while keeping unsupported layers explicit in the
payload.
Examples
plot <- ggplot2::ggplot(
mtcars[1:10, ],
ggplot2::aes(mpg, wt, colour = factor(cyl))
) +
geom_point_webgl(size = 2) +
theme_webgl(shader = "default")
ggplot_webgl(plot, width = 420, height = 320)