Update examples

This commit is contained in:
dcodeIO
2018-10-11 09:09:56 +02:00
parent be5073aba5
commit 87ec6c59ce
2 changed files with 45 additions and 40 deletions

View File

@ -137,3 +137,8 @@ function bench(steps) {
system.advance(0.01);
}
exports.bench = bench;
function getBody(index) {
var bodies = system.bodies;
return index < bodies.length ? bodies[index] : null;
}
exports.getBody = getBody;