华为使用canvas.getcontext(2d ) )实机黑屏
框架类型问题类型终端类型微信版本基础库版本小游戏错误微信安卓客户端7.0.16 2.11.3
varcanvas=wx.createCanvas (;
var context=canvas.get context (' 2d );
context.fillStyle='#1aad19 '
context.fillrect (0,0,100,200 );
在game.js文件中输入这些后,可以在电脑上显示,但不能在实机的黑屏上显示。 手机型号: POT-AL100,华为手机迈曼8。
frameworktypeproblemtypeterminaltypewechatversionbasiclibraryversiongamesbugwechatandroidclient7.0. 162.11.3 var canvas=context.fill style=' # 1a ad19 ' context.fill rect (0,0100200 ); in game.js Input these files,the computer can display,therealmachineblackscreencannotdisplay.mobile phone model 3360 pot-al 100 hot var context=canvas.get context (' 2d ); context.fillstyle=' # 1a ad19 ' context.fillrect (0,0,100,200 );
回答:
Forever:
是否调用了帧循环?
funcell:game.js只有上述几行代码。
funcell:这样也不行。 不能调用帧循环
forever :安卓手机需要调用帧循环才能显示