react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Skia React Native for web

Open Sundarcj opened this issue 4 years ago • 8 comments

Hi , i saw your remotion example using canvaskit-wasm. i want to reuse as much as code possible. is there any way to reuse your skia react native renderer for web?. i would like to contribute also.

Sundarcj avatar Feb 15 '22 18:02 Sundarcj

We'll will be providing web support but it will take a couple of months.

If you want to use it already, you can reuse the renderer, it will require a bit of tweaking:

  • The Skia module is available directly, because wasm load asynchronously you will need to make CanvasKit via a hook and inject it into the redenderer
  • Some of our JSI instance are typed arrays in canvaskit. For instance rectangles and rounded rectangles. Colors are typed arrays in canvaskit but numbers in our Skia integration. So slight adaptation needs to be done there.

Let's keep this issue open to keep track of the react native web support.

wcandillon avatar Feb 15 '22 18:02 wcandillon

Hi @wcandillon any updates on web support?

Sundarcj avatar May 02 '22 07:05 Sundarcj

No updates yet, it is something we will start end of Q3/Q2 22

wcandillon avatar May 02 '22 07:05 wcandillon

Would love to try and contribute to this if it can be broken down into steps, I will need the feature myself so I can test it out as well.

Dueen avatar May 15 '22 12:05 Dueen

@Dueen did you find any other way to use this project in web.

Sundarcj avatar May 28 '22 17:05 Sundarcj

Hi @wcandillon any doc example for skia web ?

Sundarcj avatar Jun 16 '22 18:06 Sundarcj

This is still a work in progress; stay tuned. If you run the example app with yarn web, it should work as expected. We are still fixing issues there.

wcandillon avatar Jun 16 '22 20:06 wcandillon

awesome man !! eagerly waiting.

Sundarcj avatar Jun 17 '22 05:06 Sundarcj