mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
joint - restructured common, client - added makebox function
This commit is contained in:
parent
5898f29167
commit
ca9c780bd7
2 changed files with 38 additions and 26 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue