Header menu logo Nu

CurveTimeline Type

The base class for timelines that interpolate between frame values using stepped, linear, or a Bezier curve.

Constructors

Constructor Description

CurveTimeline(frameCount, bezierCount, propertyIds)

Full Usage: CurveTimeline(frameCount, bezierCount, propertyIds)

Parameters:
    frameCount : int
    bezierCount : int - The maximum number of Bezier curves. See CurveTimeline.Shrink.
    propertyIds : string[] - Unique identifiers for the properties the timeline modifies.

The number of key frames for this timeline.

frameCount : int
bezierCount : int

The maximum number of Bezier curves. See CurveTimeline.Shrink.

propertyIds : string[]

Unique identifiers for the properties the timeline modifies.

Instance members

Instance member Description

this.GetBezierValue

Full Usage: this.GetBezierValue

Parameters:
    time : float32
    frameIndex : int - The index into !:Frames for the values of the frame before time.
    valueOffset : int - The offset from frameIndex to the value this curve is used for.
    i : int - The index of the Bezier segments. See CurveTimeline.GetCurveType.

Returns: float32

Returns the Bezier interpolated value for the specified time.

time : float32
frameIndex : int

The index into !:Frames for the values of the frame before time.

valueOffset : int

The offset from frameIndex to the value this curve is used for.

i : int

The index of the Bezier segments. See CurveTimeline.GetCurveType.

Returns: float32

this.GetCurveType

Full Usage: this.GetCurveType

Parameters:
    frame : int - Between 0 and frameCount - 1, inclusive.

Returns: float32 CurveTimeline.LINEAR, CurveTimeline.STEPPED or CurveTimeline.BEZIER + the index of the Bezier segments.

Returns the interpolation type for the specified frame.

frame : int

Between 0 and frameCount - 1, inclusive.

Returns: float32

CurveTimeline.LINEAR, CurveTimeline.STEPPED or CurveTimeline.BEZIER + the index of the Bezier segments.

this.SetBezier

Full Usage: this.SetBezier

Parameters:
    bezier : int - The ordinal of this Bezier curve for this timeline, between 0 and bezierCount - 1 (specified in the constructor), inclusive.
    frame : int - Between 0 and frameCount - 1, inclusive.
    value : int - The index of the value for the frame this curve is used for.
    time1 : float32 - The time for the first key.
    value1 : float32 - The value for the first key.
    cx1 : float32 - The time for the first Bezier handle.
    cy1 : float32 - The value for the first Bezier handle.
    cx2 : float32 - The time of the second Bezier handle.
    cy2 : float32 - The value for the second Bezier handle.
    time2 : float32 - The time for the second key.
    value2 : float32 - The value for the second key.

Stores the segments for the specified Bezier curve. For timelines that modify multiple values, there may be more than one curve per frame.

bezier : int

The ordinal of this Bezier curve for this timeline, between 0 and bezierCount - 1 (specified in the constructor), inclusive.

frame : int

Between 0 and frameCount - 1, inclusive.

value : int

The index of the value for the frame this curve is used for.

time1 : float32

The time for the first key.

value1 : float32

The value for the first key.

cx1 : float32

The time for the first Bezier handle.

cy1 : float32

The value for the first Bezier handle.

cx2 : float32

The time of the second Bezier handle.

cy2 : float32

The value for the second Bezier handle.

time2 : float32

The time for the second key.

value2 : float32

The value for the second key.

this.SetLinear

Full Usage: this.SetLinear

Parameters:
    frame : int - Between 0 and frameCount - 1, inclusive.

Sets the specified frame to linear interpolation.

frame : int

Between 0 and frameCount - 1, inclusive.

this.SetStepped

Full Usage: this.SetStepped

Parameters:
    frame : int - Between 0 and frameCount - 1, inclusive.

Sets the specified frame to stepped interpolation.

frame : int

Between 0 and frameCount - 1, inclusive.

this.Shrink

Full Usage: this.Shrink

Parameters:
    bezierCount : int

Shrinks the storage for Bezier curves, for use when bezierCount (specified in the constructor) was larger than the actual number of Bezier curves.

bezierCount : int

Type something to start searching.