Class: Layout
Constructors
constructor
• new Layout(orientation
, size
, origin
): Layout
Parameters
Name | Type |
---|---|
orientation |
HexOrientation |
size |
Point |
origin |
Point |
Returns
Properties
orientation
• orientation: HexOrientation
origin
• origin: Point
size
• size: Point
flat
▪ Static
flat: HexOrientation
pointy
▪ Static
pointy: HexOrientation
Methods
hexCornerOffset
▸ hexCornerOffset(corner
): Point
Parameters
Name | Type |
---|---|
corner |
number |
Returns
hexToPixel
▸ hexToPixel(h
): Point
Parameters
Name | Type |
---|---|
h |
Hex |
Returns
pixelToHex
▸ pixelToHex(p
): Hex
Parameters
Name | Type |
---|---|
p |
Point |
Returns
polygonCorners
▸ polygonCorners(h
): Point
[]
Parameters
Name | Type |
---|---|
h |
Hex |
Returns
Point
[]