Skip to content
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

Any plans or possibilities to use JSI? #57

Open
olosegres opened this issue Dec 15, 2022 · 4 comments
Open

Any plans or possibilities to use JSI? #57

olosegres opened this issue Dec 15, 2022 · 4 comments

Comments

@olosegres
Copy link

Hello, thanks for your work, appreciate it :)

Your tool opens the opportunity to use many libraries and algorithms from web development.

But animation rendering requires JS calculation and some things cannot work normally due to the calculation lags of each frame.
JSI can solve this problem.

Have you think about the opportunity to use it with JSI?

I seems like existing API of react-native-gcanvas api will fit good to the approach that used in react-native-reanimated2 or react-native-skia.

@flyskywhy
Copy link
Owner

Recently (at least a year) I have no time to rewrite everything to JSI, if you desire JSI performance, maybe you can try expo-gl@^11.0.0.

react-native-skia just 2d, but react-native-gcanva support 2d and 3d, so react-native-skia is not considered.

And which api is fit good between react-native-gcanvas and react-native-reanimated2, for example?

@olosegres
Copy link
Author

olosegres commented Dec 19, 2022

I meant js woklets, or a woklet hook, it seems the react-native-gcanvas js API can be left the same as it is now.

I don't know about the difficulty of translating to JSI, is it very labor intensive?

p.s. I can't use those libraries, because I have a lot of business logic tied to the canvas API

@flyskywhy
Copy link
Owner

Do you mean lot of business logic tied to the canvas API can be run in worklet e.g. https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/worklets/ ? Have you tested it or verified it?

With some blog about JSI I've read, translating to JSI need re-write every code so it is very labor intensive.

@olosegres
Copy link
Author

Do you mean lot of business logic tied to the canvas API can be run in worklet e.g

I hope that one day it will be possible :)
No, I didn't try it. I think It should require some patches on native side, but I'm not so deep into the wilds of react-native.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants