namespace Examples;
///
/// A runnable raylib example. Loop-spanning state lives in instance fields, (re)initialized in
/// so re-selecting an example resets it.
///
///
/// Desktop drives examples via Program.cs (each also keeps a thin standalone
/// static Main()); in the browser, Web/Host.cs owns the single window and calls
/// one frame at a time from JavaScript. Platform divergences are guarded
/// with #if BROWSER, preferably around a single constant.
///
///
public interface IExample
{
/// Display name shown in the navigation dropdown.
string Name
{
get;
}
/// Window title, matching the example's standalone Main().
string Title
{
get;
}
/// Desktop window size, matching the standalone Main(). The browser canvas is fixed at 800x450.
int Width => 800;
///
int Height => 450;
/// Config flags the desktop runner applies before window creation. Ignored in the browser.
ConfigFlags ConfigFlags => 0;
/// Target FPS. The desktop runner always applies it; the browser host paces its frame loop with it.
int TargetFps => 60;
/// Whether the desktop runner disables the cursor. Ignored in the browser (the pointer stays visible).
bool CursorDisabled => false;
/// Whether the desktop runner hides the cursor. Ignored in the browser.
bool CursorHidden => false;
///
/// Whether the desktop runner should exit its frame loop; defaults to
/// . Examples that intercept the close request
/// override this and poll WindowShouldClose in themselves.
///
bool ShouldClose => WindowShouldClose();
/// Set up the Example and preload necessary resources.
void Init();
/// Render one frame, including BeginDrawing/EndDrawing.
void Update();
/// Free resources.
void Unload();
}