微信小游戏中window.requestAnimationFrame函数调用返回oN{9999}?

小游戏 文章 2022-03-12 17:40 1324 0 全屏看文

AI助手支持GPT4.0

微信小游戏中window.requestAnimationFrame函数调用返回oN{9999}?The window.requestAnimationFrame function call in WeChat Mini Game returns oN{9999}?

微信小游戏中window.requestAnimationFrame函数调用返回oN{9999}?

在使用lib:2.20.3版本中

this.bindLoop = this.loop.bind(this)this.aniId = window.requestAnimationFrame(this.bindLoop,canvas)console.log(this.aniId)

这里打印出来的值是oN{9999},这而且loop函数也没有被执行。我在官方给的例子中打印this.aniID这个值显示为DY{9999}。我这个是少了啥操作吗

In using lib: version 2.20.3, this bindLoop = this. loop. bind(this)this. aniId = window. requestAnimationFrame(this.bindLoop,canvas)console. Log (this. Aniid). The value printed here is on {9999}, and the loop function is not executed. I printed this in the example given by the official Aniid is displayed as dy {9999}. Is there anything missing in my operation

回答:

ferns:

刚刚发现是我把左侧的显示界面给关闭了,所以在运行的时候loop没有被调用起来,一旦打开左侧面板loop就被执行了,另外再说一下,这个函数的第二个参数canvas好像没啥用

保驾护航:i
孙鑫:等
品味人生:好的好的好的好的挂电话的呼吸很大很大华西坝补习补习坝坝席呼吸黄旭熙工序小嘎关系关系勾搭勾搭很大很大很大很大疙瘩呼吸哈哈嘻哈一点一点一点一点一定要对呀对呀对呀对呀对呀对呀韵达就晓得记得记得记得记得就打击打击打击打击你,!,。,!?我的事儿了,谢谢了兄弟们加油^0^~^0^~^0^~

-EOF-

AI助手支持GPT4.0