class Opal::Animation::Animator

Overview

Central animation orchestrator managing tween updates per frame.

Defined in:

opal/animation/animator.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

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


[View source]
def cancel(name : String) : self #

[View source]
def clear : self #

[View source]
def running? : Bool #

[View source]
def tick(now : Time::Instant = Time.instant) : Nil #

Advances all active animations by timestamp


[View source]
def tweens : Hash(String, ActiveTween) #

[View source]