rgl.attrib
). This function
modifies the data for those attributes in a WebGL scene.ageSetter(births, ages,
colors = NULL, alpha = NULL, radii = NULL,
vertices = NULL, normals = NULL, origins = NULL,
texcoords = NULL,
objids, prefixes = "", digits = 7,
param = seq(floor(min(births)), ceiling(max(births))))
NULL
attributes will be
interpolated from these values. See the Details section below.c("ageSetter", "propertySetter")
containing Javascript
code defining a function suitable for use in a propertySlider
.The function takes a single argument, time
, and uses it to compute the
i
as time - births[i]
.
Those are then used with the ages
argument to linearly interpolate settings of the specified attributes.
Extrapolation is constant. Repeated values in ages
can be used
to obtain discontinuities in the settings.
All attributes must have the same number of entries (rows for the matrices)
as the ages
vector. The births
vector must have the
same number of entries as the number of vertices in the object.
Not all objects contain all attributes listed here; if one is
chosen that is not a property of the corresponding object, a
Javascript alert()
will be generated.
propertySlider
; more detailed control is available in
vertexSetter
.propertySlider(ageSetter(births = 1:10, ages = c(-1, 0, 1),
alpha = c(0, 1, 1), objids = 123))
Run the code above in your browser using DataLab