index.wxml 1.2 KB

123456789101112131415161718192021
  1. <xr-scene ar-system="modes:Marker" id="xr-scene" bind:ready="handleReady" bind:ar-ready="handleARReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load type="gltf" asset-id="gltf" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb" />
  4. </xr-assets>
  5. <xr-env env-data="xr-frame-team-workspace-day" />
  6. <xr-node wx:if="{{arReady}}">
  7. <xr-ar-tracker mode="Marker" src="{{markerImg}}">
  8. <xr-gltf model="gltf" anim-autoplay position="0.2 0 -0.2" scale="0.6 0.6 0.6" rotation="0 -50 0" />
  9. <xr-gltf model="gltf" anim-autoplay position="0.4 0 0.3" scale="0.5 0.5 0.5" rotation="0 -50 0" />
  10. <xr-gltf model="gltf" anim-autoplay position="-0.3 0 0.3" scale="0.4 0.4 0.4" rotation="0 -50 0" />
  11. </xr-ar-tracker>
  12. <xr-camera
  13. id="camera" node-id="camera" position="0.8 2.2 -5" clear-color="0.925 0.925 0.925 1"
  14. background="ar" is-ar-camera
  15. ></xr-camera>
  16. </xr-node>
  17. <xr-node node-id="lights">
  18. <xr-light type="ambient" color="1 1 1" intensity="1" />
  19. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  20. </xr-node>
  21. </xr-scene>