Description Usage Arguments Details Value Author(s) See Also Examples
This function produces a button in an HTML scene that will toggle the display of items in the scene.
1 2 3 4 5 | toggleWidget(sceneId,
ids = integer(), hidden = integer(),
subscenes = NULL,
label = deparse(substitute(ids)),
...)
|
sceneId |
The HTML id of the rgl scene being controlled,
or an object as in |
ids, hidden |
The rgl id numbers of the objects to toggle. Those in |
subscenes |
The subscenes in which to toggle the objects. |
label |
The label to put on the button. |
... |
Additional arguments to pass to |
Like playwidget
, this function is designed
to work within the htmlwidgets framework.
If the value is printed, the button will be inserted
into the output.
It is also designed to work with magrittr-style
pipes: the result of rglwidget
or
other widgets can be piped into it to add it
to a display. It can also appear first in the
pipeline, if sceneId
is set to NA
.
A widget suitable for use in an Rmarkdown-generated web page, or elsewhere.
Duncan Murdoch
toggleButton
for the older style
of HTML control.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.