-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(🖼️): improved scene graph model (RN Web only for now) (#2863)
This is a new model where use a Picture recorder that supports animation values. Consider the following deeply nested tree: ```jsx <Image x={0} y={0} width={width} height={height} image={oslo} fit="cover"> <ColorMatrix matrix={matrix} /> <LinearToSRGBGamma> <Lerp t={t}> <ColorMatrix matrix={purple} /> <ColorMatrix matrix={blackAndWhite} /> </Lerp> </LinearToSRGBGamma> </Image> ``` This will generate the following instruction set: ``` [ { type: 'SaveCTM', props: { transform: [Array] } }, { type: 'SavePaint', props: {} }, { type: 'PushColorFilter', colorFilterType: 'skMatrixColorFilter', props: { matrix: [Array] } }, { type: 'PushColorFilter', colorFilterType: 'skMatrixColorFilter', props: { matrix: [Array] } }, { type: 'PushColorFilter', colorFilterType: 'skMatrixColorFilter', props: { matrix: [Array] } }, { type: 'PushColorFilter', colorFilterType: 'skLerpColorFilter', props: { t: 0.5 } }, { type: 'PushColorFilter', colorFilterType: 'skLinearToSRGBGammaColorFilter', props: {} }, { type: 'ComposeColorFilter' }, { type: 'MaterializePaint' }, { type: 'DrawImage', props: { x: 0, y: 0, width: 256, height: 256, image: [JsiSkImage], fit: 'cover' } }, { type: 'RestorePaint' }, { type: 'RestoreCTM' } ] ```
- Loading branch information
1 parent
167e4e2
commit fef5aba
Showing
42 changed files
with
2,216 additions
and
1,788 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file modified
BIN
+10.3 KB
(120%)
packages/skia/src/__tests__/snapshots/image-filter/test-shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.