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()