From 8a56a234cf23ca1634126af6bdd8934eca6109c2 Mon Sep 17 00:00:00 2001 From: Odin-interactive Date: Mon, 6 Nov 2023 19:17:24 +0300 Subject: [PATCH] Update tuesday_visual.html --- tuesday_visual.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuesday_visual.html b/tuesday_visual.html index e420059..935668a 100644 --- a/tuesday_visual.html +++ b/tuesday_visual.html @@ -812,7 +812,7 @@ const plugins_list={"tue_aspect_ratio":{ "name":"Aspect ratio", "text":"fixed screen size while maintaining aspect ratio", - "code":"function TueAspectRatio(){let e=story_json.parameters.resolutions,t=tuesday.parentNode,i=t.getBoundingClientRect();if(0==i.height||0==i.width){var s=e[0]/window.innerWidth>e[1]/window.innerHeight?window.innerWidth/e[0]:window.innerHeight/e[1];tuesday.style.left=(window.innerWidth-e[0]*s)/2+\"px\",tuesday.style.top=(window.innerHeight-e[1]*s)/2+\"px\"}else{var s=e[0]/i.width>e[1]/i.height?i.width/e[0]:i.height/e[1];tuesday.style.left=(i.width-e[0]*s)/2+\"px\",tuesday.style.top=(i.height-e[1]*s)/2+\"px\"}t.style.backgroundColor=e[2]&&e[2].length>0?e[2]:\"#000\",t.style.backgroundImage=\"url('\"+e[3]+\"')\",t.style.backgroundPosition=\"center\",t.style.backgroundSize=\"cover\",t.style.overflow=\"hidden\",t.style.position=\"relative\",tuesday.style.position=\"absolute\",tuesday.style.transformOrigin=\"left top\",tuesday.style.width=e[0]+\"px\",tuesday.style.height=e[1]+\"px\",tuesday.style.transform=\"scale(\"+s+\")\"}window.addEventListener(\"script_executed\",TueAspectRatio,!0),window.addEventListener(\"resize\",TueAspectRatio,!0);" + "code":"function TueAspectRatio(){let e=story_json.parameters.resolutions,t=tuesday.parentNode,i=t.getBoundingClientRect();if(0==i.height||0==i.width){var s=e[0]/window.innerWidth>e[1]/window.innerHeight?window.innerWidth/e[0]:window.innerHeight/e[1];tuesday.style.left=(window.innerWidth-e[0]*s)/2+\"px\",tuesday.style.top=(window.innerHeight-e[1]*s)/2+\"px\"}else{var s=e[0]/i.width>e[1]/i.height?i.width/e[0]:i.height/e[1];tuesday.style.left=(i.width-e[0]*s)/2+\"px\",tuesday.style.top=(i.height-e[1]*s)/2+\"px\"}t.style.backgroundColor=e[2]&&e[2].length>0?e[2]:\"#000\",t.style.backgroundImage=\"url('\"+e[3]+\"')\",t.style.backgroundPosition=\"center\",t.style.backgroundSize=\"cover\",t.style.overflow=\"hidden\",t.style.position=\"relative\",tuesday.style.position=\"absolute\",tuesday.style.transformOrigin=\"left top\",tuesday.style.width=e[0]+\"px\",tuesday.style.height=e[1]+\"px\",tuesday.style.transform=\"scale(\"+s+\")\"}window.addEventListener(\"script_executed\",TueAspectRatio,!0),window.addEventListener(\"script_loaded\",TueAspectRatio,!0),window.addEventListener(\"resize\",TueAspectRatio,!0);" },"game_pad":{ "name":"GamePad", "text":"Support for external game controllers",