Members
acceleration :Vector2
Acceleration of a body
Type:
- Source:
angle :number
Orientation of a body in degrees.
Type:
- number
- Source:
angularVelocity :number
Angular velocity of a body.
Type:
- number
- Source:
bodies :Array.<Body>
List of bodies contained.
Type:
- Array.<Body>
- Source:
constraints :Array.<Constraint>
List of bodies contained.
Type:
- Array.<Constraint>
- Source:
density :number
Density of a body.
Type:
- number
- Source:
entity :Entity|null
Entity this belongs to.
Type:
- Entity | null
- Source:
mass :number
Mass of a body.
Type:
- number
- Source:
orientation :Angle
Orientation of a body
Type:
- Source:
(package) physicsType :number
Used to determine what it is in a world.
Type:
- number
- Source:
position :Vector2
Position of a body
Type:
- Source:
velocity :Vector2
Velocity of a body
Type:
- Source:
Methods
add(object)
Parameters:
Name | Type | Description |
---|---|---|
object |
Constraint | Body |
- Source:
init(entity, composited)
Initializes the body to its given.Called by the world or an entity manager.
Parameters:
Name | Type | Description |
---|---|---|
entity |
Entity | null | |
composited |
boolean |
- Source:
update()
This updates the world coordinates of shapes, anchors and bounds.
- Source: