From 26fbf8cb3511576ba4bfdc0ae8514e5a4d4b3b86 Mon Sep 17 00:00:00 2001 From: haliphax Date: Thu, 18 Jan 2024 13:11:31 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20grey=20bg=20color=20for=20demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/overlay/index.js | 4 +++- html/overlay/styles.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/html/overlay/index.js b/html/overlay/index.js index 57677f3..5e749e4 100644 --- a/html/overlay/index.js +++ b/html/overlay/index.js @@ -7,6 +7,8 @@ import { twitchClient } from "./twitch.js"; if (!hs.hasOwnProperty("oauth") && !hs.hasOwnProperty("demo")) window.location = constants.OAUTH_URL; +if (hs.hasOwnProperty("demo")) document.body.classList.add("demo"); + const options = { height: constants.SCREEN_HEIGHT, physics: { @@ -20,7 +22,7 @@ const options = { }, pixelArt: true, render: { - transparent: hs.hasOwnProperty("demo") ? false : true, + transparent: true, }, scene: DirectorScene, type: Phaser.AUTO, diff --git a/html/overlay/styles.css b/html/overlay/styles.css index 0f2c87b..76b501c 100644 --- a/html/overlay/styles.css +++ b/html/overlay/styles.css @@ -9,6 +9,10 @@ body { width: 100%; } +body.demo { + background-color: #777; +} + * { image-rendering: pixelated !important; image-rendering: crisp-edges !important;