Skip to content

Commit

Permalink
added pixel ratio scaling to render debug stats
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Aug 13, 2023
1 parent 5f79511 commit 7ec38a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@ var Mouse = require('../core/Mouse');

Render.world(render, time);

render.context.setTransform(render.options.pixelRatio, 0, 0, render.options.pixelRatio, 0, 0);

if (render.options.showStats || render.options.showDebug) {
Render.stats(render, render.context, time);
}

if (render.options.showPerformance || render.options.showDebug) {
Render.performance(render, render.context, time);
}

render.context.setTransform(1, 0, 0, 1, 0, 0);
})();
};

Expand Down

0 comments on commit 7ec38a1

Please sign in to comment.