微信更新到8.0.37 使用buffer 填充SpriteFrame()花屏
[图片] 示例代码: 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;