Skip to content
Browse files

use updated matter.js runner api

  • Loading branch information...
1 parent b8fa8d0 commit d4cb41ab547e7444abd5657df91ccb14b3de848d @shakiba committed
Showing with 4,012 additions and 1,369 deletions.
  1. +4,008 −1,365 example/dep/{matter-0.8.0.js → matter.js}
  2. +1 −1 example/matterjs/app.js
  3. +1 −1 example/matterjs/index.html
  4. +2 −2 ext/stage-matter.js
View
5,373 example/dep/matter-0.8.0.js → example/dep/matter.js
4,008 additions, 1,365 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 example/matterjs/app.js
@@ -39,7 +39,7 @@ World.add(world, Bodies.rectangle(0, height, corner, corner, frame));
World.add(world, Bodies.rectangle(width, 0, corner, corner, frame));
World.add(world, Bodies.rectangle(width, height, corner, corner, frame));
-var blockId = Body.nextGroupId();
+var blockId = Body.nextGroup();
for (var i = 0; i <= 10; i++) {
for (var j = 0; j <= 10; j++) {
World.add(world, Bodies.rectangle(100 + i * 40, 100 + j * 40, 40, 40, {
View
2 example/matterjs/index.html
@@ -12,7 +12,7 @@
<script src="../example.js"></script>
<script src="../../dist/stage.web.js"></script>
- <script src="../dep/matter-0.8.0.js"></script>
+ <script src="../dep/matter.js"></script>
<script src="../../ext/stage-matter.js"></script>
<script src="app.js"></script>
View
4 ext/stage-matter.js
@@ -60,11 +60,11 @@
self.addRenderable(bodies[i]);
}
- var runner = Runner.runner(engine);
+ var runner = Runner.create(engine);
var time = 0;
this.tick(function(t) {
time += t;
- runner(time);
+ Runner.tick(runner, engine, time);
return true;
});
}

0 comments on commit d4cb41a

Please sign in to comment.
Something went wrong with that request. Please try again.