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 Frame Transition (v1) #45

Merged
merged 3 commits into from
Jan 3, 2024
Merged

Add Frame Transition (v1) #45

merged 3 commits into from
Jan 3, 2024

Conversation

Hapaxia
Copy link
Owner

@Hapaxia Hapaxia commented Jan 3, 2024

No description provided.

update year for 2024
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).
@Hapaxia Hapaxia merged commit f873fe0 into master Jan 3, 2024
24 checks passed
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

Successfully merging this pull request may close these issues.

1 participant