---
title: "GridSim"
description: "A declared grid simulation."
group: "simulation"
groupTitle: "Simulation"
categoryId: "simulate"
categorySlug: "simulate"
categoryTitle: "Simulate"
kind: "class"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/sim.ts#L170"
---

# GridSim

A declared grid simulation.

```ts
class GridSim
```

Import `GridSim` from `shaders/std`.

Read its outputs with `output('name')` and pass them to an effect.

## Example

```ts
effect: displaceBy(waves.output('displacement'), {strength: p('intensity'), chromatic: p('chromaticSplit'), edges: p('edges')})
```

> **Tip.** Asking for an output that was not declared in `derive` throws with the list of names that were.

## See also

- [`simulate`](/docs/primitives/simulate/simulate) — Declare a simulation the engine runs for you.
- `SimOutputRef`