diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-06 12:59:07 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-06 12:59:07 +0200 |
| commit | c411edb7c160c55e94fddf62fd60fa1e166351c0 (patch) | |
| tree | 39495bfc8120590c93943a396cce2b477d3faa6c /apps/web/src/lib/animation/bezier.ts | |
| parent | 2776adaae1512bf925c5bb4564b311b37f46202d (diff) | |
| download | opencut-c411edb7c160c55e94fddf62fd60fa1e166351c0.tar.gz | |
fix: clean up
Diffstat (limited to 'apps/web/src/lib/animation/bezier.ts')
| -rw-r--r-- | apps/web/src/lib/animation/bezier.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/src/lib/animation/bezier.ts b/apps/web/src/lib/animation/bezier.ts index 4dce027e..5a9758ed 100644 --- a/apps/web/src/lib/animation/bezier.ts +++ b/apps/web/src/lib/animation/bezier.ts @@ -1,5 +1,7 @@ import type { ScalarAnimationKey } from "@/lib/animation/types"; +const BEZIER_SOLVE_ITERATIONS = 20; + export function getBezierPoint({ progress, p0, @@ -68,7 +70,7 @@ export function solveBezierProgressForTime({ const leftHandle = rightKey.leftHandle ?? getDefaultLeftHandle({ leftKey, rightKey }); - for (let iteration = 0; iteration < 20; iteration++) { + for (let iteration = 0; iteration < BEZIER_SOLVE_ITERATIONS; iteration++) { const mid = (lower + upper) / 2; const estimate = getBezierPoint({ progress: mid, |
