react-three-fiber icon indicating copy to clipboard operation
react-three-fiber copied to clipboard

📱 Call for React Native maintainers!

Open gsimone opened this issue 3 years ago • 10 comments

While we move towards version 6 (!!) of react-three-fiber, the native part is still looking for a solid team of maintainers.

We are looking for any kind of help on the react-native department:

  • issues triaging
  • PR reviewing
  • staying on top of react-native changes that might break stuff
  • tests

If you are interested, message me or @drcmda on Twitter or Discord, or just pop in the react-three-fiber channel and let us know

https://discord.gg/ZZjjNvJ

Some of the issues we're currently facing are:

  • #734
  • #791
  • #643
  • #650
  • #663

gsimone avatar Feb 23 '21 21:02 gsimone

Hey! We're a React Native shop that uses react-three-fiber and would love to help out with maintenance.

Any input on where we can start?

jesse-savary avatar Apr 01 '21 03:04 jesse-savary

Hi @jesse-savary, currently we've released v6 but we have no react-native target in the project. I guess that would be a good start, we think with the right knowledge it should be straight forward as the whole core of the renderer is modular....

joshuaellis avatar Apr 01 '21 07:04 joshuaellis

Hey @gsimone, I want to help maintaining this repo. This would be my first open source contribution. Thanks

mayank-budhiraja avatar Apr 14 '21 14:04 mayank-budhiraja

@mayank-budhiraja If you want to help you can start by looking at react-native issues and see if you can reproduce/help fix them

gsimone avatar Apr 14 '21 16:04 gsimone

Is there a change log showing major changes from 5 to 6? I saw https://github.com/pmndrs/react-three-fiber/releases but am not sure whether it is complete. I had been using v4 and v5 for the last few months. I noticed v6 is missing native.js - it has a significant trunk of code so I want to be cautious before migrating / upgrading.

polymorpher avatar May 02 '21 01:05 polymorpher

You would need to copy web/index.js as is, channel webglrenderer into exporenderer, and then make events work by mimicking pointer events. Most code has been abstracted so it's just throwing these modules together. You could start without events, if you see it renders we could talk on discord about the events.

drcmda avatar May 02 '21 06:05 drcmda

Hi there, after a day of trying to understand what react-reconciler seems to do, and how the original v5 implementation worked, I've managed to get react-three-fiber to render on React Native.

IMG_426D33010AB1-1

I shimmed the HTMLCanvasElement with an object (similar to how it was done in Expo-Three's Renderer). And the rest are from figuring out how the v5 implementation worked.

This is my fork here. https://github.com/swittk/react-three-fiber/tree/reactnative/packages/fiber

I've also added a simple "demo" folder in the project directory for testing/debugging with Expo react-native. To run it you'll need to install the peer & dev dependencies, then run npm run expo

To be honest I still don't know the ins and outs of how this all works much, but I guess I'll at least put this here as a start 😅.

Current issues

  • ~~There seems to currently be a warning that pops up saying Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported whenever I hot reload. I'm pretty sure it's an easy fix, but I just don't have time to look at it yet.~~ Seems to only happen when editing the r3f source, likely just hot reload not clearing all objects.
  • I commented out the addEventListener and removeEventListener code from events.ts since the "canvas" that I passed was simply an object, and also HTMLElement isn't defined in the React-native context. This is likely easily fixed by a few function shims on the object, but I don't know this library or the HTML Canvas enough to know what functions should be shimmed, so I'll leave it to those who know this more than me .-.

Hope this helps!

swittk avatar May 15 '21 14:05 swittk

what's up with that initiative ? Are there some people working on it right now ? Is it doable ? Would be so nice if it could work perfectly at least with expo 🥰

Daavidaviid avatar Oct 02 '21 19:10 Daavidaviid

I'm experimenting with #1384 to add events in #1699, but I've been running into issues with its demo/example.

I just need to get that and then tests up so we can start mapping events. We can streamline the API later.

CodyJasonBennett avatar Oct 02 '21 20:10 CodyJasonBennett

It's all working in #1699. Just time to clean up the API and figure out how we can best mirror web.

CodyJasonBennett avatar Oct 03 '21 15:10 CodyJasonBennett