-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmousexy.html
More file actions
49 lines (36 loc) · 815 Bytes
/
mousexy.html
File metadata and controls
49 lines (36 loc) · 815 Bytes
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
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/p5.js"></script>
<script>
function setup() {
createCanvas(windowWidth,windowHeight);
background(221,160,221);
}
function draw() {
// ellipseMode(CENTER);
// rectMode(CENTER);
//square
stroke('gray');
fill('blue');
rect(mouseX,mouseY,70,70);
/*
// moving ellipse
stroke('yellow');
fill('purple');
ellipse(mouseX, mouseY,50,50);
*/
/*
//triangle
stroke('yellow');
fill(39,134,34);
triangle(mouseX+60,mouseY+90,mouseX+60,mouseY+40,mouseX+10,mouseY+70);
*/
}
function mousePressed() {
background(250,250,200)
}
</script>
</head>
<body>
</body>
</html>