PavePave
Home
Guide
API
Sandbox
  • English
  • 日本語
GitHub
Home
Guide
API
Sandbox
  • English
  • 日本語
GitHub
  • Line

@baku89/pave v0.7.1


@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

ParameterType
lineSimpleSegmentL

Returns

Rect


derivative()

derivative(line): vec2

Defined in: Line.ts:26

Parameters

ParameterType
lineSimpleSegmentL

Returns

vec2


divideAtTimes()

divideAtTimes(line, times): VertexL[]

Defined in: Line.ts:64

Parameters

ParameterType
lineSimpleSegmentL
timesIterable<number>

Returns

VertexL[]


isZero()

isZero(line): boolean

Defined in: Line.ts:76

Returns true if the length of line segment is zero.

Parameters

ParameterType
lineSimpleSegmentL

Returns

boolean


normal()

normal(line): vec2

Defined in: Line.ts:34

Parameters

ParameterType
lineSimpleSegmentL

Returns

vec2


offset()

offset(line, distance): PathL

Defined in: Line.ts:80

Parameters

ParameterType
lineSimpleSegmentL
distancenumber

Returns

PathL


orientation()

orientation(line, loc): mat2d

Defined in: Line.ts:40

Parameters

ParameterType
lineSimpleSegmentL
locSegmentLocation

Returns

mat2d


point()

point(line, loc): vec2

Defined in: Line.ts:21

Parameters

ParameterType
lineSimpleSegmentL
locSegmentLocation

Returns

vec2


tangent()

tangent(line): vec2

Defined in: Line.ts:30

Parameters

ParameterType
lineSimpleSegmentL

Returns

vec2


toTime()

toTime(line, loc): number

Defined in: Line.ts:93

Converts a signed location to a time between 0 and 1.

Parameters

ParameterTypeDescription
lineSimpleSegmentL
locSegmentLocation

Returns

number


trim()

trim(line, start, end): SegmentL

Defined in: Line.ts:50

Parameters

ParameterType
lineSimpleSegmentL
startSegmentLocation
endSegmentLocation

Returns

SegmentL

Edit this page