diff options
author | Elizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz> | 2023-04-30 14:41:32 -0600 |
---|---|---|
committer | Lizzy Hunt <elizabeth.hunt@simponic.xyz> | 2023-04-30 14:51:25 -0600 |
commit | 4165705816db965e660972dec350ba6791ce867b (patch) | |
tree | f570fe0c4497274c426416abb2b4e47138e0b39b | |
parent | b4b95a18f0e9c0dc71d99da633fa32977aed80ce (diff) | |
download | simponic.xyz-4165705816db965e660972dec350ba6791ce867b.tar.gz simponic.xyz-4165705816db965e660972dec350ba6791ce867b.zip |
Update script.js
-rw-r--r-- | dvd-logo/js/script.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dvd-logo/js/script.js b/dvd-logo/js/script.js index 98a2dcc..3934c54 100644 --- a/dvd-logo/js/script.js +++ b/dvd-logo/js/script.js @@ -60,12 +60,9 @@ const drawLogo = (logo, element) => { element.style.filter = `brightness(0.5) sepia(1) saturate(10000%) hue-rotate(${logo.dColorWheel}rad)`; } -const makeSvg = (coords) => { - const makeLine = (a, b, color='white') => `<line x1="${a.x}" x2="${b.x}" y1="${a.y}" y2="${b.y}" stroke="${color}" />`; - - return ` +const makeLine = (a, b, color='white') => `<line x1="${a.x}" x2="${b.x}" y1="${a.y}" y2="${b.y}" stroke="${color}" />`; +const makeSvg = (coords) => ` <svg xmlns='http://www.w3.org/2000/svg' width='${window.innerWidth}px' height='${window.innerHeight}px'> - <rect x="0" y="0" width="${window.innerWidth}" height="${window.innerHeight}" fill="${document.body.style.backgroundColor || "black"}"/> ${coords.map((_,i) => { if (i == 0) { return; @@ -74,7 +71,6 @@ const makeSvg = (coords) => { }).join('')} </svg> `; -} const setBackgroundToSvg = (svg) => { document.getElementById("container").style.background = 'url(data:image/svg+xml;base64,'+btoa(svg)+')'; |