path function
The faces a character shows on its way from `from` to `to`, both included: along the drum, the last `flips` steps before the target, or `flips` random faces.
import { path } from '@dioramajs/text/split-flap'. One step when they are equal.
function path(
drumFaces: readonly string[],
from: string,
to: string,
flips: number,
motion: 'drum' | 'random',
random: () => number,
): string[]Parameters
| Name | Type | Description |
|---|---|---|
drumFaces | readonly string[] | |
from | string | |
to | string | |
flips | number | |
motion | 'drum' | 'random' | |
random | () => number |
Defined in packages/text/src/split-flap.ts.