使用AR功能时,加载了自定义的纹理贴图,在识别后导致摄像头画面无限镜像闪烁,去掉后一切正常,其它代码没有贴出来,同官方示例相同,唯一区别在于官方示例展示一个小机器人,问题代码想要展示两个平面贴图,而且两个贴图感觉也很怪异,不是一起动
const plane = new THREE.PlaneGeometry(10, 10)
const texture = new THREE.TextureLoader().load("/static/ar-js/a.png");
const planeMaterial = new THREE.MeshBasicMaterial({
map: texture,
side: THREE.DoubleSide
})
texture.minFilter = THREE.LinearFilter
const mesh = new THREE.Mesh(plane, planeMaterial)
const plane2 = new THREE.PlaneGeometry(10, 10)
const texture2 = new THREE.TextureLoader().load("/static/ar-js/abc.jpg");
const planeMaterial2 = new THREE.MeshBasicMaterial({
map: texture2,
side: THREE.DoubleSide
})
texture2.minFilter = THREE.LinearFilter
const mesh2 = new THREE.Mesh(plane2, planeMaterial2)
mesh2.position.set(0, 0, .6)
const g = new THREE.Group();
g.rotateX(Math.PI / 2)
g.add(mesh)
g.add(mesh2)
scene.add(g)
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
代码片段https://developers.weixin.qq.com/s/GWoCt4m37UCz