1

我不知道为什么,但我似乎无法使这段代码工作:

<!-- 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 文件的文章和教程,但我尝试的一切似乎都不起作用。我的代码有问题吗?

提前致谢

4

0 回答 0