SparkSplat-Viewer / app /src /modules /interaction /pointerGuards.ts
Jeprary
Initial commit: SparkSplat with proper UTF-8 LFS
1829efb
Raw
History Blame Contribute Delete
296 Bytes
const POINTER_LOCK_SUPPRESSION_MS = 300
let lastObjectInteractionAt = 0
export function markObjectInteraction() {
lastObjectInteractionAt = performance.now()
}
export function shouldSuppressPointerLock() {
return performance.now() - lastObjectInteractionAt < POINTER_LOCK_SUPPRESSION_MS
}