Skip to content

@phun-ky/arclace / bezierPath

Function: bezierPath() ​

bezierPath(start, startSide, end, endSide, curvature?): ArcPathResultType

Defined in: src/utils/paths.ts:114

A cubic bezier curve that leaves start and arrives at end perpendicular to their sides.

Parameters ​

start ​

ArcPointInterface

startSide ​

ArcSideType

end ​

ArcPointInterface

endSide ​

ArcSideType

curvature? ​

number = 1

Returns ​

ArcPathResultType

Throws ​

When a point or curvature isn't finite.

Throws ​

When a side isn't top, right, bottom or left.

Example ​

ts
bezierPath({ x: 0, y: 0 }, 'right', { x: 200, y: 100 }, 'left').d;

Released under the MIT License.