index.wxml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <xr-demo-viewer
  2. title="加载案例"
  3. intro="点击按钮进行对应资源的加载与使用。(目前视频纹理属于beta状态,真机情况下,多张视频纹理不可以同时加载与渲染,但是可以取消一份后渲染另外一份)"
  4. code=""
  5. showBackBtn="{{showBackBtn}}"
  6. >
  7. <xr-template-loading
  8. disable-scroll
  9. id="main-frame"
  10. width="{{renderWidth}}"
  11. height="{{renderHeight}}"
  12. gltfListRaw="{{gltfList}}"
  13. imageListRaw="{{imageList}}"
  14. videoListRaw="{{videoList}}"
  15. style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
  16. />
  17. <!-- <view class="xr-info">
  18. <view class="info-text title">加载列表</view>
  19. <view class="info-text">加载进度:</view>
  20. <view class="info-process">
  21. <view class="info-bar" style="width: {{0}}%"></view>
  22. </view>
  23. </view> -->
  24. <view class="xr-res-panel">
  25. <view class="res-row">
  26. <view class="res-name">glTF</view>
  27. <view class="res-btn {{onFlags[0] ? 'on': ''}}"
  28. bindtap="tapResBtn"
  29. data-type="gltf"
  30. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/index.gltf"
  31. data-index="0"
  32. >头盔</view>
  33. <view class="res-btn {{onFlags[1] ? 'on': ''}}"
  34. bindtap="tapResBtn"
  35. data-type="gltf"
  36. data-src="/assets/gltf/Fox.glb"
  37. data-index="1"
  38. >狐狸</view>
  39. <view class="res-name">图片</view>
  40. <view class="res-btn {{onFlags[2] ? 'on': ''}}"
  41. bindtap="tapResBtn"
  42. data-type="image"
  43. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/Default_albedo.jpg"
  44. data-index="2"
  45. >头盔基础色</view>
  46. <view class="res-btn {{onFlags[3] ? 'on': ''}}"
  47. bindtap="tapResBtn"
  48. data-type="image"
  49. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/Default_AO.jpg"
  50. data-index="3"
  51. >头盔AO</view>
  52. </view>
  53. <view class="res-row">
  54. <view class="res-name">视频纹理</view>
  55. <view class="res-btn {{onFlags[4] ? 'on': ''}}"
  56. bindtap="tapResBtn"
  57. data-type="video"
  58. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/videos/paris.mp4"
  59. data-index="4"
  60. >巴黎路边</view>
  61. <view class="res-btn {{onFlags[5] ? 'on': ''}}"
  62. bindtap="tapResBtn"
  63. data-type="video"
  64. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/videos/cat.mp4"
  65. data-index="5"
  66. >猫咪视频</view>
  67. <view class="res-btn {{onFlags[6] ? 'on': ''}}"
  68. bindtap="tapResBtn"
  69. data-type="video"
  70. data-src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/videos/yulong.mp4"
  71. data-index="6"
  72. >玉龙山顶</view>
  73. </view>
  74. </view>
  75. </xr-demo-viewer>