-
Notifications
You must be signed in to change notification settings - Fork 481
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
🎭 Mask Bug Fix #245
🎭 Mask Bug Fix #245
Conversation
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.
LGTM, I added a comment about the syntax for useDerivedValue - but I think we'll change this so it doesn't matter :)
@@ -31,6 +34,8 @@ const clipRRect = Skia.RRectXY( | |||
); | |||
|
|||
export const Clipping = () => { | |||
const progress = useLoop({ duration: 3000 }); | |||
const x = useDerivedValue(() => mix(progress.current, 0, 200), [progress]); |
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.
const x = useDerivedValue((p) => mix(p, 0, 200), [progress]);
Yes let's talk about the useDerivedValue thingy ;-) |
This PR fixes #247 and also improve the blend mode example.
The current example was not documenting blend modes properly, we could use it as a reference as seen at
https://skia.org/docs/user/api/skblendmode_overview/
Fiddle: https://fiddle.skia.org/c/5c181cf8f5471e7f58aad4c59222799b