clock exercise 6.2

This commit is contained in:
Andrea Bianchi
2026-04-07 22:53:08 +09:00
parent 7ee7a5ea29
commit 13e99a84d5
3 changed files with 90 additions and 0 deletions

30
w6_2_clock/index.js Normal file
View File

@@ -0,0 +1,30 @@
import {
createStandardClock,
createSportsClock,
drawClock,
startClock,
stopClock,
} from './clock.js';
let clock;
let timer;
window.setup = function () {
createCanvas(800, 600);
// clock = createStandardClock(width / 2, height / 2, 200);
// clock = createSportsClock(width / 2, height / 2, 200);
// timer = startClock(clock);
};
window.draw = function () {
background('#eee');
// drawClock(clock);
};
window.keyPressed = function () {
if (key === 's' || key === 'S') {
// stopClock(timer);
console.log('Clock stopped');
}
};