From ff06dfd75f9368495c0dbbff708020baa27e9935 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Mon, 10 Nov 2025 16:01:25 +0100 Subject: [PATCH] feat: more precise stats --- app/components/Stats.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Stats.vue b/app/components/Stats.vue index e2bd688..3b48974 100644 --- a/app/components/Stats.vue +++ b/app/components/Stats.vue @@ -4,7 +4,7 @@ const props = withDefaults(defineProps<{ x?: number; y?: number }>(), { y: 0, }); -const SAMPLES = 60; +const SAMPLES = 600; let average = { deltaTime: 0, realDeltaTime: 0 }; const lastFrames: (typeof average)[] = []; @@ -36,7 +36,7 @@ useRender((ctx) => { let textY = props.y; ctx.fillStyle = "black"; - ctx.fillText("[avg on 60 frames]", props.x, (textY += LINE_HEIGHT)); + ctx.fillText(`[avg on ${SAMPLES} frames]`, props.x, (textY += LINE_HEIGHT)); ctx.fillText( `fps=${(1000 / average.deltaTime).toFixed()}`, props.x,