Product media placeholder
Replace this area with a screenshot or short walkthrough video during the media sweep.
Edge-detector / pulse generator. Watches `value` and fires a single-frame `pulse` when it crosses `threshold`. `mode: edge` (default) fires once per crossing then suppresses until value drops below `threshold − hysteresis` and re-crosses (debounce). `mode: auto` fires periodically paced by `cooldownMs` for as long as value stays past threshold (metronome). `direction` selects rising-only / falling-only / both. Continuous comparator output `isAbove` is raw (1 while past threshold, 0 otherwise) — useful as a gate when you do not want pulse semantics. First-frame past-threshold does NOT fire (cold-start state-snap, prevents spurious init pulses).
Inputs
| Port | Type | Description |
|---|---|---|
value | float | The signal being watched. Wire from any numeric source — scrollTrigger.progress, observer.deltaY, hover.hover, scroll velocity, etc. |
threshold | float | The crossing point. Defaults to `0` if not set in params and not wired. Wire this only if the threshold itself needs to change at runtime — otherwise just set the **Threshold** param. |
Outputs
| Port | Type | Description |
|---|---|---|
pulse | float | Single-frame `1` on each crossing event, `0` otherwise. Rising-edge consumed by `pulseCounter`, `pulseTween.restart`, `pulseRouter.pulse`, etc. |
isAbove | float | Raw comparator output: `1` while value > threshold, `0` otherwise. Use as a gate signal (e.g. drive an opacity ramp via smoothing). |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
threshold | float | 0 | Static threshold value. Use this in 90% of cases (skip wiring the input port). For wheel pulses use `30–50` to require a real gesture; for `scrollTrigger.progress` milestones use `0.5` / `0.75`; for hover gates use `0.5`. step 0.1 |
mode | enum | "edge" | **Edge** = fires once per threshold crossing, then re-arms only after value drops back. **Auto** = fires periodically paced by Cooldown for as long as value stays past threshold (continuous trail / heartbeat). Edge is the default. options edge, auto |
direction | enum | "rising" | **Rising** = fire when value crosses up through threshold (mouse enters, scroll forward, gesture starts). **Falling** = crosses down (mouse leaves, gesture ends). **Both** = either direction. options rising, falling, both |
hysteresis | float | 0 | Re-arm gap. After firing on a rising crossing, value must drop below `threshold − hysteresis` before another rising crossing can fire. Defaults to `0` (re-arms immediately when value drops below threshold). Use small values (5–10% of threshold) to debounce noisy signals near the threshold. min 0; step 0.1 |
cooldownMs | float | 0 | Minimum wall-time gap between pulses. Default `0`. Set to ≥ the duration of any animation the pulse triggers (e.g. `1200` for a 1.0s tween) so the next pulse cannot fire mid-animation. Especially important for wheel / touch sources that emit dense bursts of events. min 0; step 10 |
Use cases
- Wheel / touch gesture detection — wire from `observer.deltaY`, set `threshold` to require a meaningful gesture, `cooldownMs` to debounce. Feed `pulse` into `pulseCounter` for snap navigation. (See `section-snap` demo.)
- Scroll-progress milestones — fire one pulse when a `scrollTrigger.progress` crosses 0.5, 0.75, etc. Drives one-shot reveal animations without keyframes.
- Velocity-reactive trail — pair with `mode: auto` + low `cooldownMs` (50–100ms) to emit periodic pulses while pointer / scroll velocity exceeds a threshold; fan into `pulseRouter` for spawn-style trails.
- Hover-gate edge detection — fire one pulse when a `hover.hover` smooth gate crosses 0.5 (mouse enters); pair with another threshold falling-direction for mouse-leave.
- Debounced numeric guard — prevent re-fires on noisy signals via `cooldownMs` (250–1000ms) — same role as `_.debounce` in imperative code.
Related nodes
Envelope
Use thresholdPulse as the node type inside a graph node envelope. Add id, optional params, optional connections, and optional activeWhen based on the guide context.
Generated source
Registry faster-motion-docs/node-registry.jsonCategory page /help/faster-motion/faster-motion-node-category-inputs/