curves
import {...} from "@revideo/2d/lib/curves";
Classes
Interfaces
Type Aliases
KnotAutoHandles
Functions
getBezierSplineProfile
public getBezierSplineProfileknots: KnotInfo[]closed: booleansmoothness: number: CurveProfile
Calculate the curve profile of a spline based on a set of knots.
Parameters
knots: KnotInfo[]
The knots defining the spline
closed: boolean
Whether the spline should be closed or not
smoothness: number
The desired smoothness of the spline when using auto calculated handles.
getCircleProfile
public getCircleProfilesize: Vector2startAngle: numberendAngle: numberclosed: booleancounterclockwise: boolean = false: CurveProfile
Parameters
size: Vector2
startAngle: number
endAngle: number
closed: boolean
counterclockwise: boolean = false
getPointAtDistance
public getPointAtDistanceprofile: CurveProfiledistance: number: CurvePoint
Parameters
profile: CurveProfile
distance: number
getPolylineProfile
public getPolylineProfilepoints: readonly Vector2[]radius: numberclosed: boolean: CurveProfile
Parameters
getRectProfile
public getRectProfilerect: BBoxradius: SpacingsmoothCorners: booleancornerSharpness: number: CurveProfile
Parameters
rect: BBox
radius: Spacing
smoothCorners: boolean
cornerSharpness: number