From 1efc47f9cdc1572df1118705e327ed2ac1592ab2 Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:44:47 +1100 Subject: [PATCH] Re-enabled artwork backgrounds * Re-enabled artwork backgrounds --- gaseous-server/wwwroot/pages/game.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/gaseous-server/wwwroot/pages/game.html b/gaseous-server/wwwroot/pages/game.html index 43159c7..530f676 100644 --- a/gaseous-server/wwwroot/pages/game.html +++ b/gaseous-server/wwwroot/pages/game.html @@ -713,15 +713,17 @@ bg.setAttribute('style', 'background-image: url("/images/gamebg' + randomInt + '.jpg"); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(10px); -webkit-filter: blur(10px);'); } - // // load artwork - // if (game.artworks) { - // ajaxCall('/api/v1.1/games/' + gameId + '/artwork', 'GET', function (result) { - // artworks = result; - // var startPos = randomIntFromInterval(0, result.length); - // artworksPosition = startPos; - // rotateBackground(); - // }); - // } + // load artwork + if (!artworks) { + if (game.artworks) { + ajaxCall('/api/v1.1/games/' + gameId + '/artwork', 'GET', function (result) { + artworks = result; + var startPos = randomIntFromInterval(0, result.length); + artworksPosition = startPos; + rotateBackground(); + }); + } + } } function rotateBackground() {