// 此处如果为jpeg,则后缀名也需要改成对应后缀 // const filePath = `${wx.env.USER_DATA_PATH}/marker-ar1.jpg` // const mapfilePath = `${wx.env.USER_DATA_PATH}/marker-ar.jpg` export default function getBehavior() { return Behavior({ data: { width: 1, height: 1, fps: 0, memory: 0, cpu: 0, markerId: [], imgList: [], }, methods: { onReady() { // 初始化 threejs this.session = wx.createVKSession({ track: { plane: { mode:3 }, marker: true, }, version: 'v2' }) const session = this.session session.start(err => { if (err) { wx.redirectTo({ // url: '/pages/ar/plane-ar-v2-marker/plane-ar-v2-marker', url: '/pages/ar-classic/scene-classic-show/index', success: () => { }, fail: () => { }, }); // return console.error('VK error: ', err) } else { wx.redirectTo({ // url: '/pages/ar/plane-ar-v2-marker/plane-ar-v2-marker', url: '/pages/ar-classic/scene-classic-showsix/index', // url: '/pages/ar-classic/scene-classic-show/index', success: () => { }, fail: () => { }, }); // return console.error('VK error: ', err) } }) } }, }) }