zooming and panning!

This commit is contained in:
Bryce Covert
2016-12-01 09:10:13 -08:00
parent 9d12bc549c
commit 3370756f1c
3 changed files with 92 additions and 32 deletions

View File

@@ -30,8 +30,10 @@
entity)
(def ui-scale 1.0)
(def ui-scale 1.5)
(def mobile? (= 1.5 ui-scale))
(def max-zoom (if mobile? 0.5 0.75))
(def min-zoom 0.95)
(defn clear-stage [{:keys [^Stage renderer]}]
(.clear renderer))
@@ -657,3 +659,8 @@
:talk :talk-depressed
:look :look-depressed} cursor cursor)
cursor))
(defn bound-to-camera [x length zoom]
(min (- length (* length 0.5 zoom ))
(max (* length 0.5 zoom )
x)))