pub struct ShowcaseState { /* private fields */ }Expand description
Reactive application state powering every interactive page of the cross-platform showcase.
Implementations§
Source§impl ShowcaseState
Construction and helper methods for ShowcaseState.
impl ShowcaseState
Construction and helper methods for ShowcaseState.
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes a new reactive ShowcaseState with default values, derived computed! memos, and game host.
§Returns
Self- Initialized reactive showcase state.
Sourcepub fn ensure_media_loaded(&self)
pub fn ensure_media_loaded(&self)
Lazily hydrates Media Studio sample assets on first /media visit so Frame 1 incurs zero media codec work.
§Arguments
&Self- Reactive showcase state reference.
Sourcepub fn ensure_wasm_registry_loaded(&self)
pub fn ensure_wasm_registry_loaded(&self)
Lazily populates the in-memory .wasm OTA registry on first /dynamic visit so Frame 1 incurs zero WASM encoding work.
§Arguments
&Self- Reactive showcase state reference.
Sourcepub fn ensure_stress_loaded(&self)
pub fn ensure_stress_loaded(&self)
Lazily initializes the Stress Lab workload descriptors on first /stress visit.
§Arguments
&Self- Reactive showcase state reference.
Sourcepub fn ensure_charts_loaded(&self)
pub fn ensure_charts_loaded(&self)
Lazily marks ECharts Studio hydrated on first /charts visit so Frame 1 incurs zero chart option allocations.
§Arguments
&Self- Reactive showcase state reference.
Sourcepub fn populate_wasm_registry(registry: &RegistryWasmFetcher)
pub fn populate_wasm_registry(registry: &RegistryWasmFetcher)
Registers genuine executable partial, global, and fault-case .wasm binaries into registry.
§Arguments
&RegistryWasmFetcher- Target CDN registry fetcher.
Sourcepub fn attach_dynamic_hub(&mut self, hub: DynamicUpdateHub)
pub fn attach_dynamic_hub(&mut self, hub: DynamicUpdateHub)
Binds hub from the active App and wires interactive dynamic actions and WASM manager callbacks.
§Arguments
&Self- Mutable showcase state.DynamicUpdateHub- Shared dynamic update hub owned byApp.
Sourcepub fn build_ai_hooks(&self) -> AiAppHooks
pub fn build_ai_hooks(&self) -> AiAppHooks
Returns the categorized sidebar navigation items grouped in Linear/Vercel/shadcn hierarchy.
§Returns
Vec<EuvNavItem>- Categorized list of showcase routes.
Sourcepub fn selected_render_mode(&self) -> RenderMode
pub fn selected_render_mode(&self) -> RenderMode
Sourcepub fn next_scheme(&self)
pub fn next_scheme(&self)
Sourcepub fn toggle_theme_mode(&self)
pub fn toggle_theme_mode(&self)
Sourcepub fn freeze_for_background(&self)
pub fn freeze_for_background(&self)
Snapshots active running/playing state across all 15 showcase pages and freezes 2D/3D engines and media players for background.
§Arguments
&Self- State reference.
Sourcepub fn restore_from_foreground(&self)
pub fn restore_from_foreground(&self)
Restores the exact pre-background running/playing flags across all showcase game hosts and media players on foreground return.
§Arguments
&Self- State reference.