You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
498 B
23 lines
498 B
const box = document.getElementById('scroll')
|
|
// const hyperlinks = document.getElementsByClassName('hyperlink')
|
|
let x, y, z
|
|
|
|
function init(){
|
|
x = 0
|
|
y = 0
|
|
z = 0
|
|
AnimateSkybox()
|
|
}
|
|
|
|
function AnimateSkybox(){
|
|
x += 0.2
|
|
y = window.innerHeight / 2.2
|
|
z += 0.2
|
|
box.style.backgroundPosition = x + "px " + y + "px"
|
|
// for (let i = 0; i < hyperlinks.length; i++) {
|
|
// hyperlinks[i].style.backgroundPosition = x / 4 + "px " + z + "px";
|
|
// }
|
|
requestAnimationFrame(AnimateSkybox)
|
|
}
|
|
|
|
init()
|