index.wxml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <xr-scene id="xr-scene" ar-system="modes:Marker" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin" />
  4. <xr-asset-load type="gltf" asset-id="gltf-fiesta_tea" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/fiesta_tea/scene.gltf" />
  5. <xr-asset-material asset-id="standard-mat" effect="standard" />
  6. </xr-assets>
  7. <xr-env env-data="env1"/>
  8. <xr-node wx:if="{{loaded}}">
  9. <xr-ar-tracker mode="Marker" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/portalImage.jpg">
  10. <xr-node scale="1 1 1">
  11. <xr-gltf node-id="mesh-gltf-fiesta_tea" position="0 -1.6 1" rotation="-90 0 0" scale="0.6 0.6 0.6" model="gltf-fiesta_tea"
  12. states="stencilTestOn: true, stencilComp: 3, stencilRef: 1, stencilReadMask: 1"
  13. ></xr-gltf>
  14. <!-- <xr-mesh node-id="door" position="0 1.5 0" rotation="0 0 0" scale="1 0.1 1" geometry="cube" material="standard-mat"
  15. states="renderQueue: 2, depthTestOn: false"
  16. ></xr-mesh> -->
  17. <xr-mesh node-id="plane-cull" position="0 0 0" rotation="0 0 0" scale="1 0.1 0.9" geometry="plane"
  18. states="renderQueue: 1, stencilTestOn: true, stencilComp: 7, stencilRef: 1, stencilReadMask: 1, stencilWriteMask: 1, stencilPass: 1, stencilFail: 2, stencilZFail: 2"
  19. ></xr-mesh>
  20. </xr-node>
  21. </xr-ar-tracker>
  22. <xr-camera
  23. id="camera" node-id="camera" position="2 0.4 0" clear-color="0.925 0.925 0.925 1"
  24. background="ar" is-ar-camera
  25. ></xr-camera>
  26. </xr-node>
  27. <xr-node node-id="lights">
  28. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  29. <xr-light type="directional" rotation="30 60 0" color="1 1 1" intensity="1" />
  30. </xr-node>
  31. </xr-scene>