Skip to main content

Module transitions

Module transitions 

Source
Expand description

Screen Transition Manager — handles visual transitions between game screens.

Supports multiple transition types: FadeBlack, Dissolve, Slide, ZoomIn, ChaosWipe. Each transition captures the outgoing screen state, tweens a visual effect, and reveals the incoming screen.

§Usage

use proof_engine::game::transitions::*;

let mut tm = TransitionManager::new();
tm.start(TransitionType::FadeBlack {
    out_time: 0.2, hold_time: 0.05, in_time: 0.2,
});
// Each frame:
tm.tick(dt);
if tm.should_swap_state() {
    // swap game state here
    tm.acknowledge_swap();
}
// Render the transition overlay:
let overlay = tm.render_overlay(screen_width, screen_height);

Structs§

GameTransitions
Pre-configured transitions for specific game state changes.
Screenshot
Captured framebuffer of the previous screen for cross-fade transitions.
TransitionManager
Manages screen-to-screen visual transitions.
TransitionOverlay
A full-screen overlay quad produced by the transition for rendering.
TransitionQueue
A queue of pending transitions. Useful when multiple transitions might be requested in quick succession (e.g. combat → floor nav → shop).
TransitionRequest
Queued transition request — allows scheduling transitions from game logic.
TransitionStats
Per-frame statistics.

Enums§

TransitionEasing
Easing functions for transition curves.
TransitionEffect
Which visual effect the renderer should use.
TransitionState
Current phase of a screen transition.
TransitionType
Visual effect used for the screen transition.