index.wxml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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="texture" asset-id="bg" src="https://holodata.s3.cn-northwest-1.amazonaws.com.cn/nameCardData/mingpiantu.png" />
  5. <xr-asset-material asset-id="simple-mat" effect="simple" />
  6. <xr-asset-material asset-id="text-mat" effect="simple" />
  7. </xr-assets>
  8. <xr-node>
  9. <xr-node node-id="center" position="0 0 0"></xr-node>
  10. <xr-ar-tracker mode="Plane">
  11. <xr-gltf id="anchor" model="anchor"></xr-gltf>
  12. </xr-ar-tracker>
  13. <xr-node node-id="setitem" visible="false">
  14. <xr-node node-id="ui-block" scale="0.1 0.1 0.1">
  15. <xr-mesh node-id="mesh-sphere" position="0 0 -2.1" scale="2 2 2" geometry="sphere" uniforms="u_baseColorFactor:0.937 0.176 0.368 1"></xr-mesh>
  16. <xr-mesh
  17. position="0 0 -0.01" scale="10 1 5" rotation="90 0 0" geometry="plane" material="simple-mat"
  18. uniforms="u_baseColorMap: bg" states="cullOn: false, alphaMode: BLEND,renderQueue: 2500"
  19. ></xr-mesh>
  20. <xr-node node-id="text-wrap" position="-4 1.4 0">
  21. <xr-text
  22. material="text-mat" value="李逍遥"
  23. position="0 0 0" never-cull
  24. size="0.6" anchor="0 1" uniforms="u_baseColorFactor:1.0 1.0 1.0 1"
  25. ></xr-text>
  26. <xr-text
  27. material="text-mat" value="原是一乡下客栈店小二,天资聪颖,因一壶酒被酒剑仙传授了蜀山仙剑派剑术,在仙灵岛与赵灵儿相遇,自此经历重重磨难成长为一代旷世奇侠"
  28. position="0 -0.8 0" never-cull
  29. width="8"
  30. size="0.4" anchor="0 1" uniforms="u_baseColorFactor:1.0 1.0 1.0 1"
  31. ></xr-text>
  32. <xr-text
  33. material="text-mat" value="仙剑奇侠传"
  34. position="8 -2.7 0" never-cull
  35. size="0.4" anchor="1 0" uniforms="u_baseColorFactor:1.0 1.0 1.0 1"
  36. ></xr-text>
  37. </xr-node>
  38. </xr-node>
  39. </xr-node>
  40. <xr-camera
  41. id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1"
  42. background="ar" is-ar-camera
  43. ></xr-camera>
  44. </xr-node>
  45. <xr-node node-id="lights">
  46. <xr-light type="ambient" color="1 1 1" intensity="1" />
  47. <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
  48. </xr-node>
  49. </xr-scene>