index.wxml 1.2 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-assets>
  4. <xr-node wx:if="{{arReady}}">
  5. <xr-ar-tracker id='tracker' mode="Face" auto-sync="-1 105 104 45 98">
  6. <xr-mesh name="face" geometry="cube" scale="0.7 0.8 0.1" uniforms="u_baseColorFactor:1 1 1 0.5" states="renderQueue:2500,alphaMode:BLEND"/>
  7. <xr-mesh name="eyeL" geometry="cube" scale="0.1 0.1 0.1" uniforms="u_baseColorFactor:0 1 0 1" />
  8. <xr-mesh name="eyeR" geometry="cube" scale="0.1 0.1 0.1" uniforms="u_baseColorFactor:0 1 0 1" />
  9. <xr-mesh name="nose" geometry="cube" scale="0.1 0.1 0.1" uniforms="u_baseColorFactor:0 0 1 1" />
  10. <xr-mesh name="mouth" geometry="cube" scale="0.1 0.1 0.1" uniforms="u_baseColorFactor:1 0 0 1" />
  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="1" />
  19. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  20. </xr-node>
  21. </xr-scene>