issues
search
simonjvardy
/
alarm-clock
Alarm Clock app using HTML5, CSS3 and JavaScript. Code Institute Milestone 2 Project.
https://simonjvardy.github.io/alarm-clock/
6
stars
8
forks
source link
Dev: Building the clock face and hands with canvas rotation
#15
Closed
simonjvardy
closed
3 years ago
simonjvardy
commented
3 years ago
Refactoring of the clock.js script:
Build
a common clock hand function as they are all the same basic shape
Build
a degrees to radians converter as it's easier to imaging rotation in degrees than radians
Build
the
Hour
,
Minute
&
Second
hands
Pull in the current date using Date()
Convert the time values into clock face rotation values
Refactoring of the clock.js script: