index.wxml 1.7 KB

1234567891011121314151617181920212223242526
  1. <xr-scene id="xr-scene" bind:ready="handleReady">
  2. <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
  3. <xr-asset-load asset-id="anim" type="keyframe" src="/assets/animation/miku-kawaii-animation.json"/>
  4. <xr-asset-load type="gltf" asset-id="cloud-station" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/cloud-station/index.glb" />
  5. <xr-asset-load type="gltf" asset-id="miku-kawaii" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/shiteyanyo-hatsune-miku/index.glb" />
  6. <xr-asset-load type="gltf" asset-id="miku" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/miku.glb" />
  7. </xr-assets>
  8. <xr-node>
  9. <xr-node node-id="target" position="0 1 0" />
  10. <xr-gltf position="0 0 0" scale="1 1 1" model="cloud-station" anim-autoplay></xr-gltf>
  11. <xr-gltf position="1.8 -0.5 1.5" scale="0.12 0.12 0.12" rotation="0 180 0" model="miku" anim-autoplay></xr-gltf>
  12. <xr-node anim-keyframe="anim" anim-autoplay="clip:parent">
  13. <xr-node position="0 -0.5 3" rotation="0 90 0" anim-keyframe="anim" anim-autoplay="clip:child">
  14. <xr-gltf model="miku-kawaii" anim-keyframe="anim" anim-autoplay></xr-gltf>
  15. </xr-node>
  16. </xr-node>
  17. <xr-camera
  18. id="camera" node-id="camera" position="0 1 7" clear-color="0.925 0.925 0.925 1"
  19. target="target" background="default" camera-orbit-control=""
  20. ></xr-camera>
  21. </xr-node>
  22. <xr-node node-id="lights">
  23. <xr-light type="ambient" color="1 1 1" intensity="1" />
  24. <xr-light type="directional" rotation="40 180 0" color="1 1 1" intensity="2" />
  25. </xr-node>
  26. </xr-scene>