Add files via upload

This commit is contained in:
HarmandI 2021-09-20 16:28:57 +02:00 committed by GitHub
parent 49f3bf0b8b
commit 81300f8539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -64,7 +64,6 @@
#second {
transform-origin: 300px 300px;
transition: transform .5s ease-in-out;
animation: infinite linear;
}

View File

@ -13,12 +13,19 @@ let dAujourdhui=new Date();
let heures = dAujourdhui.getHours();
let minutes= dAujourdhui.getMinutes();
let secondes = dAujourdhui.getSeconds();
console.log(heures);
// Calculer de degré de mouvement de l'aiguille heure, de l'aiguille minute, de l'aiguille seconde
// Hint : Tous les aiguilles doivent se déplacer chaque second selon un degré
let secondeDegre=secondes*360/60;
let minuteDegre=minutes*(360/60)+secondeDegre/60;
let heureDegre = heures*(360/12)+minuteDegre/60+secondeDegre/3600;
let timSec=heures*3600+minutes*60+secondes
let secondeDegre=(timSec*(360/60));
let minuteDegre= (timSec*(360/3600));
let heureDegre = (timSec*(360/43200));
// Déplacer les aiguilles
AIGUILLEHR.style.transform=`rotate(${heureDegre}deg)`;
@ -30,3 +37,5 @@ AIGUILLESEC.style.transform=`rotate(${secondeDegre}deg)`;
var interval = setInterval(demarrerLaMontre, 1000);