clear()
Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.
The P2 world is also cleared:
- Removes all solver equations
 - Removes all constraints
 - Removes all bodies
 - Removes all springs
 - Removes all contact materials
 
This is called automatically when you switch state.
- Source code: physics/p2/World.js (Line 800)
 
Please login to continue.