Skip to content

Commit

Permalink
Update tuesday_visual.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirilllive committed Nov 6, 2023
1 parent 082301a commit 8a56a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuesday_visual.html
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8a56a23

Please sign in to comment.