We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a71e743 commit 071e1e8Copy full SHA for 071e1e8
raylib.js
@@ -117,6 +117,18 @@ class RaylibJs {
117
return false;
118
}
119
120
+ IsWindowFullscreen() {
121
+ return document.fullscreenElement && document.fullscreenElement === this.ctx.canvas;
122
+ }
123
+
124
+ ToggleFullscreen() {
125
+ if (this.IsWindowFullscreen()) {
126
+ document.exitFullscreen()
127
+ } else {
128
+ this.ctx.canvas.requestFullscreen();
129
130
131
132
SetTargetFPS(fps) {
133
console.log(`The game wants to run at ${fps} FPS, but in Web we gonna just ignore it.`);
134
this.targetFPS = fps;
0 commit comments