5 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).
$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.
| Parameter | Type | Meaning |
|---|
target | Entity | The entity to apply the timeline on. |
timeline | Reference | The timeline. |
time | float | The time since the timeline began playing. |
last_time | float | The time this timeline was last applyied. |
rate | float | Optional playback speed multiplier. |
looping | bool | Whether the timeline should loop. |
reverse | bool | Whether the timeline should play in reverse |
needs_immediate_read | bool | True 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.
$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.
| Parameter | Type | Meaning |
|---|
target | Entity | The entity to apply the timeline on. |
timeline | Reference | The timeline. |
time | int | The time in milliseconds since the timeline began playing. |
last_time | int | The time in milliseconds this timeline was last applyied. |
rate | float | Optional playback speed multiplier. |
looping | bool | Whether the timeline should loop. |
reverse | bool | Whether the timeline should play in reverse |
needs_immediate_read | bool | True 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.
$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.
| Parameter | Type | Meaning |
|---|
target | Entity | The entity to apply the timeline on. |
timeline | Reference | The timeline. |
progress | float | The normalized progress of the timeline. |
last_progress | float | The normalized progress when this timeline was last applyied. |
rate | float | Optional playback speed multiplier. |
looping | bool | Whether the timeline should loop. |
reverse | bool | Whether the timeline should play in reverse |
needs_immediate_read | bool | True 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.
$timeline.get_duration(timeline: Reference) -> float
Get the duration in seconds of a timeline.
| Parameter | Type | Meaning |
|---|
timeline | Reference | The timeline. |
Returns float: The duration in seconds.
$timeline.is_done(timeline: Reference, time: float, rate: float) -> bool
Returns true if a timeline is over.
| Parameter | Type | Meaning |
|---|
timeline | Reference | The timeline. |
time | float | The time since the timeline began playing. |
rate | float | Optional playback speed multiplier. |
Returns bool: True if done.