In debug
mode my code is working fine.
window.BABYLON.SceneLoader.ImportMesh(
"",
"/assets/logo/3D/",
"logo.gltf",
that.scene,
function (meshes) { ..... });
My .gltf
3D asset is stored in public/assets/logo/3D
with the name logo.gltf
. I am using .NetCore
as the web server.
Somehow whenever the loader requests .gltf
file, it returns html
. It suppose to return json
(gltf
). Image files like .jpg
, '.png', etc... are fine.
I have specify the mime type for .gltf
in my web.config
file:
<system.webServer>
<staticContent>
<remove fileExtension=".gltf" />
<mimeMap fileExtension=".gltf" mimeType="model/gltf+json" />
</staticContent>
</system.webServer>
Here is the screenshot:
It retrieves as content-type: text/html
. It suppose to be model/gltf+json
.
How can I load the file safely?