Start 0.3.0-SNAPSHOT

This commit is contained in:
oakes
2014-04-06 02:27:41 -04:00
parent 25895faa9b
commit ef918eb21c
6 changed files with 45 additions and 37 deletions

View File

@@ -39,13 +39,15 @@
(u/call! object# ~k ~@options)))
(defn size!
"Sets the size of the camera in `screen`.
"Sets the size of the camera in `screen` and recenters it.
(size! screen 480 360)"
[screen width height]
(let [^Camera camera (u/get-obj screen :camera)]
(set! (. camera viewportWidth) width)
(set! (. camera viewportHeight) height)
(set! (. (. camera position) x) (/ width 2))
(set! (. (. camera position) y) (/ height 2))
(.update camera)))
(defn width!