Very happy with it overall, but there are some artifacts in one of my projects where I draw a scaled and/or rotated img of the screen back onto itself.
I added a couple of pics, the 1st 2 pics are from the phone version, where you can see these purple artifacts, even if I draw nothing, the last pic is from the ipad, how it is supposed to look.
I only get the artifacts when the screen is being rotated and/or scaled, the strength of which is determined by how you hold the device. I included the relevant bit of code below, there is another setcontext() before I draw the final img to the screen.
You can scale up or down by ‘tilting’ and rotate by ‘rolling’ the device.
You can draw something on the screen by touching, but the artifacts show up regardless.
-- Artifact Xmple
function setup()
rnd = math.random
img = image(WIDTH, HEIGHT)
noStroke()
setContext(img)
fill(55+rnd(200), 55+rnd(200), 55+rnd(200))
rect(WIDTH/2-150,HEIGHT/2-150, 300, 300)
setContext()
end
function draw()
background(0, 0, 0, 255)
-- draw scaled & rotated img onto itself
zoom = 1-(Gravity.y+.8) / 20
setContext(img)
pushMatrix()
translate(WIDTH/2, HEIGHT/2)
rotate(-Gravity.x*6)
sprite(img, 0,0, img.width*zoom, img.height*zoom)
popMatrix()
-- fade to black
fill(0,2)
rect(0,0,WIDTH, HEIGHT)
setContext()
-- draw img to screen
sprite(img, img.width/2, img.height/2)
fill(255)
text(1//DeltaTime, WIDTH/2,HEIGHT-20)
end
function touched(t)
setContext(img)
ellipse(t.x,t.y, 50)
setContext()
end