start and end points of the line
line
Creates a segment from two points (array format: [start, end]). Example: start=[0,0,0], end=[10,5,0] → [[0,0,0], [10,5,0]]
start and end points of the segment
segment
Calculates point at parameter t along line segment (0=start, 1=end, linear interpolation). Example: line={start:[0,0,0], end:[10,0,0]}, param=0.5 → [5,0,0] (midpoint)
line
point on line
Calculates length (distance) of a line segment. Example: line={start:[0,0,0], end:[3,4,0]} → 5 (using Pythagorean theorem)
a line
line length
Calculates intersection point of two lines (or segments if checkSegmentsOnly=true). Returns undefined if lines are parallel, skew, or segments don't overlap. Example: line1={start:[0,0,0], end:[10,0,0]}, line2={start:[5,-5,0], end:[5,5,0]} → [5,0,0]
line1 and line2
intersection point or undefined if no intersection
Creates line segments connecting consecutive points in a list (forms a polyline path). Example: points=[[0,0,0], [5,0,0], [5,5,0]] → 2 lines: [0→5] and [5→5,5]
points
lines
Creates lines by pairing corresponding start and end points from two arrays. Filters out zero-length lines. Example: starts=[[0,0,0], [5,0,0]], ends=[[0,5,0], [5,5,0]] → 2 lines connecting paired points
start points and end points
lines
Converts segment array to line object format. Example: [[0,0,0], [10,5,0]] → {start:[0,0,0], end:[10,5,0]}
segment
line
Converts multiple segment arrays to line object format (batch conversion). Example: 3 segment arrays → 3 line objects with start/end properties
segments
lines
Applies transformation matrix to line (rotates, scales, or translates both endpoints). Example: line={start:[0,0,0], end:[10,0,0]} with translation [5,5,0] → {start:[5,5,0], end:[15,5,0]}
a line
transformed line
Applies multiple transformations to multiple lines (one transform per line). Example: 3 lines with 3 different translation matrices → each line moved independently
lines
transformed lines
Generated using TypeDoc
Creates a line from two points (line object with start and end properties). Example: start=[0,0,0], end=[10,5,0] → {start:[0,0,0], end:[10,5,0]}
create
line
true