displayed more debugging info
This commit is contained in:
@@ -116,6 +116,9 @@ document.addEventListener("DOMContentLoaded", async function() {
|
|||||||
calcPixelDensity()
|
calcPixelDensity()
|
||||||
console.log("pxDensity: " + getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
console.log("pxDensity: " + getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
||||||
|
|
||||||
|
if (densityWidth > densityHeight) { console.log("pxDensity Direction: Width, " + densityWidth) }
|
||||||
|
else { console.log("pxDensity Direction: Height, " + densityHeight) }
|
||||||
|
|
||||||
switch (CURRENT_PAGE) {
|
switch (CURRENT_PAGE) {
|
||||||
case (PAGES.SYNTHWAVE): loadingScreenSynthwave()
|
case (PAGES.SYNTHWAVE): loadingScreenSynthwave()
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-5
@@ -1,12 +1,17 @@
|
|||||||
let pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
let pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
||||||
let pxDensityDefined = false
|
let pxDensityDefined = false
|
||||||
|
|
||||||
function calcPixelDensity() {
|
let densityWidth = document.documentElement.clientWidth / 256
|
||||||
let densityWidth = document.documentElement.clientWidth / 256
|
let densityHeight = document.documentElement.clientHeight / 164
|
||||||
let densityHeight = document.documentElement.clientHeight / 164
|
|
||||||
|
|
||||||
document.documentElement.style.setProperty("--pxDensity", Math.max(densityWidth, densityHeight))
|
function calcPixelDensity() {
|
||||||
document.documentElement.style.setProperty("--pxDensityPx", `${Math.max(densityWidth, densityHeight)}px`)
|
densityWidth = document.documentElement.clientWidth / 256
|
||||||
|
densityHeight = document.documentElement.clientHeight / 164
|
||||||
|
|
||||||
|
let widest = Math.max(densityWidth, densityHeight)
|
||||||
|
|
||||||
|
document.documentElement.style.setProperty("--pxDensity", widest)
|
||||||
|
document.documentElement.style.setProperty("--pxDensityPx", `${widest}px`)
|
||||||
|
|
||||||
pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ function loadingScreenSynthwave() {
|
|||||||
addStars()
|
addStars()
|
||||||
|
|
||||||
setLoadingProgress("Starting synthwave animation...")
|
setLoadingProgress("Starting synthwave animation...")
|
||||||
//preAnimateSynthwave(25)
|
preAnimateSynthwave(25)
|
||||||
//animateSynthwave(0)
|
animateSynthwave(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user