index.wxml 1.3 KB

1234567891011121314151617181920212223242526
  1. <xr-demo-viewer
  2. title="卡 其 脱 离 太"
  3. intro="xr-frame团队的办公区和成员三维重建,以及与小程序音频系统、2dview协作的例子。点击`卡其脱离太`开始奔跑,奔跑之后点击成员可以跳跃(建议打开声音(不是"
  4. code="{{xmlCode}}"
  5. >
  6. <xr-scan-team
  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. loaded="{{loaded}}"
  13. run="{{run}}"
  14. bind:assetsLoaded="handleLoaded"
  15. bind:syncPositions="handleSyncPositions"
  16. />
  17. <block wx:if="{{loaded}}" wx:for="{{positions}}" wx:for-item="pos" wx:key="*this">
  18. <view style="display: block; position: absolute;left: {{pos[0]}}px;top: {{pos[1]}}px;background: rgba(44, 44, 44, 0.5);transform: translate(-50%, -50%);">
  19. <view style="text-align: center;color: white;font-size: 16px;padding: 8px;">{{pos[2]}}</view>
  20. </view>
  21. </block>
  22. <view wx:if="{{!loaded}}" style="text-align: center;">等待加载完成...</view>
  23. <button wx:if="{{loaded}}" bindtap="handleRun" style="margin-top: 12px; padding: 8px; font-size: 20px; background: #f22; color: white; text-align: center;">卡 其 脱 离 太!</button>
  24. </xr-demo-viewer>