the first body: a renderable with a body in the world
Optionalanchorwhere the joint holds a, in a's own space. Default: the point of
a under b's anchor when the joint is made, so nothing moves; for a
"rope", the centre of a's body. z is its depth, for an adapter
whose bodies have depth (AdapterCapabilities.bodies3d); a 2D
adapter ignores it.
Optionalanchorwhere the joint holds b, in b's own space; default: the centre of
its body. z as for anchorA.
Optionalaxis"slider": the direction b slides in, in a's own space; default:
along x. On an adapter whose bodies have depth
(AdapterCapabilities.bodies3d) it may carry a z, and a
"hinge" takes it as the axis the bodies turn about (default: z, as a
2D hinge turns); a 2D adapter ignores both.
the second body. To pin a to a fixed point, join it to a renderable
with a "static" body.
Optionalcollidewhether a and b still collide with each other; default false
Optionallimits"hinge": the range of b's angle minus a's, in radians.
"slider": the range of travel along axis, in pixels, measured
between the two anchors: from where b starts, when anchorA is left
out. Unbounded when left out.
Optionalmax"rope": the most the anchors can be apart, in pixels; default: their distance when the joint is made
the kind of joint
What World#addJoint joins, and how. Distances are in pixels and angles in radians, as everywhere else in melonJS; the adapter converts them to its engine's units. Anchors are points in each renderable's own space, the space its
bodyDefshapes are written in.Example