feat: add cursor settings, enhance setup wizard and loading animations

This commit is contained in:
2025-07-01 14:13:40 +02:00
parent ba211641a6
commit 50f6812054
10 changed files with 374 additions and 130 deletions

20
src/lib/displayUtils.ts Normal file
View File

@@ -0,0 +1,20 @@
export function estimateRefreshRate(): Promise<number> {
return new Promise((resolve) => {
let last = performance.now();
let frames = 0;
function loop() {
const now = performance.now();
frames++;
if (now - last >= 1000) {
console.log(`Estimated Refresh Rate: ${frames} FPS`);
resolve(frames); // estimated Hz
} else {
requestAnimationFrame(loop);
}
}
requestAnimationFrame(loop);
});
}