-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Extract Worklet API to RuntimeManager.h
#1861
Extract Worklet API to RuntimeManager.h
#1861
Conversation
…`RuntimeManager`
Note that I still haven't tested if it would work to use a SharedValue in a separate worklet runtime (that is not the REA UI runtime). So e.g.: // [[react JS runtime]]
const sv = useSharedValue(1)
const as = useAnimatedStyle(() => ({
// [[reanimated UI runtime]]
opacity: sv.value
}), [sv]);
const fp = useFrameProcessor(() => {
// [[VisionCamera frame processor runtime]]
sv.value = Math.random() // <-- no idea if that works.
}, [sv]);
// ... If it doesn't work, this will require an additional PR in the future. |
@Szymon20000 / @piaskowyk let me know if you need anything. |
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.
Generally, It looks ok to me👌
It is waiting for @Szymon20000 review.
Part 3 of 3
valueSetter
,runtime
,errorHandler
,scheduler
andworkletsCache
out ofNativeReanimatedModule
, intoRuntimeDecorator.h
NativeReanimatedModule
extendRuntimeDecorator
(all worklet API consumers should do that)RuntimeDecorator
instead ofNativeReanimatedModule
to make it more abstract