A totally different approach to night.
This commit is contained in:
@@ -43,11 +43,15 @@
|
||||
(let [t (dec (/ t duration))]
|
||||
(+ (* delta (inc (* t t t))) start)))
|
||||
|
||||
(defn tween [id screen path start end duration & {:keys [finish ease]}]
|
||||
(defn tween [id screen path start end duration & {:keys [finish ease entities]}]
|
||||
(let [ease (or ease ease-linear)
|
||||
finish (or finish identity)
|
||||
start-time (or (:total-time screen) 0.0)
|
||||
delta (- end start)]
|
||||
start (if (and entities (= start :current))
|
||||
(get-in entities path)
|
||||
start)
|
||||
delta (- end start)
|
||||
]
|
||||
(fn [e total-time]
|
||||
(let [delta-time (- total-time start-time)
|
||||
pct-done (min (/ delta-time duration) 1.0)
|
||||
|
||||
Reference in New Issue
Block a user