propertySetter: Obsolete function to write HTML/Javascript code to control a...

Description Usage Arguments Author(s) See Also

View source: R/webGLcontrols.R

Description

These functions write out HTML code to control WebGL displays based using the obsolete writeWebGL. Use playwidget and related functions instead.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
propertySlider(setter = propertySetter,
             minS = NULL, maxS = NULL, step = 1, init = NULL, 
	     labels, 
	     id = basename(tempfile("input")), name = id,
	     outputid = paste0(id, "text"),
	     index = NULL,
	     ...) 
	     
propertySetter(values = NULL, entries, properties, objids, prefixes = "",
               param = seq_len(NROW(values)), interp = TRUE, digits = 7) 
               
par3dinterpSetter(fn, from, to, steps, subscene, omitConstant = TRUE, 
                  rename = character(), ...)

matrixSetter(fns, from, to, steps, subscene = currentSubscene3d(), 
             matrix = "userMatrix", omitConstant = TRUE, prefix = "", ...) 
             
vertexSetter(values, vertices = 1, attributes, objid, prefix = "",
	     param = seq_len(NROW(values)), interp = TRUE,
	     digits = 7)

Arguments

setter

A function to write Javascript code, or its output, or a list containing several of these.

minS, maxS, step, init

Slider values to be displayed. Reasonable defaults are used if missing.

labels

Labels to display for each slider value. The defaults are calculated using internal variables. If NULL, no labels will be shown.

id

The id of the input control that will be generated.

name

The name of the input control that will be generated.

outputid

The id of the output control that will display the slider value, or NULL for none.

index

The 1-based index of this slider: it controls the corresponding entry in an indexed setter such as matrixSetter.

...

Other parameters.

values

An array of values; rows correspond to slider positions. Alternatively, NULL; the generated function takes a single value or array of values and applies them directly.

entries, properties, objids, prefixes

Vectors describing the columns of values.

param

Parameter values corresponding to each row of values.

interp

Whether to interpolate values. If FALSE, the Javascript function will expect non-negative integer values. Ignored if values is NULL.

digits

How many significant digits to emit in the Javascript code.

fn

A function returned from par3dinterp.

from, to, steps

Values where fn should be evaluated.

subscene

Which subscene's properties should be modified?

omitConstant

If TRUE, do not set values that are constant across the range.

rename

A named character vector of names of Javascript properties to modify.

fns

A list containing functions returned from par3dinterp.

matrix

A character string giving the Javascript property name of the matrix to modify.

prefix

The prefix of the scene containing matrix.

vertices

A vector of vertex numbers (1-based) within an object.

attributes

A vector of attributes of a vertex, from c("x", "y", "z", "r", "g", "b", "a", "nx", "ny", "nz", "radius", "ox", "oy", "oz", "ts", "tt").

objid

The object containing the vertices to be modified.

Author(s)

Duncan Murdoch

See Also

rglwidget, playwidget


rgl documentation built on Feb. 1, 2021, 3:01 a.m.