App

:= []

Application startup configuration and model initialization.

Use App.init when startup needs effects such as loading host-owned assets. The callback runs after the window, renderer, and audio device are ready.

default : Config

Default 800x600 window configuration capped at 240 FPS.

init : Config, InitCallback(model, errors) -> Init(model, errors)

Build app initialization from pure startup config plus the effectful callback that creates the first model after raylib/audio are ready.

FramePacing : FramePacing

Mutually exclusive frame pacing strategy.

CursorMode : CursorMode

Initial native cursor mode.

Config : Config

Opaque validated startup configuration. Update it through receivers.

InitCallback : Host => Try(model, [Exit(I64), ..errors])

Effectful startup callback run after the host has initialized raylib and audio. Return Ok(model) to start the app, Err(Exit(code)) to quit before the first frame, or let other initialization errors propagate.

Init : {
    config : Config,
    run! : InitCallback(model, errors),
}

Startup configuration paired with an effectful model initializer.