pc.CurveSet
A curve set is a collection of curves.
Summary
Properties
| length | The number of curves in the curve set.[read only] |
| type | The interpolation scheme applied to all curves in the curve set. |
Methods
| clone | Returns a clone of the specified curve set object. |
| get | Return a specific curve in the curve set. |
| value | Returns the interpolated value of all curves in the curve set at the specified time. |
Details
Constructor
CurveSet([curveKeys])
Creates a new curve set.
Parameters
| curveKeys | Array. | An array of arrays of keys (pairs of numbers with the time first and value second). |
Properties
The interpolation scheme applied to all curves in the curve set. Can be:
Defaults to pc.CURVE_SMOOTHSTEP.
Methods
clone()
Returns a clone of the specified curve set object.
Returns
pc.CurveSetA clone of the specified curve set.
get(index)
Return a specific curve in the curve set.
Parameters
| index | number | The index of the curve to return. |
Returns
pc.CurveThe curve at the specified index.
value(time, [result])
Returns the interpolated value of all curves in the curve set at the specified time.
Parameters
| time | number | The time at which to calculate the value. |
| result | number[] | The interpolated curve values at the specified time. If this parameter is not supplied, the function allocates a new array internally to return the result. |
Returns
number[]The interpolated curve values at the specified time.