yyyyyyy
This commit is contained in:
parent
cd314cfe4a
commit
4dc7824f7e
61 changed files with 1795 additions and 0 deletions
60
yyyyyyy/l/space/index.html
Normal file
60
yyyyyyy/l/space/index.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html><html lang="en"><head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||
<title>(━┳━○░░░░░░░░|_・YY</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
#vidbg {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
.image {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
transition: opacity 1000ms ease-in-out;
|
||||
animation: floatingY 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.image img {
|
||||
animation: floatingX 5.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.image.visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes floatingY {
|
||||
from { transform: translateY(0px) rotate(-2deg); }
|
||||
50% { transform: translateY(15px) rotate(2deg); }
|
||||
to {transform: translateY(0px) rotate(-2deg); }
|
||||
}
|
||||
|
||||
@keyframes floatingX {
|
||||
from { transform: translateX(0px) rotate(1deg); }
|
||||
50% { transform: translateX(30px) rotate(-1deg); }
|
||||
to { transform: translateX(0px) rotate(1deg); }
|
||||
}
|
||||
</style><script src="js/howler.core.min.js"></script><script src="js/index.js" defer=""></script></head>
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
<video muted="" autoplay="" loop="" id="vidbg">
|
||||
<source src="media/mist.mp4" type="video/mp4">
|
||||
<source src="media/mist.ogg" type="video/ogg">
|
||||
</video>
|
||||
|
||||
|
||||
</body></html>
|
2
yyyyyyy/l/space/js/howler.core.min.js
vendored
Normal file
2
yyyyyyy/l/space/js/howler.core.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
59
yyyyyyy/l/space/js/index.js
Normal file
59
yyyyyyy/l/space/js/index.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
const mist = new Howl({ src: ['mist.mp3'], autoplay: true, loop: true })
|
||||
const swish = new Howl({ src: ['sound1.mp3'] })
|
||||
|
||||
const fadeTime = 1100
|
||||
|
||||
async function getImage() {
|
||||
let response = await fetch('/getimage')
|
||||
|
||||
try {
|
||||
return response.json()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
function createImage(data) {
|
||||
const leftPos = Math.floor(Math.random() * (window.innerWidth - 200 + 1)) + 'px'
|
||||
const topPos = Math.floor(Math.random() * (window.innerHeight - 200 + 1)) + 'px'
|
||||
const newDiv = document.createElement('div')
|
||||
|
||||
newDiv.setAttribute('class', 'image')
|
||||
newDiv.style.top = topPos
|
||||
newDiv.style.left = leftPos
|
||||
newDiv.innerHTML = `<img src="https://files.yyyyyyy.info/images/${data.file}" width="${data.width}" height="${data.height}">`
|
||||
document.body.appendChild(newDiv)
|
||||
|
||||
setTimeout(() => {
|
||||
newDiv.classList.add('visible')
|
||||
swish.play()
|
||||
}, 50)
|
||||
|
||||
return newDiv
|
||||
}
|
||||
|
||||
function removeImage() {
|
||||
const oldDiv = document.getElementsByClassName('image')[0]
|
||||
|
||||
oldDiv.classList.remove('visible')
|
||||
setTimeout(() => {
|
||||
oldDiv.parentNode.removeChild(oldDiv)
|
||||
}, fadeTime)
|
||||
}
|
||||
|
||||
async function cycleImage() {
|
||||
const image = await getImage()
|
||||
|
||||
createImage(image.image[0])
|
||||
swish.play()
|
||||
}
|
||||
|
||||
mist.play()
|
||||
cycleImage()
|
||||
|
||||
setInterval(() => {
|
||||
setTimeout(() => {
|
||||
removeImage()
|
||||
}, 100)
|
||||
cycleImage()
|
||||
}, 6000)
|
5
yyyyyyy/l/space/media/mist.mp4
Normal file
5
yyyyyyy/l/space/media/mist.mp4
Normal file
|
@ -0,0 +1,5 @@
|
|||
A server error has occurred
|
||||
|
||||
FUNCTION_RESPONSE_PAYLOAD_TOO_LARGE
|
||||
|
||||
fra1::66qpg-1737991416123-f9438736e713
|
BIN
yyyyyyy/l/space/media/mist.ogg
Normal file
BIN
yyyyyyy/l/space/media/mist.ogg
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue