I have created 3d scenes where I used THREE js and physics library Ammo js .
It basically displays different 3d shapes which react to each other on button clicks .
So I planned to build to make it publicly available .
But I am confused whether to build a Webapp or Native app or Progressive Webapp .
I don’t even know which of these are possible and also how can each be done like using which stack .
And I also wanted to use camera at some point of time , Is that possible ?
And each can signup to make their own account and create,edit and save their own models .
- Can anyone say which will be the best choice ?
- And also provide some reference like video tutuorials of how to build them .
- And also the advantage and disadvantage of each one with regard to three js .
Any small reference would be of great help .
I think Native app would be a good choice here.
Is there any reference to how to get start with it bro.
And can Ammo js be utilized there ??
Yes, but I think you could also use a native physics library which should be faster than a js one.
three is a web library, you can’t make native apps with it. even if you do, it will run in a webview.
the only exception is react-native, your three app will run in a native opengles context. see: https://github.com/react-spring/react-three-fiber/blob/86b0f78d684ee9f25135f490b9159919cf486697/recipes.md#usage-with-react-native since microsoft itself is involved in react now im pretty sure this will extend to native desktop apps soon as well.
Doesn’t electron count as native?
But I couldn’t find any simulations available in native physics libraries. Do any of them have which I am not aware of !
What about PWA ?
Can I built a webapp and builld pwa with it .
i do some testing with threejs and TWA app you can try my beta app from
electron is just a chrome browser. plain three js is for the web, no escaping it.
What is TWA? And yeah I guess I’m confused is native then stuff like C++?
You can use a camera
It works on IOS safari, and also contains a chroma key option.
Sourcecode @ https://github.com/Sean-Bradley/Three.js-TypeScript-Boilerplate/tree/webcam
I suggest you make a PWA (which is very simple) or a Hybrid App (feels like native and can be downloaded from the app store) using capacitor.
Ammo (even the wasm version) and three.js will work with both without any issues.
I just created a awesome three.js project template. PWA and Native App ready! It uses TypeScript and you can easily add React.
Did we reach a consensus here? what is the best solution?
That was great .I too feel like pwa would be the best way to go . I would surely check that out .
Any tutorials or blogs on PWA with three.js would hlep a lot .