Description Usage Arguments Value Generated file Defaults See Also
Opens a new WebGL HTML device for RGL-based graphics.
The opened device, which is indeed an RGL device, must be closed
using devDoneRGL
(), otherwise the WebGL HTML file is not generated.
When the device is closed, the output is written to a WebGL HTML document, which can then be incorporated into a main HTML document, for instance, using RSP-embed HTML templates, cf. R.rsp.
1 2 |
filename |
The pathname of the generated WebGL HTML file. |
width, height |
|
font |
A |
useNULL |
A |
snapshot |
A |
header |
A |
class |
A |
... |
Additional arguments passed to |
Returns (invisibly) the RGL device number, cf. rgl.dev.list
.
When done plotting, the device must be closed using devDoneRGL
().
If created, the generated file is saved in the directory
specfied by argument path
with a filename consisting of
the name
followed by optional comma-separated tags
and a filename extension given by argument ext
.
By default, the file is only created if the expr
is evaluated completely. If it is, for instance, interrupted
by the user or due to an error, then any incomplete/blank
file that was created will be removed. This behavior can be
turned of using argument onIncomplete
.
Whenever a default value is missing, the fallback is to use the
corresponding value for the "png"
device type according
to R.devices, i.e. R.devices::devOptions("png")
.
Currently, this only applies to the width and the height arguments.
To close the device, use devDoneRGL
().
A more convenient and robust function for generating WebGL HTML file
is toWebGL
() (recommended).
See also devEvalRGL
() and devNewRGL
().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.