bevy_web_fullscreen 0.2.1

Bevy plugin for automatic resizing of primary bevy window to fit browser viewport
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 5.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 584.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 59s Average build duration of successful builds.
  • all releases: 59s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ostwilkens

bevy_web_fullscreen

plugin for automatic resizing of primary bevy window to fit browser viewport

tested with mrks-its/bevy_webgl2 in ostwilkens/arugio

usage

.add_plugin(FullViewportPlugin)

recommended html/css

<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
body {
    margin: 0px;
    display: flex;
    overflow: hidden;
}
canvas {
    touch-action: none;
}

Conditional compilation

Make use of this cfg in order to have your code only include the plugin when targeting wasm.

#[cfg(target_family = "wasm")]
app.add_plugin(FullViewportPlugin);