Struggling to load a 3D model through the Three.js MT: / OBJ loader.
You can see an example of what I'm trying to achieve here:
The issue arises because the Three.js package requires both the files and the code to have the same base path.
For instance, if my model is located at 3d.com
and my files are in a directory called 3d.com/files
, then everything works smoothly.
However, when using Firebase storage to host the 3D files that users upload, a problem occurs due to the differing base paths. Firebase storage URLs typically start with
https://firebasestorage.googleapis.com/v0/...
, resulting in CORS errors.
Seeking advice on how to overcome this dilemma. Does anyone have a solution?