namespace Examples;
///
/// A runnable raylib example. Each example class implements this interface directly: loop-spanning
/// state from the original example's Main lives in instance fields, (re)initialized in
/// so re-selecting an example resets it.
///
///
/// Desktop runs the example via its static Main(), a thin driver that owns the window
/// (InitWindow/CloseWindow, SetTargetFPS and friends) and drives ,
/// , and around a blocking
/// while (!WindowShouldClose()) loop. In the browser, Web/Host.cs owns the single
/// window and calls one frame at a time from JavaScript, so examples never
/// block. Platform divergences (e.g. GLSL 100 vs 330 shaders) are guarded with #if BROWSER,
/// preferably around a single constant so both platforms share one code path.
///
///
public interface IExample
{
/// Display name shown in the navigation dropdown.
string Name { get; }
/// Window title, matching the example's standalone Main().
string Title { get; }
/// Config flags the desktop runner applies before window creation.
ConfigFlags ConfigFlags => 0;
/// Target FPS the desktop runner sets after window creation.
int TargetFps => 60;
/// Whether the desktop runner disables the cursor (relative mouse movement).
bool CursorDisabled => false;
/// Whether the desktop runner hides the cursor.
bool CursorHidden => false;
/// One-time setup.
void Init();
/// Render one frame, including BeginDrawing/EndDrawing.
void Update();
/// Free resources.
void Unload();
}