summaryrefslogtreecommitdiff
path: root/misc/dist/html
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-01-30 11:35:03 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-02-19 05:12:32 +0100
commit65abf94675fbd7fddf8b3350efd15507ed3fb76a (patch)
tree1a7e0f39b69bc071fb6da2c048440549e06e5348 /misc/dist/html
parent2972ea32297adfd9cc08c81dd85339679365f52e (diff)
[HTML5] Better fullscreen, canvas resizing.
Three canvas resize policies: - `None`: Godot window settings are ignored. - `Project`: Godot handles the canvas like a native app (resizing it when setting the window size). - `Adaptive`: Canvas size will always adapt to browser window size. Use `None` if you want to control the canvas size with custom JavaScript code.
Diffstat (limited to 'misc/dist/html')
-rw-r--r--misc/dist/html/full-size.html17
1 files changed, 0 insertions, 17 deletions
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index c7e657e53d..08912ba860 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -161,23 +161,6 @@ $GODOT_HEAD_INCLUDE
}
requestAnimationFrame(animate);
- function adjustCanvasDimensions() {
- const scale = window.devicePixelRatio || 1;
- if (lastWidth != window.innerWidth || lastHeight != window.innerHeight || lastScale != scale) {
- lastScale = scale;
- lastWidth = window.innerWidth;
- lastHeight = window.innerHeight;
- canvas.width = Math.floor(lastWidth * scale);
- canvas.height = Math.floor(lastHeight * scale);
- canvas.style.width = lastWidth + "px";
- canvas.style.height = lastHeight + "px";
- }
- }
- if (GODOT_CONFIG['canvasResizePolicy'] == 2) {
- animationCallbacks.push(adjustCanvasDimensions);
- adjustCanvasDimensions();
- }
-
function setStatusMode(mode) {
if (statusMode === mode || !initializing)