Skip to content

$timeline

5 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).

apply

$timeline.apply(target: Entity, timeline: Reference, time: float, last_time: float, rate: float, looping: bool, reverse: bool, needs_immediate_read: bool) -> float

Apply a timeline animation to an entity's and its children's components.

ParameterTypeMeaning
targetEntityThe entity to apply the timeline on.
timelineReferenceThe timeline.
timefloatThe time since the timeline began playing.
last_timefloatThe time this timeline was last applyied.
ratefloatOptional playback speed multiplier.
loopingboolWhether the timeline should loop.
reverseboolWhether the timeline should play in reverse
needs_immediate_readboolTrue to make the change visible to the caller immediately (slower), false if it will not be read till later (faster).

Returns float: The progress of the timeline from 0 to 1.

apply_ms

$timeline.apply_ms(target: Entity, timeline: Reference, time: int, last_time: int, rate: float, looping: bool, reverse: bool, needs_immediate_read: bool) -> float

Apply a timeline animation to an entity's and its children's components with an input time in milliseconds.

ParameterTypeMeaning
targetEntityThe entity to apply the timeline on.
timelineReferenceThe timeline.
timeintThe time in milliseconds since the timeline began playing.
last_timeintThe time in milliseconds this timeline was last applyied.
ratefloatOptional playback speed multiplier.
loopingboolWhether the timeline should loop.
reverseboolWhether the timeline should play in reverse
needs_immediate_readboolTrue to make the change visible to the caller immediately (slower), false if it will not be read till later (faster).

Returns float: The progress of the timeline from 0 to 1.

apply_normalized

$timeline.apply_normalized(target: Entity, timeline: Reference, progress: float, last_progress: float, rate: float, looping: bool, reverse: bool, needs_immediate_read: bool) -> float

Apply a timeline animation to an entity's and its children's components with an input progress normalized (from 0 to 1) over its duration.

ParameterTypeMeaning
targetEntityThe entity to apply the timeline on.
timelineReferenceThe timeline.
progressfloatThe normalized progress of the timeline.
last_progressfloatThe normalized progress when this timeline was last applyied.
ratefloatOptional playback speed multiplier.
loopingboolWhether the timeline should loop.
reverseboolWhether the timeline should play in reverse
needs_immediate_readboolTrue to make the change visible to the caller immediately (slower), false if it will not be read till later (faster).

Returns float: The progress of the timeline from 0 to 1.

get_duration

read-only
$timeline.get_duration(timeline: Reference) -> float

Get the duration in seconds of a timeline.

ParameterTypeMeaning
timelineReferenceThe timeline.

Returns float: The duration in seconds.

is_done

read-only
$timeline.is_done(timeline: Reference, time: float, rate: float) -> bool

Returns true if a timeline is over.

ParameterTypeMeaning
timelineReferenceThe timeline.
timefloatThe time since the timeline began playing.
ratefloatOptional playback speed multiplier.

Returns bool: True if done.