Class: Manufacturer

Manufacturer()

A manufacturer allows to create rectangular puzzles by automatically generating inserts

Constructor

new Manufacturer()

Source:

Members

headAnchor :Anchor

Type:
Source:

Methods

_annotate(piece, index)

Parameters:
Name Type Description
piece Piece
index number
Source:

_annotateAll(pieces)

Parameters:
Name Type Description
pieces Array.<Piece>
Source:

_buildPiece(puzzle, horizontalSequence, verticalSequence)

Parameters:
Name Type Description
puzzle Puzzle
horizontalSequence InsertSequence
verticalSequence InsertSequence
Source:

build() → {Puzzle}

Source:
Returns:
Type
Puzzle

withDimensions(width, height)

Parameters:
Name Type Description
width number
height number
Source:

withHeadAt(anchor)

Sets the central anchor. If not specified, puzzle will be positioned at the distance of a whole piece from the origin
Parameters:
Name Type Description
anchor Anchor
Source:

withInsertsGenerator(generator)

Parameters:
Name Type Description
generator InsertsGenerator
Source:

withMetadata(metadata)

Attach metadata to each piece
Parameters:
Name Type Description
metadata Array.<object> list of metadata that will be attached to each generated piece
Source:

withStructure(structure)

If nothing is configured, default Puzzle structured is assumed
Parameters:
Name Type Description
structure Settings
Source: