-
Notifications
You must be signed in to change notification settings - Fork 711
Basic concepts
Shape A geometrical shape, such as a sphere or a box.
Rigid body A piece of matter that is assumed indefinitely stiff. Any two points in a rigid body are assumed to always be at a constant distance from each other. We may refer to a rigid body by just saying "body". A rigid body has got a shape and a number of physical properties such as mass and inertia.
Constraint A constraint is a physical connection that removes degrees of freedom from bodies. In 3D a body has 6 degrees of freedom (three translation coordinates and three rotation coordinates). If we take a door and put it on a door hinge we have constrained the door body to the wall. At this point the body can only rotate about the door hinge, so the constraint has removed 5 degrees of freedom.
Contact constraint A special constraint designed to prevent penetration of rigid bodies and to simulate friction and restitution. You do not create contact constraints; they are created automatically by Cannon.js.
World A physics world is a collection of bodies and constraints that interact together. Cannon.js supports the creation of multiple worlds, but this is usually not necessary or desirable.
Solver The physics world has a solver that is used to resolve constraints.