--- layout: posts title: Api - ConnectTheDots Class ---
String containing a list of numbers which can be delimited by spaces, commas, or anything non-numeric (Note: exponential notation is allowed).
Create a model by connecting points designated in a string. The model may be closed, or left open.
Example:
var c = new makerjs.models.ConnectTheDots(false, '-10 0 10 0 0 20'); // 3 coordinates to form a polyline
Flag to specify if last point should connect to the first point.
String containing a list of numbers which can be delimited by spaces, commas, or anything non-numeric (Note: exponential notation is allowed).
Create a model by connecting points designated in a numeric array. The model will be 'closed' - i.e. the last point will connect to the first point.
Example:
var c = new makerjs.models.ConnectTheDots([-10, 0, 10, 0, 0, 20]); // 3 coordinates to form a triangle
Array of coordinates.
Create a model by connecting points designated in a numeric array. The model may be closed, or left open.
Example:
var c = new makerjs.models.ConnectTheDots(false, [-10, 0, 10, 0, 0, 20]); // 3 coordinates to form a polyline
Flag to specify if last point should connect to the first point.
Array of coordinates.
Create a model by connecting points designated in an array of points. The model may be closed, or left open.
Example:
var c = new makerjs.models.ConnectTheDots(false, [[-10, 0], [10, 0], [0, 20]]); // 3 coordinates left open
Flag to specify if last point should connect to the first point.
Array of IPoints.
Generated using TypeDoc
Create a model by connecting points designated in a string. The model will be 'closed' - i.e. the last point will connect to the first point.
Example:
var c = new makerjs.models.ConnectTheDots('-10 0 10 0 0 20'); // 3 coordinates to form a triangle