title: How to embed an rgl snapshot in Rmarkdown package vignette
body: <p>I created an R vignette for my package. This vignette embed an interactive rgl figure with webGL.</p>
  
  <pre><code>---
  title: "title"
  output: rmarkdown::html_vignette
  vignette: &gt;
    %\VignetteIndexEntry{title}
    %\VignetteEngine{knitr::rmarkdown}
    %\VignetteEncoding{UTF-8}
  ---
  
  ```{r setup, include = FALSE}
  knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#&gt;"
  )
  ```
  
  ```r
  rgl::plot3d(runif(10), runif(10), runif(10))
  ```
  
  ```{r, echo = FALSE}
  rgl::plot3d(runif(10), runif(10), runif(10))
  rgl::rglwidget()
  ```
  </code></pre>
  
  <p>It works perfectly well but is over-killed for my needs. A simple non interactive picture would be good enough. The problem of the webGL display is that it creates a big file (>1 Mb). Thus I have a NOTE on CRAN about directory size. Rather than arguing about this NOTE I would like to reduce the size of the html output using a regular picture.</p>
  
  <pre><code>rgl::plot3d(runif(10), runif(10), runif(10))
  rgl::rgl.snapshot()
  </code></pre>
  
  <p>This obviously does not work.</p>