我不知道为什么,但是我似乎无法使这段代码起作用:
<!-- AR.js by @jerome_etienne - github: https://github.com/jeromeetienne/ar.js - info: https://medium.com/arjs/augmented-reality-in-10-lines-of-html-4e193ea9fdbf -->
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.6.0/aframe/build/aframe-ar.js"></script>
<script src="https://cdn.rawgit.com/donmccurdy/aframe-extras/v4.2.0/dist/aframe-extras.min.js"></script>
<script src="https://rawgit.com/donmccurdy/aframe-extras/master/dist/aframe-extras.loaders.min.js"></script>
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs="sourceType: webcam;">
<a-assets>
<a-asset-item id="#poster-obj" src ="hx0requiem.github.io/BoysenOBJJJJ.obj"></a-asset-item>
<a-asset-item id="#poster-mtl" src ="hx0requiem.github.io/BoysenOBJJJJ.mtl"></a-asset-item>
</a-assets>
<a-obj-model src="#poster-obj" mtl="poster-mtl"> </a-obj-model>
<a-marker-camera preset="hiro"></a-marker-camera>
</a-scene>
</body>
我尝试了一切。通过仅使用.png图像和gltf图像。阅读有关如何在ar.js中使用obj文件的文章和教程,但是我尝试的所有操作似乎均不起作用。我的代码有问题吗?
预先感谢