Interface: HexSettings
Table of contents
Properties
Properties
dimensions
dimensions: Ellipse
An object with an xRadius
and yRadius
. There are two radiuses to make it possible to have "wide" (xRadius
> yRadius
) or "tall" (xRadius
< yRadius
) hexes.
Defined in
offset
offset: HexOffset
In a grid with pointy hexes, each row is offsetted half a hex relative to the previous row. In grids with flat hexes, this applies to the columns. Redblobgames has a visual example.
Set the offset property to 1
or -1
(the default) to control whether the even or odd rows/columns are offsetted.
Defined in
orientation
orientation: Orientation
Either pointy ⬢ (the default) or flat ⬣.
Defined in
origin
origin: Point
If a hex is converted to a point, its origin point is crucial. The origin is relative to a hex's center, so an origin of { x: 0, y: 0 }
(the default) means its center. An origin of { x: 10, y: 5 }
means 10 right and 5 down from the center. { x: -5, y: -10 }
means 5 left, 10 up. You get the Point
🙃.