Nape Physics
Rigid body physics with the nape plugin: click anywhere to drop boxes that fall, stack, and tumble over rotated bumpers with realistic rotations.
// Give some gravity to the default nape space
app.nape.space.gravity.setxy(0, 600);
// A STATIC body: part of the simulation, but immovable
floor.initNapePhysics(STATIC);
// A DYNAMIC body: fully simulated (gravity, collisions, rotation).
// The visual follows the physics body automatically.
box.initNapePhysics(DYNAMIC);
Next example ➔ Scene Transitions