2.3.0截屏问题

我用这个方法截图,报错
public saveImg() {
let htmlCanvas: any = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0);
let canvas: any = htmlCanvas.sourse;
canvas.toTempFilePath({
x: 100,
y: 200,
width: 50,
height: 50,
destWidth: 100,
destHeight: 100,
fileType: "png",
quality: 1.0,
success: (res) => {
console.log(res.tempFilePath);
}
})
}
 
报的是
gameThirdScriptError
ImageData is not defined
ReferenceError: ImageData is not defined
    at Function.RunDriver.drawToCanvas (http://127.0.0.1:27664/game/libs/laya.webgl.js:7119:27)
 
drawToCanvas怎么搞,截屏问题,谁看一下
已邀请:

要回复问题请先

商务合作
商务合作