index.wxml 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. <xr-scene id="xr-scene" bind:ready="handleReady" bind:assetsLoaded="handleLoaded">
  2. <xr-assets bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load type="texture" asset-id="glow_circle" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/glow_circle.png" />
  4. <xr-asset-load type="gltf" asset-id="gltf-ballon" src="https://webar.hereto.cn/asset/fe/ast-show/ballon-anim.glb" />
  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="magicField" position="0 0 0" rotation="0 0 180" capacity="10" speed="0.1" size="2" emit-rate="6" life-time="0.5" angle="0" render-mode="mesh" mesh="specialCylinder" texture="glow_circle" angular-speed="0"></xr-custom-particle> -->
  12. <xr-custom-particle id="magicField" position="0 0 0" rotation="0 0 0" capacity="10" speed="0.1" size="0.02" emit-rate="6" life-time="0.5" angle="0" texture="glow_circle" angular-speed="0" render-model="gltf-ballon"></xr-custom-particle>
  13. <xr-gltf id="ballon" node-id="gltf-ballon" position="0.8 0 0" rotation="0 0 0" scale="1.2 1.2 1.2" model="gltf-ballon"></xr-gltf>
  14. <xr-camera
  15. id="camera" node-id="camera" position="0 6 -6" clear-color="0.1 0.1 0.1 1"
  16. target="mesh-plane" background="skybox"
  17. camera-orbit-control=""
  18. ></xr-camera>
  19. </xr-node>
  20. <xr-node node-id="lights">
  21. <xr-light type="ambient" color="1 1 1" intensity="0.3" />
  22. <xr-light type="directional" rotation="90 0 0" color="1 1 1" intensity="2.5" />
  23. </xr-node>
  24. </xr-scene>