<xr-asset-load type="gltf" asset-id="damage-helmet" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/index.glb" />
<xr-gltf node-id="damage-helmet" model="damage-helmet" />
<xr-camera
position="0 1.5 4" target="damage-helmet" background="skybox"
clear-color="0.4 0.8 0.6 1" camera-orbit-control fov="90"
/>
试了下,应该是最新的windows工具里面的问题。
可以先使用上一个版本的工具
Windows 64
https://dldir1.qq.com/WechatWebDev/nightly/p-3bd19c2db3a642a0b39af853efaf67f8/0.54.1/wechat_devtools_1.06.2302022_x64.exe
Windows 32
https://dldir1.qq.com/WechatWebDev/nightly/p-3bd19c2db3a642a0b39af853efaf67f8/0.54.1/wechat_devtools_1.06.2302022_ia32.exe
用的demo中大代码,自己导出的gltf模型无法展示,官方提供的可以,是什么原因呢?加载资源也没有报错,gltf使用的unity导出来的,还需要控制还是怎么的?
<xr-scene id="xr-scene" ar-system bind:ready="handleReady" bind:ar-ready="handleARReady" bind:ar-error="handleARError">
<xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
<xr-asset-load type="gltf" asset-id="gltf-table" src="https://img.nkhabit.com/static/argame/charged6.gltf" />
<!-- <xr-asset-load type="gltf" asset-id="gltf-table" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/metal_table/scene.gltf" /> -->
</xr-assets>
<xr-env env-data="gz-haixinsha"/>
<xr-node>
<xr-node node-id="camera-target" position="0 0 0"></xr-node>
<xr-node node-id="table-wrap" position="0 0 0">
<xr-gltf node-id="mesh-gltf-table" position="0 -1 0" rotation="0 45 0" scale="0.5 0.5 0.5" model="gltf-table" />
</xr-node>
<xr-camera
position="2 1 2" clear-color="0.925 0.925 0.925 1"
background="ar" target="camera-target" camera-orbit-control=""
/>
</xr-node>
<xr-node node-id="lights">
<xr-light type="ambient" color="1 1 1" intensity="0.2" />
<xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="2" />
</xr-node>
</xr-scene>
如果解决了cuo我一下, 呜呜呜