index.wxml 1.5 KB

1234567891011121314151617181920212223
  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="gltf" asset-id="gltf-burger" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/index.glb" />
  4. </xr-assets>
  5. <xr-node>
  6. <xr-node node-id="id2" scale="2 2 2" position="0 0 0"></xr-node>
  7. <xr-ar-tracker mode="OSD" src="{{markerImg}}">
  8. <xr-mesh geometry="plane" rotation="-90 0 0" scale="1 1 1" uniforms="u_baseColorFactor:0 1 0 0.5" states="alphaMode:BLEND" />
  9. <!-- 坐标系提示,单位1 的坐标轴 -->
  10. <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>
  11. <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>
  12. <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>
  13. </xr-ar-tracker>
  14. <xr-camera
  15. id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1"
  16. background="ar" is-ar-camera
  17. ></xr-camera>
  18. </xr-node>
  19. <xr-node node-id="lights">
  20. <xr-light type="ambient" color="1 1 1" intensity="1" />
  21. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  22. </xr-node>
  23. </xr-scene>