A帧:条形码类型标记永远不会起作用

时间:2017-08-10 01:39:41

标签: augmented-reality aframe

这次我再次使用条形码类型标记。 这是我写的和预设和模式类型标记正在工作。 但是,条形码类型不起作用。 我用网络摄像头在这个网站上查看了5个标记。 https://aframe.io/blog/arjs/#different-type-of-markers-pattern-and-barcode

请有人告诉我,我做错了什么......

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
  <title>Marker Test</title>
  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
  <script src="./lib/AR.js/aframe/build/aframe-ar.js"></script>
</head>

<body style="padding-top:40px;">
  <a-scene embedded artoolkit="sourceType: webcam; detectionMode: mono_and_matrix; maxDetectionRate: 30; canvasWidth: 240; canvasHeight: 180;">
  <a-marker preset="hiro">
      <a-entity>
          <a-box color="tomato" depth="0.5" height="0.5" width="0.5"></a-box>
      </a-entity>
  </a-marker>

  <a-marker type="pattern" url="./pat/to.patt">
      <a-entity>
          <a-box color="tomato" depth="0.5" height="0.5" width="0.5"></a-box>
     </a-entity>
  </a-marker>

  <a-marker type="barcode" value="5">
      <a-entity>
          <a-box color="tomato" depth="0.5" height="0.5" width="0.5"></a-box>
      </a-entity>
  </a-marker>

<a-entity camera>
    <a-entity id="myCursor"
                  cursor="fuse:true; maxDistance:30; timeout:500;"
                  scale="0.03 0.03 0.03"
                  position="0 0 -2"
                  geometry="primitive: ring"
                  material="color: red; shader: flat; opacity:0.5">
    </a-entity>
</a-entity>

0 个答案:

没有答案