index.wxml 1.3 KB

123456789101112131415161718192021222324252627
  1. <xr-scene id="xr-scene" bind:ready="handleReady" bind:assetsLoaded="handleLoaded">
  2. <xr-assets>
  3. <xr-asset-load type="texture" asset-id="particle-texture" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/point.png" />
  4. <xr-asset-load type="texture" asset-id="flarePicture" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/flare.png" />
  5. </xr-assets>
  6. <xr-node>
  7. <xr-mesh node-id="mesh-plane" position="0 -1 0" rotation="0 0 0" scale="5 0.2 5"
  8. geometry="cube" material="blue-mat" uniforms="u_baseColorFactor:0.48 0.78 0.64 1"
  9. ></xr-mesh>
  10. <xr-env sky-map="sky" is-sky2d/>
  11. <xr-custom-particle id="firework" position="0 0 0" start-color="1 1 1 1" end-color="1 0 0 1" capacity="1" speed="1" size="0.5" emit-rate="1" life-time="3" angle="0" texture="particle-texture">
  12. </xr-custom-particle>
  13. <xr-camera
  14. id="camera" node-id="camera" position="0 6 -6" clear-color="0.1 0.1 0.1 1"
  15. target="mesh-plane" background="skybox"
  16. camera-orbit-control=""
  17. ></xr-camera>
  18. </xr-node>
  19. <xr-node node-id="lights">
  20. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  21. <xr-light type="directional" rotation="90 0 0" color="1 1 1" intensity="2.5" />
  22. </xr-node>
  23. </xr-scene>