beginShape()

Begin an extruded path built from vertex() points.

The first vertex() after beginShape() positions the nozzle at the start of the path; every following vertex() extrudes to the next point. mode chooses how the first move is made i.e. how the nozzle reaches the path start:

Call endShape() to finish, or endShape(CLOSE) to extrude back to the first vertex. The functionality follows beginShape() / vertex() / endShape() in p5.js.

Parameters

Name Type Description
mode? string Lead-in for the first vertex: TRAVEL, RETRACT, MOVE, or EXTRUDE. Default: TRAVEL.

Examples

Syntax

fab.beginShape([mode])