mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-10 03:37:44 +02:00
[eric] streaming: the gesture stamp starts at -Infinity; zero read as mid-gesture for the app's first 350ms
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
// Capture-phase listeners keep a decaying "interacting" stamp; stream dispatch consults it and
|
||||
// falls back to the 1Hz buffer during the gesture. Smoothness beats token immediacy for ~a second.
|
||||
const DECAY_MS = 350;
|
||||
let p_lastInteraction = 0;
|
||||
// -Infinity, not 0: performance.now() is near 0 at process start, so 0 would read as 'mid-gesture' for the app's first 350ms.
|
||||
let p_lastInteraction = Number.NEGATIVE_INFINITY;
|
||||
|
||||
export function markInteraction(): void {
|
||||
p_lastInteraction = performance.now();
|
||||
|
||||
Reference in New Issue
Block a user