I want to import different 3D models in my webAR Zappar project based from user chose; When user select a character name, modelPath Variable must be change to selected model file path. my question is how i can use a string for changing the path and model file?
I tried through the following method.
let modelPath ='../assets/model.glb';
let model = new URL(modelPath , import.meta.url).href;
Result of above codes is : file:///assets/model.glb
But when i change codes to
let model = new URL('../assets/model.glb', import.meta.url).href;
result is (I need this result) : https://IPADDRESS:PORT/model.01234567.glb?12345678901234
for more information you can see https://github.com/zappar-xr/threejs-example-instant-tracking-gltf-loader/tree/master