-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathissues.js
82 lines (77 loc) · 3.02 KB
/
issues.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ISSUE:
-> shapes
-> no going back from erase mode
TODO:
-> reset button
-> on-off button
-> selecting element
// --------------------------------------------------------------------------------------------------------------------
if (sketch.mouseIsPressed) {
//console.log("shape: ",shape);
if (currShape === "lineShape") {
// currTool = "";
toggleErase();
sketch.line(sketch.mouseX, sketch.mouseY, sketch.pmouseX, sketch.pmouseY);
}
else if (currShape === "circleShape") {
toggleErase();
// currTool = "";
sketch.ellipse(sketch.mouseX, sketch.mouseY, sketch.pmouseX, sketch.pmouseY);
}
else if (currShape === "ellipseShape") {
toggleErase();
// currTool = "";
sketch.ellipse(sketch.mouseX, sketch.mouseY, sketch.pmouseX, sketch.pmouseY);
}
else if (currShape === "triangleShape") {
toggleErase();
// currTool = "";
sketch.triangle(sketch.mouseX, sketch.mouseY, sketch.pmouseX, sketch.pmouseY, sketch.pmouseX, sketch.pmouseY);
}
else if (currShape === "squareShape") {
toggleErase();
// currTool = "";
sketch.rect(sketch.mouseX, sketch.mouseY, sketch.pmouseX, sketch.pmouseY);
//sketch.scale(sketch.pmouseX, sketch.pmouseY);
}
//USING TOOLS
if (currTool === "bucketTool") {
toggleErase();
sketch.background(currColor);
}
else if (currTool === "eraserTool") {
// alert("erasing ");
// toggleErase();
eraseEnable=true;
currShape = "";
// sketch.fill('white');
// sketch.noStroke();
// sketch.ellipse(sketch.mouseX, sketch.mouseY, 30, 30);
//p5.instanc.drawingContext.globalCompositeOperation = 'destination-out';
sketch.erase();
// alert("erased");
}
else if (currTool === "sprayTool") {
toggleErase();
// currShape = "";
console.log("inside sprayTool: ", currColor);
for (let i = 0; i < numDots; i++) {
let x = sketch.mouseX + sketch.random(-spread, spread);
let y = sketch.mouseY + sketch.random(-spread, spread);
sketch.point(x, y);
}
//sketch.noCursor();
}
else if (currTool === "brushTool") {
//currShape = "";
toggleErase();
sketch.fill(currColor);
//sketch.ellipse(sketch.mouseX, sketch.mouseY, 50, 50);
}
}
// --------------------------
https://www.linkedin.com/posts/abdurrahman-163a63127_gripjan21-grip-dataanalytics-ugcPost-6757147054973218816-KFQY
https://www.linkedin.com/posts/p-charith-0068281aa_gripjan21-tsf-github-ugcPost-6752862262064758784-J4JE
https://www.linkedin.com/posts/anmol-1810rs_gripjan21-task8-datascience-ugcPost-6756161865862172672-8T1R
https://www.linkedin.com/posts/thejaswin-s-22252318b_task2-gripjan21-gripdec20-ugcPost-6755756364598915072-VMob
https://www.linkedin.com/posts/abdurrahman-163a63127_gripjan21-computervision-cv-ugcPost-6756069120178995200-ORHF