index.wxml 1.4 KB

123456789101112131415161718192021222324
  1. <xr-scene ar-system="modes:OSD" id="xr-scene" bind:ready="handleReady" bind:ar-ready="handleARReady" bind:log="handleLog">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin" />
  4. <xr-asset-load type="gltf" asset-id="gltf-wxball" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/wxball/wxball.gltf" />
  5. </xr-assets>
  6. <xr-env env-data="env1"/>
  7. <xr-node>
  8. <xr-ar-tracker mode="OSD" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/wxball.jpg">
  9. <xr-gltf id="wxball" node-id="mesh-gltf-wxball" position="0 -0.1 0" rotation="-45 30 0" scale="0.16 0.16 0.16" model="gltf-wxball"
  10. bind:gltf-loaded="handleGltfLoaded"
  11. bind:touch-shape="handleTouchWXball" sphere-shape="radius: 1.5"
  12. bind:anim-stop="handleAnimationStop"
  13. />
  14. </xr-ar-tracker>
  15. <xr-camera
  16. id="camera" node-id="camera" position="1 1 1" clear-color="0.925 0.925 0.925 1"
  17. far="2000" background="ar" is-ar-camera
  18. ></xr-camera>
  19. </xr-node>
  20. <xr-node node-id="lights">
  21. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  22. <xr-light type="directional" rotation="30 60 0" color="1 1 1" intensity="1" />
  23. </xr-node>
  24. </xr-scene>