index.wxml 1.0 KB

123456789101112131415161718192021
  1. <xr-scene ar-system="modes:Face;camera:Front" 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-glass" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/jokers_mask_persona5.glb" />
  4. </xr-assets>
  5. <xr-env env-data="xr-frame-team-workspace-day" />
  6. <xr-node wx:if="{{arReady}}">
  7. <xr-ar-tracker id='tracker' mode="Face" auto-sync="43">
  8. <xr-node name="nose" >
  9. <xr-gltf node-id="gltf-glass" position="0 0.02 -0.05" rotation="0 180 0" scale="0.5 0.5 0.5" model="gltf-glass"></xr-gltf>
  10. </xr-node>
  11. </xr-ar-tracker>
  12. <xr-camera
  13. id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1"
  14. background="ar" is-ar-camera near="0.01"
  15. ></xr-camera>
  16. </xr-node>
  17. <xr-node node-id="lights">
  18. <xr-light type="ambient" color="1 1 1" intensity="0.2" />
  19. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="1" />
  20. </xr-node>
  21. </xr-scene>