API Reference › Tween › Tween.delay
method

Tween.delay

Tween.delay(handle, ticks) -> handle

Appends a pause of ticks ticks to a handle's sequence: the value holds where the previous segment left it, then the next chained segment begins. Returns the handle for fluent chaining. Use it to stagger a multi-step motion — rise, hold, fall — or to offset one handle from another running in parallel.

Parameters

handlethe tween handle to extend
tickshow many engine ticks to hold

Example

program Demo {
  property Marker { n: int = 0 }
  model M { Marker }
  entry {
    var h = Tween.to(0, 50, 15, 0)      # move
    h = Tween.delay(h, 10)              # wait
    h = Tween.chain(h, 100, 15, 0)      # move again
    quit()
  }
}
← All symbols