* Creates a new p5.Geometry that contains all * the shapes drawn in a provided callback function. The returned combined shape * can then be drawn all at once using model() . * * If you need to draw complex shapes every frame which don't
(callback)
| 484 | * @returns {p5.Geometry} The model that was built from the callback function. |
| 485 | */ |
| 486 | buildGeometry(callback) { |
| 487 | this.beginGeometry(); |
| 488 | callback(); |
| 489 | return this.endGeometry(); |
| 490 | } |
| 491 | |
| 492 | ////////////////////////////////////////////// |
| 493 | // Shape drawing |
no test coverage detected