three.js on Android: do I need to run a local webserver in my android webview?

I am working on a WebGL app developed with three.js. When I test this app on my computer, I need to run a local server as mentioned here.

When I will run my three.js/WebGL app in a webview of my app, will I need to run a local webserver in my app? If yes, how to do that?

Thanks.

If you want to make s static web ,you can warp a static web page into a app.
You can use react native , ionic or other.

Thanks. With a “static web page”, will I be able to replace the 3D model at runtime. See my question here: Three.js on Android: how to replace GLTF model at runtime?

Since it emerged from the depths without a clear, simple answer :smiling_face_with_tear::

  • Want to develop on your computer and just see preview of localhost / 127.0.0.1 on your phone, similarly as if you’d open it in the browser? Use ngrok, then on your phone just open the IP address it generates for you (works with hot-reloading, assets, etc. etc.)

  • Want to preview your code as an actual app deployed on your phone, not just a preview in the browser? Use Capacitor to build Android / iOS app, and just npx cap run android or npx cap run ios to deploy to a USB-connected device (it bundles the app in .apk / .aab / .ipa on each deploy, so it doesn’t support hot-reloading - but as a result you run your code as an actual WebView app, able to test all it’s pros and cons.)