Adjust docstrings and make other small fixes

This commit is contained in:
oakes
2014-04-20 21:54:53 -04:00
parent c90b607cf2
commit 62c287f53b
5 changed files with 12 additions and 12 deletions

View File

@@ -27,9 +27,10 @@
(defmacro perspective (defmacro perspective
"Returns a [PerspectiveCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/PerspectiveCamera.html). "Returns a [PerspectiveCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/PerspectiveCamera.html).
(perspective)" (perspective 75 (game :width) (game :height))"
[fov vw vh & options] [field-of-view viewport-width viewport-height & options]
`(let [^PerspectiveCamera object# (perspective* ~fov ~vw ~vh)] `(let [^PerspectiveCamera object#
(perspective* ~field-of-view ~viewport-width ~viewport-height)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
(defmacro perspective! (defmacro perspective!

View File

@@ -246,9 +246,9 @@ in the `layer`.
"Returns a map with the provided x,y,z values converted from screen to input "Returns a map with the provided x,y,z values converted from screen to input
coordinates. coordinates.
(screen->input screen {:x 10 :y 10 :z 0})
(screen->input screen 10 10) (screen->input screen 10 10)
(screen->input screen 10 10 0) (screen->input screen 10 10 0)"
(screen->input screen {:x 10 :y 10 :z 0})"
([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}] ([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}]
(let [^Camera camera (u/get-obj screen :camera) (let [^Camera camera (u/get-obj screen :camera)
coords (m/vector-3 x y z)] 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 "Returns a map with the provided x,y,z values converted from input to screen
coordinates. coordinates.
(input->screen screen {:x 10 :y 10 :z 0})
(input->screen screen 10 10) (input->screen screen 10 10)
(input->screen screen 10 10 0) (input->screen screen 10 10 0)"
(input->screen screen {:x 10 :y 10 :z 0})"
([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}] ([screen {:keys [x y z] :or {x 0 y 0 z 0} :as entity}]
(let [^Camera camera (u/get-obj screen :camera) (let [^Camera camera (u/get-obj screen :camera)
coords (m/vector-3 x y z)] coords (m/vector-3 x y z)]

View File

@@ -132,8 +132,8 @@ found."
(defmacro loader! (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). "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\")" (loader! object :tmx-map :load \"map.tmx\")"
[object & options] [object type & options]
`(let [^AsynchronousAssetLoader object# ~object] `(let [^AsynchronousAssetLoader object# ~object]
(u/call! object# ~@options))) (u/call! object# ~@options)))

View File

@@ -60,8 +60,7 @@
(u/call! object# ~k ~@options))) (u/call! object# ~k ~@options)))
(defn add-body! (defn add-body!
"Creates a body from the `b-def`, adds it to the `screen` for physics "Creates a body from `b-def`, adds it to the `screen` and returns it.
simulations and returns it.
(add-body! screen (body-def :dynamic))" (add-body! screen (body-def :dynamic))"
[screen b-def] [screen b-def]

View File

@@ -125,7 +125,7 @@
(btSoftBodyWorldInfo.)) (btSoftBodyWorldInfo.))
(defn add-body! (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))" (add-body! screen (rigid-body info))"
[screen body] [screen body]