/voxel-fullscreen

toggle fullscreen with a keyboard shortcut (voxel.js plugin)

Primary LanguageJavaScriptMIT LicenseMIT

voxel-fullscreen

Toggle fullscreen with a hotkey (voxel.js plugin)

Uses the fullscreen keybinding, default F11. Hitting this key will enter or exit fullscreen mode via the HTML5 Fullscreen API (more details).

Known issue: leaving fullscreen may release pointer lock (click to re-acquire).

Options

element: the HTML element to fullscreen, defaults to document.body

requestFlags: flags to pass to requestFullscreen, defaults to Element.ALLOW_KEYBOARD_INPUT

How does this plugin compare to...

...browser menu fullscreening (View - Enter Full Screen in Chrome)? Since this plugin uses the HTML5 Fullscreen API, the document is shown in its entirety, without any extra browser chrome (e.g., tabs).

...game-shell's fullscreen property? This plugin adds a keybinding, and also sets the fullscreen element to document.body instead of just the WebGL canvas.

License

MIT