@@ -273,7 +273,7 @@ class Geometry {
273
273
*
274
274
* // Create a p5.Geometry object.
275
275
* // Set its internal color to red.
276
- * let myGeometry = buildGeometry(() => {
276
+ * let myGeometry = buildGeometry(function() {
277
277
* fill(255, 0, 0);
278
278
* plane(20);
279
279
* });
@@ -336,7 +336,7 @@ class Geometry {
336
336
* let saveBtn;
337
337
* function setup() {
338
338
* createCanvas(200, 200, WEBGL);
339
- * myModel = buildGeometry(() => {
339
+ * myModel = buildGeometry(function()) {
340
340
* for (let i = 0; i < 5; i++) {
341
341
* push();
342
342
* translate(
@@ -441,7 +441,7 @@ class Geometry {
441
441
* let saveBtn2;
442
442
* function setup() {
443
443
* createCanvas(200, 200, WEBGL);
444
- * myModel = buildGeometry(() => {
444
+ * myModel = buildGeometry(function() {
445
445
* for (let i = 0; i < 5; i++) {
446
446
* push();
447
447
* translate(
@@ -936,9 +936,9 @@ class Geometry {
936
936
* createCanvas(100, 100, WEBGL);
937
937
*
938
938
* // Create a p5.Geometry object.
939
- * beginGeometry();
940
- * torus();
941
- * myGeometry = endGeometry( );
939
+ * myGeometry = buildGeometry(function() {
940
+ * torus();
941
+ * } );
942
942
*
943
943
* // Compute the vertex normals.
944
944
* myGeometry.computeNormals();
@@ -1679,9 +1679,9 @@ class Geometry {
1679
1679
* createCanvas(100, 100, WEBGL);
1680
1680
*
1681
1681
* // Create a very small torus.
1682
- * beginGeometry() ;
1683
- * torus(1, 0.25);
1684
- * myGeometry = endGeometry( );
1682
+ * myGeometry = buildGeometry(function() { ;
1683
+ * torus(1, 0.25);
1684
+ * } );
1685
1685
*
1686
1686
* // Normalize the torus so its vertices fill
1687
1687
* // the range [-100, 100].
@@ -1794,10 +1794,10 @@ class Geometry {
1794
1794
* });
1795
1795
*
1796
1796
* // Create the Geometry object.
1797
- * beginGeometry();
1798
- * fill('hotpink');
1799
- * sphere(45, 50, 50);
1800
- * geo = endGeometry( );
1797
+ * geo = buildGeometry(function() {
1798
+ * fill('hotpink');
1799
+ * sphere(45, 50, 50);
1800
+ * } );
1801
1801
*
1802
1802
* // Set the roughness value for every vertex.
1803
1803
* for (let v of geo.vertices){
@@ -2224,9 +2224,9 @@ function geometry(p5, fn){
2224
2224
* createCanvas(100, 100, WEBGL);
2225
2225
*
2226
2226
* // Create a p5.Geometry object.
2227
- * beginGeometry();
2228
- * torus(30, 15, 10, 8);
2229
- * myGeometry = endGeometry( );
2227
+ * myGeometry = buildGeometry(function() {
2228
+ * torus(30, 15, 10, 8);
2229
+ * } );
2230
2230
*
2231
2231
* describe('A white torus rotates slowly against a dark gray background. Red spheres mark its vertices.');
2232
2232
* }
@@ -2293,9 +2293,9 @@ function geometry(p5, fn){
2293
2293
* createCanvas(100, 100, WEBGL);
2294
2294
*
2295
2295
* // Create a p5.Geometry object.
2296
- * beginGeometry();
2297
- * torus(30, 15, 10, 8);
2298
- * myGeometry = endGeometry( );
2296
+ * myGeometry = buildGeometry(function() {
2297
+ * torus(30, 15, 10, 8);
2298
+ * } );
2299
2299
*
2300
2300
* // Compute the vertex normals.
2301
2301
* myGeometry.computeNormals();
@@ -2440,9 +2440,9 @@ function geometry(p5, fn){
2440
2440
* createCanvas(100, 100, WEBGL);
2441
2441
*
2442
2442
* // Create a p5.Geometry object.
2443
- * beginGeometry();
2444
- * sphere();
2445
- * myGeometry = endGeometry( );
2443
+ * myGeometry = buildGeometry(function() {
2444
+ * sphere();
2445
+ * } );
2446
2446
*
2447
2447
* describe("A sphere drawn on a gray background. The sphere's surface is a grayscale patchwork of triangles.");
2448
2448
* }
0 commit comments