File: propertyControl.Rd

package info (click to toggle)
rgl 1.3.34-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,968 kB
  • sloc: cpp: 23,234; ansic: 7,462; javascript: 6,125; sh: 3,555; makefile: 2
file content (70 lines) | stat: -rw-r--r-- 2,589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
\name{propertyControl}
\alias{subsetControl}
\alias{propertyControl}
\title{
Controls to use with playwidget()
}
\description{
These are setter functions to produce actions in a Shiny app,
or in an animation.
}
\usage{
subsetControl(value = 1, subsets, subscenes = NULL,
                         fullset = Reduce(union, subsets),
                         accumulate = FALSE)
propertyControl(value = 0, entries, properties, 
                objids = tagged3d(tags), tags, values = NULL,
                param = seq_len(NROW(values)) - 1, interp = TRUE)
}
\arguments{
  \item{value}{The value to use for input (typically \code{input$value}
  in a Shiny app.)}
  \item{subsets}{A list of vectors of object identifiers; the value will
  choose among them.}
  \item{fullset}{Objects in the subscene which are not in \code{fullset}
  will not be touched.}
  \item{subscenes}{The subscenes to be controlled.  If \code{NULL}, the
  root subscene.}
  \item{accumulate}{If \code{TRUE}, the subsets will accumulate (by union)
  as the value increases.}
  \item{entries, properties, objids}{Which properties to set.}
  \item{tags}{
Select objects with matching tags.  Ignored
if \code{objids} is specified.
}
  \item{values}{Values to set.}
  \item{param}{Parameter values corresponding to the rows of \code{value}}
  \item{interp}{Whether to use linear interpolation between \code{param}
  values}
}
\details{
\code{subsetControl} produces data for \code{\link{playwidget}} to
display subsets of the object in one or more subscenes.  This code will not
touch objects in the
subscenes if they
are not in \code{fullset}.  \code{fullset} defaults to the union of
all the object ids mentioned in \code{subsets}, so by default if an id is
not mentioned in one of the subsets, it will not be controlled by the slider.  If \code{value} is specified in R code, it will be a 1-based
index into the \code{subsets} list; when specified internally
in Javascript, 0-based indexing into the corresponding array
will be used.

\code{propertyControl} sets individual properties.  Here the row
of \code{values} is determined by the position of \code{value}
in \code{param}.
}
\value{
These functions return controller data in a list of class
\code{"rglControl"}.
}
\author{
Duncan Murdoch
}

\seealso{
\code{\link{subsetSetter}} for a way to embed a pure Javascript
control, and \code{\link{playwidget}} for a way to use these
in animations (including Shiny), \code{\link{rglShared}}
for linking using the \pkg{crosstalk} package.  The \HTMLVignette{WebGL}{}{User Interaction in WebGL} vignette
gives more details.
}