MCPcopy
hub / github.com/processing/p5.js / beginGeometry

Method beginGeometry

src/core/p5.Renderer3D.js:438–447  ·  view source on GitHub ↗

* Starts creating a new p5.Geometry. Subsequent shapes drawn will be added * to the geometry and then returned when * endGeometry() is called. One can also use * buildGeometry() to pass a function that * draws shapes. *

()

Source from the content-addressed store, hash-verified

436 * @private
437 */
438 beginGeometry() {
439 if (this.geometryBuilder) {
440 throw new Error(
441 "It looks like `beginGeometry()` is being called while another p5.Geometry is already being build."
442 );
443 }
444 this.geometryBuilder = new GeometryBuilder(this);
445 this.geometryBuilder.prevFillColor = this.states.fillColor;
446 this.fill(new Color([-1, -1, -1, -1]));
447 }
448
449 /**
450 * Finishes creating a new <a href="#/p5.Geometry">p5.Geometry</a> that was

Callers 1

buildGeometryMethod · 0.95

Calls 1

fillMethod · 0.95

Tested by

no test coverage detected