---
title: "flowField"
description: "A swirling, animated wave pattern from −1 to 1."
group: "paint"
groupTitle: "Painting"
categoryId: "paint"
categorySlug: "paint"
categoryTitle: "Fields, palettes & ramps"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/fields.ts#L573"
---

# flowField

A swirling, animated wave pattern from −1 to 1.

```ts
flowField(slots: {detail: FieldScalar}): Field
```

Import `paint` from `shaders/std` and use `paint.flowField`.

`detail` sets how fine the swirls are. It moves on the layer's clock, so declare `animatedTime: {speed: 'speed'}`. Feed it to `threshold` for color bands or to `pulse` for a shimmer.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{detail: FieldScalar}` |  |

## Example

```ts
paint: rampOver(threshold(flowField({detail: p('detail')}), {low: 0.3, high: 0.7}), stops(p('colorSpace')))
```

## See also

- [`threshold`](/docs/primitives/paint/threshold) — Turns a signed field (−1 to 1) into a soft 0–1 mask.
- [`pulse`](/docs/primitives/paint/pulse) — A gentle brightness pulse that follows a pattern field, hovering around 1.
- [`share`](/docs/primitives/paint/share) — Evaluates a field once and lets several words read the same result.

## Used by

[Swirl](/docs/components/swirl)