Moved root page to space/
This commit is contained in:
parent
4c54e1e62f
commit
310fa09baf
23 changed files with 1 additions and 2 deletions
19
space/js/control.js
Normal file
19
space/js/control.js
Normal 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()
|
||||
}
|
Loading…
Add table
Reference in a new issue