Skip to content

Instantly share code, notes, and snippets.

@Joncom
Created June 4, 2013 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joncom/5703442 to your computer and use it in GitHub Desktop.
Save Joncom/5703442 to your computer and use it in GitHub Desktop.
ImpactJS Box2D - Get Body Count
getbodyCount = function() {
var count = 0;
for( var body = ig.world.GetBodyList(); body; body = body.m_next ) {
count++;
}
console.log(count);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment