mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-24 13:29:01 -05:00
added timing to engine snapshot
This commit is contained in:
parent
ea5c01294e
commit
e0cdbb8ee2
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,7 @@ const limit = (val, precision=3) => {
|
||||||
const engineSnapshot = (engine, extended=false) => {
|
const engineSnapshot = (engine, extended=false) => {
|
||||||
const {
|
const {
|
||||||
positionIterations, velocityIterations,
|
positionIterations, velocityIterations,
|
||||||
constraintIterations, world
|
constraintIterations, timing, world
|
||||||
} = engine;
|
} = engine;
|
||||||
|
|
||||||
const bodies = Composite.allBodies(world);
|
const bodies = Composite.allBodies(world);
|
||||||
|
@ -36,6 +36,7 @@ const engineSnapshot = (engine, extended=false) => {
|
||||||
positionIterations,
|
positionIterations,
|
||||||
velocityIterations,
|
velocityIterations,
|
||||||
constraintIterations,
|
constraintIterations,
|
||||||
|
timing,
|
||||||
bodyCount: bodies.length,
|
bodyCount: bodies.length,
|
||||||
constraintCount: constraints.length,
|
constraintCount: constraints.length,
|
||||||
compositeCount: composites.length,
|
compositeCount: composites.length,
|
||||||
|
|
Loading…
Reference in a new issue