[−][src]Function quicksilver::lifecycle::run_with
pub fn run_with<T: State, F: FnOnce() -> Result<T>>(
title: &str,
size: Vector,
settings: Settings,
f: F
)
Run the application's game loop
On desktop platforms, this yields control to a simple game loop controlled by a Timer. On wasm, this yields control to the browser functions setInterval and requestAnimationFrame
This function behaves the same as run
, but the FnOnce
argument is responsible for state
creation instead of the backend.