index.wxml 971 B

123456789101112131415161718
  1. <xr-scene ar-system="modes:Marker" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load
  4. type="video-texture" asset-id="hikari"
  5. src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/xr-frame-team/2dmarker/hikari-v.mp4" options="loop:true"
  6. />
  7. <xr-asset-material asset-id="mat" effect="simple" uniforms="u_baseColorMap: video-hikari" />
  8. </xr-assets>
  9. <xr-node wx:if="{{loaded}}">
  10. <xr-ar-tracker mode="Marker" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/xr-frame-team/2dmarker/hikari.jpg" bind:ar-tracker-switch="handleTrackerSwitch">
  11. <xr-mesh node-id="mesh-plane" geometry="plane" material="mat" />
  12. </xr-ar-tracker>
  13. <xr-camera
  14. id="camera" node-id="camera" position="1 1 1" clear-color="0.925 0.925 0.925 1"
  15. background="ar" is-ar-camera
  16. />
  17. </xr-node>
  18. </xr-scene>