physics library
Physics helpers (Forge2D adapters) for Artisanal.
Experimental: this API is still evolving and may change in minor releases. This library exposes lightweight wrappers plus common forge2d types so you can integrate physics into UV/TUI demos without extra setup.
Classes
- DistanceJoint
- A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
- Joint
- The base joint class. Joints are used to constrain two bodies together in various fashions. Some joints also feature limits and motors.
- PhysicsSettings
- Global physics settings (Forge2D uses module-level settings).
- PhysicsWorld
-
Convenience wrapper around a Forge2D
World. - RevoluteJoint
- A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
Typedefs
- Body = Body
- Alias for a forge2d physics body.
- BodyDef = BodyDef
- Alias for a forge2d body definition.
- BodyType = BodyType
- Alias for forge2d body types (static, dynamic, kinematic).
- CircleShape = CircleShape
- Alias for a forge2d circle shape.
- EdgeShape = EdgeShape
- Alias for a forge2d edge (line segment) shape.
- FixtureDef = FixtureDef
- Alias for a forge2d fixture definition.
- PolygonShape = PolygonShape
- Alias for a forge2d convex polygon shape.
- Shape = Shape
- Alias for the forge2d shape base class.
- Vec2 = Vector2
- Re-export common forge2d types for convenience. Alias for forge2d's 2-D vector.