AS3 FOAM 2D Physics Engine

A new AS3 physics engine has been released from generalrelativity and adds itself to the block. It is in early alpha but this is looking pretty good so far. APE, the highly anticipated Motor Physics from polygonal labs and now FOAM, so many wonderful physics toys to build games with!

Current Features:

  • Rigid body simulation
    • Arbitrary convex polygons
    • Circles
    • Cubic Bezier curves
    • Lines
  • Constraints
    • Springs
    • Bungees
  • Easily swappable numerical integrators
    • RK4
    • Euler
    • Midpoint
  • Separation Axis Theorem based collision detection
  • Modular force generation

Source

Demos:

SVN:

  • http://foam-as3.googlecode.com/svn/trunk/

Here’s a list of classes in the repo:

AABR
AABRDetector
AbstractSolver
AxisProjection
BezierDetector
Bungee
Circle
CircleAxisProjection
CircleCircleDetector
CirclePolygonDetector
CollisionResolver
CollisionType
Contact
CubicBezierCurve
Euler
Foam
FOAM_AS3
Friction
GravitationalForceGenerator
Gravity
IBody
ICoarseCollisionDetector
ICollisionFactory
IFineCollisionDetector
IFoamRenderer
IForceGenerator
IODE
IODESolver
ISimulatable
KeyDrivenTorqueGenerator
MathUtil
MouseSpring
PerpetualFall
PhysicsEngine
PointPolygonDetector
PolygonPolygonDetector
Renderable
RenderingUtil
RigidBody
RigidBodyBungee
RigidBodySpring
RK4
RotationMatrix
SATCollisionFactory
ShapeUtil
SimpleFoamRenderer
SimpleForceGenerator
SimpleMap
SimpleOrbit
SimpleParticle
Simplification
Spring
Vector
ZeroGravityToyChest

game on! Thanks Drew!