clock exercise 6.2
This commit is contained in:
30
w6_2_clock/index.js
Normal file
30
w6_2_clock/index.js
Normal 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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user