index.wxml 1.6 KB

1234567891011121314151617181920212223242526272829
  1. <xr-scene ar-system="modes:Plane;" 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-item" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/just_a_girl/index.glb" />
  4. <xr-asset-load type="gltf" asset-id="anchor" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/ar-plane-marker.glb" />
  5. <xr-asset-material asset-id="standard-mat" effect="standard" />
  6. </xr-assets>
  7. <xr-node>
  8. <xr-ar-tracker mode="Plane">
  9. <xr-gltf model="anchor"></xr-gltf>
  10. </xr-ar-tracker>
  11. <xr-node node-id="setitem" visible="false">
  12. <xr-gltf model="gltf-item" scale="0.006 0.006 0.006"></xr-gltf>
  13. </xr-node>
  14. <!-- 坐标系提示,单位1 的坐标轴 -->
  15. <xr-mesh node-id="mesh-x" position="1 0 0" scale="2 0.02 0.02" geometry="cube" uniforms="u_baseColorFactor:0.7 0.3 0.3 1" ></xr-mesh>
  16. <xr-mesh node-id="mesh-y" position="0 1 0" scale="0.02 2 0.02" geometry="cube" uniforms="u_baseColorFactor:0.3 0.7 0.3 1"></xr-mesh>
  17. <xr-mesh node-id="mesh-z" position="0 0 1" scale="0.02 0.02 2" geometry="cube" uniforms="u_baseColorFactor:0.3 0.3 0.7 1"></xr-mesh>
  18. <xr-camera
  19. id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1"
  20. background="ar" is-ar-camera
  21. ></xr-camera>
  22. </xr-node>
  23. <xr-node node-id="lights">
  24. <xr-light type="ambient" color="1 1 1" intensity="1" />
  25. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  26. </xr-node>
  27. </xr-scene>