hex is a Go implementation of hexagonal grid math based on amitp's Hexagonal Grids articles. This package focuses on hexagonal grid math, including:
- Generating sets of hexes programmatically in common patterns.
- Compositing sets of hexes with unions, intersections, and subtractions (constructive solid geometry).
- Multithreaded A* pathing in a hex grid.
- Fast intersection testing.
- Super naive drawing package! This isn't performant; it's to help you visualize what's going on.
import (
// Base library
"github.com/erinpentecost/hex"
// For pathfinding
"github.com/erinpentecost/hex/path"
// For constructive solid geometry
"github.com/erinpentecost/hex/area"
)