Moved root page to space/

This commit is contained in:
DarkCat09 2022-12-30 16:03:19 +04:00
parent 4c54e1e62f
commit 310fa09baf
23 changed files with 1 additions and 2 deletions

19
space/js/control.js Normal file
View file

@ -0,0 +1,19 @@
/** @type {HTMLImageElement} */
const spaceObj = document.querySelector('#space-obj')
/** @type {HTMLDivElement} */
const space = document.querySelector('.space')
function changePicture(/** @type {Event} */ ev) {
spaceObj.src = ev.target.dataset.img || 'img/earth.gif'
hideContextMenu()
}
function changeSpeed(/** @type {Event} */ ev) {
spaceObj.style.animationDuration = `${1200 - ev.target.value}s`
}
function landToEarth() {
hideContextMenu()
}