I've just started learning to create AR scenes with AR.js and I'm having some trouble with loading custom 3D models. I've tried many examples and all of them work perfectly, but once I insert my own model, it just doesn't show up. I used almost the same exact code for the given example and for my 3D model, which is this one:
<!DOCTYPE html>
<html>
<script src="https://aframe.io/releases/1.0.0/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs>
<a-marker preset="hiro">
<a-entity
position="0 0 0"
<!-- example given in AR.js docs -->
<!-- scale="0.05 0.05 0.05"
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
-->
<!-- my 3D model -->
scale="0.05 0.05 0.5"
gltf-model="model/scene.gltf"
></a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html>
My page structure:
.
|_ index.html
|_ model
|_ scene.gltf
|_ scene.bin
My model:
https://sketchfab.com/3d-models/coronavirus-covid-19-virus-991102145c294fe4b633faecc23f3799
I've tried many other models, other formats (.dae, .obj, .fbx), changing the scale of the model and nothing seems to work. What could be the problem?