Skip to main content

Crate repame_shell

Crate repame_shell 

Source
Expand description

App wiring: Repose platform runners plus sim, gamepad and portal helpers.

Re-exports§

pub use portal::AdKind;
pub use portal::AdOutcome;
pub use portal::GameState;
pub use portal::PortalHost;
pub use portal::PortalReport;
pub use portal::Suspend;

Modules§

portal
Portal integration: ads, cloud saves, host pause, lifecycle mute and the host-facing gameplay notices, in one place.

Structs§

Camera2d
2D orthographic camera. Owned by the UI (signals), copied into the snapshot per frame. effective_center is center + offset. Canvas, GPU batch, and picks derive from these fields together.
GamepadId
Opaque gamepad handle. Backend-local index, stable for the connection lifetime. Survives across frames; invalid after GamepadEvent::Disconnected.
GamepadPoller
Gamepad polling on the shared platform backend. Events feed ReposeRuntime::handle_gamepad (UI nav) and rt.gamepads (gameplay).
MotionPoller
Motion-sensor polling on top of the shared platform backend. Sensor nodes are separate evdev nodes from the pad, so readings are routed back to pads by name; feed MotionPoller::feed_gamepad the same events GamepadPoller drains.
PadBank
PadBridge
PadMotion
One pad’s motion, ready for MotionTracker. Holds its own copy of the reading so it stays a plain value the sim can carry between frames.
Quit
A quit request, latched so a browser shell can park instead of exiting.
RetainedRoot
RumbleBridge
Routes HapticBus motors to ReposeRuntime::request_rumble. Uploads only on change and on refresh, and stops devices the bus dropped, since the bus stops mentioning a device rather than zeroing it.
ShortcutEdges
Sim
Fixed-step sim state. Game registers systems, feeds wall time with step, reads world for the snapshot.
SimTime
Sim time, advanced once per fixed step.
SpriteInstance
One batched sprite. uv is in atlas texels normalized to 0..1.
Staging

Enums§

GamepadEvent
PickEvent

Constants§

RUMBLE_REFRESH
Upload again once this much of RUMBLE_UPLOAD_MS has elapsed, which keeps a held effect alive without restarting it every frame.
RUMBLE_UPLOAD_MS
Length of each rumble upload. The backend sends a fresh force-feedback effect per call, so uploads are spaced out rather than repeated per frame.
TRIGGER_HELD

Traits§

ShellHooks
Per-frame hooks the game implements.

Functions§

apply_scheduler_levels
game_shortcut_map
install_game_shortcuts
Compose the game map + edges handler once in the root view (mount-once under the hood: safe to call every frame on desktop, web, and Android-with-keyboard alike). One call per game; no per-key duplication at call sites.
install_handler_into
Install only the action handler into long-lived edges (tests and headless compose without a runner use this path).
install_map
Overwrite the process-global default shortcut map (tests and headless compose without a runner use this path).
on_first_user_gesture
Run f on the first user gesture on this page.
run_desktop
Desktop entry point. Mounts root with title and size. The root closure owns stepping and requests frames for continuity. The closure receives the live [Scheduler] each frame, whose held_keys / window_focused / mouse_* fields are the single polled hardware snapshot (GML keyboard_check / mouse_check_button parity).
shared_edges
shortcut_handler
take_shortcut_edges
user_gesture_seen
Whether a user gesture has been seen.

Type Aliases§

SharedEdges