We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a30707f commit 2581595Copy full SHA for 2581595
1 file changed
test/ExampleWorker.js
@@ -12,7 +12,12 @@ const runExample = options => {
12
13
const Examples = requireUncached('../examples/index');
14
const example = Examples[options.name]();
15
+
16
const engine = example.engine;
17
+ const runner = example.runner;
18
19
+ runner.delta = 1000 / 60;
20
+ runner.isFixed = true;
21
22
let totalMemory = 0;
23
let totalDuration = 0;
@@ -24,8 +29,8 @@ const runExample = options => {
24
29
for (let i = 0; i < options.updates; i += 1) {
25
30
const startTime = process.hrtime();
26
31
totalMemory += process.memoryUsage().heapUsed;
27
-
28
- Matter.Engine.update(engine, 1000 / 60);
32
33
+ Matter.Runner.tick(runner, engine, i * runner.delta);
34
35
const duration = process.hrtime(startTime);
36
totalDuration += duration[0] * 1e9 + duration[1];
0 commit comments