Scripting API
Scripting API
ClipCurve
Record in Abyss.Core, from Abyss.Core.
One curve on a clip: a field of a component on the animator — Footing.Plant — or on what is under it that its ClipCurve.Path names — a UI element's BackgroundColor.a — that the engine writes with the curve's value at the clip's time at every frame the clip plays, and, while clips fade, with their curves for it weighed by how much of each is drawn.
public record ClipCurveConstructors
ClipCurve
public ClipCurve(string Field, bool Smooth, IReadOnlyList<CurveKey> Keys)One curve on a clip: a field of a component on the animator — Footing.Plant — or on what is under it that its ClipCurve.Path names — a UI element's BackgroundColor.a — that the engine writes with the curve's value at the clip's time at every frame the clip plays, and, while clips fade, with their curves for it weighed by how much of each is drawn.
Parameters
Field: The field: the component's name, a dot, and where in it — a field's name, or the names down to a number, a color's part (r,g,b,a), a length or an angle in degrees.Smooth: Whether it is smooth between its keys rather than straight.Keys: Its keys, in the order of their times.
Properties
Field
public string Field { get; init; }The field: the component's name, a dot, and where in it — a field's name, or the names down to a number, a color's part (r, g, b, a), a length or an angle in degrees.
Smooth
public bool Smooth { get; init; }Whether it is smooth between its keys rather than straight.
Keys
public IReadOnlyList<CurveKey> Keys { get; init; }Its keys, in the order of their times.
Path
public string Path { get; init; }What it writes on: the names from the animator down to it with a / between them — Panel/Title — as a model's clips name its nodes; empty for the animator itself.
Unit
public LengthUnit Unit { get; init; }The unit a length it writes is in.
Methods
EaseOf
public KeyEase EaseOf(CurveKey key)How the curve goes on from a key: as the key says, or, where it says nothing, as the curve does.
Parameters
key
Sample
public float Sample(float time)The curve's value at time, as the engine works it out: its first key's before it and its last's after it, and between two keys as the first of them goes on (ClipCurve.EaseOf): its value held, a straight line, or a cubic through them whose slope at each key is the slope between the keys either side of it.
Parameters
time: Seconds from the clip's start.
Equals
public bool Equals(ClipCurve? other)Whether two say the same: the same path, field, unit and smoothness, and the same keys.
Parameters
other
GetHashCode
public override int GetHashCode()