I have created a vintage-inspired clock using javascript and css.
function updateClock() {
var now = moment(),
second = now.seconds() * 6,
minute = now.minutes() * 6,
hour = now.hours() % 12 / 12 * 360 + 90 + minute / 12;
document.getElementById("hour").style.transform = 'rotate(' + hour + 'deg)';
document.getElementById("minute").style.transform = 'rotate(' + minute + 'deg)';
}
function timedUpdate() {
updateClock();
setTimeout(timedUpdate, 1000);
}
timedUpdate();
I am looking to incorporate a winding effect, where the clocks initially start at 12:00 and slowly animate to display the current time (similar to the clocks on this page: )