Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

ostwilkens/bevy_web_fullscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ this plugin is deprecated, as bevy now has this built-in. see link

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);

About

full-viewport plugin for bevy on the web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages