Class: DefLineStrip

algeobra~DefLineStrip(points)

Definition of a line strip, defined by a sequence of points

Constructor

new DefLineStrip(points)

Default value
Parameters:
Name Type Description
points Array.<{x:Number, y:Number}> An array of points
Source:

Methods

compute(createInfo) → {Object}

Computes the line strip
Parameters:
Name Type Description
createInfo CreateInfo The creation info
Source:
Returns:
A line strip of type TYPE_LINE_STRIP
Type
Object

(static) fromPointArray(pointArray, attach) → {CreateInfo}

Computes a line strip from an array of points stored as a value
Parameters:
Name Type Default Description
pointArray Number | Object Either the index or value of an array of points of type TYPE_POINT. The point array
attach Boolean false Whether the points should be attached to the points already specified for this line strip
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPoints(points, attach) → {CreateInfo}

Computes a line strip from an array of points
Parameters:
Name Type Default Description
points Array.<(Number|Object)> Either the indices or values of TYPE_POINT. The points from which to make the line strip of
attach Boolean false Whether the points should be attached to the points already specified for this line strip
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPolygon(poly, attach) → {CreateInfo}

Computes a line strip from the points of a polygon
Parameters:
Name Type Default Description
poly Number | Object Either the index or value of a TYPE_POLYGON. The polygon
attach Boolean false Whether the points should be attached to the points already specified for this line strip
Source:
Returns:
The creation info
Type
CreateInfo