From 8ea0be1fd4cc529593ca4d3b9dbca197c018a077 Mon Sep 17 00:00:00 2001 From: verekia <522007+verekia@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:40:38 +0700 Subject: [PATCH] fix: remove state.delta from throttle condition --- packages/core/src/main-loop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/main-loop.ts b/packages/core/src/main-loop.ts index 957868e..91fc1ae 100644 --- a/packages/core/src/main-loop.ts +++ b/packages/core/src/main-loop.ts @@ -66,7 +66,7 @@ export const addMainLoopEffect = ( const lastExecution = callbackLastExecutions.get(callback) || 0 const throttleInterval = options?.throttle || 0 - if (state.time - lastExecution >= throttleInterval + state.delta) { + if (state.time - lastExecution >= throttleInterval) { state.deltaWithThrottle = (state.time - lastExecution) / 1000 callbackLastExecutions.set(callback, state.time)