---
title: "springLatticeField"
description: "A cloth of springs the cursor pushes: it stretches, rings and settles like fabric."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.pointerFields"
categorySlug: "effects-pointerfields"
categoryTitle: "Pointer fields"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/pointerFields.ts#L311"
---

# springLatticeField

A cloth of springs the cursor pushes: it stretches, rings and settles like fabric.

```ts
springLatticeField(slots: {
    stiffness: PropRef
    damping: PropRef
    radius: PropRef
    output: string
}): (params: GpuFragmentParams, root: GridRoot) => GridSimConfig
```

Import `effects` from `shaders/std` and use `effects.pointerFields.springLatticeField`.

Spread it with `...sim.grids.gridSim(...)`. `stiffness` (about 1 to 30) is how rigid the cloth is; `damping` (about 0 to 10) how quickly it stops moving; `radius` the push area (1 is about 8% of the canvas). The grid is fixed at 64 cells per side. The field is published under `output` for a warp map such as `warps.liquidDisplace`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    stiffness: PropRef
    damping: PropRef
    radius: PropRef
    output: string
}` |  |

## Example

```ts
...sim.grids.gridSim(springLatticeField({stiffness: p('stiffness'), damping: p('damping'), radius: p('radius'), output: 'displacement'}))
```

> **Tip.** Add `uvRemapIdentityWhen: ({computeOutputs}) => !computeOutputs?.displacement` so the warp is a no-op before the field exists.

## See also

- [`pointerSplatField`](/docs/primitives/effects-pointerfields/pointersplatfield) — A field the cursor smears: cells near the pointer move with it, then fade back to rest.

## Used by

[Liquify](/docs/components/liquify)