class
Opal::Animation::Animator
- Opal::Animation::Animator
- Reference
- Object
Overview
Central animation orchestrator managing tween updates per frame.
Defined in:
opal/animation/animator.crConstructors
Instance Method Summary
-
#animate(name : String, from from_val : Number, to to_val : Number, duration : Time::Span = 300.milliseconds, easing : Symbol = :ease_out_cubic, now : Time::Instant = Time.instant, on_complete : Proc(Nil) | Nil = nil, &on_update : Float64 -> Nil) : self
Starts or updates a named tween animation
- #cancel(name : String) : self
- #clear : self
- #running? : Bool
-
#tick(now : Time::Instant = Time.instant) : Nil
Advances all active animations by timestamp
- #tweens : Hash(String, ActiveTween)
Constructor Detail
Instance Method Detail
def animate(name : String, from from_val : Number, to to_val : Number, duration : Time::Span = 300.milliseconds, easing : Symbol = :ease_out_cubic, now : Time::Instant = Time.instant, on_complete : Proc(Nil) | Nil = nil, &on_update : Float64 -> Nil) : self
#
Starts or updates a named tween animation