endShape(shapeMode)
The endShape() function is the companion to beginShape() and may only be called after beginShape(). It creates and returns a path of the previously called vertex() points. The shapeMode parameter allows to close the shape (to connect the beginning and the end).
Type: function
Parameter(s):
- shapeMode {String}:
Set to
CLOSEif the new path should be auto-closed.
Returns:
-
{GraphicLine | Polygon}:
The GraphicLine or Polygon object that was created.