Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 371 forks source link

React Native template #2448

Open PaulHax opened 2 years ago

PaulHax commented 2 years ago

Need

A template repo showing how to use vtk.js in a React Native app with:

Feature

Could look like one of these: https://github.com/Kitware/web-project-templates

Synergies with https://github.com/Kitware/react-vtk-js ?

Hoping this does not require changes to vtk.js.

Proof of concept: https://github.com/PaulHax/vtkjs-react-native

daker commented 2 years ago

I did play with vtk.js and RN with expo-gl a while ago, unfortunately i didn't manage to render anything, some parts need access to an HTML canvas element and the DOM.

daker commented 2 years ago

@PaulHax i did test your POC, it renders the cone animation without errors, the document and the container shims are missing the addEventListener/removeEventListener methods

PaulHax commented 2 years ago

@daker Thanks for kicking the tires =)

container shims are missing the addEventListener/removeEventListener methods

Yes. Should we keep poly-filling a browser on global, find some React Native library that does that, or extend vtk.js "classes" with injectable RN to browser adapters?