diff --git a/src/play_clj/core_cameras.clj b/src/play_clj/core_cameras.clj index e01f55a..7079e41 100644 --- a/src/play_clj/core_cameras.clj +++ b/src/play_clj/core_cameras.clj @@ -27,9 +27,10 @@ (defmacro perspective "Returns a [PerspectiveCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/PerspectiveCamera.html). - (perspective)" - [fov vw vh & options] - `(let [^PerspectiveCamera object# (perspective* ~fov ~vw ~vh)] + (perspective 75 (game :width) (game :height))" + [field-of-view viewport-width viewport-height & options] + `(let [^PerspectiveCamera object# + (perspective* ~field-of-view ~viewport-width ~viewport-height)] (u/calls! object# ~@options))) (defmacro perspective! diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj index 291c497..ac7920f 100644 --- a/src/play_clj/core_graphics.clj +++ b/src/play_clj/core_graphics.clj @@ -246,9 +246,9 @@ in the `layer`. "Returns a map with the provided x,y,z values converted from screen to input coordinates. + (screen->input screen {:x 10 :y 10 :z 0}) (screen->input screen 10 10) - (screen->input screen 10 10 0) - (screen->input screen {:x 10 :y 10 :z 0})" + (screen->input screen 10 10 0)" ([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}] (let [^Camera camera (u/get-obj screen :camera) coords (m/vector-3 x y z)] @@ -266,9 +266,9 @@ coordinates. "Returns a map with the provided x,y,z values converted from input to screen coordinates. + (input->screen screen {:x 10 :y 10 :z 0}) (input->screen screen 10 10) - (input->screen screen 10 10 0) - (input->screen screen {:x 10 :y 10 :z 0})" + (input->screen screen 10 10 0)" ([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}] (let [^Camera camera (u/get-obj screen :camera) coords (m/vector-3 x y z)] diff --git a/src/play_clj/core_utils.clj b/src/play_clj/core_utils.clj index 7a20fdd..a9d9010 100644 --- a/src/play_clj/core_utils.clj +++ b/src/play_clj/core_utils.clj @@ -132,8 +132,8 @@ found." (defmacro loader! "Calls a single method in a subclass of [AsynchronousAssetLoader](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/assets/loaders/AsynchronousAssetLoader.html). - (loader! object :load \"map.tmx\")" - [object & options] + (loader! object :tmx-map :load \"map.tmx\")" + [object type & options] `(let [^AsynchronousAssetLoader object# ~object] (u/call! object# ~@options))) diff --git a/src/play_clj/g2d_physics.clj b/src/play_clj/g2d_physics.clj index eb1c213..6a40c5e 100644 --- a/src/play_clj/g2d_physics.clj +++ b/src/play_clj/g2d_physics.clj @@ -60,8 +60,7 @@ (u/call! object# ~k ~@options))) (defn add-body! - "Creates a body from the `b-def`, adds it to the `screen` for physics -simulations and returns it. + "Creates a body from `b-def`, adds it to the `screen` and returns it. (add-body! screen (body-def :dynamic))" [screen b-def] diff --git a/src/play_clj/g3d_physics.clj b/src/play_clj/g3d_physics.clj index 6ee3084..18b2625 100644 --- a/src/play_clj/g3d_physics.clj +++ b/src/play_clj/g3d_physics.clj @@ -125,7 +125,7 @@ (btSoftBodyWorldInfo.)) (defn add-body! - "Adds the `body` to the `screen` for physics simulations and returns it. + "Adds the `body` to the `screen` and returns it. (add-body! screen (rigid-body info))" [screen body]