I need a way to open a local html file and display Babylon content like textures and gltf meshes inside it. I dont want to open the html file with a local webserver if possible. I know it is not possible to access local files because you run into CORs errors because of browser security, but I can display multiple local images as img tag inside my html file and I wont run into CORs problems.
This piece of code displays the correct image when I open the html file
<img :src="require('@/assets/Map.png')" alt="">
When I try to load the texture through an assetmanager I get the error: “Error while trying to load image” which is caused by CORs.
Can someone explain why I wont get CORs problems when I try to display the img inside html but as soon as I use the same img in babylon I get errors?
Thanks in advance