voxel / ideas

issue tracker for new voxel.js plugin ideas
4 stars 1 forks source link

[voxel-fullscreen] Fullscreen mode #29

Closed deathcap closed 10 years ago

deathcap commented 10 years ago

A plugin to allow the user to easily enter/exit fullscreen mode, using the HTML5 Fullscreen API:

http://www.w3.org/TR/fullscreen/ (more information: http://www.sitepoint.com/use-html5-full-screen-api/)

game-shell supports this API, can request entering with game.shell.fullscreen = true. However it cannot be requested at any time, so it adds a click event handler, then calls webkitRequestFullScreen() there. But there are a few problems:

Some of these could be changed in game-shell, but the hotkey ought to be separate (probably using voxel-keys).

For testing:

document.body.addEventListener('click', function() { document.body.webkitRequestFullScreen(document.body.ALLOW_KEYBOARD_INPUT) })

screenshots:

screen shot 2014-06-14 at 8 23 45 pm screen shot 2014-06-14 at 8 23 08 pm

deathcap commented 10 years ago

Now available: https://github.com/deathcap/voxel-fullscreen

Filed those issues with other plugins separately: