zooming and panning!
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user