Skip to content

Commit

Permalink
bugfix: cat/mouse anim period
Browse files Browse the repository at this point in the history
  • Loading branch information
holenet committed Aug 6, 2024
1 parent 76d046b commit 523df6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ function App() {
dy *= speed / d;
return { x: dx, y: dy };
});
const catAnimatedStep = useComputed(() => (isPlaying.value ? ~~(lastTickTime.value / 500) % 2 : 0));
const mouseAnimatedStep = useComputed(() => (isPlaying.value ? ~~(lastTickTime.value / 750) % 2 : 0));
const catAnimatedStep = useComputed(() => (isPlaying.value ? ~~((lastTickTime.value * 1000) / 500) % 2 : 0));
const mouseAnimatedStep = useComputed(() => (isPlaying.value ? ~~((lastTickTime.value * 1000) / 750) % 2 : 0));
const tick = (time: number) => {
const deltaTime = Math.min(0.033333333, time - lastTickTime.value);
lastTickTime.value = time;
Expand Down

0 comments on commit 523df6c

Please sign in to comment.