index.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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="anchor" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/ar-plane-marker.glb" />
  4. <xr-asset-load type="gltf" asset-id="door" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/door.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 id="anchor" model="anchor"></xr-gltf>
  10. </xr-ar-tracker>
  11. <xr-node id="f" position="0 0 3.0">
  12. <xr-mesh rotation="90 0 0" geometry="plane" uniforms="u_baseColorFactor:0.4 0.2 0.2 1, u_metallicRoughnessValues: 0 0.6" states="cullOn: false"></xr-mesh>
  13. </xr-node>
  14. <!-- <xr-node id="b" position="0 0 -3.0">
  15. <xr-mesh rotation="90 0 0" geometry="plane" uniforms="u_baseColorFactor:0.2 0.4 0.2 1, u_metallicRoughnessValues: 0 0.6" states="cullOn: false"></xr-mesh>
  16. </xr-node> -->
  17. <xr-node id="b" position="0 0 -3.0">
  18. <xr-gltf rotation="0 -90 0" scale="0.01 0.01 0.01" model="door"></xr-gltf>
  19. </xr-node>
  20. <xr-node id="l" position="-3.0 0 0.0">
  21. <xr-mesh rotation="90 0 0" geometry="plane" uniforms="u_baseColorFactor:0.2 0.2 0.4 1, u_metallicRoughnessValues: 0 0.6" states="cullOn: false"></xr-mesh>
  22. </xr-node>
  23. <xr-node id="r" position="3.0 0 0.0">
  24. <xr-mesh rotation="90 0 0" geometry="plane" uniforms="u_baseColorFactor:0.4 0.2 0.6 1, u_metallicRoughnessValues: 0 0.6" states="cullOn: false"></xr-mesh>
  25. </xr-node>
  26. <xr-camera
  27. id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1"
  28. background="ar" is-ar-camera
  29. ></xr-camera>
  30. </xr-node>
  31. <xr-node node-id="lights">
  32. <xr-light type="ambient" color="1 1 1" intensity="1" />
  33. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  34. </xr-node>
  35. </xr-scene>