Allow size! to work with any camera
This commit is contained in:
@@ -45,8 +45,10 @@
|
|||||||
|
|
||||||
(size! screen 480 360)"
|
(size! screen 480 360)"
|
||||||
[screen width height]
|
[screen width height]
|
||||||
(let [^OrthographicCamera camera (u/get-obj screen :camera)]
|
(let [^Camera camera (u/get-obj screen :camera)]
|
||||||
(.setToOrtho camera false width height)))
|
(set! (. camera viewportWidth) width)
|
||||||
|
(set! (. camera viewportHeight) height)
|
||||||
|
(.update camera)))
|
||||||
|
|
||||||
(defn width!
|
(defn width!
|
||||||
"Sets the width of the camera in `screen`, adjusting the height so the ratio
|
"Sets the width of the camera in `screen`, adjusting the height so the ratio
|
||||||
|
|||||||
Reference in New Issue
Block a user