made synthwave pixelated

This commit is contained in:
8BitBiscotti
2024-12-12 13:50:04 +01:00
parent 17187ad792
commit 367c844669
6 changed files with 160 additions and 42 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
let pxDensity = getComputedStyle(document.body).getPropertyValue("--pxDensity")
let pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
let pxDensityDefined = false
function calcPixelDensity() {
@@ -8,7 +8,7 @@ function calcPixelDensity() {
document.documentElement.style.setProperty("--pxDensity", Math.max(densityWidth, densityHeight))
document.documentElement.style.setProperty("--pxDensityPx", `${Math.max(densityWidth, densityHeight)}px`)
pxDensity = getComputedStyle(document.body).getPropertyValue("--pxDensity")
pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
pxDensityDefined = true
console.log("pxDensity: " + getComputedStyle(document.body).getPropertyValue("--pxDensity"))