Constructor
new GrObject(name, objectOrObjects, paramInfoopt)
The parameter list (if provided) should be either a string (with the name of the parameter) or an Array with the first value being a string (the name), and the remaining 3 values being numbers: min, max, and initial value (all optional).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | unique name for the object |
|
objectOrObjects |
THREE.Object3D | Array.<THREE.Object3D> | ||
paramInfo |
Array.<(string|Array)> |
<optional> |
a list of the parameters for the object |
- Source:
Members
objects :Array.<THREE.Object3D>
Type:
- Array.<THREE.Object3D>
- Source:
params :Array.<Object>
Type:
- Array.<Object>
- Source:
Methods
advance(delta, timeOfDay)
Advance the object by an amount of time. Time only flows forward so use this to figure out how fast things should move. In theory, it is always a "step" (1/60th of a second) In the past, so many things were stochastic and only computed the delta, that this became the norm (if you need to accumulate time you can sum the delta) time of day is provided so you can make objects that change over the course of the day - it is a number between 0-24 (midnight->midnight) it does not necessarily change smoothly.
Parameters:
Name | Type | Description |
---|---|---|
delta |
number | |
timeOfDay |
number |
- Source:
update(paramValues)
set the parameter values to new values this gets called when the sliders are moved
Parameters:
Name | Type | Description |
---|---|---|
paramValues |
Array.<Number> |
- Source: