out of bounds doesn't result in crappy zoom.
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
(defn pan-to [screen entities x y scale-fn & [ease duration]]
|
||||
(let [ease (or ease tween/ease-in-out-quadratic)
|
||||
duration (or duration 3.0)
|
||||
target-zoom (min 0.95 (max 0.75 (scale-fn [x y])))
|
||||
target-zoom (min 0.95 (max 0.75 (scale-fn [(max 0 (min 319 x)) (max 0 (min 240 y))])))
|
||||
current-zoom (get-in entities [:cam :zoom] 1.0)
|
||||
|
||||
;; don't zoom if it's a subtle difference
|
||||
|
||||
Reference in New Issue
Block a user