index.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <xr-demo-viewer
  2. title="基础案例"
  3. intro="使用`xr-particle`,控制粒子系统的显示。从远到近,从左到右依次是:案例1:球形发射器与颜色过渡效果的粒子展示 案例2:闪电球效果的粒子展示 案例3:光环效果展示 案例4:传送门效果展示 案例5: 《戴珍珠耳环的少女》人像效果展示"
  4. code="{{xmlCode}}"
  5. >
  6. <xr-basic-particle
  7. disable-scroll
  8. id="main-frame"
  9. width="{{renderWidth}}"
  10. height="{{renderHeight}}"
  11. style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
  12. capacity="{{capacity}}"
  13. emitRate="{{emitRate}}"
  14. lifeTime="{{lifeTime}}"
  15. />
  16. <view class="env-words">
  17. <!-- <span class="tips">粒子上限: </span><span class="content">{{capacity}}</span><text>\n</text>
  18. <span class="tips">粒子速率: </span><span class="content">{{emitRate}}</span><text>\n</text>
  19. <span class="tips">粒子生命周期: </span><span class="content">{{lifeTime}}</span><text>\n</text> -->
  20. </view>
  21. <view class="button-wrap">
  22. <!-- <view class="change-button" bindtap="handleAdd">增加粒子</view>
  23. <view class="change-button" bindtap="handleSub">减少粒子</view>
  24. <view class="change-button" bindtap="handleRateAdd">增加粒子速率</view>
  25. <view class="change-button" bindtap="handleRateSub">减少粒子速率</view>
  26. <view class="change-button" bindtap="handleTimeAdd">增加粒子生命周期</view>
  27. <view class="change-button" bindtap="handleTimeSub">减少粒子生命周期</view> -->
  28. </view>
  29. </xr-demo-viewer>