Current angle of the body.
An angular velocity of the body.
The sum of areas of all shapes attached to the body.
A variable which determines the body's ability to sleep
A center mass of the body.
An id of the body
The moment of inertia of the body. This determines how hard it is to rotate the body.
A number equal to 1 / body.inertia.
A number equal to 1 / body.mass.
A Set of all joints attached to the body
The sum of masses of all shapes attached to the body.
Vector relative to which the shapes are attached.
Set of shapes attached to the body.
Current sleeping state of the body(awake, sleepy, of sleeping)
A type of the body(dynamic, static or kinematic).
A variable that contains user data
A linear velocity of the body.
A number that determines how fast the body slows down. Must be in range 0...1.
Clears all events.
Unsubscribes the callback function from the given event name.
True if the event was successfully unsubscribed, otherwise false
Subscribes the callback function to the given event name.
The id of the event
Subscribes the callback function to the given event name for one time.
Rotates the body by the given angle.
Sets body.canSleep to the given value. If necessary awakens a body.
Sets the angle of the body to the given.
Sets the body's ability to rotate to the given value.
Sets the position of the body to the given.
Sets sleeping state to the given value
Sets body's type to the given.
Sets the velosity of a body to the given.
Translates the body by the given vector.
Triggers all the callbacks subscribed to the given name.
Updates the area of the body.
Updates the center of mass of the body.
Updates the inertia of the body.
Updates the mass of the body.
Updates position of the body.
Updates velocity of the body.
The delta time
Generated using TypeDoc
The bodies have position, angle, velocity. You can apply forces, impulses and add the shapes to the bodies. The bodies can be dynamic, static or kinematic.
A dynamic bodies normally move according to forces but can be moved manually by the user. Dynamic bodies collide with all body types. You can set the mass of the dynamic bodies, but it can't be zero.
A static bodies do not respond to forces and can't be moved by other bodies and behaves as if it has infinite mass. Static bodies do not collide with other static and kinematic bodies.
A kinematic bodies do not respond to forces and can't be moved by other bodies and behaves as if it has infinite mass. Kinematic can be moved by setting its velocity. Kinematic bodies do not collide with other kinematic and static bodies.
Events: