ConstantSpline

new Cesium.ConstantSpline(value)

A spline that evaluates to a constant value. Although this follows the Spline interface, it does not maintain an internal array of times since its value never changes.
Name Type Description
value number | Cartesian3 | Quaternion The constant value that the spline evaluates to.
Example:
const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const spline = new Cesium.ConstantSpline(position);

const p0 = spline.evaluate(0.0);
See:

Members

The constant value that the spline evaluates to.

Methods

Clamps the given time to the period covered by the spline.
Name Type Description
time number The time.
Returns:
The time, clamped to the animation period.
Evaluates the curve at a given time.
Name Type Description
time number The time at which to evaluate the curve.
result Cartesian3 | Quaternion optional The object onto which to store the result.
Returns:
The modified result parameter or the value that the constant spline represents.
Finds an index i in times such that the parameter time is in the interval [times[i], times[i + 1]]. Since a constant spline has no internal times array, this will throw an error.
Name Type Description
time number The time.
Throws:
  • DeveloperError : findTimeInterval cannot be called on a ConstantSpline.
Wraps the given time to the period covered by the spline.
Name Type Description
time number The time.
Returns:
The time, wrapped around to the updated animation.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.