Take notice that each get() creates a new HTMLCanvasElement, which is not a light object btW:
Depending on how many of them are created each draw() iteration, the sketch can even crash some mobile devices:
Mutating already existing pixels[] saves memory and can be more performant.
1 Like