EPGLTransitionView icon indicating copy to clipboard operation
EPGLTransitionView copied to clipboard

Add Up and Down transition

Open jorbsd opened this issue 14 years ago • 4 comments

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.

jorbsd avatar Apr 20 '11 01:04 jorbsd

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

saiy2k avatar Feb 20 '12 11:02 saiy2k

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?

priteshshah1983 avatar Jul 24 '12 18:07 priteshshah1983

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

epatel avatar Jul 24 '12 19:07 epatel

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

priteshshah1983 avatar Jul 24 '12 19:07 priteshshah1983