setContext experimentation

A cool effect with setContext :

http://www.youtube.com/watch?v=5-tW8PC-2qo&feature=youtu.be

@HyroVitalyProtago Very cool. I was trying to dig up a similar project that I did but I can’t seem to find it.

Does anyone with an iPad Air see this video. I just see a large white area. There’s about 2" of white background between the text “A cool effect…” and the “Write Comment” area or next comment. On my iPad1 I see the video with no problems.

i see it with my ipad air

I wonder if there’s a setting somewhere that I need to either turn on or turn off.

EDIT: Never mind. I closed Codea Talk and started it up again and the video now shows.

EDIT: Now it doesn’t. It appears that it works the first time, but if I switch to another discussion and come back, I just see the white background.

@HyroVitalyProtago Nice effect. How are you doing that. Also, sorry for changing the content of your discussion, but I wasn’t seeing anything at first.

@Briarfox - Thanks. If you found it, i’m more than interested !

@dave1707 - No problems :wink:

This effect is based on setContext and view in 3D (perspective and camera).

-- SetContextExperiment

-- SEE IT IN LANDSCAPE

displayMode(FULLSCREEN)

function setup()
    img = image(WIDTH-5,HEIGHT-4)
end

function draw2()
    pushMatrix()
    perspective(40, WIDTH/HEIGHT)
    camera(WIDTH/2,HEIGHT/2,150,WIDTH/2,HEIGHT/2,0,0,1,0)
    translate(0,0,-900)
    sprite("Cargo Bot:Codea Icon",WIDTH/2, HEIGHT/2)
    sprite(img,WIDTH/2, HEIGHT/2)
    popMatrix()
end

function draw()
    background(0)
    setContext(img)
    draw2()
    setContext()
    draw2()
end

@dave1707 i have the problem quite often too. It came with ios7. Usually i just have to kill safari and restart it, then it is ok, until it breaks again after several videos.

@Jmv38 I’m not sure when the problem started, but I’m currently on iOS 7.1 .

@dave1707 btw i experience the == bug too, but i cant reproduce it.