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
"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!

View File

@@ -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)]

View File

@@ -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)))

View File

@@ -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]

View File

@@ -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]