From 34b49df0ab7336789e79590e51d4456f92024408 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 18 Feb 2025 02:16:42 -0500 Subject: Fix aspect ratio --- templates/api/throwshade.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'templates') diff --git a/templates/api/throwshade.html b/templates/api/throwshade.html index 2bf006a..d65add6 100644 --- a/templates/api/throwshade.html +++ b/templates/api/throwshade.html @@ -16,6 +16,16 @@ CONFIG_SUBST window.wasmBindings = bindings; console.log("initialized, starting..."); window.wasmBindings.main_js(); + function resizeCanvas() { + let canvas = document.getElementById("teleia-parent").firstChild; + if (canvas) { + canvas.width = 1920; + canvas.height = 1080; + } else { + setTimeout(resizeCanvas, 50); + } + } + resizeCanvas(); @@ -24,10 +34,10 @@ CONFIG_SUBST
+ vec4 shade(vec2 cs) { + return vec4(0.0, 1.0, 0.0, 1.0); + } +
-- cgit v1.2.3