Clear shapes, lights, bbox
1 2 3 4 5 6 7 8
clear3d( type = c("shapes", "bboxdeco", "material"), defaults, subscene = 0 ) pop3d( type = "shapes", id = 0 ) ids3d( type = "shapes", subscene = NA ) # These are mainly intended for internal use: rgl.clear( type = "shapes", subscene = 0 ) rgl.pop( type = "shapes", id = 0 ) rgl.ids( type = "shapes", subscene = NA )
default values to use after clearing
which subscene to work with.
vector of ID numbers of items to remove
RGL holds several lists of objects in each scene.
There are lists for shapes, lights, bounding box decorations, subscenes, etc.
clear3d clears the specified stack, or restores
the defaults for the bounding box (not visible) or viewpoint.
id = 0
the last added node on the list (except for subscenes: there it
removes the active subscene). The
may be used to specify arbitrary item(s) to remove; if
id != 0,
type argument is ignored.
clear3d may also be used to clear material properties
back to their defaults.
clear3d has an optional
defaults argument, which defaults to
r3dDefaults. Only the
materials component of this argument
is currently used by
ids3d returns a dataframe containing the IDs in the currently active subscene
by default, or a specified subscene, or if
subscene = 0, in the whole
rgl window, along with an indicator of their type.
Note that clearing the light stack leaves the scene in darkness; it should normally
be followed by a call to
rgl.* versions of these functions are mainly
intended for internal use.
1 2 3 4 5 6 7 8 9 10 11 12 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.