-
-
Notifications
You must be signed in to change notification settings - Fork 830
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
411be5b
commit 24f4ae4
Showing
5 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export class Animation { | ||
startTime: number | null = null | ||
|
||
holdTime: number | null = null | ||
|
||
currentTime: number | null = null | ||
} |
1 change: 1 addition & 0 deletions
1
packages/framer-motion/src/animation/animators/AsyncAnimation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export class AsyncAnimation extends Animation {} |
3 changes: 3 additions & 0 deletions
3
packages/framer-motion/src/animation/animators/SyncAnimation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Animation } from "./Animation" | ||
|
||
export class SyncAnimation extends Animation {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { MotionValue } from "." | ||
import { useCombineMotionValues } from "./use-combine-values" | ||
|
||
let collectMotionValues: MotionValue[] | undefined = undefined | ||
|
||
export function useComputed<O>(compute: () => O): MotionValue<O> { | ||
collectMotionValues = [] | ||
compute() | ||
const value = useCombineMotionValues(collectMotionValues, compute) | ||
collectMotionValues = undefined | ||
|
||
return value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters