Spline

abstract external class Spline(source)

Creates a curve parameterized and evaluated by time. This type describes an interface and is not intended to be instantiated directly.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract external var points: ReadonlyArray<JsAny>

An array of control points.

Link copied to clipboard
abstract external var times: ReadonlyArray<JsDouble>

An array of times for the control points.

Functions

Link copied to clipboard
abstract external fun clampTime(time: Double): Double

Clamps the given time to the period covered by the spline.

Link copied to clipboard
abstract external fun evaluate(time: Double, result: JsAny? = definedExternally): JsAny

Evaluates the curve at a given time.

Link copied to clipboard
abstract external fun findTimeInterval(time: Double, startIndex: Int): Int

Finds an index i in times such that the parameter time is in the interval [times[i], times[i + 1]].

Link copied to clipboard
abstract external fun wrapTime(time: Double): Double

Wraps the given time to the period covered by the spline.