Skip to main content

create_showcase_app_with_viewport

Function create_showcase_app_with_viewport 

Source
pub fn create_showcase_app_with_viewport(
    headless: bool,
    mode: RenderMode,
    logical_width: u32,
    logical_height: u32,
    initial_scale: f32,
) -> Result<(App, ShowcaseState), PlatformError>
Expand description

Builds an App and reactive ShowcaseState configured with explicit initial logical viewport dimensions and DPR scale.

§Arguments

  • bool - When true, uses deterministic HeadlessPlatform; otherwise uses the active native OS backend.
  • RenderMode - Initial rendering pipeline mode.
  • u32 - Initial logical viewport width in pixels.
  • u32 - Initial logical viewport height in pixels.
  • f32 - Initial device pixel ratio (>= 0.5).

§Returns

  • Result<(App, ShowcaseState), PlatformError> - Initialized showcase app and state.