I’m posting this as Code Sharing rather than Bugs as I seem to have discovered an iPad fault rather than a Codea bug.
I installed Codea today and thought I would try testing the effect of swapping the screen color repeatedly from black to white. I wrote the code below, it ran fine, a few minutes later I ran again and left it running for a minute or so. When I stopped the code running there seemed to be the same flashing effect on the screen. At first I thought it was my eyes, but even after doing a proper shutdown (not reset), and power up, the flashing continued. I went back into Codea and ran the Roller Coaster example which stopped the flashing.
So, does anyone know how the iPad can behave like this? I have an iPad 1 btw.
WARNING: The code below made my iPad behave funny, so use it at your own risk.
function setup()
displayMode(FULLSCREEN)
scolor = 0
end
function draw()
-- This sets the background color to black or white
-- depending on the scolor value.
if scolor == 0 then
background(0, 0, 0, 255)
scolor = 1
else
background(255, 255, 255, 255)
scolor = 0
end
end