improve keyframe animation#857
Merged
Merged
Conversation
…k 'Latin Extended-A' - European characters)
Expanded UNICODE range for Latin characters from 33-255 to 33-383
fix(pattern): fix matrix order & fix pattern create failed error
To compatible with the environment that not support css animation
Still set attributes once when all values in keyframes are same.
For the case:
el.x = 0;
el.animate().when(0, {x: 100}.when(100, {x: 100}
Ensure the attribute will be set instead of ignored.
Which means the initial value is before the animation start.
Member
|
Looks promising! 🔥 |
Merged
5 tasks
plainheart
reviewed
Dec 17, 2021
plainheart
reviewed
Dec 19, 2021
6 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR aims to improving the keyframe based animation in zrender and https://github.com/apache/echarts on top of it.
There are no big changes. All changes are minor but can imporve the flexibity of keyframe animation.
The ultimate goal is keyframe animation in zrender can have enough flexibity to display a very complex lottie animation.
Here is the full change list:
Add easing configuration for each keyframe
Instead of configuring easing for the whole animation. We support easing configuration for each frame now. It can provide more granular timing functions.
Use case
Add cubic-bezier timing functions
Instead of using builtin easing function or custom callback functions. We add more commonly used
cubic-beziertiming function which has same format with CSS.Use case
Support animation on gradient color
Previously we can only do interpolation between solid colors with string. Now we can have animation between gradient colors with arbitrary color stops.
But animation between gradient color and solid color are not supported yet.
Use case
Support discrete animation
Previously if one property can not be animated, like
ignore, it will skip the animation and assign the final value directly.Now we can have discrete animation on these properties.
Use case
Support negative keyframe time
Negative keyframe exist in the lottie animations. It's useful when we wan it to be in the intermediate frame on the initial state.
Use case
Support
anchorXandanchorYanchorXandanchorYis used in some animation systems like lottie. It will translate the shape to the anchor before applying other transforms. The difference between anchor and origin is that origin won't translate the shape. Before using anchor, we need an extra group to do the anchor transform.Now we can just use one group:
Deprecated functions
These unused functions are removed to reduce the complexity.
Catmull-Rom spline timing function is removed.
Polyfill of dashed line in the browsers IE <= 10 is dropped.
Clip#gapis removed.animation#onframecallback is removed. Useanimation#on('frame')instead.zrender#pathToImage