尽管给出了正确的路径,但无法在下面的ar.js html文件中加载obj文件:
<script src=”https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src=”https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
<body style=’margin : 0px; overflow: hidden;’>
<a-scene embedded arjs=’sourceType: webcam;’>
<a-marker preset=’hiro’>
<!-- Adding an OBJ file to an AR Project-->
<a-entity
obj-model=”obj: url(https://rishavjayswal.github.io/augmented-reality/resources/couch.obj);
mtl: url(https://rishavjayswal.github.io/augmented-reality/resources/couch.mtl)”>
</a-entity>
</a-marker>
<a-entity camera>
</a-entity>
</a-scene>
</body>获取
https://rishavjayswal.github.io/augmented-reality/%E2%80%9Dhttps://aframe.io/releases/0.6.1/aframe.min.js%22 net::ERR_ABORTED
在跑完之后。使用obj和mtl文件的相对路径进行尝试,还可以:
资源/Couch.obj
可以在这里打开链接:https://rishavjayswal.github.io/augmented-reality/
发布于 2017-12-07 07:41:46
你的模型装得很好。这是glitch中的一个工作示例:https://glitch.com/edit/#!/excellent-face?path=index.html:13:19
我看到您将属性值周围的引号类型混合在一起。您的HTML无效。使用直接双引号:"
在obj-model属性中,您使用的是”,arjs属性中使用的是’。
https://stackoverflow.com/questions/47682528
复制相似问题