added starfalls / shooting stars
This commit is contained in:
@@ -31,6 +31,11 @@ function randomInt(min, max) {
|
||||
}
|
||||
|
||||
|
||||
function randomBool(probablity) {
|
||||
return Math.random() <= probablity
|
||||
}
|
||||
|
||||
|
||||
function clampNearest(n, mul) {
|
||||
if(n > 0)
|
||||
return Math.ceil(n / mul) * mul;
|
||||
|
||||
+7
-4
@@ -1,12 +1,15 @@
|
||||
let pxDensity = parseFloat(getComputedStyle(document.body).getPropertyValue("--pxDensity"))
|
||||
let pxDensityDefined = false
|
||||
|
||||
let densityWidth = document.documentElement.clientWidth / 256
|
||||
let densityHeight = document.documentElement.clientHeight / 164
|
||||
let pxWidth = 256
|
||||
let pxHeight = 164
|
||||
|
||||
let densityWidth = document.documentElement.clientWidth / pxWidth
|
||||
let densityHeight = document.documentElement.clientHeight / pxHeight
|
||||
|
||||
function calcPixelDensity() {
|
||||
densityWidth = document.documentElement.clientWidth / 256
|
||||
densityHeight = document.documentElement.clientHeight / 164
|
||||
densityWidth = document.documentElement.clientWidth / pxWidth
|
||||
densityHeight = document.documentElement.clientHeight / pxHeight
|
||||
|
||||
let widest = Math.max(densityWidth, densityHeight)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user