repl.it
@UniSophie/

Project 3: Painting tool

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • instructions
  • script.js
  • style.css
index.html
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
<script src="https://home.et.utwente.nl/slootenvanf/div/processing.min.js"></script>
<script type="application/processing" data-processing-target="pjs">
// DO NOT CHANGE CODE ABOVE THIS LINE

void setup() {
background (0, 0, 0);
  size (500, 500);
}

void draw() {
 if (mouseX >= 255 && mouseY >= 255){
    fill (255, 248, 153);
    ellipse (mouseX, mouseY, 25, 25);
  }
  if (mouseX <=255 && mouseY <=255){
    fill (250, 90, 125);
    ellipse (mouseX, mouseY, 25, 25);
  }
  if (mouseX >= 255 && mouseY <=255){
      fill (191, 173, 255);
      ellipse (mouseX, mouseY, 25, 25);
  }
  if (mouseX <= 255 && mouseY >=255){
      fill (random(255), random(255), random(255));
      ellipse (mouseX, mouseY, 25,25);
      text("<3 ^w^ hi S :3", 250, 250);
  }
  ellipse(mouseX, mouseY, 25, 25);

 
}














</script><canvas id="pjs"></canvas>
result
console
?