0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-20 17:10:11 -05:00

added pixel ratio scaling to render debug stats

This commit is contained in:
liabru 2023-08-13 18:59:33 +01:00
parent 5f79511391
commit 7ec38a1f1c

View file

@ -144,6 +144,8 @@ var Mouse = require('../core/Mouse');
Render.world(render, time); Render.world(render, time);
render.context.setTransform(render.options.pixelRatio, 0, 0, render.options.pixelRatio, 0, 0);
if (render.options.showStats || render.options.showDebug) { if (render.options.showStats || render.options.showDebug) {
Render.stats(render, render.context, time); Render.stats(render, render.context, time);
} }
@ -151,6 +153,8 @@ var Mouse = require('../core/Mouse');
if (render.options.showPerformance || render.options.showDebug) { if (render.options.showPerformance || render.options.showDebug) {
Render.performance(render, render.context, time); Render.performance(render, render.context, time);
} }
render.context.setTransform(1, 0, 0, 1, 0, 0);
})(); })();
}; };