---
title: "Getting Started with ggWebGL"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Getting Started with ggWebGL}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
```

# Overview

`ggWebGL` currently provides a browser-native WebGL backend for a focused
subset of `ggplot2`.

# Current capabilities

The current implementation provides:

- WebGL rendering for point, line, and raster layers
- four point shader modes: `default`, `density_splat`, `trajectory_age`, and `trajectory_age_glow`
- interactive `pan`, `zoom`, and optional `hover` inspection
- fixed-scale `facet_wrap()` and `facet_grid()` layouts
- `ggplot_webgl()` for htmlwidget conversion
- Shiny bindings and manual smoke-test examples under `inst/examples/`
- packaged real-data evidence examples and an evaluation suite under `inst/benchmarks/`

# Example

```{r eval = FALSE}
library(ggplot2)
library(ggWebGL)

plot <- ggplot(diamonds, aes(carat, price, colour = cut)) +
  geom_point_webgl(size = 1.1, alpha = 0.18) +
  theme_webgl(
    shader = "density_splat",
    interactions = c("pan", "zoom", "hover")
  )

ggplot_webgl(plot, height = 520)
```
