@f*g/hexagonal
v0.2.0
Published
⬡⬢ tools for building hexagonal things ⎔⬣
Downloads
4
Readme
Hexagonal Architecture
Theory
It's not trivial to build interfaces using hexagonal (triangular) grids. Our digital world is build on rectangles.
This project is the beginning of something much bigger, an entire system for building hexagonal interfaces.
I know it could/should be organized better, but I'm letting expand organically as I use it to build my hexagonal things.
Capapibilites
HexProps
w
→ widthh
→ heightx
→ translate Xy
→ translate Ys
→ length of a side (radius of circumcircle)m
→ mid pointa
→ length of tipb
→ length of tip + body
Property builders
verticalHexagonConstrained(...)
verticalHexagonFromWidth(...)
verticalHexagonFromHeight(...)
Path builders
createPathVerticalHexagonFull(hexProps)
createPathVerticalHexagonTipTop(hexProps)
createPathVerticalHexagonTipBottom(hexProps)
createPathVerticalHexagonBevelLeft(hexProps, bevelWidth)
createPathVerticalHexagonBevelRight(hexProps, bevelWidth)
Development
yarn start
yarn build
yarn publish
Changelog
v0.2 bevelled hexagons
- create hexagonal bevels for a neat look
- reorganize code
v0.1 vertical hexagons
- create the properties of vertical hexagons constrained by width, height, or both
- using those properties create the SVG paths for a full hexagon, or just the tips (top & bottom)