Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

setContext experimentation

edited March 2014 in General Posts: 292

A cool effect with setContext :

Comments

  • BriarfoxBriarfox Mod
    Posts: 1,542

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

  • dave1707dave1707 Mod
    edited March 2014 Posts: 7,605

    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.

  • Posts: 386

    i see it with my ipad air

  • dave1707dave1707 Mod
    edited March 2014 Posts: 7,605

    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.

  • dave1707dave1707 Mod
    Posts: 7,605

    @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 ;)

    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
    
  • Jmv38Jmv38 Mod
    Posts: 3,295

    @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.

  • dave1707dave1707 Mod
    Posts: 7,605

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

  • Jmv38Jmv38 Mod
    Posts: 3,295

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

Sign In or Register to comment.