0
0
Fork 0
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:
liabru 2019-09-15 23:46:07 +01:00
parent ea5c01294e
commit e0cdbb8ee2

View file

@ -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,