Liking cljdoc? Tell your friends :D

play-clj.g2d-physics


add-body!clj

(add-body! screen b-def)

Creates a body from b-def, adds it to the screen and returns it.

(add-body! screen (body-def :dynamic))

Creates a body from `b-def`, adds it to the `screen` and returns it.

(add-body! screen (body-def :dynamic))
sourceraw docstring

add-joint!clj

(add-joint! screen j-def)

Adds the joint to the screen for physics simulations and returns it.

Adds the `joint` to the `screen` for physics simulations and returns it.
sourceraw docstring

body!cljmacro

(body! entity k & options)

Calls a single method on a body.

Calls a single method on a body.
sourceraw docstring

body-angle!clj

(body-angle! entity angle)

Changes the angle (degrees) of the body in entity.

Changes the `angle` (degrees) of the body in `entity`.
sourceraw docstring

body-defcljmacro

(body-def k & options)

Returns a BodyDef.

(body-def :dynamic)

Returns a [BodyDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/BodyDef.html).

(body-def :dynamic)
sourceraw docstring

body-position!clj

(body-position! entity x y angle)

Changes the position of the body in entity. The angle is in degrees.

Changes the position of the body in `entity`. The angle is in degrees.
sourceraw docstring

body-x!clj

(body-x! entity x)

Changes the x of the body in entity.

Changes the `x` of the body in `entity`.
sourceraw docstring

body-y!clj

(body-y! entity y)

Changes the y of the body in entity.

Changes the `y` of the body in `entity`.
sourceraw docstring

box-2dcljmacro

(box-2d gravity-x gravity-y & options)

Returns a World.

(box-2d 0 0)

Returns a [World](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/World.html).

(box-2d 0 0)
sourceraw docstring

box-2d!cljmacro

(box-2d! screen k & options)

Calls a single method on a box-2d.

Calls a single method on a `box-2d`.
sourceraw docstring

box-2d*clj

(box-2d*)
(box-2d* gravity-x gravity-y)
(box-2d* gravity-x gravity-y sleep?)
source

chain-shapecljmacro

(chain-shape & options)

Returns a ChainShape.

Returns a [ChainShape](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/ChainShape.html).
sourceraw docstring

chain-shape!cljmacro

(chain-shape! object k & options)

Calls a single method on a chain-shape.

Calls a single method on a `chain-shape`.
sourceraw docstring

chain-shape*clj

(chain-shape*)
source

circle-shapecljmacro

(circle-shape & options)

Returns a CircleShape.

Returns a [CircleShape](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/CircleShape.html).
sourceraw docstring

circle-shape!cljmacro

(circle-shape! object k & options)

Calls a single method on a circle-shape.

Calls a single method on a `circle-shape`.
sourceraw docstring

circle-shape*clj

(circle-shape*)
source

edge-shapecljmacro

(edge-shape & options)

Returns an EdgeShape.

Returns an [EdgeShape](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/EdgeShape.html).
sourceraw docstring

edge-shape!cljmacro

(edge-shape! object k & options)

Calls a single method on an edge-shape.

Calls a single method on an `edge-shape`.
sourceraw docstring

edge-shape*clj

(edge-shape*)
source

first-entityclj

(first-entity screen entities)

Returns the first entity in a contact. May only be used in contact functions such as :on-begin-contact.

Returns the first entity in a contact. May only be used in contact functions
such as :on-begin-contact.
sourceraw docstring

fixture!cljmacro

(fixture! object k & options)

Calls a single method on a fixture.

Calls a single method on a fixture.
sourceraw docstring

fixture-defcljmacro

(fixture-def & options)

Returns a FixtureDef.

Returns a [FixtureDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/FixtureDef.html).
sourceraw docstring

joint!cljmacro

(joint! object k & options)

Calls a single method on a joint.

Calls a single method on a joint.
sourceraw docstring

joint-defcljmacro

(joint-def k & options)

Returns a subclass of JointDef.

(joint-def :rope)

Returns a subclass of [JointDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/JointDef.html).

(joint-def :rope)
sourceraw docstring

polygon-shapecljmacro

(polygon-shape & options)

Returns a PolygonShape.

Returns a [PolygonShape](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/PolygonShape.html).
sourceraw docstring

polygon-shape!cljmacro

(polygon-shape! object k & options)

Calls a single method on a polygon-shape.

Calls a single method on a `polygon-shape`.
sourceraw docstring

polygon-shape*clj

(polygon-shape*)
source

second-entityclj

(second-entity screen entities)

Returns the second entity in a contact. May only be used in contact functions such as :on-begin-contact.

Returns the second entity in a contact. May only be used in contact functions
such as :on-begin-contact.
sourceraw docstring

step!clj

(step! {:keys [world time-step velocity-iterations position-iterations]
        :or {time-step (/ 1 60) velocity-iterations 10 position-iterations 10}
        :as screen})
(step! screen entities)

Runs the physics simulations for a single frame and optionally returns the entities with their positions updated.

Runs the physics simulations for a single frame and optionally returns the
`entities` with their positions updated.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close