This function produces a button in an HTML scene that will toggle the display of items in the scene.
The HTML id of the RGL scene being controlled,
or an object as in
The RGL id numbers of the objects to toggle. Those in
are initially shown; those in
hidden are initially hidden.
Alternate way to specify
ids. Ignored if
The subscenes in which to toggle the objects.
The label to put on the button. The default is set
from the expression passed to
ids or the value of
Additional arguments to pass to
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
other widgets can be piped into it to add it
to a display. It can also appear first in the
sceneId is set to
A widget suitable for use in an Rmarkdown-generated web page, or elsewhere.
toggleButton for the older style
of HTML control.