p5 2.2.1-rc.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accessibility/color_namer.js +5 -6
- package/dist/accessibility/describe.js +4 -26
- package/dist/accessibility/index.js +5 -6
- package/dist/accessibility/outputs.js +6 -38
- package/dist/app.js +5 -6
- package/dist/color/color_conversion.js +5 -6
- package/dist/color/creating_reading.js +1 -1
- package/dist/color/index.js +2 -2
- package/dist/color/p5.Color.js +1 -1
- package/dist/color/setting.js +59 -357
- package/dist/{constants-DEJVKr9Z.js → constants-DQyACdzq.js} +11 -61
- package/dist/core/constants.js +1 -1
- package/dist/core/environment.js +26 -158
- package/dist/core/filterShaders.js +1 -1
- package/dist/core/friendly_errors/fes_core.js +1 -1
- package/dist/core/friendly_errors/file_errors.js +1 -1
- package/dist/core/friendly_errors/index.js +1 -1
- package/dist/core/friendly_errors/param_validator.js +1 -1
- package/dist/core/friendly_errors/sketch_verifier.js +1 -1
- package/dist/core/helpers.js +1 -1
- package/dist/core/init.js +5 -6
- package/dist/core/internationalization.js +1 -1
- package/dist/core/legacy.js +5 -6
- package/dist/core/main.js +5 -6
- package/dist/core/p5.Graphics.js +4 -5
- package/dist/core/p5.Renderer.js +3 -4
- package/dist/core/p5.Renderer2D.js +5 -6
- package/dist/core/p5.Renderer3D.js +4 -5
- package/dist/core/rendering.js +4 -5
- package/dist/core/structure.js +13 -52
- package/dist/core/transform.js +32 -176
- package/dist/{creating_reading-CgHCHxqN.js → creating_reading-ZXzcZEsb.js} +3 -196
- package/dist/data/local_storage.js +4 -30
- package/dist/dom/dom.js +24 -159
- package/dist/dom/index.js +2 -2
- package/dist/dom/p5.Element.js +31 -208
- package/dist/dom/p5.File.js +1 -32
- package/dist/dom/p5.MediaElement.js +10 -113
- package/dist/events/acceleration.js +11 -64
- package/dist/events/keyboard.js +13 -81
- package/dist/events/pointer.js +18 -160
- package/dist/image/const.js +1 -1
- package/dist/image/filterRenderer2D.js +4 -5
- package/dist/image/image.js +4 -5
- package/dist/image/index.js +4 -5
- package/dist/image/loading_displaying.js +4 -5
- package/dist/image/p5.Image.js +3 -4
- package/dist/image/pixels.js +17 -100
- package/dist/io/files.js +4 -5
- package/dist/io/index.js +4 -5
- package/dist/io/p5.Table.js +66 -158
- package/dist/io/p5.TableRow.js +48 -71
- package/dist/io/p5.XML.js +6 -99
- package/dist/io/utilities.js +8 -3
- package/dist/{main-_RXV5Lx8.js → main-DvN69W3f.js} +13 -42
- package/dist/math/Matrices/Matrix.js +87 -126
- package/dist/math/Matrices/MatrixNumjs.js +1 -5
- package/dist/math/calculation.js +10 -112
- package/dist/math/index.js +1 -1
- package/dist/math/math.js +2 -12
- package/dist/math/noise.js +5 -32
- package/dist/math/p5.Matrix.js +3 -3
- package/dist/math/p5.Vector.js +104 -345
- package/dist/math/random.js +5 -32
- package/dist/math/trigonometry.js +15 -105
- package/dist/{p5.Renderer-QoFcvj3f.js → p5.Renderer-D-5LdCRz.js} +25 -178
- package/dist/{rendering-CsICjEXA.js → rendering-h9unX5K0.js} +254 -1156
- package/dist/shape/2d_primitives.js +33 -194
- package/dist/shape/attributes.js +12 -73
- package/dist/shape/curves.js +30 -95
- package/dist/shape/custom_shapes.js +63 -144
- package/dist/shape/index.js +2 -2
- package/dist/shape/vertex.js +21 -106
- package/dist/strands/p5.strands.js +248 -46
- package/dist/type/index.js +3 -4
- package/dist/type/p5.Font.js +4 -49
- package/dist/type/textCore.js +5 -158
- package/dist/utilities/conversion.js +17 -104
- package/dist/utilities/time_date.js +3 -40
- package/dist/utilities/utility_functions.js +6 -48
- package/dist/webgl/3d_primitives.js +4 -5
- package/dist/webgl/GeometryBuilder.js +1 -2
- package/dist/webgl/ShapeBuilder.js +22 -2
- package/dist/webgl/enums.js +1 -1
- package/dist/webgl/index.js +4 -5
- package/dist/webgl/interaction.js +6 -33
- package/dist/webgl/light.js +4 -5
- package/dist/webgl/loading.js +12 -46
- package/dist/webgl/material.js +4 -5
- package/dist/webgl/p5.Camera.js +4 -5
- package/dist/webgl/p5.DataArray.js +0 -4
- package/dist/webgl/p5.Framebuffer.js +4 -5
- package/dist/webgl/p5.Geometry.js +12 -106
- package/dist/webgl/p5.Quat.js +1 -1
- package/dist/webgl/p5.RendererGL.js +7 -18
- package/dist/webgl/p5.Shader.js +12 -36
- package/dist/webgl/p5.Texture.js +4 -5
- package/dist/webgl/text.js +4 -5
- package/dist/webgl/utils.js +4 -5
- package/dist/webgpu/index.js +1 -1
- package/dist/webgpu/p5.RendererWebGPU.js +529 -208
- package/dist/webgpu/shaders/color.js +32 -17
- package/dist/webgpu/shaders/filters/base.js +18 -7
- package/dist/webgpu/shaders/font.js +52 -40
- package/dist/webgpu/shaders/line.js +50 -36
- package/dist/webgpu/shaders/material.js +90 -83
- package/dist/webgpu/strands_wgslBackend.js +5 -2
- package/lib/p5.esm.js +5576 -7811
- package/lib/p5.esm.min.js +1 -1
- package/lib/p5.js +5576 -7811
- package/lib/p5.min.js +1 -1
- package/lib/p5.webgpu.esm.js +786 -453
- package/lib/p5.webgpu.js +786 -453
- package/lib/p5.webgpu.min.js +1 -1
- package/package.json +13 -13
- package/types/global.d.ts +16905 -16783
- package/types/p5.d.ts +11142 -11081
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Color } from '../creating_reading-
|
|
1
|
+
import { C as Color } from '../creating_reading-ZXzcZEsb.js';
|
|
2
2
|
import { Vector } from '../math/p5.Vector.js';
|
|
3
|
-
import { J as INCLUDE, K as PATH, O as EMPTY_PATH, Q as OPEN, V as CLOSE, X as POINTS, Y as LINES, c as TRIANGLES, Z as QUADS, _ as TRIANGLE_FAN, T as TRIANGLE_STRIP, $ as QUAD_STRIP, a0 as EXCLUDE, a1 as JOIN } from '../constants-
|
|
3
|
+
import { J as INCLUDE, K as PATH, O as EMPTY_PATH, Q as OPEN, V as CLOSE, X as POINTS, Y as LINES, c as TRIANGLES, Z as QUADS, _ as TRIANGLE_FAN, T as TRIANGLE_STRIP, $ as QUAD_STRIP, a0 as EXCLUDE, a1 as JOIN } from '../constants-DQyACdzq.js';
|
|
4
4
|
import 'colorjs.io/fn';
|
|
5
5
|
import '../color/color_spaces/hsb.js';
|
|
6
6
|
|
|
@@ -1617,8 +1617,6 @@ function customShapes(p5, fn) {
|
|
|
1617
1617
|
* @param {Number} order The new order to set. Can be either 2 or 3, by default 3
|
|
1618
1618
|
*
|
|
1619
1619
|
* @example
|
|
1620
|
-
* <div>
|
|
1621
|
-
* <code>
|
|
1622
1620
|
* function setup() {
|
|
1623
1621
|
* createCanvas(100, 100);
|
|
1624
1622
|
*
|
|
@@ -1645,8 +1643,6 @@ function customShapes(p5, fn) {
|
|
|
1645
1643
|
*
|
|
1646
1644
|
* describe('A black curve drawn on a gray square. The curve starts at the top-left corner and ends at the center.');
|
|
1647
1645
|
* }
|
|
1648
|
-
* </code>
|
|
1649
|
-
* </div>
|
|
1650
1646
|
*/
|
|
1651
1647
|
/**
|
|
1652
1648
|
* @method bezierOrder
|
|
@@ -1737,8 +1733,6 @@ function customShapes(p5, fn) {
|
|
|
1737
1733
|
* @chainable
|
|
1738
1734
|
*
|
|
1739
1735
|
* @example
|
|
1740
|
-
* <div>
|
|
1741
|
-
* <code>
|
|
1742
1736
|
* function setup() {
|
|
1743
1737
|
* createCanvas(100, 100);
|
|
1744
1738
|
*
|
|
@@ -1764,11 +1758,7 @@ function customShapes(p5, fn) {
|
|
|
1764
1758
|
* );
|
|
1765
1759
|
* }
|
|
1766
1760
|
*
|
|
1767
|
-
*
|
|
1768
|
-
* </div>
|
|
1769
|
-
*
|
|
1770
|
-
* <div>
|
|
1771
|
-
* <code>
|
|
1761
|
+
* @example
|
|
1772
1762
|
* function setup() {
|
|
1773
1763
|
* createCanvas(100, 100);
|
|
1774
1764
|
* background(220);
|
|
@@ -1784,11 +1774,7 @@ function customShapes(p5, fn) {
|
|
|
1784
1774
|
* );
|
|
1785
1775
|
* }
|
|
1786
1776
|
*
|
|
1787
|
-
*
|
|
1788
|
-
* </div>
|
|
1789
|
-
*
|
|
1790
|
-
* <div>
|
|
1791
|
-
* <code>
|
|
1777
|
+
* @example
|
|
1792
1778
|
* let ringInnerRadius, ringWidth;
|
|
1793
1779
|
* let radius, dRadius;
|
|
1794
1780
|
* let theta, dTheta;
|
|
@@ -1829,12 +1815,8 @@ function customShapes(p5, fn) {
|
|
|
1829
1815
|
* }
|
|
1830
1816
|
* endShape(CLOSE);
|
|
1831
1817
|
* }
|
|
1832
|
-
* </code>
|
|
1833
|
-
* </div>
|
|
1834
1818
|
*
|
|
1835
1819
|
* @example
|
|
1836
|
-
* <div>
|
|
1837
|
-
* <code>
|
|
1838
1820
|
* let vertexA;
|
|
1839
1821
|
* let vertexB;
|
|
1840
1822
|
* let vertexC;
|
|
@@ -1916,10 +1898,7 @@ function customShapes(p5, fn) {
|
|
|
1916
1898
|
*
|
|
1917
1899
|
* describe('On a gray background, a black spline passes through vertices A, B, C, D, E, and F, shown as white circles. A red line segment joining vertices A and C has the same slope as the red tangent segment at B. Similarly, the blue line segment joining vertices D and F has the same slope as the blue tangent at E.');
|
|
1918
1900
|
* }
|
|
1919
|
-
* </code>
|
|
1920
|
-
* </div>
|
|
1921
1901
|
*/
|
|
1922
|
-
|
|
1923
1902
|
/**
|
|
1924
1903
|
* @method splineVertex
|
|
1925
1904
|
* @param {Number} x
|
|
@@ -1928,8 +1907,6 @@ function customShapes(p5, fn) {
|
|
|
1928
1907
|
* @chainable
|
|
1929
1908
|
*
|
|
1930
1909
|
* @example
|
|
1931
|
-
* <div>
|
|
1932
|
-
* <code>
|
|
1933
1910
|
* // Click and drag the mouse to view the scene from different angles.
|
|
1934
1911
|
*
|
|
1935
1912
|
* function setup() {
|
|
@@ -1970,8 +1947,6 @@ function customShapes(p5, fn) {
|
|
|
1970
1947
|
* splineVertex(34, 41, -20);
|
|
1971
1948
|
* endShape();
|
|
1972
1949
|
* }
|
|
1973
|
-
* </code>
|
|
1974
|
-
* </div>
|
|
1975
1950
|
*/
|
|
1976
1951
|
/**
|
|
1977
1952
|
* @method splineVertex
|
|
@@ -2087,8 +2062,6 @@ function customShapes(p5, fn) {
|
|
|
2087
2062
|
* @param value Value to set the given property to.
|
|
2088
2063
|
*
|
|
2089
2064
|
* @example
|
|
2090
|
-
* <div>
|
|
2091
|
-
* <code>
|
|
2092
2065
|
* // Move the mouse left and right to see the curve change.
|
|
2093
2066
|
*
|
|
2094
2067
|
* let t;
|
|
@@ -2129,74 +2102,65 @@ function customShapes(p5, fn) {
|
|
|
2129
2102
|
* text(`tightness: ${round(t, 1)}`, 15, 90);
|
|
2130
2103
|
* describe('A black spline forms a sideways U shape through four points. The spline passes through the points more loosely as the mouse moves left of center (negative tightness), and more tightly as it moves right of center (positive tightness). The tightness is displayed at the bottom.');
|
|
2131
2104
|
* }
|
|
2132
|
-
* </code>
|
|
2133
|
-
* </div>
|
|
2134
2105
|
*
|
|
2135
2106
|
* @example
|
|
2136
|
-
* <div>
|
|
2137
|
-
* <code>
|
|
2138
2107
|
* function setup() {
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2143
|
-
* // Right panel: ends = INCLUDE (all spans).
|
|
2144
|
-
* push();
|
|
2145
|
-
* translate(10, 10);
|
|
2146
|
-
* stroke(220);
|
|
2147
|
-
* rect(0, 0, 160, 120);
|
|
2148
|
-
* fill(30);
|
|
2149
|
-
* textSize(11);
|
|
2150
|
-
* text('ends: INCLUDE (all spans)', 8, 16);
|
|
2151
|
-
* noFill();
|
|
2152
|
-
*
|
|
2153
|
-
* splineProperty('ends', INCLUDE);
|
|
2154
|
-
* stroke(0);
|
|
2155
|
-
* strokeWeight(2);
|
|
2156
|
-
* spline(25, 46, 93, 44, 93, 81, 35, 85);
|
|
2108
|
+
* createCanvas(360, 140);
|
|
2109
|
+
* background(240);
|
|
2110
|
+
* noFill();
|
|
2157
2111
|
*
|
|
2158
|
-
*
|
|
2159
|
-
*
|
|
2160
|
-
*
|
|
2161
|
-
*
|
|
2162
|
-
*
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2166
|
-
*
|
|
2167
|
-
* // Right panel: ends = EXCLUDE (middle only).
|
|
2168
|
-
* push();
|
|
2169
|
-
* translate(190, 10);
|
|
2170
|
-
* stroke(220);
|
|
2171
|
-
* rect(0, 0, 160, 120);
|
|
2172
|
-
* noStroke();
|
|
2173
|
-
* fill(30);
|
|
2174
|
-
* text('ends: EXCLUDE ', 18, 16);
|
|
2175
|
-
* noFill();
|
|
2112
|
+
* // Right panel: ends = INCLUDE (all spans).
|
|
2113
|
+
* push();
|
|
2114
|
+
* translate(10, 10);
|
|
2115
|
+
* stroke(220);
|
|
2116
|
+
* rect(0, 0, 160, 120);
|
|
2117
|
+
* fill(30);
|
|
2118
|
+
* textSize(11);
|
|
2119
|
+
* text('ends: INCLUDE (all spans)', 8, 16);
|
|
2120
|
+
* noFill();
|
|
2176
2121
|
*
|
|
2177
|
-
*
|
|
2178
|
-
*
|
|
2179
|
-
*
|
|
2180
|
-
*
|
|
2122
|
+
* splineProperty('ends', INCLUDE);
|
|
2123
|
+
* stroke(0);
|
|
2124
|
+
* strokeWeight(2);
|
|
2125
|
+
* spline(25, 46, 93, 44, 93, 81, 35, 85);
|
|
2181
2126
|
*
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2184
|
-
*
|
|
2185
|
-
*
|
|
2186
|
-
*
|
|
2187
|
-
*
|
|
2188
|
-
*
|
|
2189
|
-
*
|
|
2127
|
+
* // vertices
|
|
2128
|
+
* strokeWeight(5);
|
|
2129
|
+
* stroke(0);
|
|
2130
|
+
* point(25, 46);
|
|
2131
|
+
* point(93, 44);
|
|
2132
|
+
* point(93, 81);
|
|
2133
|
+
* point(35, 85);
|
|
2134
|
+
* pop();
|
|
2135
|
+
*
|
|
2136
|
+
* // Right panel: ends = EXCLUDE (middle only).
|
|
2137
|
+
* push();
|
|
2138
|
+
* translate(190, 10);
|
|
2139
|
+
* stroke(220);
|
|
2140
|
+
* rect(0, 0, 160, 120);
|
|
2141
|
+
* noStroke();
|
|
2142
|
+
* fill(30);
|
|
2143
|
+
* text('ends: EXCLUDE ', 18, 16);
|
|
2144
|
+
* noFill();
|
|
2145
|
+
*
|
|
2146
|
+
* splineProperty('ends', EXCLUDE);
|
|
2147
|
+
* stroke(0);
|
|
2148
|
+
* strokeWeight(2);
|
|
2149
|
+
* spline(25, 46, 93, 44, 93, 81, 35, 85);
|
|
2150
|
+
*
|
|
2151
|
+
* // vertices
|
|
2152
|
+
* strokeWeight(5);
|
|
2153
|
+
* stroke(0);
|
|
2154
|
+
* point(25, 46);
|
|
2155
|
+
* point(93, 44);
|
|
2156
|
+
* point(93, 81);
|
|
2157
|
+
* point(35, 85);
|
|
2158
|
+
* pop();
|
|
2190
2159
|
*
|
|
2191
|
-
*
|
|
2160
|
+
* describe('Left panel shows spline with ends INCLUDE (three spans). Right panel shows EXCLUDE (only the middle span). Four black points mark the vertices.');
|
|
2192
2161
|
* }
|
|
2193
|
-
* </code>
|
|
2194
|
-
* </div>
|
|
2195
2162
|
*
|
|
2196
2163
|
* @example
|
|
2197
|
-
*
|
|
2198
|
-
* <div>
|
|
2199
|
-
* <code>
|
|
2200
2164
|
* let vertexA;
|
|
2201
2165
|
* let vertexB;
|
|
2202
2166
|
* let vertexC;
|
|
@@ -2278,11 +2242,7 @@ function customShapes(p5, fn) {
|
|
|
2278
2242
|
*
|
|
2279
2243
|
* describe('On a gray background, a black spline passes through vertices A, B, C, D, E, and F, shown as white circles. A red line segment joining vertices A and C has the same slope as the red tangent segment at B. Similarly, the blue line segment joining vertices D and F has the same slope as the blue tangent at E.');
|
|
2280
2244
|
* }
|
|
2281
|
-
* </code>
|
|
2282
|
-
* </div>
|
|
2283
|
-
*
|
|
2284
2245
|
*/
|
|
2285
|
-
|
|
2286
2246
|
/**
|
|
2287
2247
|
* @method splineProperty
|
|
2288
2248
|
* @param {String} property
|
|
@@ -2323,8 +2283,6 @@ function customShapes(p5, fn) {
|
|
|
2323
2283
|
* @chainable
|
|
2324
2284
|
*
|
|
2325
2285
|
* @example
|
|
2326
|
-
* <div>
|
|
2327
|
-
* <code>
|
|
2328
2286
|
* function setup() {
|
|
2329
2287
|
* createCanvas(100, 100);
|
|
2330
2288
|
* background(220);
|
|
@@ -2338,7 +2296,7 @@ function customShapes(p5, fn) {
|
|
|
2338
2296
|
* noFill();
|
|
2339
2297
|
* stroke(0);
|
|
2340
2298
|
* strokeWeight(2);
|
|
2341
|
-
*
|
|
2299
|
+
*
|
|
2342
2300
|
* beginShape();
|
|
2343
2301
|
* splineVertex(20, 80);
|
|
2344
2302
|
* splineVertex(30, 30);
|
|
@@ -2356,12 +2314,8 @@ function customShapes(p5, fn) {
|
|
|
2356
2314
|
*
|
|
2357
2315
|
* describe('A smooth curved line with tightness 0.5 connecting four red points.');
|
|
2358
2316
|
* }
|
|
2359
|
-
* </code>
|
|
2360
|
-
* </div>
|
|
2361
2317
|
*
|
|
2362
2318
|
* @example
|
|
2363
|
-
* <div>
|
|
2364
|
-
* <code>
|
|
2365
2319
|
* function setup() {
|
|
2366
2320
|
* createCanvas(100, 100);
|
|
2367
2321
|
* background(220);
|
|
@@ -2376,7 +2330,7 @@ function customShapes(p5, fn) {
|
|
|
2376
2330
|
* noFill();
|
|
2377
2331
|
* stroke(0);
|
|
2378
2332
|
* strokeWeight(2);
|
|
2379
|
-
*
|
|
2333
|
+
*
|
|
2380
2334
|
* beginShape();
|
|
2381
2335
|
* splineVertex(10, 50); // Control point (affects curve but not drawn to)
|
|
2382
2336
|
* splineVertex(30, 20); // Start of visible curve
|
|
@@ -2389,15 +2343,13 @@ function customShapes(p5, fn) {
|
|
|
2389
2343
|
* noStroke();
|
|
2390
2344
|
* circle(10, 50, 6); // Control point
|
|
2391
2345
|
* circle(90, 50, 6); // Control point
|
|
2392
|
-
*
|
|
2346
|
+
*
|
|
2393
2347
|
* fill(0, 0, 255);
|
|
2394
2348
|
* circle(30, 20, 6); // Visible curve point
|
|
2395
2349
|
* circle(70, 80, 6); // Visible curve point
|
|
2396
2350
|
*
|
|
2397
2351
|
* describe('A curved line between two blue points, with red control points at the ends.');
|
|
2398
2352
|
* }
|
|
2399
|
-
* </code>
|
|
2400
|
-
* </div>
|
|
2401
2353
|
*
|
|
2402
2354
|
* @method splineProperties
|
|
2403
2355
|
* @return {Object}
|
|
@@ -2428,8 +2380,6 @@ function customShapes(p5, fn) {
|
|
|
2428
2380
|
* @param {Number} y y-coordinate of the vertex.
|
|
2429
2381
|
*
|
|
2430
2382
|
* @example
|
|
2431
|
-
* <div>
|
|
2432
|
-
* <code>
|
|
2433
2383
|
* function setup() {
|
|
2434
2384
|
* createCanvas(100, 100);
|
|
2435
2385
|
*
|
|
@@ -2453,11 +2403,8 @@ function customShapes(p5, fn) {
|
|
|
2453
2403
|
*
|
|
2454
2404
|
* describe('Four black dots that form a square are drawn on a gray background.');
|
|
2455
2405
|
* }
|
|
2456
|
-
* </code>
|
|
2457
|
-
* </div>
|
|
2458
2406
|
*
|
|
2459
|
-
*
|
|
2460
|
-
* <code>
|
|
2407
|
+
* @example
|
|
2461
2408
|
* function setup() {
|
|
2462
2409
|
* createCanvas(100, 100);
|
|
2463
2410
|
*
|
|
@@ -2477,11 +2424,8 @@ function customShapes(p5, fn) {
|
|
|
2477
2424
|
*
|
|
2478
2425
|
* describe('A white square on a gray background.');
|
|
2479
2426
|
* }
|
|
2480
|
-
* </code>
|
|
2481
|
-
* </div>
|
|
2482
2427
|
*
|
|
2483
|
-
*
|
|
2484
|
-
* <code>
|
|
2428
|
+
* @example
|
|
2485
2429
|
* function setup() {
|
|
2486
2430
|
* createCanvas(100, 100, WEBGL);
|
|
2487
2431
|
*
|
|
@@ -2501,11 +2445,8 @@ function customShapes(p5, fn) {
|
|
|
2501
2445
|
*
|
|
2502
2446
|
* describe('A white square on a gray background.');
|
|
2503
2447
|
* }
|
|
2504
|
-
* </code>
|
|
2505
|
-
* </div>
|
|
2506
2448
|
*
|
|
2507
|
-
*
|
|
2508
|
-
* <code>
|
|
2449
|
+
* @example
|
|
2509
2450
|
* function setup() {
|
|
2510
2451
|
* createCanvas(100, 100, WEBGL);
|
|
2511
2452
|
*
|
|
@@ -2530,11 +2471,8 @@ function customShapes(p5, fn) {
|
|
|
2530
2471
|
* // Stop drawing the shape.
|
|
2531
2472
|
* endShape(CLOSE);
|
|
2532
2473
|
* }
|
|
2533
|
-
* </code>
|
|
2534
|
-
* </div>
|
|
2535
2474
|
*
|
|
2536
|
-
*
|
|
2537
|
-
* <code>
|
|
2475
|
+
* @example
|
|
2538
2476
|
* let img;
|
|
2539
2477
|
*
|
|
2540
2478
|
* async function setup() {
|
|
@@ -2571,11 +2509,8 @@ function customShapes(p5, fn) {
|
|
|
2571
2509
|
* // Stop drawing the shape.
|
|
2572
2510
|
* endShape();
|
|
2573
2511
|
* }
|
|
2574
|
-
* </code>
|
|
2575
|
-
* </div>
|
|
2576
2512
|
*
|
|
2577
|
-
*
|
|
2578
|
-
* <code>
|
|
2513
|
+
* @example
|
|
2579
2514
|
* let vid;
|
|
2580
2515
|
* function setup() {
|
|
2581
2516
|
* // Load a video and create a p5.MediaElement object.
|
|
@@ -2611,8 +2546,6 @@ function customShapes(p5, fn) {
|
|
|
2611
2546
|
* vertex(-40, 40, 0, 1);
|
|
2612
2547
|
* endShape();
|
|
2613
2548
|
* }
|
|
2614
|
-
* </code>
|
|
2615
|
-
* </div>
|
|
2616
2549
|
*/
|
|
2617
2550
|
/**
|
|
2618
2551
|
* @method vertex
|
|
@@ -2679,8 +2612,6 @@ function customShapes(p5, fn) {
|
|
|
2679
2612
|
* @method beginContour
|
|
2680
2613
|
*
|
|
2681
2614
|
* @example
|
|
2682
|
-
* <div>
|
|
2683
|
-
* <code>
|
|
2684
2615
|
* function setup() {
|
|
2685
2616
|
* createCanvas(100, 100);
|
|
2686
2617
|
*
|
|
@@ -2708,11 +2639,8 @@ function customShapes(p5, fn) {
|
|
|
2708
2639
|
*
|
|
2709
2640
|
* describe('A white square with a square hole in its center drawn on a gray background.');
|
|
2710
2641
|
* }
|
|
2711
|
-
* </code>
|
|
2712
|
-
* </div>
|
|
2713
2642
|
*
|
|
2714
|
-
*
|
|
2715
|
-
* <code>
|
|
2643
|
+
* @example
|
|
2716
2644
|
* // Click and drag the mouse to view the scene from different angles.
|
|
2717
2645
|
*
|
|
2718
2646
|
* function setup() {
|
|
@@ -2747,8 +2675,6 @@ function customShapes(p5, fn) {
|
|
|
2747
2675
|
* // Stop drawing the shape.
|
|
2748
2676
|
* endShape(CLOSE);
|
|
2749
2677
|
* }
|
|
2750
|
-
* </code>
|
|
2751
|
-
* </div>
|
|
2752
2678
|
*/
|
|
2753
2679
|
fn.beginContour = function(kind) {
|
|
2754
2680
|
this._renderer.beginContour(kind);
|
|
@@ -2785,8 +2711,6 @@ function customShapes(p5, fn) {
|
|
|
2785
2711
|
* @param {OPEN|CLOSE} [mode=OPEN] By default, the value is OPEN
|
|
2786
2712
|
*
|
|
2787
2713
|
* @example
|
|
2788
|
-
* <div>
|
|
2789
|
-
* <code>
|
|
2790
2714
|
* function setup() {
|
|
2791
2715
|
* createCanvas(100, 100);
|
|
2792
2716
|
*
|
|
@@ -2814,11 +2738,8 @@ function customShapes(p5, fn) {
|
|
|
2814
2738
|
*
|
|
2815
2739
|
* describe('A white square with a square hole in its center drawn on a gray background.');
|
|
2816
2740
|
* }
|
|
2817
|
-
* </code>
|
|
2818
|
-
* </div>
|
|
2819
2741
|
*
|
|
2820
|
-
*
|
|
2821
|
-
* <code>
|
|
2742
|
+
* @example
|
|
2822
2743
|
* // Click and drag the mouse to view the scene from different angles.
|
|
2823
2744
|
*
|
|
2824
2745
|
* function setup() {
|
|
@@ -2853,8 +2774,6 @@ function customShapes(p5, fn) {
|
|
|
2853
2774
|
* // Stop drawing the shape.
|
|
2854
2775
|
* endShape(CLOSE);
|
|
2855
2776
|
* }
|
|
2856
|
-
* </code>
|
|
2857
|
-
* </div>
|
|
2858
2777
|
*/
|
|
2859
2778
|
fn.endContour = function(mode = OPEN) {
|
|
2860
2779
|
this._renderer.endContour(mode);
|
package/dist/shape/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import attributes from './attributes.js';
|
|
|
3
3
|
import curves from './curves.js';
|
|
4
4
|
import vertex from './vertex.js';
|
|
5
5
|
import customShapes from './custom_shapes.js';
|
|
6
|
-
import '../constants-
|
|
6
|
+
import '../constants-DQyACdzq.js';
|
|
7
7
|
import '../core/helpers.js';
|
|
8
|
-
import '../creating_reading-
|
|
8
|
+
import '../creating_reading-ZXzcZEsb.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
10
10
|
import '../color/color_spaces/hsb.js';
|
|
11
11
|
import '../math/p5.Vector.js';
|