added starfalls / shooting stars
This commit is contained in:
@@ -4,6 +4,9 @@ function loadingScreenSynthwave() {
|
||||
setLoadingProgress("Adding stars...")
|
||||
addStars()
|
||||
|
||||
setLoadingProgress("Starting starfall animation...")
|
||||
startStarfall()
|
||||
|
||||
setLoadingProgress("Starting synthwave animation...")
|
||||
defShaderMaterial()
|
||||
preAnimateSynthwave(25)
|
||||
@@ -20,4 +23,13 @@ function addStars() {
|
||||
|
||||
starNoise.style.top = `round(calc(${randX}px * var(--pxDensity)), var(--pxDensityPx))`
|
||||
starNoise.style.left = `round(calc(${randY}px * var(--pxDensity)), var(--pxDensityPx))`
|
||||
}
|
||||
|
||||
|
||||
function onResizeSynthwave() {
|
||||
renderer.setSize(window.innerWidth, window.innerHeight)
|
||||
composer.setSize(window.innerWidth, window.innerHeight)
|
||||
camera.aspect = window.innerWidth / window.innerHeight
|
||||
camera.updateProjectionMatrix()
|
||||
if (shaderMaterial) { updateShaderMatPxDensity() }
|
||||
}
|
||||
Reference in New Issue
Block a user