Closed antonyrey closed 1 year ago
hi @antonyrey,
I think I need to move this out to a helper library: https://github.com/brianzinn/react-babylonjs/blob/master/packages/react-babylonjs/src/customComponents/Html.tsx
You will need to go back to v 3.0.25
in the meantime before that dependency was introduced. You will get a peer dependency warning that can be ignored in that version.
I've been slowly working on the docs - they are quite horrible currently. There is a storybook of examples that I want to sunset and a new documentation site with gastby + MDX that is close to ready.
Will that version work for you in the meantime?
Actually, I think I just need a separate native export. ie: import { Scene } from 'react-babylonjs/native'
. That would exclude Html
component. I won't need Engine
component in there either due to how native creates one with their useEngine
hook. @dennemark FYI
it's worth trying import Scene from 'react-babylonjs/dist/Scene';
. I can work to remove /dist/ from the import statement.
I haven´t used react-native yet. Is it easy to set up with the react-babylonjs repository? It would be nice to have a similar component to HTML for native, but I guess it won´t be that easy. If you manage to seperate the native export, it is a nice solution. Otherwise we would have the same issue in a package that would seperate HTML from main package as soon as you want to use other helper files from it in a native environment.
closing from inactivity... please re-open if you need help still.
Hello,
I'm trying to use react-babylonjs inside a React Native application. I followed the small sample in the README : https://github.com/brianzinn/react-babylonjs#react-native
However, when I start my project, I get the following error at runtime :
Did anyone encounter the same issue?
I didn't find any working sample anywhere, and is there really no documentation at all for this library?
Thanks a lot, have a nice day !