这里添加了图片位置,drawImage方法中有清除画布的方法,会把图片清楚掉,只能看到图片一闪而逝
const image wxcreateImage
const imgX canvaswidth 50
let imgY 500
image.onload = function{
context.drawImage(image,imgX,imgY)
}
image.src = 'img/plane.png'
const image wxcreateImage
const imgX canvaswidth 50
let imgY 500
image.onload = function{
context.drawImage(image,imgX,imgY)
}
image.src = 'img/plane.png'