From ee62d9ee17deda884b253618f76dca78180bab1e Mon Sep 17 00:00:00 2001 From: MeexReay Date: Sat, 22 Mar 2025 00:48:45 +0300 Subject: [PATCH] fix enable graphics --- index.html | 2 ++ sys/graphics.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/index.html b/index.html index a577851..8eb7cdb 100644 --- a/index.html +++ b/index.html @@ -68,6 +68,8 @@ position: absolute; width: 100%; height: 100%; + top: 0; + left: 0; } diff --git a/sys/graphics.js b/sys/graphics.js index 7cf3e58..b5ec641 100644 --- a/sys/graphics.js +++ b/sys/graphics.js @@ -5,7 +5,11 @@ var graphics_context = null function enableGraphics() { graphics_canvas = document.createElement("canvas") graphics_canvas.id = "graphics" + graphics_canvas.width = window.innerWidth.toString() + graphics_canvas.height = window.innerHeight.toString() graphics_context = graphics_canvas.getContext("2d") + graphics_context.fillStyle = "blue"; + graphics_context.fillRect(0, 0, graphics_canvas.width, graphics_canvas.height); document.body.appendChild(graphics_canvas) }