forked from airbnb/lottie-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Update from airbnb #1
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
Open
miszmaniac
wants to merge
1,022
commits into
miszmaniac:master
Choose a base branch
from
airbnb:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
These should all point to opencollective.com/lottie and not opencollective.com/lottie-web, which is currently controlled by a security researcher.
Fix opencollective links in readme
chore(index.d.ts): add setIDPrefix
Make `AnimationItem` type indicate that the `loop` property can be `boolean | number`
Fix transform matrix precalculation when adding effects
fix(package.json) : support esm
In `searcShapes()`, if we found a matching element for a style in `this.processedElements()`, we would reset its `closed` property to `false` always, even if the element is hidden. Instead, set it to the value of the `hd` property to ensure that hidden styles are not re-rendered.
feat: added resetSegments to worker_wrapper
fix: set `sideEffects` as false
When calling `SVGShapeElement.reloadShapes()`, `searchShapes()` will correctly reconciliate modified and added shapes and reuse their elements. However, it will call `setElementStyles()`, which will add all styles unconditionally to `this.stylesList`, even if the styles were already in there. Modify `setElementStyles()` to check for the existence of a particular style before adding it.
With efeb109, support for transform effects has been added, which required introducing another matrix on `TransformElement` to represent the final transform matrix including the effects. This matrix is denoted as `localMat` If there are no transform effects, `localMat` is the same (referentially) as the existing transform matrix (`mat`). Otherwise, it's calculated by composing the transform effects and then composing that with the "old" transform matrix. Alongside `localMat`, a `_localMatMdf` member is introduced, which tracks whether the local matrix was modified since its last commit to the DOM, analogously to `_matMdf`. Unfortunately, a logic bug introduced by efeb109 meant that, in the absence of transform effects, `_localMatMdf` was latched to `true`, i.e. no code path would ever be able to reset it to `false` after it was once set to `true` (e.g. as a result of the matrix being animated). This causes a serious performance regression, since all matrices that once had `_matMdf` set to `true` will keep being updated in the DOM every frame, causing costly full style recalculations. Fix by forcing `_matMdf` and `_localMatMdf` to be equivalent in the case of no transform effects, just as `mat` and `localMat` are referentially equal. In the case of >0 transform effects, the custom logic in `renderLocalTransform()` will take over and compute `_localMatMdf` separately from and based on `_matMdf`.
Ensure `_localMatMdf` is reset to `false`
…lement Don't re-add existing styles to SVGShapeElement
Fix hidden styles being reset to visible
Update type definition of `AnimationItem.resize`
feat(types): added dpr setting to ts definition
…ient circles Due to the way `_mdf` (modified) flags are checked in `SVGElementsRenderer.renderGradient()`, it's possible that the `fx` and `fy` components of a radial gradient, defining its "inner" circle (used for highlights via `.h` and `.a` members of a `gf` shape element in the Lottie JSON), fall out of sync with `cx` and `cy` which define its outer circle. In particular, the branch which sets `fx`/`fy` triggers only when the gradient end point changes, but then sets `fx` and `fy` based on a calculation that involves both the start and end points. Therefore, if the start point of a gradient ever changes without a corresponding change in the end point, the `cx`/`cy` value will be updated but not the `fx`/`fy` value, causing visual artifacts.
…cle-desync-upstream fix: Avoid desync between start and end (outer and inner) radial gradient circles
fix: document validation for SSR
version 5.13.0
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.
No description provided.