forked from processing/processing4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebGPU.java
More file actions
58 lines (43 loc) · 1.16 KB
/
WebGPU.java
File metadata and controls
58 lines (43 loc) · 1.16 KB
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
import processing.core.PApplet;
public class WebGPU extends PApplet {
public void settings() {
size(600, 400, WEBGPU);
}
public void draw() {
background(200);
noStroke();
fill(255, 0, 0);
rect(50, 50, 80, 80);
fill(0, 255, 0);
rect(150, 50, 80, 80);
fill(0, 0, 255);
rect(250, 50, 80, 80);
fill(255, 0, 0, 128);
rect(50, 150, 80, 80);
fill(0, 255, 0, 128);
rect(150, 150, 80, 80);
fill(0, 0, 255, 128);
rect(250, 150, 80, 80);
stroke(0);
strokeWeight(4);
fill(255, 200, 0);
rect(50, 250, 80, 80);
fill(200, 0, 255);
rect(150, 250, 80, 80);
noFill();
stroke(255, 0, 255);
strokeWeight(6);
rect(250, 250, 80, 80);
noStroke();
fill(255, 0, 0, 100);
rect(400, 100, 100, 100);
fill(0, 255, 0, 100);
rect(440, 140, 100, 100);
fill(0, 0, 255, 100);
rect(420, 180, 100, 100);
}
public static void main(String[] args) {
PApplet.disableAWT = true;
PApplet.main(WebGPU.class.getName());
}
}