Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Frame Transition drawable. transitions between two (equally sized) rectangles. Each frame's alpha animation (Fade) can be customised to allow linear fades, step switch or just keeping their alpha or even just removing it (invisible). "TexCrop" 'wipes' a line across the rectangle replacing one texture with another. how the texture is calculated for these quads can be customised allowing for different wipe types including the standard "wipe", "push", "slide in", "slide out", "shuffle". TexCrop can also be animated in either of the four standard directions (right, left, down, up). Note that the two quads never overlap and always fill the entire FrameTransition rectangle. "Zoom" places the first frame (A) in front of the second frame (B) and zooms in, out, a combination of both or neither. the Fade is particular useful here. Each frame can be customised to have different zoom types (as listed above), zoom amounts (via parameters) and whether it scales the actual quad or its texture rectangle to control zooms. each frame (A and B) can have its own colour, along with an alpha, that is taken into account for its quad including during alpha animations (Fades). during "proper" usage, the quads will never exceed the FrameTransition rectangle. however, it's possible to "hack" this (if required) when using parameters with zoom. note that local and global bounds always return the rectangle of the drawable and purposefully ignores any scaling of quads. each frame can have a separate texture or use the same one. the order of the frames can also be swapped if required for something special. if the frame order is not swapped and the textures are the same for both frames, FrameTransition can optimise the draw calls (a single draw call instead of two).
- Loading branch information