From 7ec38a1f1c7cbfc5e37cc2a1c1b9a2978dc06ab0 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 13 Aug 2023 18:59:33 +0100 Subject: [PATCH] added pixel ratio scaling to render debug stats --- src/render/Render.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render/Render.js b/src/render/Render.js index 1002a42..9507049 100644 --- a/src/render/Render.js +++ b/src/render/Render.js @@ -144,6 +144,8 @@ 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); } @@ -151,6 +153,8 @@ var Mouse = require('../core/Mouse'); if (render.options.showPerformance || render.options.showDebug) { Render.performance(render, render.context, time); } + + render.context.setTransform(1, 0, 0, 1, 0, 0); })(); };