---
title: "hexLines"
description: "Honeycomb lines (pointy-top hexagons) drawn in a `cellFrame`, plus a per-cell shade."
group: "paint"
groupTitle: "Painting"
categoryId: "patterns"
categorySlug: "patterns"
categoryTitle: "Patterns & tiling"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/patterns.ts#L626"
---

# hexLines

Honeycomb lines (pointy-top hexagons) drawn in a `cellFrame`, plus a per-cell shade.

```ts
hexLines(slots: {
    frame: PatternPaint
    thickness: PropRef
    softness: PropRef
    variation: PropRef
}): {lines: PatternPaint; shade: PatternPaint}
```

Import `patterns` from `shaders/std` and use `patterns.hexLines`.

Returns `lines` (1 on a line) and `shade` (a brightness factor around 1 for `vary`). `thickness` 1 draws lines about 2% of a cell wide; 0 draws none. `softness` 0–1 blurs the lines. `variation` 0–1 sets how far `shade` strays from 1. Draw it with the `'clockwise'` convention.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    frame: PatternPaint
    thickness: PropRef
    softness: PropRef
    variation: PropRef
}` |  |

## Example

```ts
const field = hexLines({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness'), variation: p('variation')})
```

## See also

- [`cellFrame`](/docs/primitives/patterns/cellframe) — The shared coordinate system of a tiled pattern: how many cells fit down the canvas height and how far the whole lattice is rotated.
- [`gridLines`](/docs/primitives/patterns/gridlines) — Square grid lines drawn in a `cellFrame`, plus a per-cell shade for the fill.
- [`isoCubeFaces`](/docs/primitives/patterns/isocubefaces) — Tumbling blocks: three shaded rhombus faces per hexagon that read as a field of 3D cubes.
- [`vary`](/docs/primitives/patterns/vary) — A color lightened or darkened per cell by a shade factor, alpha untouched.

## Used by

[HexGrid](/docs/components/hexgrid)