Fix potential division by zero in dpr calculation

This commit is contained in:
2025-05-28 17:59:29 +02:00
parent 9c0bcd6756
commit 65b84cb3e2

View File

@@ -99,7 +99,7 @@ function onResize() {
renderer.setScissorTest(false);
const dpr = Math.min(window.devicePixelRatio || 1, IS_MOBILE ? 1.0 : 2.0);
const dpr = Math.min(window.devicePixelRatio || 1, IS_MOBILE ? 1 : 2);
renderer.setPixelRatio(dpr);
composer.setPixelRatio(dpr);