Appearance
KBE3D / KBCore / Cesium / ConstantSpline
类: ConstantSpline
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.
示例
ts
const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const spline = new Cesium.ConstantSpline(position);
const p0 = spline.evaluate(0.0);参数
The constant value that the spline evaluates to.
属性
value
readonlyvalue:number|Cartesian3|Quaternion
The constant value that the spline evaluates to.
方法
findTimeInterval()
findTimeInterval(
time:number):void
Finds an index <code>i</code> in <code>times</code> such that the parameter <code>time</code> is in the interval <code>[times[i], times[i + 1]]</code>.
Since a constant spline has no internal times array, this will throw an error.
参数
time
number
The time.
返回
void
wrapTime()
wrapTime(
time:number):number
Wraps the given time to the period covered by the spline.
参数
time
number
The time.
返回
number
The time, wrapped around to the updated animation.
clampTime()
clampTime(
time:number):number
Clamps the given time to the period covered by the spline.
参数
time
number
The time.
返回
number
The time, clamped to the animation period.
evaluate()
evaluate(
time:number,result?:Cartesian3|Quaternion):number|Cartesian3|Quaternion
Evaluates the curve at a given time.
参数
time
number
The time at which to evaluate the curve.
result?
The object onto which to store the result.
返回
number | Cartesian3 | Quaternion
The modified result parameter or the value that the constant spline represents.
构造函数
构造函数
new ConstantSpline(
value:number|Cartesian3|Quaternion):ConstantSpline
参数
value
number | Cartesian3 | Quaternion
返回
ConstantSpline
