joint - restructured common, client - added makebox function

This commit is contained in:
logsol 2012-07-18 15:29:19 +02:00
parent 5898f29167
commit ca9c780bd7
2 changed files with 38 additions and 26 deletions

View file

@ -52,4 +52,18 @@ function getElementPosition(element) {
}
}
function findBody(index) {
var body = null;
var nextBody = world.GetBodyList();
for (var i = 0; i < bodiesNum; i++) {
if (nextBody.GetUserData().bodyId == index) { body = nextBody; break; }
nextBody = nextBody.GetNext();
}
return body;
}
window.onload = init;