PathData

Represents a bezier path composed of multiple points.

PathData interface

Represents a bezier path composed of multiple points.

Signature:

interface PathData

Remarks

PathData defines a vector shape path that can be either open or closed. When closed is true, the path automatically connects the last point back to the first. Paths require at least 2 points for a line.

Example

const trianglePath: PathData = {
  points: [
    { vertex: { x: 0, y: 0 }, inTan: { x: 0, y: 0 }, outTan: { x: 0, y: 0 } },
    { vertex: { x: 100, y: 0 }, inTan: { x: 0, y: 0 }, outTan: { x: 0, y: 0 } },
    { vertex: { x: 50, y: 100 }, inTan: { x: 0, y: 0 }, outTan: { x: 0, y: 0 } },
  ],
  closed: true,
};

Properties

Property

Modifiers

Type

Description

closed

readonly

boolean

Whether the path is closed (connects last point to first)

points

readonly

PathPoint[]

Array of path points defining the bezier curve

Last updated: August 5, 2026 at 11:47 AMEdit this page