From 2d31a0c685d913c7459deee61a00b71db3883c2a Mon Sep 17 00:00:00 2001 From: meowarex Date: Wed, 4 Jun 2025 20:50:53 +1000 Subject: [PATCH] Increase Performance --- .../radiant-lyrics-luna/src/cover-everywhere.css | 3 ++- plugins/radiant-lyrics-luna/src/index.ts | 14 ++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/radiant-lyrics-luna/src/cover-everywhere.css b/plugins/radiant-lyrics-luna/src/cover-everywhere.css index 9817156..e30547f 100644 --- a/plugins/radiant-lyrics-luna/src/cover-everywhere.css +++ b/plugins/radiant-lyrics-luna/src/cover-everywhere.css @@ -20,9 +20,10 @@ height: 150vh; object-fit: cover; z-index: -1; - filter: blur(100px) brightness(0.4) contrast(1.2) saturate(1); + filter: blur(80px) brightness(0.4) contrast(1.2) saturate(1); opacity: 1; animation: spinGlobal 45s linear infinite; + will-change: transform, filter; } @keyframes spinGlobal { diff --git a/plugins/radiant-lyrics-luna/src/index.ts b/plugins/radiant-lyrics-luna/src/index.ts index e538342..aef1cff 100644 --- a/plugins/radiant-lyrics-luna/src/index.ts +++ b/plugins/radiant-lyrics-luna/src/index.ts @@ -88,14 +88,12 @@ const applyGlobalSpinningBackground = (albumImageSrc: string): void => { blackBg.className = 'global-spinning-black-bg'; appContainer.appendChild(blackBg); - // Add two spinning images - for (let i = 0; i < 2; i++) { - const img = document.createElement('img'); - img.src = albumImageSrc; - img.className = 'global-spinning-image'; - img.style.animationDelay = '0s'; - appContainer.appendChild(img); - } + // Add one spinning image for performance + const img = document.createElement('img'); + img.src = albumImageSrc; + img.className = 'global-spinning-image'; + img.style.animationDelay = '0s'; + appContainer.appendChild(img); }; // Function to clean up global spinning background