Skip to content

Commit 855495f

Browse files
Update p5.js to v2.0.2
1 parent c30d49e commit 855495f

File tree

240 files changed

+945
-822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+945
-822
lines changed

public/reference/data.json

+413-375
Large diffs are not rendered by default.

public/search-indices/en.json

+1-1
Large diffs are not rendered by default.

public/search-indices/es.json

+1-1
Large diffs are not rendered by default.

public/search-indices/hi.json

+1-1
Large diffs are not rendered by default.

public/search-indices/ko.json

+1-1
Large diffs are not rendered by default.

public/search-indices/zh-Hans.json

+1-1
Large diffs are not rendered by default.

src/content/contributor-docs/en/creating_libraries.mdx

+137-118
Large diffs are not rendered by default.

src/content/reference/en/p5.Camera/camera.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ description: >
5151
the "up"
5252
5353
vector is <code>(0, 1, 0)</code>.</p>
54-
line: 2108
54+
line: 2102
5555
isConstructor: false
5656
itemtype: method
5757
example:

src/content/reference/en/p5.Camera/centerX.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: >
1010
"world" space, so
1111
1212
<code>myCamera.centerX</code> is 0.</p>
13-
line: 1199
13+
line: 1193
1414
isConstructor: false
1515
itemtype: property
1616
example:
@@ -58,7 +58,7 @@ example:
5858
fill(0);
5959
6060
// Display the value of centerX, rounded to the nearest integer.
61-
text(`centerX: ${round(cam.centerX)}`, 0, 55);
61+
text(`centerX: ${round(cam.centerX)}`, 0, 45);
6262
}
6363
</code>
6464
</div>
@@ -112,7 +112,7 @@ example:
112112
cam.lookAt(x, 20, -30);
113113
114114
// Display the value of centerX, rounded to the nearest integer.
115-
text(`centerX: ${round(cam.centerX)}`, 0, 55);
115+
text(`centerX: ${round(cam.centerX)}`, 0, 45);
116116
}
117117
</code>
118118
</div>

src/content/reference/en/p5.Camera/centerY.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: >
1010
"world" space, so
1111
1212
<code>myCamera.centerY</code> is 0.</p>
13-
line: 1199
13+
line: 1193
1414
isConstructor: false
1515
itemtype: property
1616
example:
@@ -58,7 +58,7 @@ example:
5858
fill(0);
5959
6060
// Display the value of centerY, rounded to the nearest integer.
61-
text(`centerY: ${round(cam.centerY)}`, 0, 55);
61+
text(`centerY: ${round(cam.centerY)}`, 0, 45);
6262
}
6363
</code>
6464
</div>
@@ -112,7 +112,7 @@ example:
112112
cam.lookAt(10, y, -30);
113113
114114
// Display the value of centerY, rounded to the nearest integer.
115-
text(`centerY: ${round(cam.centerY)}`, 0, 55);
115+
text(`centerY: ${round(cam.centerY)}`, 0, 45);
116116
}
117117
</code>
118118
</div>

src/content/reference/en/p5.Camera/centerZ.mdx

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: >
1010
"world" space, so
1111
1212
<code>myCamera.centerZ</code> is 0.</p>
13-
line: 1199
13+
line: 1193
1414
isConstructor: false
1515
itemtype: property
1616
example:
@@ -58,7 +58,7 @@ example:
5858
fill(0);
5959
6060
// Display the value of centerZ, rounded to the nearest integer.
61-
text(`centerZ: ${round(cam.centerZ)}`, 0, 55);
61+
text(`centerZ: ${round(cam.centerZ)}`, 0, 45);
6262
}
6363
</code>
6464
</div>
@@ -76,9 +76,6 @@ example:
7676
// Create a p5.Camera object.
7777
cam = createCamera();
7878
79-
// Set the camera
80-
setCamera(cam);
81-
8279
// Place the camera at the top-right.
8380
cam.setPosition(100, -400, 800);
8481
@@ -112,7 +109,7 @@ example:
112109
cam.lookAt(10, 20, z);
113110
114111
// Display the value of centerZ, rounded to the nearest integer.
115-
text(`centerZ: ${round(cam.centerZ)}`, 0, 55);
112+
text(`centerZ: ${round(cam.centerZ)}`, 0, 45);
116113
}
117114
</code>
118115
</div>

src/content/reference/en/p5.Camera/eyeX.mdx

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ file: src/webgl/p5.Camera.js
66
description: |
77
<p>The camera’s x-coordinate.</p>
88
<p>By default, the camera’s x-coordinate is set to 0 in "world" space.</p>
9-
line: 1199
9+
line: 1193
1010
isConstructor: false
1111
itemtype: property
1212
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of eyeX, rounded to the nearest integer.
57-
text(`eyeX: ${round(cam.eyeX)}`, 0, 55);
57+
text(`eyeX: ${round(cam.eyeX)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -72,9 +72,6 @@ example:
7272
// Create a p5.Camera object.
7373
cam = createCamera();
7474
75-
// Set the camera
76-
setCamera(cam);
77-
7875
// Place the camera at the top-center.
7976
cam.setPosition(0, -400, 800);
8077
@@ -108,7 +105,7 @@ example:
108105
cam.setPosition(x, -400, 800);
109106
110107
// Display the value of eyeX, rounded to the nearest integer.
111-
text(`eyeX: ${round(cam.eyeX)}`, 0, 55);
108+
text(`eyeX: ${round(cam.eyeX)}`, 0, 45);
112109
}
113110
</code>
114111
</div>

src/content/reference/en/p5.Camera/eyeY.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ file: src/webgl/p5.Camera.js
66
description: |
77
<p>The camera’s y-coordinate.</p>
88
<p>By default, the camera’s y-coordinate is set to 0 in "world" space.</p>
9-
line: 1199
9+
line: 1193
1010
isConstructor: false
1111
itemtype: property
1212
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of eyeY, rounded to the nearest integer.
57-
text(`eyeY: ${round(cam.eyeY)}`, 0, 55);
57+
text(`eyeY: ${round(cam.eyeY)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -108,7 +108,7 @@ example:
108108
cam.setPosition(0, y, 800);
109109
110110
// Display the value of eyeY, rounded to the nearest integer.
111-
text(`eyeY: ${round(cam.eyeY)}`, 0, 55);
111+
text(`eyeY: ${round(cam.eyeY)}`, 0, 45);
112112
}
113113
</code>
114114
</div>

src/content/reference/en/p5.Camera/eyeZ.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ file: src/webgl/p5.Camera.js
66
description: |
77
<p>The camera’s z-coordinate.</p>
88
<p>By default, the camera’s z-coordinate is set to 800 in "world" space.</p>
9-
line: 1199
9+
line: 1193
1010
isConstructor: false
1111
itemtype: property
1212
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of eyeZ, rounded to the nearest integer.
57-
text(`eyeZ: ${round(cam.eyeZ)}`, 0, 55);
57+
text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -108,7 +108,7 @@ example:
108108
cam.setPosition(0, -400, z);
109109
110110
// Display the value of eyeZ, rounded to the nearest integer.
111-
text(`eyeZ: ${round(cam.eyeZ)}`, 0, 55);
111+
text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);
112112
}
113113
</code>
114114
</div>

src/content/reference/en/p5.Camera/frustum.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ description: >
5858
the
5959
6060
camera and the origin.</p>
61-
line: 1546
61+
line: 1540
6262
isConstructor: false
6363
itemtype: method
6464
example:

src/content/reference/en/p5.Camera/lookAt.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ description: >
1919
<code>myCamera.lookAt(10, 20, 30)</code> points the camera at the coordinates
2020
2121
<code>(10, 20, 30)</code>.</p>
22-
line: 1926
22+
line: 1920
2323
isConstructor: false
2424
itemtype: method
2525
example:

src/content/reference/en/p5.Camera/move.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description: >
1616
pixels to the right, 20 pixels down, and 30 pixels backward in its "local"
1717
1818
space.</p>
19-
line: 2247
19+
line: 2241
2020
isConstructor: false
2121
itemtype: method
2222
example:

src/content/reference/en/p5.Camera/ortho.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ description: >
5151
<code>far</code> are set to
5252
5353
0 and <code>max(width, height) + 800</code>, respectively.</p>
54-
line: 1413
54+
line: 1407
5555
isConstructor: false
5656
itemtype: method
5757
example:

src/content/reference/en/p5.Camera/pan.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ description: >
2424
<p>Note: Angles are interpreted based on the current
2525
2626
<a href="/reference/p5/angleMode/">angleMode()</a>.</p>
27-
line: 1775
27+
line: 1769
2828
isConstructor: false
2929
itemtype: method
3030
example:

src/content/reference/en/p5.Camera/perspective.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ description: >
8989
<code>10 * 800</code>,
9090
9191
which is 10 times the default distance between the camera and the origin.</p>
92-
line: 1199
92+
line: 1193
9393
isConstructor: false
9494
itemtype: method
9595
example:

src/content/reference/en/p5.Camera/set.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: >
1313
1414
<code>cam2.set(cam1)</code> will set <code>cam2</code> using
1515
<code>cam1</code>’s configuration.</p>
16-
line: 2480
16+
line: 2474
1717
isConstructor: false
1818
itemtype: method
1919
example:

src/content/reference/en/p5.Camera/setPosition.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description: >
1616
1717
places the camera at coordinates <code>(10, 20, 30)</code> in "world"
1818
space.</p>
19-
line: 2404
19+
line: 2398
2020
isConstructor: false
2121
itemtype: method
2222
example:

src/content/reference/en/p5.Camera/slerp.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ description: >
4242
close to <code>cam1</code>’s.</p>
4343
4444
<p>Note: All of the cameras must use the same projection.</p>
45-
line: 2578
45+
line: 2572
4646
isConstructor: false
4747
itemtype: method
4848
example:

src/content/reference/en/p5.Camera/tilt.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ description: >
2424
<p>Note: Angles are interpreted based on the current
2525
2626
<a href="/reference/p5/angleMode/">angleMode()</a>.</p>
27-
line: 1840
27+
line: 1834
2828
isConstructor: false
2929
itemtype: method
3030
example:

src/content/reference/en/p5.Camera/upX.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: |
77
<p>The x-component of the camera's "up" vector.</p>
88
<p>The camera's "up" vector orients its y-axis. By default, the "up" vector is
99
<code>(0, 1, 0)</code>, so its x-component is 0 in "local" space.</p>
10-
line: 1199
10+
line: 1193
1111
isConstructor: false
1212
itemtype: property
1313
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of upX, rounded to the nearest tenth.
57-
text(`upX: ${round(cam.upX, 1)}`, 0, 55);
57+
text(`upX: ${round(cam.upX, 1)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -107,7 +107,7 @@ example:
107107
cam.camera(100, -400, 800, 0, 0, 0, x, 1, 0);
108108
109109
// Display the value of upX, rounded to the nearest tenth.
110-
text(`upX: ${round(cam.upX, 1)}`, 0, 55);
110+
text(`upX: ${round(cam.upX, 1)}`, 0, 45);
111111
}
112112
</code>
113113
</div>

src/content/reference/en/p5.Camera/upY.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: |
77
<p>The y-component of the camera's "up" vector.</p>
88
<p>The camera's "up" vector orients its y-axis. By default, the "up" vector is
99
<code>(0, 1, 0)</code>, so its y-component is 1 in "local" space.</p>
10-
line: 1199
10+
line: 1193
1111
isConstructor: false
1212
itemtype: property
1313
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of upY, rounded to the nearest tenth.
57-
text(`upY: ${round(cam.upY, 1)}`, 0, 55);
57+
text(`upY: ${round(cam.upY, 1)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -107,7 +107,7 @@ example:
107107
cam.camera(100, -400, 800, 0, 0, 0, 0, y, 0);
108108
109109
// Display the value of upY, rounded to the nearest tenth.
110-
text(`upY: ${round(cam.upY, 1)}`, 0, 55);
110+
text(`upY: ${round(cam.upY, 1)}`, 0, 45);
111111
}
112112
</code>
113113
</div>

src/content/reference/en/p5.Camera/upZ.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: |
77
<p>The z-component of the camera's "up" vector.</p>
88
<p>The camera's "up" vector orients its y-axis. By default, the "up" vector is
99
<code>(0, 1, 0)</code>, so its z-component is 0 in "local" space.</p>
10-
line: 1199
10+
line: 1193
1111
isConstructor: false
1212
itemtype: property
1313
example:
@@ -54,7 +54,7 @@ example:
5454
fill(0);
5555
5656
// Display the value of upZ, rounded to the nearest tenth.
57-
text(`upZ: ${round(cam.upZ, 1)}`, 0, 55);
57+
text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);
5858
}
5959
</code>
6060
</div>
@@ -107,7 +107,7 @@ example:
107107
cam.camera(100, -400, 800, 0, 0, 0, 0, 1, z);
108108
109109
// Display the value of upZ, rounded to the nearest tenth.
110-
text(`upZ: ${round(cam.upZ, 1)}`, 0, 55);
110+
text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);
111111
}
112112
</code>
113113
</div>

src/content/reference/en/p5.Color/setAlpha.mdx

-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ example:
4343
}
4444
</code>
4545
</div>
46-
*
4746
- |-
4847
<div>
4948
<code>
@@ -71,7 +70,6 @@ example:
7170
}
7271
</code>
7372
</div>
74-
*
7573
- |-
7674
<div>
7775
<code>
@@ -99,7 +97,6 @@ example:
9997
}
10098
</code>
10199
</div>
102-
*
103100
- |-
104101
<div>
105102
<code>
@@ -127,7 +124,6 @@ example:
127124
}
128125
</code>
129126
</div>
130-
*
131127
class: p5.Color
132128
overloads:
133129
- params:

0 commit comments

Comments
 (0)