1
動作しませんので、これは私のコードP5.js updatePixelsは()私は赤に、各ピクセルを更新したい
const canvasWidth = 800
const canvasHeight = 600
function setup() {
createCanvas(canvasWidth, canvasHeight)
loadPixels()
let xoff = 0
for (let x = 0; x < canvasWidth; x++) {
let yoff = 0
for (let y = 0; y < canvasHeight; y++) {
pixels[x + y * canvasWidth] = color('red')
yoff += + 0.01;
}
xoff += 0.01
}
updatePixels()
}
ですが、コードは動作しません