pub fn mainloop<F, G>(interval: Duration, state_callback: F, render_callback: G)Expand description
Main loop helper function. Provides callbacks for game state changes and rendering. Calls state_callback multiple times if the actual render_callback call interval exceeds the given interval. Both callbacks receive a LoopState object containing frame delta and fps data.