Skip to content

Commit cd5548a

Browse files
committed
fix decay animation
1 parent 390305a commit cd5548a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/animated/FrameLoop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const update = () => {
5959
position =
6060
from +
6161
(velocity / (1 - 0.998)) *
62-
(1 - Math.exp(-(1 - 0.998) * (time - controller.startTime)))
62+
(1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)))
6363
endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1
6464
if (endOfAnimation) to = position
6565
} else {

0 commit comments

Comments
 (0)