Core math, camera, input, mesh, animation, and transform contracts for Kagura
Dependencies
pub trait Game {
fn layout(Self, outside : OutsideSize) -> LogicalSize
fn update(Self, input : InputSnapshot) -> EngineTermination?
fn draw(Self, frame : FrameBudget) -> Unit
}impl Show for FixedStepConfigimpl Show for FixedStepStatepub struct InputSnapshot {
cursor_x : Double
cursor_y : Double
wheel_x : Double
wheel_y : Double
pressed_keys : Array[Int]
pressed_mouse_buttons : Array[Int]
touches : Array[TouchPoint]
gamepads : Array[GamepadSnapshot]
} derive(Debug)impl Show for InputSnapshotpub struct NoopGame {
logical_width : Int
logical_height : Int
}pub struct RunOptions {
init_unfocused : Bool
screen_transparent : Bool
screen_cleared_every_frame : Bool
} derive(Debug)impl Show for RunOptionsimpl Show for StepResultpub struct TouchPointEx {
id : Int
x : Double
y : Double
phase : TouchPhase
pressure : Double
delta_x : Double
delta_y : Double
} derive(Debug)impl Show for TouchPointExfn new_gamepad_snapshot(id : Int, axes : Array[Double], pressed_buttons : Array[Int]) -> GamepadSnapshotfn new_input_snapshot(cursor_x : Double, cursor_y : Double, wheel_x : Double, wheel_y : Double, pressed_keys : Array[Int]) -> InputSnapshotfn new_input_snapshot_full(cursor_x : Double, cursor_y : Double, wheel_x : Double, wheel_y : Double, pressed_keys : Array[Int], pressed_mouse_buttons : Array[Int], touches : Array[TouchPoint], gamepads : Array[GamepadSnapshot]) -> InputSnapshotfn new_run_options(init_unfocused? : Bool, screen_transparent? : Bool, screen_cleared_every_frame? : Bool) -> RunOptionsfn new_touch_point_ex_full(id : Int, x : Double, y : Double, phase : TouchPhase, pressure : Double, delta_x : Double, delta_y : Double) -> TouchPointExfn new_touch_point_with_source(id : Int, x : Double, y : Double, source : TouchSource) -> TouchPointfn step_fixed_timestep(state : FixedStepState, elapsed_ms : Double, config : FixedStepConfig) -> StepResultCore math, camera, input, mesh, animation, and transform contracts for Kagura
Dependencies