index.wxml 1.2 KB

1234567891011121314151617181920212223242526
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:loaded="handleAssetsLoaded">
  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-assets>
  5. <xr-node>
  6. <xr-mesh node-id="mesh-plane" position="0 -1 0" rotation="0 0 0" scale="5 0.2 5"
  7. geometry="cube" material="blue-mat" uniforms="u_baseColorFactor:0.48 0.78 0.64 1"
  8. ></xr-mesh>
  9. <xr-env sky-map="sky" is-sky2d/>
  10. <xr-custom-particle position="0 0 2" start-color="0 1 0 1" end-color="1 1 0 1" capacity="100" speed="-5" size="0.1 0.2" emit-rate="80" life-time="0.2 0.4" angle="0 360" angular-speed="-300" emitter-type="SphereShape" emitter-props="radius:1.5" texture="particle-texture">
  11. </xr-custom-particle>
  12. <xr-camera
  13. id="camera" node-id="camera" position="0 6 -6" clear-color="0.1 0.1 0.1 1"
  14. target="mesh-plane" background="skybox"
  15. camera-orbit-control=""
  16. ></xr-camera>
  17. </xr-node>
  18. <xr-node node-id="lights">
  19. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  20. <xr-light type="directional" rotation="90 0 0" color="1 1 1" intensity="2.5" />
  21. </xr-node>
  22. </xr-scene>