-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathp4Test.html
More file actions
38 lines (34 loc) · 844 Bytes
/
p4Test.html
File metadata and controls
38 lines (34 loc) · 844 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="thirdPartyCode/p5.js"></script>
</head>
<body style="background-color: #2ac845">
<script>
function setup() {
smooth();
createCanvas(400, 400, WEBGL);
// Make a <p> element and put it behind the canvas
let p = createP('I am a dom element');
p.center();
p.style('font-size', '20px');
p.style('text-align', 'center');
p.style('z-index', '-9999');
}
function draw() {
background(250, 250, 150);
fill(15, 195, 185);
noStroke();
sphere(30);
erase();
rotateY(frameCount * 0.02);
translate(0, 0, 40);
torus(15, 5);
noErase();
blendMode(ADD);
}
</script>
</body>
</html>