---
title: "waves"
description: "Overlapping traveling sine waves from a schedule written as data: the organic wobble behind blob edges, water lines and drifting fills."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "noise"
categorySlug: "noise"
categoryTitle: "Noise"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/noise.ts#L82"
---

# waves

Overlapping traveling sine waves from a schedule written as data: the organic wobble behind blob edges, water lines and drifting fills.

```ts
waves(
  axes: {x: Expr | number; y?: Expr | number; t?: Expr | number},
  schedule: WaveTerm[],
): Expr
```

Import `noise` from `shaders/std` and use `noise.waves`.

Pass the coordinates to wave over (`x`, optionally `y`, and `t` for the layer's clock) and a list of terms. Each term multiplies its waves and the terms add up. The result is signed: one wave runs −1 to 1, a schedule runs within about ±(sum of weights). It returns an expression, not a field, so it slots into `paint: (params) => …` recipes and math.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `axes` | `{x: Expr \| number; y?: Expr \| number; t?: Expr \| number}` |  |
| `schedule` | `WaveTerm[]` |  |

## Example

```ts
const wobble = waves({x: delta.member('x'), y: delta.member('y'), t: time}, [
  {waves: [{x: 3, t: 0.8}, {y: 2.2, t: -0.5}]},
  {waves: [{x: 5.1, y: -3.3, t: 0.6}], weight: 0.5},
])
```

> **Tip.** Keep the schedule as constants next to the definition. It is the look, so keep it where you can tune it.

## See also

- [`wavyLine`](/docs/primitives/noise/wavyline) — The height of an animated wavy line at a point along it: a stack of traveling sines.
- [`organicWaves`](/docs/primitives/noise/organicwaves) — A ready-made `waves` schedule from three knobs, for when you have no hand-tuned constants.
- [`hashPhase`](/docs/primitives/math/hashphase) — A random but stable angle in radians, 0..2π, from a seed.

## Used by

[Blob](/docs/components/blob), [Waveform](/docs/components/waveform)