index.wxml 2.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load
  4. type="env-data" asset-id="env0" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-scan-test/dayb4.bin"
  5. />
  6. <xr-asset-load
  7. type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-scan-test/nightb1.bin"
  8. />
  9. <xr-asset-load
  10. type="env-data" asset-id="env2" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin"
  11. />
  12. <xr-asset-load type="gltf" asset-id="gltf-wxdog" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/model-scan-test/wxdog/index.gltf" />
  13. <xr-asset-load type="gltf" asset-id="gltf-wxmail" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/model-scan-test/wxmail/index.gltf" />
  14. <xr-asset-material asset-id="standard-mat" effect="standard" />
  15. </xr-assets>
  16. <xr-env env-data="env{{envIndex}}" />
  17. <xr-node>
  18. <xr-node node-id="id2" position="0 0 0"></xr-node>
  19. <xr-gltf node-id="mesh-gltf-wxdog" position="-0.4 0 -1" rotation="0 55 0" scale="0.7 0.7 0.7" model="gltf-wxdog"></xr-gltf>
  20. <xr-gltf node-id="mesh-gltf-wxmail" position="1 0 1" rotation="0 -10 0" scale="0.7 0.7 0.7" model="gltf-wxmail"></xr-gltf>
  21. <xr-mesh node-id="mesh-floor-wxdog" position="-0.35 -0.62 -1" rotation="-3 80 -2" scale="1 0.02 1.8" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor: 0.32 0.32 0.36 1, u_metallicRoughnessValues: 0 0.1"></xr-mesh>
  22. <xr-mesh node-id="mesh-floor-wxmail" position="0.95 -0.63 0.9" rotation="5 -10 -2" scale="0.9 0.02 1.7" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor: 0.32 0.32 0.36 1, u_metallicRoughnessValues: 0 0.1"></xr-mesh>
  23. <xr-mesh node-id="mesh-floor-roughmetal" position="-0.6 -0.6 0.6" rotation="0 -10 0" scale="1.6 0.02 1.6" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor: 0.28 0.51 0.34 1, u_metallicRoughnessValues: 0.6 0.1"></xr-mesh>
  24. <xr-camera
  25. id="camera" node-id="camera" position="-1.4 1.4 1.4" clear-color="0.8 0.8 0.8 1"
  26. target="id2" far="2000" background="skybox"
  27. camera-orbit-control=""
  28. ></xr-camera>
  29. </xr-node>
  30. <xr-node node-id="lights">
  31. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  32. </xr-node>
  33. </xr-scene>