teletilt (#3)

- Context
- sync _tilts_ between participants
- shiny cards
- reconnect clients
- updates Settings
- re-animate Switches

Co-authored-by: Gavin McDonald <gavinmcdoh@gmail.com>
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2025-07-03 14:40:35 -04:00
parent 59aa904c5a
commit fa352238bb
24 changed files with 712 additions and 341 deletions

12
tools/throttle.ts Normal file
View File

@@ -0,0 +1,12 @@
export default function throttle(func: Function, threshold: number) {
let lastCall = 0;
return (...args: any[]) => {
const now = Date.now();
if (now - lastCall >= threshold) {
lastCall = now;
func(...args);
}
};
}