wx.createSelectorQuery()
.select('#annieEngineOn')
.fields({
node: true,
size: true,
}).exec(function (res) {
let canvas = res[0].node;
annie.devicePixelRatio = sysInfo.pixelRatio;
canvas.width = windowWidth * sysInfo.pixelRatio;
canvas.height = windowHeight * sysInfo.pixelRatio;
annie.CanvasRender.rootContainer = canvas;
annie.CanvasRender._ctx = canvas.getContext('2d');
resolve(res)
})
目前pc端还不支持canvas 2d