index.wxml 848 B

123456789101112131415161718192021222324
  1. <xr-demo-viewer
  2. title="AR OSDMarker案例"
  3. intro="Marker识别案例,点击可以上传OSDMarker。识别成功后,会于屏幕绘制一个纯色立方体展示位置。"
  4. hint="默认扫描图片见官网开发文档\n组件->xr-frame->示例"
  5. >
  6. <xr-ar-osdmarker
  7. disable-scroll
  8. id="main-frame"
  9. width="{{renderWidth}}"
  10. height="{{renderHeight}}"
  11. style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
  12. markerImg="{{markerImg}}"
  13. bind:arTrackerState="handleARTrackerState"
  14. />
  15. <view wx:if="{{arTrackerShow}}" style="text-align: center;padding: 12px;">
  16. <view>Tracker识别状态:{{arTrackerState}}</view>
  17. <view>错误信息:{{arTrackerError}}</view>
  18. </view>
  19. <button bindtap="handleChangeMarkerImg">
  20. 点击替换Marker图像
  21. </button>
  22. </xr-demo-viewer>