index.wxml 1.0 KB

123456789101112131415161718192021
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load type="texture" asset-id="waifu" src="/assets/waifu.png" />
  4. <xr-asset-material asset-id="shining-mat" effect="shining" uniforms="u_color:1 1 0 1" />
  5. </xr-assets>
  6. <xr-node node-id="target">
  7. <xr-mesh geometry="star" material="shining-mat" rotation="90 0 0" />
  8. <xr-node wx:for="{{stars}}" wx:for-item="star">
  9. <xr-shining-star rotation="90 0 0" position="{{star.pos}}" uniforms="u_color:{{star.color}},u_reflection:waifu,u_speed:{{star.speed}}" />
  10. </xr-node>
  11. <xr-camera
  12. id="camera" node-id="camera" position="0 0 10" clear-color="0.4 0.6 0.7 1"
  13. background="default" target="target"
  14. camera-orbit-control=""
  15. ></xr-camera>
  16. </xr-node>
  17. <xr-node node-id="lights">
  18. <xr-light type="ambient" color="{{test}}}" intensity="1" />
  19. <xr-light type="directional" rotation="40 170 0" color="1 1 1" intensity="3" />
  20. </xr-node>
  21. </xr-scene>