-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Defer keyframe resolution #2448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
f5a9238
adding stub
mattgperry 39872a6
Latest
mattgperry 92c01c6
Updating
mattgperry 7ac9a87
Update
mattgperry 084aff6
Fixing
mattgperry 7672ee6
Latest
mattgperry 37adbff
Fixing Motion 3D tests
mattgperry ea5b508
Latest
mattgperry b08c163
Latest
mattgperry c5883ff
Fixing
mattgperry aa24a14
Latest
mattgperry 372f5a8
Reducing size
mattgperry 0296ad2
Fixing test
mattgperry 76e8f76
Updating
mattgperry ec2adcb
Latest
mattgperry bdd559c
Latest
mattgperry 05af0a0
Latest
mattgperry 9ba2544
Latest test fixes
mattgperry a91bd00
Becnhmark changes
mattgperry 19f69bc
Latest
mattgperry 45288f8
Latest
mattgperry 16ac355
Latest
mattgperry d1fc1da
Latest
mattgperry 57031dd
Fixing tests
mattgperry fa89b82
Latest
mattgperry cdbd5f2
Skipping more
mattgperry cb3789e
Fixing tests:
mattgperry 7380ab8
Fixing
mattgperry f949a89
Fix/async animation 2 (#2528)
mattgperry 9001d53
undoing benchmark changes
mattgperry 0b8ab84
Clean
mattgperry e208f4f
Latest
mattgperry a6e7d87
Updating package
mattgperry a900c81
Updating test
mattgperry fc046d3
Latest
mattgperry b2a0bbd
Updating
mattgperry 15532d0
Latest
mattgperry 958bbbb
Adding comment
mattgperry 3d8f06d
Fixing
mattgperry b55ab66
Fixing build
mattgperry 85864c2
Change
mattgperry 2a08624
v11.0.7-alpha.0
mattgperry 8e72328
Updating size
mattgperry 1175f07
comments
mattgperry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,73 @@ | ||
| <html> | ||
| <!-- | ||
| Warm Start: Framer Motion | ||
|
|
||
| This benchmarks warm start - when an animation library already | ||
| knows the initial animating values. | ||
|
|
||
| Run in private browsing mode to avoid browser plugins interfering with | ||
| benchmark. | ||
| --> | ||
| <head> | ||
| <style> | ||
| body { | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .container { | ||
| padding: 100px; | ||
| width: 100%; | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| .container > div { | ||
| width: 100px; | ||
| height: 100px; | ||
| } | ||
|
|
||
| .box { | ||
| width: 10%; | ||
| height: 100px; | ||
| background-color: #fff; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"></div> | ||
|
|
||
| <script src="../../packages/framer-motion/dist/dom.js"></script> | ||
| <script> | ||
| // Create boxes | ||
| const numBoxes = 100 | ||
| let html = `` | ||
| for (let i = 0; i < numBoxes; i++) { | ||
| html += `<div><div class="box"></div></div>` | ||
| } | ||
| document.querySelector(".container").innerHTML = html | ||
|
|
||
| const { animate } = Motion | ||
| const boxes = document.querySelectorAll(".box") | ||
|
|
||
| setTimeout(() => { | ||
| // Warm start | ||
| boxes.forEach((box) => | ||
| animate( | ||
| box, | ||
| { | ||
| rotate: [0, Math.random() * 360], | ||
| backgroundColor: ["#fff", "#f00"], | ||
| width: ["0%", Math.random() * 100 + "%"], | ||
| x: [0, 5], | ||
| }, | ||
| { | ||
| easing: "linear", | ||
| duration: 1, | ||
| } | ||
| ) | ||
| ) | ||
| }, 1000) | ||
| </script> | ||
| </body> | ||
| </html> |
This file contains hidden or 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,84 @@ | ||
| <html> | ||
| <!-- | ||
| Warm Start: GSAP | ||
|
|
||
| This benchmarks warm start - when an animation library already knows | ||
| the initial values to animate. | ||
|
|
||
| Run in private browsing mode to avoid browser plugins interfering with | ||
| benchmark. | ||
| --> | ||
| <head> | ||
| <style> | ||
| body { | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .container { | ||
| padding: 100px; | ||
| width: 100%; | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| .container > div { | ||
| width: 100px; | ||
| height: 100px; | ||
| } | ||
|
|
||
| .box { | ||
| width: 10px; | ||
| height: 100px; | ||
| background-color: #fff; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"></div> | ||
| <script src="../../node_modules/gsap/dist/gsap.min.js"></script> | ||
| <script> | ||
| // Create boxes | ||
| const numBoxes = 100 | ||
| let html = `` | ||
| for (let i = 0; i < numBoxes; i++) { | ||
| html += `<div><div class="box"></div></div>` | ||
| } | ||
| document.querySelector(".container").innerHTML = html | ||
|
|
||
| const boxes = document.querySelectorAll(".box") | ||
|
|
||
| gsap.set(boxes, { | ||
| rotate: 0, | ||
| backgroundColor: "#fff", | ||
| width: "0%", | ||
| x: 0, | ||
| }) | ||
|
|
||
| setTimeout(() => { | ||
| // Warm start | ||
| boxes.forEach((box) => | ||
| gsap.to(box, { | ||
| rotate: Math.random() * 360, | ||
| backgroundColor: "#f00", | ||
| width: Math.random() * 100 + "%", | ||
| x: 5, | ||
| duration: 1, | ||
| }) | ||
| ) | ||
|
|
||
| // setTimeout(() => { | ||
| // // Unit conversion | ||
| // boxes.forEach((box) => | ||
| // gsap.to(box, { | ||
| // width: Math.random() * 100 + "px", | ||
| // x: "50%", | ||
| // duration: 1, | ||
| // easing: "linear", | ||
| // }) | ||
| // ) | ||
| // }, 1500) | ||
| }, 1000) | ||
| </script> | ||
| </body> | ||
| </html> |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ignore the
/benchmarks