---
title: "title"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{title}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```r
rgl::plot3d(runif(10), runif(10), runif(10))
```
```{r, echo = FALSE}
rgl::plot3d(runif(10), runif(10), runif(10))
rgl::rglwidget()
```
它工作得很好,但因我的需要而过度使用了。一张简单的非交互式图片就足够了。webGL显示的问题在于它会创建一个大文件(>1MB)。因此,我在CRAN上有一个关于目录大小的注释。我不想争论这个问题,而是想使用一个普通的图片来减少html输出的大小。
rgl::plot3d(runif(10), runif(10), runif(10))
rgl::rgl.snapshot()