Liking cljdoc? Tell your friends :D

lambdaisland.cljbox2d


*camera*clj/s

source

add-bodyclj/s

(add-body world props)
source

add-fixtureclj/s

(add-fixture body f)
(add-fixture body shape density)
source

add-jointclj/s

(add-joint world props)
source

alter-user-data!clj/s

(alter-user-data! entity f & args)
source

body-defclj/s

(body-def {:keys [active? allow-sleep? angle angular-damping angular-velocity
                  awake? bullet? fixed-rotation? gravity-scale linear-damping
                  linear-velocity position type user-data]
           :as props})
source

body-typeclj/s

source

ContactListenerFanoutclj

source

ctl!clj/s

(ctl! entity & kvs)
source

destroyclj/s

(destroy world object)
source

find-all-byclj/s

(find-all-by container k v)

Find all bodies or fixtures with a given user-data property, e.g. (find-by world :type :npc)

Find all bodies or fixtures with a given user-data property,
e.g. (find-by world :type :npc)
sourceraw docstring

find-byclj/s

(find-by container k v)

Find a body or fixture with a given user-data property, e.g. (find-by world :id :player)

Find a body or fixture with a given user-data property,
e.g. (find-by world :id :player)
sourceraw docstring

fixture-defclj/s

(fixture-def {:keys [density filter friction sensor? restitution shape
                     user-data]
              :as props})
source

ICoerceclj/sprotocol

as-vec2clj/s

(as-vec2 _)
source

indexedclj/s

(indexed entities)
source

IOperationsclj/sprotocol

apply-force!clj/s

(apply-force! _ force)
(apply-force! _ force point)

ctl1!clj/s

(ctl1! entity k v)

Generically control properties

Generically control properties

zoom*!clj/s

(zoom*! _ f)

move-to!clj/s

(move-to! _ v)

apply-angular-impulse!clj/s

(apply-angular-impulse! _ impulse)

apply-torque!clj/s

(apply-torque! _ torque)

alter-user-data*!clj/s

(alter-user-data*! entity f args)

move-by!clj/s

(move-by! _ v)

apply-impulse!clj/s

(apply-impulse! _ impulse wake?)
(apply-impulse! _ impulse point wake?)
source

IPropertyclj/sprotocol

fixtureclj/s

(fixture _)

frictionclj/s

(friction _)

bodyclj/s

(body _)

densityclj/s

(density _)

angular-velocityclj/s

(angular-velocity _)

sensor?clj/s

(sensor? _)

bodiesclj/s

(bodies _)

linear-velocityclj/s

(linear-velocity _)

bullet?clj/s

(bullet? _)

verticesclj/s

(vertices _)

transformclj/s

(transform _)

awake?clj/s

(awake? _)

radiusclj/s

(radius _)

angleclj/s

(angle _)

gravityclj/s

(gravity _)

user-dataclj/s

(user-data _)

fixturesclj/s

(fixtures _)

centroidclj/s

(centroid _)

Local position of a shape/fixture inside a body

Local position of a shape/fixture inside a body

world-centerclj/s

(world-center _)

restitutionclj/s

(restitution _)

fixed-rotation?clj/s

(fixed-rotation? _)

jointsclj/s

(joints _)

shapeclj/s

(shape _)

positionclj/s

(position _)

filter-dataclj/s

(filter-data _)
source

IValueclj/sprotocol

valueclj/s

(value _)
source

joint-defclj/s

(joint-def {:keys [type collide-connected? bodies joints frequency damping
                   local-anchors length max-force max-torque ratio linear-offset
                   angular-offset correction-factor local-axis reference-angle
                   enable-limit? lower-translation upper-translation
                   enable-motor? max-motor-force motor-speed ground-anchors
                   lengths lower-angle upper-angle max-motor-torque max-length]
            :as props})
source

linked-list-seqclj/s

(linked-list-seq x)
source

listen!clj/s

(listen! world event key f)

Listen for world events, event is one of :begin-contact, :end-contact, :pre-solve, :post-solve. key is a key you choose to identify this listener. Calling listen! again with the same event+key will replace the old listener. The key can also be used to unlisten!

Returns the world instance for easy threading.

Listen for world events, `event` is one
of :begin-contact, :end-contact, :pre-solve, :post-solve. `key` is a key you
choose to identify this listener. Calling [[listen!]] again with the same
event+key will replace the old listener. The key can also be used
to [[unlisten!]]

Returns the world instance for easy threading.
sourceraw docstring

make-shapeclj/smultimethod

source

pan!clj/s

(pan! x y)
(pan! camera x y)
source

pan-x!clj/s

(pan-x! x)
(pan-x! camera x)
source

pan-y!clj/s

(pan-y! y)
(pan-y! camera y)
source

particle-raycastclj

(particle-raycast world pcb point1 point2)
source

particle-raycast-callbackclj

(particle-raycast-callback f)
source

populateclj/s

(populate world bodies)
(populate world bodies joints)
source

raycastclj/s≠

clj
(raycast world rcb point1 point2)
(raycast world rcb pcb point1 point2)
cljs
(raycast world rcb point1 point2)

Perform a raycasting query, this finds bodies that are "visible" from the given point. This takes a callback function, which receives the fixture, point, normal, and fraction. The return value from the callback determines whether the search terminates or not. See raycast-seq for a more convenient wrapper.

Perform a raycasting query, this finds bodies that are "visible" from the
given point. This takes a callback function, which receives the fixture,
point, normal, and fraction. The return value from the callback determines
whether the search terminates or not. See [[raycast-seq]] for a more
convenient wrapper.
sourceraw docstring

raycast-callbackclj

(raycast-callback f)
source

raycast-seqclj/s

(raycast-seq world point1 point2)
(raycast-seq world point1 point2 behavior)

Perform raycasting and return a sequence of fixtures

This draws a line from point1 to point2, and returns fixtures that intersect the line. Behavior can be :all, return all fixtures, or :first, return the first matching fixture. Defaults to :first.

For each fixture returns a map of :fixture: the matching fixture, :point: the point of initial intersection, :normal: the normal vector at point of intersection, :fraction: the fraction along the ray at point of intersection.

Perform raycasting and return a sequence of fixtures

This draws a line from point1 to point2, and returns fixtures that intersect
the line. Behavior can be `:all`, return all fixtures, or `:first`, return the
first matching fixture. Defaults to `:first`.

For each fixture returns a map of `:fixture`: the matching fixture, `:point`:
the point of initial intersection, `:normal`: the normal vector at point of
intersection, `:fraction`: the fraction along the ray at point of
intersection.
sourceraw docstring

rectangleclj/s

(rectangle w h)
(rectangle w h center angle)
source

screen->worldclj/s

(screen->world vec)
(screen->world camera vec)
source

set-viewport!clj/s

(set-viewport! x y scale)
source

setup-listener-fanout!clj/s

(setup-listener-fanout! world)
source

step-worldclj/s

(step-world world)
(step-world world timestep)
(step-world world timestep velocity-iterations position-iterations)
source

unlisten!clj/s

(unlisten! world event key)

Remove a specific event listener

Remove a specific event listener
sourceraw docstring

user-data-defclj/s

(user-data-def props)
source

vec2clj/s

(vec2 x y)
source

worldclj/s

(world gravity-x gravity-y)
source

world->screenclj/s

(world->screen vec)
(world->screen camera vec)
source

world-pointclj/s

(world-point body vec)
source

world-verticesclj/s

(world-vertices fixture)
(world-vertices body fixture-or-shape)
source

zoom!clj/s

(zoom! amount)
(zoom! camera amount)
source

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

× close