pixijs CANVAS putImageData 使用方法
https://codepen.io/a6965921/pen/vYXwwGg
const app = new PIXI.Application({ width: 300, height: 150, forceCanvas: true, transparent: true }); app.view.setAttribute('id','pixicanvas') document.body.appendChild(app.view); app.stop(); var c=document.getElementById("pixicanvas"); var ctx=c.getContext("2d"); const imgData = ctx.getImageData(0, 0, 300, 150) console.log(imgData); for (let i = 0; i < imgData.data.length ; i++) { imgData.data[i]=66; } ctx.putImageData(imgData, 0, 0)