Skip to content

Commit 1cb1eb1

Browse files
committed
increase fps info size
1 parent 1ee0c32 commit 1cb1eb1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ async function init() {
219219
const clock = new THREE.Clock();
220220
const stats = new Stats();
221221
stats.dom.style.position = 'fixed';
222-
stats.dom.style.pointerEvents = 'none';
222+
stats.dom.style.top = 'calc(env(safe-area-inset-top,0px) + 10px)';
223+
stats.dom.style.left = 'calc(env(safe-area-inset-left,0px) + 10px)';
224+
stats.dom.style.zIndex = '9999';
225+
stats.dom.style.transformOrigin = 'top left';
226+
stats.dom.style.transform = window.innerWidth < 768 ? 'scale(1.6)' : 'scale(1)';
223227
document.body.appendChild(stats.dom);
224228

225229
function Update() {
@@ -251,6 +255,7 @@ async function init() {
251255
Update();
252256

253257
window.addEventListener("resize", () => {
258+
stats.dom.style.transform = window.innerWidth < 768 ? 'scale(1.6)' : 'scale(1)';
254259
camera.aspect = window.innerWidth / window.innerHeight;
255260
camera.updateProjectionMatrix();
256261
renderer.setSize(window.innerWidth, window.innerHeight);

0 commit comments

Comments
 (0)