index.wxml 1.2 KB

123456789101112131415161718192021
  1. <xr-scene id="xr-scene" bind:ready="handleReady" bind:log="handleLog">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load
  4. type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin"
  5. />
  6. <xr-asset-load type="gltf" asset-id="gltf-damageHelmet" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/index.glb" />
  7. </xr-assets>
  8. <xr-env env-data="env1" />
  9. <xr-node node-id="target">
  10. <xr-gltf model="gltf-damageHelmet" position="2 0 0" auto-rotate="speed:2 1 3" />
  11. <xr-auto-rotate-touchable-gltf id="artg" position="-2 0 0" model="gltf-damageHelmet" speed="1 0 0" bind:drag-shape="handleDrag" bind:touch-shape="handleTouchStart" bind:untouch-shape="handleTouchEnd" />
  12. <xr-camera
  13. id="camera" node-id="camera" position="0 0 8" clear-color="0.925 0.925 0.925 1"
  14. background="skybox" target="target"
  15. ></xr-camera>
  16. </xr-node>
  17. <xr-node node-id="lights">
  18. <xr-light type="ambient" color="1 1 1" intensity="1" />
  19. <xr-light type="directional" rotation="40 170 0" color="1 1 1" intensity="3" />
  20. </xr-node>
  21. </xr-scene>