//公共域发送数据
let openDataContext = wx.getOpenDataContext()
let sharedCanvas = openDataContext.canvas
sharedCanvas.width = 400
sharedCanvas.height = 200
setTimeout(() => {
let canvas = wx.createCanvas()
let context = canvas.getContext('2d')
context.drawImage(sharedCanvas, 0, 0)
}, 2000);
非安全 Canvas 的 WebGL 上下文的 drawImage 不能传入安全 Canvas?? 小游戏运营专员 - 宏 的回答 - 微信开放社区 https://developers.weixin.qq.com/community/develop/doc/0004c60a6ac1981cbbe9e6dbb56800?_at=1640078750275&jumpto=comment&commentid=0006e4667c4ea84db7e9b6346578