addRectangle(width, height, offsetX, offsetY, rotation) → {p2.Box}
Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.
Parameters
Name Type Argument Default Description width number The width of the rectangle in pixels. height number The height of the rectangle in pixels. offsetX number <optional> 0 Local horizontal offset of the shape relative to the body center of mass. offsetY number <optional> 0 L