index.wxml 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <xr-scene id="xr-scene" bind:ready="handleReady" bind:assetsLoaded="handleLoaded">
  2. <xr-assets>
  3. <xr-asset-load type="texture" asset-id="orb" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/orb.png" />
  4. <xr-asset-load type="texture" asset-id="magic-line" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/magic_line.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-particle id="orb" position="0 0 2" rotation="0 0 0" capacity="1000" speed="0" size="5" emit-rate="18" life-time="0.2" angle="0" texture="orb">
  12. </xr-particle>
  13. <xr-particle id="orbLine" position="0 0 2" rotation="0 0 0" angle="90" capacity="1000" speed="-4 -2" size="0.4 0.7" emit-rate="70" life-time="0.2 0.4" texture="magic-line" emitter-type="SphereShape" emitter-props="radius:0.7" render-mode="stretched">
  14. </xr-particle>
  15. <xr-camera
  16. id="camera" node-id="camera" position="0 6 -6" clear-color="0.1 0.1 0.1 1"
  17. target="mesh-plane" background="skybox"
  18. camera-orbit-control=""
  19. ></xr-camera>
  20. </xr-node>
  21. <xr-node node-id="lights">
  22. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  23. <xr-light type="directional" rotation="90 0 0" color="1 1 1" intensity="2.5" />
  24. </xr-node>
  25. </xr-scene>