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:
parent
5f79511391
commit
7ec38a1f1c
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue