Camera.onCameraFrame(function callback)回调为什么不执行?

小游戏 文章 2022-03-21 12:00 0 全屏看文

Camera.onCameraFrame(function callback)回调为什么不执行?Why is the Camera.onCameraFrame(function callback) callback not executed?

Camera.onCameraFrame(function callback)回调为什么不执行?
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小游戏 Bug Camera.onCameraFrame(function callback) 微信安卓客户端 8.0.18 2.23.0

var camera = wx.createCamera({

success:function(res){

camera.onCameraFrame(function(res){

      console.log(123);

    })

}

});

   

真机调试、真机预览都不回调。相机是创建成功的,有画面,就是附在整个游戏上边。怎么能把这个画面作为游戏中场景相机的背景,望指点一下。

Framework type problem type API / component name terminal type wechat version basic library version games bug camera Oncameraframe (function callback) wechat Android client 8.0.18 2.23.0 var camera = Wx createCamera({ success:function(res){ camera.onCameraFrame(function(res){ console.log(123); }) } }); There is no callback for real machine debugging and real machine preview. The camera is created successfully. With pictures, it is attached to the whole game. How can this picture be used as the background of the scene camera in the game? I hope you can give me some advice.

回答:

小游戏运营专员 - 宏:

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

浪荡少年:因
湘西张氏石雕工艺:亅l丶:::r:::∵:

-EOF-