无法<a-frame>为 ar 加载 obj.js



尽管给出了正确的路径,但仍无法将OBJ文件加载到以下html文件中:

<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/�https://aframe.io/releases/0.6.1/aframe.min.min.min.js" netP>

运行后。使用OBJ和MTL文件的相对路径尝试:

/resources/couch.obj

可以在此处打开链接:https://rishavjayswal.github.io/augmented-reality/

您的模型加载良好。这是小故障中的一个工作示例:https://glitch.com/edit/#!/excellent-face?path=index.html:13:19

我看到您正在混合围绕属性值的引号。您的HTML无效。使用直接引号:"

在您的OBJ模型属性中,您正在使用,在您的ARJS属性中,您正在使用

最新更新