XRFRAME-2dmarker真机预览不显示?开发工具看不了
组件代码: <xr-scene ar-system="modes:Marker" id="xr-scene" bind:ready="handleReady" bind:ar-ready="handleARReady">
<xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
<xr-asset-load type="gltf" asset-id="gltf" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb" />
</xr-assets>
<xr-env env-data="xr-frame-team-workspace-day" />
<xr-node wx:if="{{arReady}}">
<xr-ar-tracker mode="Marker" src="{{markerImg}}">
<xr-gltf model="gltf" anim-autoplay position="0.2 0 -0.2" scale="0.6 0.6 0.6" rotation="0 -50 0" />
<xr-gltf model="gltf" anim-autoplay position="0.4 0 0.3" scale="0.5 0.5 0.5" rotation="0 -50 0" />
<xr-gltf model="gltf" anim-autoplay position="-0.3 0 0.3" scale="0.4 0.4 0.4" rotation="0 -50 0" />
</xr-ar-tracker>
<xr-camera id="camera" node-id="camera" position="0.8 2.2 -5" clear-color="0.925 0.925 0.925 1" background="ar" is-ar-camera></xr-camera>
</xr-node>
<xr-node node-id="lights">
<xr-light type="ambient" color="1 1 1" intensity="1" />
<xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
</xr-node>
</xr-scene>
// components/xr-scene/xr-scene.js
Component({
/**
* 组件的属性列表
*/
properties: {
markerImg: {
type: String
},
},
/**
* 组件的初始数据
*/
data: {
loaded: false,
arReady: false,
},
lifetimes: {
attached() {
console.log('data', this.data)
}
},
/**
* 组件的方法列表
*/
methods: {
handleReady({
detail
}) {
const xrScene = this.scene = detail.value;
console.log('xr-scene', xrScene);
},
handleAssetsProgress: function ({
detail
}) {
console.log('assets progress', detail.value);
},
handleAssetsLoaded: function ({
detail
}) {
console.log('assets loaded', detail.value);
this.setData({
loaded: true
});
},
handleARReady: function ({
detail
}) {
console.log('arReady');
this.setData({
arReady: true
})
}
}
})
分包也设置了,空的 {
"pages": [
"pages/index/index"
],
"subpackages": [],
"window": {
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
},
"style": "v2",
"renderer": "skyline",
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,
"disableABTest": true,
"sdkVersionBegin": "3.0.0",
"sdkVersionEnd": "15.255.255"
}
},
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
}
截图: 手机是安卓8.0.41 [图片] 开发工具已经是最新的了 [图片]