diff options
Diffstat (limited to 'dvd-logo/js/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)+')'; |