index.wxml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load asset-id="basic-anim" type="keyframe" src="/assets/animation/basic-animation.json"/>
  4. <xr-asset-load type="texture" asset-id="waifu" src="/assets/waifu.png" />
  5. <xr-asset-material asset-id="standard-mat" effect="standard" />
  6. </xr-assets>
  7. <xr-node>
  8. <xr-node node-id="camera-target" position="0 0 0"></xr-node>
  9. <xr-mesh
  10. node-id="mesh-plane" position="0 -0.8 0" rotation="0 0 0" scale="10 1 8" geometry="plane" material="standard-mat" uniforms="u_baseColorFactor:0.48 0.78 0.64 1" states="cullOn: false"
  11. anim-keyframe="basic-anim" anim-autoplay="clip:plane, speed:4"
  12. receive-shadow
  13. ></xr-mesh>
  14. <xr-mesh
  15. node-id="mesh-cube" position="-3 0 2" scale="1 1 1" rotation="0 0 0" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor:0.298 0.764 0.85 1"
  16. anim-keyframe="basic-anim" anim-clipmap="default:cube" anim-autoplay="clip:cube, speed:2"
  17. cast-shadow
  18. ></xr-mesh>
  19. <xr-mesh
  20. node-id="mesh-sphere" position="-3 0 0" scale="0.8 0.8 0.8" geometry="sphere" material="standard-mat" uniforms="u_baseColorFactor:0.937 0.176 0.368 1"
  21. anim-keyframe="basic-anim" anim-autoplay="clip:sphere, speed:2"
  22. cast-shadow
  23. ></xr-mesh>
  24. <xr-mesh
  25. node-id="mesh-cylinder" position="-3 0 -2" scale="1 0.6 1" geometry="cylinder" material="standard-mat" uniforms="u_baseColorFactor:1 0.776 0.364 1"
  26. anim-keyframe="basic-anim" anim-autoplay="clip:cylinder, speed:2"
  27. cast-shadow
  28. ></xr-mesh>
  29. <xr-mesh node-id="mesh-light-cube" position="-5 1 0" scale="0.5 10 10" rotation="0 0 0" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor:0.3 0.3 0.3 1, u_baseColorMap: waifu"></xr-mesh>
  30. <xr-camera
  31. id="camera" node-id="camera" position="5 3 0" clear-color="0.925 0.925 0.925 1"
  32. target="camera-target"
  33. camera-orbit-control=""
  34. ></xr-camera>
  35. </xr-node>
  36. <xr-node node-id="lights">
  37. <xr-light type="ambient" color="1 1 1" intensity="1" />
  38. <xr-light type="directional" rotation="30 230 0" color="1 1 1" intensity="3" cast-shadow/>
  39. <xr-light
  40. type="spot" position="-4 1 0" rotation="0 -90 0" color="0 1 0" range="20" intensity="100" inner-cone-angle="20" outer-cone-angle="60"
  41. anim-keyframe="basic-anim" anim-autoplay="clip:spotLight, speed:2"
  42. />
  43. </xr-node>
  44. </xr-scene>