示例代码:
var aCanvas=wx.createCanvas();
aCanvas.width=SCREEN_WIDTH;
aCanvas.height=SCREEN_HEIGHT;
var canvas2d=aCanvas.getContext('2d');
var ctxImageData = canvas2d.createImageData(SCREEN_WIDTH,SCREEN_HEIGHT);
ctxImageData.data.set(new Uint8Array(framebuffer_u8));
canvas2d.putImageData(ctxImageData, 0, 0);
var myTexture2D =new cc.Texture2D();
myTexture2D.initWithElement(aCanvas);
var sprite = that.game.getComponent(cc.Sprite);
var sp=new cc.SpriteFrame();
sp.setTexture(myTexture2D);
sprite.spriteFrame=sp;
小游戏目前可用 wx.createImageData 替换 canvasCtx.createImageData 方法
https://developers.weixin.qq.com/community/develop/article/doc/0004cef0f980407630dfa1e2956013
已定位到问题,会尽快修复