index.wxml 814 B

1234567891011121314151617181920
  1. <xr-demo-viewer
  2. title="投球小游戏Demo"
  3. intro="等待AR平面识别完成,然后在较远的地面上放置篮筐。按住右侧按钮准备投球,然后挥动手机并放开按钮将球投出。(该demo目前在安卓上可能表现不佳,受限于安卓的平面识别功能。)"
  4. code="{{xmlCode}}"
  5. >
  6. <view class="overlay button" style="right: 50px; bottom: 300px;"
  7. wx:if="{{arDetected}}"
  8. bindtouchstart="handleThrowStart" bindtouchend="handleThrowEnd">
  9. <text>按住\n投球</text>
  10. </view>
  11. <xr-basic
  12. disable-scroll
  13. id="main-frame"
  14. width="{{renderWidth}}"
  15. height="{{renderHeight}}"
  16. throwing="{{throwing}}"
  17. style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
  18. bind:ar_detected="handleARDetected"
  19. />
  20. </xr-demo-viewer>