@baku89/pave / Line
Line
A collection of functions to handle a line represented with SegmentL.
Variables
curvature
const
curvature:0
=0
Defined in: Line.ts:38
Functions
bounds()
bounds(
line
):Rect
Defined in: Line.ts:16
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
Returns
derivative()
derivative(
line
):vec2
Defined in: Line.ts:26
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
divideAtTimes()
divideAtTimes(
line
,times
):VertexL
[]
Defined in: Line.ts:64
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
times | Iterable <number > |
Returns
VertexL
[]
isZero()
isZero(
line
):boolean
Defined in: Line.ts:76
Returns true if the length of line segment is zero.
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
Returns
boolean
normal()
normal(
line
):vec2
Defined in: Line.ts:34
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
offset()
offset(
line
,distance
):PathL
Defined in: Line.ts:80
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
distance | number |
Returns
orientation()
orientation(
line
,loc
):mat2d
Defined in: Line.ts:40
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
loc | SegmentLocation |
Returns
mat2d
point()
point(
line
,loc
):vec2
Defined in: Line.ts:21
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
loc | SegmentLocation |
Returns
vec2
tangent()
tangent(
line
):vec2
Defined in: Line.ts:30
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
toTime()
toTime(
line
,loc
):number
Defined in: Line.ts:93
Converts a signed location to a time between 0 and 1.
Parameters
Parameter | Type | Description |
---|---|---|
line | SimpleSegmentL | |
loc | SegmentLocation |
Returns
number
trim()
trim(
line
,start
,end
):SegmentL
Defined in: Line.ts:50
Parameters
Parameter | Type |
---|---|
line | SimpleSegmentL |
start | SegmentLocation |
end | SegmentLocation |