Skip to main content

Interface: PolygonOptions

Defined in: src/mobjects/geometry/Polygon.ts:26

Options for creating a Polygon

Properties​

closed?​

optional closed: boolean

Defined in: src/mobjects/geometry/Polygon.ts:36

Whether to close the polygon. Default: true


color?​

optional color: string

Defined in: src/mobjects/geometry/Polygon.ts:30

Stroke color as CSS color string. Default: Manim's blue (#58C4DD)


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/geometry/Polygon.ts:32

Fill opacity from 0 to 1. Default: 0


holes?​

optional holes: Vector3Tuple[][]

Defined in: src/mobjects/geometry/Polygon.ts:43

Interior rings (holes) punched out of the fill. Each hole is an array of vertices; the hole is closed automatically. A hole is honored only when the polygon is closed. Each hole is re-wound opposite to the exterior ring, so the input winding does not matter. Default: none.


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/geometry/Polygon.ts:34

Stroke width in pixels. Default: 4 (Manim's default)


vertices​

vertices: Vector3Tuple[]

Defined in: src/mobjects/geometry/Polygon.ts:28

Array of vertices defining the polygon. Required.