Vixen
02b45cc4
csharp
public sealed class TimelineSpan

A stretch of time on a track, with a ramp at each end.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

What a key cannot say is "for how long". An event happens at a moment; a constraint, a sub-clip or an audio region occupies an interval and fades at its edges, and representing one as a pair of keys loses the association between them the moment either is dragged.

⚠ End before Begin means it wraps the end of the timeline and is drawn as two bars. That is the ordinary case for anything authored against a looping clip — a foot that plants near the end of a cycle and lifts near the start of the next — and refusing it would make the loop point a place authors cannot mark.

Fields and properties (7)

  • public float Begin

    When it starts, in seconds.

  • public float End

    When it stops, in seconds.

  • public float EaseIn

    How long it takes to fade in, in seconds.

  • public float EaseOut

    How long it takes to fade out, in seconds.

  • public float Peak

    The most of it that ever applies, in [0, 1]. What the bar's height shows.

  • public object? Tag

    Whatever the application wants to hang off it.

  • public bool Wraps

    Whether it runs past the end of the timeline and resumes at the start.

Methods (4)

  • public TimelineSpan(float begin, float end, object? tag = null)

    Creates a span.

  • public float Length(float duration)

    How long it lasts, in seconds.

  • public float Activation(float time, float duration)

    How much of it is live at a moment, ramps included.

  • public override string ToString()

    Returns a string that represents the current object.

Used by (5)

  • TimelineVixen.Ui.Controls.Advanced
  • TimelineLanesVixen.Ui.Controls.Advanced
  • TimelineSpanTestsVixen.Ui.Controls.Advanced.Tests
  • TimelineTrackVixen.Ui.Controls.Advanced
  • AnimationClipViewVixen.Editor.AssetEditors