-
-
Notifications
You must be signed in to change notification settings - Fork 865
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding support for linear easing * Fixing tests * Renaming animateStyle to startWaapiAnimation * Adding entrypoints: * adding native animator * Removing spring from sequence bundle * Fixing comment * Adding polyfill and test * Adding test * Latest tests * Latest tests * Updating easing * Latest * Latest * Adding tests * Latest * Updating entry names * Latest filesize improvements * fixing * Laetst * Fixing test * Latest
- Loading branch information
1 parent
b544cce
commit c3d7fd4
Showing
106 changed files
with
5,171 additions
and
481 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,26 @@ | ||
import { animateMini } from "framer-motion/dom" | ||
import { useRef, useEffect } from "react" | ||
|
||
export const App = () => { | ||
const ref = useRef<HTMLDivElement>(null) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
|
||
const animation = animateMini( | ||
ref.current, | ||
{ width: 200 }, | ||
{ duration: 0.1, autoplay: false } | ||
) | ||
|
||
return () => animation.cancel() | ||
}, []) | ||
|
||
return <div id="box" ref={ref} style={style} /> | ||
} | ||
|
||
const style = { | ||
width: 100, | ||
height: 100, | ||
backgroundColor: "#fff", | ||
} |
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,28 @@ | ||
import { animateMini } from "framer-motion/dom" | ||
import { useRef, useEffect } from "react" | ||
|
||
export const App = () => { | ||
const ref = useRef<HTMLDivElement>(null) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
|
||
const animation = animateMini( | ||
ref.current, | ||
{ width: 200 }, | ||
{ duration: 20 } | ||
) | ||
|
||
animation.complete() | ||
|
||
return () => animation.cancel() | ||
}, []) | ||
|
||
return <div id="box" ref={ref} style={style} /> | ||
} | ||
|
||
const style = { | ||
width: 100, | ||
height: 100, | ||
backgroundColor: "#fff", | ||
} |
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,51 @@ | ||
import { spring } from "framer-motion" | ||
import { animate } from "framer-motion/dom/mini" | ||
import { useRef, useEffect } from "react" | ||
|
||
export const App = () => { | ||
const ref = useRef<HTMLDivElement>(null) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
|
||
ref.current.style.backgroundColor = "red" | ||
|
||
let animation = animate( | ||
ref.current, | ||
{ width: [null, 200] }, | ||
{ duration: 0.1 } | ||
) | ||
|
||
if (animation.duration === 0.1) { | ||
animation = animate(ref.current, { width: [null, 200] }, {}) | ||
|
||
if (animation.duration === 0.3) { | ||
animation = animate( | ||
ref.current, | ||
{ width: [null, 200] }, | ||
{ type: spring } | ||
) | ||
|
||
if (animation.duration === 1.06) { | ||
ref.current.style.backgroundColor = "green" | ||
} | ||
} | ||
} | ||
|
||
return () => { | ||
animation.cancel() | ||
} | ||
}, []) | ||
|
||
return ( | ||
<div id="box" ref={ref} style={style}> | ||
content | ||
</div> | ||
) | ||
} | ||
|
||
const style = { | ||
width: 100, | ||
height: 100, | ||
backgroundColor: "#fff", | ||
} |
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,38 @@ | ||
import { animateMini } from "framer-motion/dom" | ||
import { useRef, useEffect } from "react" | ||
|
||
export const App = () => { | ||
const ref = useRef<HTMLDivElement>(null) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
|
||
const animation = animateMini( | ||
ref.current, | ||
{ width: 200 }, | ||
{ duration: 2 } | ||
) | ||
|
||
const timer = setTimeout(() => { | ||
if (!ref.current) return | ||
animateMini(ref.current, { width: 100 }, { duration: 0.5 }) | ||
}, 1000) | ||
|
||
return () => { | ||
animation.cancel() | ||
clearTimeout(timer) | ||
} | ||
}, []) | ||
|
||
return ( | ||
<div id="box" ref={ref} style={style}> | ||
content | ||
</div> | ||
) | ||
} | ||
|
||
const style = { | ||
width: 100, | ||
height: 100, | ||
backgroundColor: "#fff", | ||
} |
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,32 @@ | ||
import { animateMini } from "framer-motion/dom" | ||
import { useRef, useEffect } from "react" | ||
|
||
export const App = () => { | ||
const ref = useRef<HTMLDivElement>(null) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
|
||
const animation = animateMini( | ||
ref.current, | ||
{ width: 200 }, | ||
{ duration: 0.2 } | ||
) | ||
|
||
setTimeout(() => { | ||
animation.pause() | ||
}, 100) | ||
|
||
animation.pause() | ||
|
||
return () => animation.cancel() | ||
}, []) | ||
|
||
return <div id="box" ref={ref} style={style} /> | ||
} | ||
|
||
const style = { | ||
width: 100, | ||
height: 100, | ||
backgroundColor: "#fff", | ||
} |
Oops, something went wrong.