summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/animation/keyframe-query.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-07 01:09:13 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-07 01:09:13 +0200
commite4b67094e757917588fb624a30aa046667403add (patch)
tree55452692eac69a5a63b58f2a5cdb701dd7023d68 /apps/web/src/lib/animation/keyframe-query.ts
parent79df73643185c02493364a077402726d1fa7b9ec (diff)
downloadopencut-e4b67094e757917588fb624a30aa046667403add.tar.gz
refactor: split effects and masks into dedicated rust crates, introduce MediaTime and FrameRate
Diffstat (limited to 'apps/web/src/lib/animation/keyframe-query.ts')
-rw-r--r--apps/web/src/lib/animation/keyframe-query.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/web/src/lib/animation/keyframe-query.ts b/apps/web/src/lib/animation/keyframe-query.ts
index 304a6698..dbcd041c 100644
--- a/apps/web/src/lib/animation/keyframe-query.ts
+++ b/apps/web/src/lib/animation/keyframe-query.ts
@@ -1,4 +1,3 @@
-import { TIME_EPSILON_SECONDS } from "@/constants/animation-constants";
import type {
AnimationBindingInstance,
AnimationChannel,
@@ -76,8 +75,7 @@ function getUniqueBindingKeyframeMatches({
const previousMatch = uniqueMatches[uniqueMatches.length - 1];
if (
!previousMatch ||
- Math.abs(previousMatch.keyframe.time - match.keyframe.time) >
- TIME_EPSILON_SECONDS
+ previousMatch.keyframe.time !== match.keyframe.time
) {
uniqueMatches.push(match);
continue;
@@ -249,9 +247,7 @@ export function getKeyframeAtTime({
matches: getBindingKeyframeMatches({
animations,
binding,
- }).filter(({ keyframe }) =>
- Math.abs(keyframe.time - time) <= TIME_EPSILON_SECONDS,
- ),
+ }).filter(({ keyframe }) => keyframe.time === time),
});
if (!keyframeMatch) {
return null;