Product media placeholder
Replace this area with a screenshot or short walkthrough video during the media sweep.
Maintains a ±1 direction value, flipped to +1 on rising-edge `forward` or -1 on rising-edge `backward`. Outputs `direction` (signed) plus `forwardActive` / `backwardActive` (binary 0/1) for use as multipliers in direction-aware animation expressions. Replaces the pulseTween-of-duration-0.001s + sign-extracting expressions hack.
Inputs
| Port | Type | Description |
|---|---|---|
forward | float | Rising-edge trigger. Sets direction to +1. |
backward | float | Rising-edge trigger. Sets direction to -1. |
Outputs
| Port | Type | Description |
|---|---|---|
direction | float | Current direction: +1 forward, -1 backward. |
forwardActive | float | `1` when direction is +1, else `0`. Multiply forward-only values by this. |
backwardActive | float | `1` when direction is -1, else `0`. |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
initialDirection | enum | 1 | Direction held until the first input pulse fires. Default forward. options 1, -1 |
Use cases
- Bidirectional section-snap — wire wheel-down pulse to `forward`, wheel-up to `backward`. Multiply slide-in animation values by `direction` so forward/backward animations come from below/above respectively.
- Toggle between two modes with hysteresis-free latching (last gesture wins).
- Track scroll velocity sign without needing per-frame scroll tracking — only the direction of the most recent crossing matters.
Envelope
Use directionLatch 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/