This commit is contained in:
2015-03-13 19:09:58 -07:00
parent 2d84b07b09
commit fbec0dc46d
18 changed files with 329 additions and 25 deletions

View File

@@ -35,6 +35,14 @@
(- (* t t t t) 2))
start)))))
(defn ease-out-quadratic [t start delta duration]
(let [t (/ t duration)]
(+ (* (- delta) t (- t 2)) start)))
(defn ease-out-cubic [t start delta duration]
(let [t (dec (/ t duration))]
(+ (* delta (inc (* t t t))) start)))
(defn tween [id screen path start end duration & {:keys [finish ease]}]
(let [ease (or ease ease-linear)
finish (or finish identity)