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.
w
→ widthh
→ heightx
→ translate Xy
→ translate Ys
→ length of a side (radius of circumcircle)m
→ mid pointa
→ length of tipb
→ length of tip + body
verticalHexagonConstrained(...)
verticalHexagonFromWidth(...)
verticalHexagonFromHeight(...)
createPathVerticalHexagonFull(hexProps)
createPathVerticalHexagonTipTop(hexProps)
createPathVerticalHexagonTipBottom(hexProps)
createPathVerticalHexagonBevelLeft(hexProps, bevelWidth)
createPathVerticalHexagonBevelRight(hexProps, bevelWidth)
yarn start
yarn build
yarn publish
- create hexagonal bevels for a neat look
- reorganize code
- 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)