I’ve been working on some infinite zooming Mandelbrot set plotting code for my nephew and I’ve run into more problems with imageData. Specifically, clearCanvas() doesn’t appear to work. I have to manually set each pixel in the canvas to white or else the drawImageURL() background image isn’t erased. Curiously, even though clearCanvas() seems to do nothing, leaving it out and doing the manual white clear using the imageData functions results in nothing being erased on the screen.
Here is the code :
Does anyone have an idea of what the problem might be?