Begins adding shapes to a new p5.Geometry object.
The beginGeometry() and endGeometry() functions help with creating complex 3D shapes from simpler ones such as sphere(). beginGeometry() begins adding shapes to a custom p5.Geometry object and endGeometry() stops adding them.
beginGeometry() and endGeometry() can help to make sketches more performant. For example, if a complex 3D shape doesn’t change while a sketch runs, then it can be created with beginGeometry() and endGeometry(). Creating a p5.Geometry object once and then drawing it will run faster than repeatedly drawing the individual pieces.
See buildGeometry() for another way to build 3D shapes.
Note: beginGeometry() can only be used in WebGL mode.
예제
관련 레퍼런스
beginGeometry
Begins adding shapes to a new p5.Geometry object.
buildGeometry
Creates a custom p5.Geometry object from simpler 3D shapes.
endGeometry
Stops adding shapes to a new p5.Geometry object and returns the object.
freeGeometry
Clears a p5.Geometry object from the graphics processing unit (GPU) memory.