---
title: "heartbeatPulse"
description: "A double heartbeat, 0 to 1, driven by the layer's clock."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.edgeGlow"
categorySlug: "effects-edgeglow"
categoryTitle: "Edge glow"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/edgeGlow.ts#L38"
---

# heartbeatPulse

A double heartbeat, 0 to 1, driven by the layer's clock.

```ts
heartbeatPulse(animTime: number): number
```

Import `effects` from `shaders/std` and use `effects.edgeGlow.heartbeatPulse`.

Compute it once per pixel and hand the same value to `edgeGlowBand` and every `orbitSpotsAccum` call, so the band's smoke and the spots beat together.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `args` | `[animTime: number]` |  |

## Example

```ts
const beat = asLocal(call(heartbeatPulse, 'heartbeatPulse', [animatedTime(params)]), 'beat')
```

## See also

- [`edgeGlowBand`](/docs/primitives/effects-edgeglow/edgeglowband) — The glowing band around the shape's edge, with drifting smoke, plus the angle around the shape.
- [`orbitSpotsAccum`](/docs/primitives/effects-edgeglow/orbitspotsaccum) — The spots of one color orbiting the band, as coverage at this pixel.

## Used by

[LightEdge](/docs/components/lightedge)