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.
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, anddraw.js
, which does all the drawing onto the canvas.ES6 This is fairly minor but I changed all the
var
declarations tolet
andconst
. 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.