index.wxml 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-material asset-id="standard-mat" effect="standard" />
  4. <xr-asset-render-texture asset-id="rt" width="2048" height="1024" />
  5. </xr-assets>
  6. <xr-node layer="1">
  7. <xr-mesh id="cube" node-id="mesh-cube" position="-1 0.5 1.5" scale="1 1 1" rotation="0 45 0" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor:0.298 0.764 0.85 1" />
  8. <xr-mesh node-id="mesh-sphere" position="0 1.25 0" scale="1.25 1.25 1.25" geometry="sphere" material="standard-mat" uniforms="u_baseColorFactor:0.937 0.176 0.368 1" />
  9. <xr-mesh node-id="mesh-cylinder" position="1 0.7 1.5" scale="1 0.7 1" geometry="cylinder" material="standard-mat" uniforms="u_baseColorFactor:1 0.776 0.364 1" />
  10. </xr-node>
  11. <xr-node layer="2">
  12. <xr-mesh node-id="mesh-plane" position="0 0 -6" rotation="-90 0 0" scale="16 1 12" geometry="plane" material="standard-mat"
  13. uniforms="u_baseColorMap:render-rt" states="cullOn:false" />
  14. </xr-node>
  15. <xr-node node-id="rt-camera-target" position="0 1 0"></xr-node>
  16. <xr-camera
  17. position="0 4 6" clear-color="0.925 0.925 0.925 1"
  18. target="mesh-plane" cull-mask="0b111" camera-orbit-control=""
  19. >
  20. <xr-camera
  21. position="0 0 0" clear-color="0.925 0.925 0.925 1"
  22. target="rt-camera-target" render-target="rt" cull-mask="0b011"
  23. />
  24. </xr-camera>
  25. <xr-node node-id="lights">
  26. <xr-light type="ambient" color="1 1 1" intensity="1" />
  27. <xr-light type="directional" rotation="40 170 0" color="1 1 1" intensity="3" />
  28. </xr-node>
  29. </xr-scene>