Skip to content

Commit 0a93c8e

Browse files
committed
check isMobile()
1 parent 1cb1eb1 commit 0a93c8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async function init() {
223223
stats.dom.style.left = 'calc(env(safe-area-inset-left,0px) + 10px)';
224224
stats.dom.style.zIndex = '9999';
225225
stats.dom.style.transformOrigin = 'top left';
226-
stats.dom.style.transform = window.innerWidth < 768 ? 'scale(1.6)' : 'scale(1)';
226+
stats.dom.style.transform = isMobile() ? 'scale(1.6)' : 'scale(1)';
227227
document.body.appendChild(stats.dom);
228228

229229
function Update() {
@@ -255,7 +255,7 @@ async function init() {
255255
Update();
256256

257257
window.addEventListener("resize", () => {
258-
stats.dom.style.transform = window.innerWidth < 768 ? 'scale(1.6)' : 'scale(1)';
258+
stats.dom.style.transform = isMobile() ? 'scale(1.6)' : 'scale(1)';
259259
camera.aspect = window.innerWidth / window.innerHeight;
260260
camera.updateProjectionMatrix();
261261
renderer.setSize(window.innerWidth, window.innerHeight);

0 commit comments

Comments
 (0)