class Tessell::Anim::Runner(O)

Overview

轨注册表:animate(替换语义)/ cancel / cancel_owner / tick。 同 key 重复 animate 会替换旧轨并触发其 on_cancel(无泄漏)。

Defined in:

tessell/anim.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def active? : Bool #

[View source]
def animate(track : Track) : Track #

注册/替换。旧轨触发 on_cancel;返回生效轨。


[View source]
def cancel(key : UI::UiKey) : Bool #

取消:触发 on_cancel。返回是否存在。


[View source]
def cancel_owner(owner : O) : Int32 #

owner dispose 收口:取消该 owner 名下全部轨(各触发 on_cancel)。


[View source]
def tick(now_ms : Int64, reduced_motion : Bool, applier : Applier) : Int32 #

推进:对每条轨闭式采样并交给 applier。目标缺失(detach)→ 静默移除 (不触发任何回调——回调可能引用已卸载对象);完成 → 应用终值后移除 并触发 on_finish。返回仍活动轨数。


[View source]
def track_count : Int32 #

[View source]