CRLSCSClub / CRLSTime

A clock for showing the CRLS schedule during the school day
6 stars 10 forks source link

refactored code, uses ES6 features, content resizes smoothly, clock face loads instantly #25

Closed 71c closed 5 years ago

71c commented 6 years ago

Refactoring This part is the biggest change to the code. The code looked like a mess so I refactored it into three files: index.html, which is the actual page, schedule.js, which contains information about the schedule and time, and draw.js, which does all the drawing onto the canvas.

ES6 This is fairly minor but I changed all the var declarations to let and const. There are also now some arrow functions.

content resizes smoothly Now the page doesn't reload whenever it's resized. Instead it is resized smoothly.

clock loads instantly Before there was a one second delay between loading the buttons and loading the clock face. Now they all load at once, but the falcon image is still delayed. However it is delayed less now because the clock is now rendered more frequently than every second.