new Line( [ p1 [, p2 ] ] )

Description
Line Class
Parameters
Name Type Attributes Description
p1 Vector2 | Object <optional>
Vector2 like object of the start position
p2 Vector2 | Object <optional>
Vector2 like object of the end position
Properties
Name Type Description
start Vector2 The start position of the line
end Vector2 The end position of the line
Details

Members


<readonly> length :Number

Details
Number

Methods


intersect( line )

Description
Get the intersection of this line with an other one Return false if lines does not intersect
Parameters
Name Type Description
line Line Second line
Returns
boolean|Vector2
Details

alongPoint( lerpValue )

Description
Get a point on the line from start to end at lerpValue
Parameters
Name Type Description
lerpValue Number The lerp value, should be between 0 and 1, and it will be clamped
Returns
Vector2
Details

alongPointUnclamped( lerpValue )

Description
Get a point on the line from start to end at lerpValue (Unclamped version)
Parameters
Name Type Description
lerpValue Number The lerp value, should be between 0 and 1, but can be out of bound
Returns
Vector2
Details

<static> Intersect( l1, l2 )

Description
Get the intersection of two lines Return false if lines does not intersect
Parameters
Name Type Description
l1 Line First line
l2 Line Second line
Returns
boolean|Vector2
Details