基础库版本3.10.0,检测物体移出镜头后隔很久才监听到removeAnchors事件,参考的是官方的例子
AR的OSD检测,Marker移出镜头后updateAnchors还在一直更新?this.session.on('addAnchors', anchors => { const anchor = anchors[0] const { width, height } = this.data console.log('addAnchors') if (anchor) { this.setData({ frameShow: true, frameX: anchor.origin.x * width, frameY: anchor.origin.y * height, frameWidth: anchor.size.width * width, frameHeight: anchor.size.height * height, }) } }) this.session.on('updateAnchors', anchors => { const anchor = anchors[0] const { width, height } = this.data if (anchor) { this.setData({ frameX: anchor.origin.x * width, frameY: anchor.origin.y * height, frameWidth: anchor.size.width * width, frameHeight: anchor.size.height * height, }) } }) this.session.on('removeAnchors', anchors => { this.setData({ frameShow: false, }) })
09-28那普通用户没用unionid了吗
小程序获取unionidhttps://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/union-id.html 小程序要获取unionid,一定要注册微信开放平台,然后绑定小程序吗?
2023-07-28