Skip to main content

Curve

A shape with a list of 2D points

Extends Item

TYPE
object

Properties

NAMETYPEDESCRIPTION
type"CURVE"The type of item
pointsVector2[]The list of points to draw
styleCurveStyleThe style of the curve

Type Definitions​

CurveStyle​

TYPE
object

Properties

NAMETYPEDESCRIPTION
fillColorstringThe fill color of the shape
fillOpacitynumberThe fill opacity of the shape between 0 and 1
strokeColorstringThe stroke color of the shape
strokeOpacitynumberThe stroke opacity of the shape between 0 and 1
strokeWidthnumberThe stroke width of the shape in pixels
strokeDashnumber[]The pattern of the stroke dash
tensionnumberHow much curvature to apply between points in the curve. A value of 0 will make a straight edge shape. A value of 1 will cause a large curve.
closedbooleanAn optional boolean when true the curve ends where it started