-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsketch.js
68 lines (48 loc) · 921 Bytes
/
sketch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//var hr, mm,sc;
hr = hour();
mm = minute();
sc = second();
scAngle = map(0, 60, 0,360);
function setup() {
createCanvas(450, 450);
//createSprite(400, 200, 50, 50);
angleMode(DEGREES);
}
function draw() {
background("black");
translate(200,200)
rotate (-90);
let hr = hour();
let mn = minute();
let sc = second();
strokeWeight(8);
stroke("blue");
noFill();
let end = map(sc,0,60,0,360);
arc(0,0,300,300,0,end);
stroke(1, 254, 0);
let end2 = map(mn,0,60,0,360);
arc(0,0,280,280,0,end2);
stroke("yellow");
let end3 = map(hr%12,0,12,-0,360);
arc(0,0,260,260,0,end3);
push();
rotate(end);
stroke("blue");
strokeWeight(3)
line(0,0,105,0);
pop();
push();
rotate(end2);
stroke(1, 254, 0);
strokeWeight(9)
line(0,0,115,0);
pop();
push();
rotate(end3);
stroke("yellow");
strokeWeight(7)
line(0,0,75,0);
pop();
drawSprites();
}