Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Up and Down transition #4

Open
jorbsd opened this issue Apr 20, 2011 · 4 comments
Open

Add Up and Down transition #4

jorbsd opened this issue Apr 20, 2011 · 4 comments

Comments

@jorbsd
Copy link

jorbsd commented Apr 20, 2011

In addition to the left and right transitions it would be great to have up and down transitions in the samples that come with the code.

@saiy2k
Copy link

saiy2k commented Feb 20, 2012

In the drawTransitionFrameWithTextureFrom:(GLuint)textureFromView textureTo:(GLuint)textureToView method of DemoTransition2.m, change the vertices and texcoords to the following for vertical transition:]

GLfloat vertices[] = {
    -1, 1.5,
    -1, 0,
    1,  1.5,
    1,  0,
    -1, 0,
    -1, -1.5,
    1, 0,
    1, -1.5,
};

GLfloat texcoords[] = {
    0, 0,
    0, 0.5,
    1, 0,
    1, 0.5,
    0, 0.5,
    0, 1,
    1, 0.5,
    1, 1,
};

also find the lines:
glRotatef(v*180.0, 0, 1, 0);
glRotatef(180.0, 0, 1, 0);

and replace them with
glRotatef(v*180.0, 1, 0, 0);
glRotatef(180.0, 1, 0, 0);

@priteshshah1983
Copy link

How do I change the reference line for rotation to the top of the screen (instead of the center) to achieve a Rolodex like animation?

@epatel
Copy link
Owner

epatel commented Jul 24, 2012

Actually I think EPGLTransition might be overkill for "flat panel" animations. Best for that would be using CALayers efficiently. i.e. see http://www.voyce.com/index.php/2010/04/10/creating-an-ipad-flip-clock-with-core-animation/
EPGLTransition is better if one would like to do "non-flat panel" animations, like a page curl, curtain cloth etc

@priteshshah1983
Copy link

Thanks for your help Edward! I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants