# path

function in `@dioramajs/text/split-flap`

```ts
import { path } from '@dioramajs/text/split-flap'
```

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. One step when they are equal.

```ts
function path(
  drumFaces: readonly string[],
  from: string,
  to: string,
  flips: number,
  motion: 'drum' | 'random',
  random: () => number,
): string[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `drumFaces` | `readonly string[]` |  |
| `from` | `string` |  |
| `to` | `string` |  |
| `flips` | `number` |  |
| `motion` | `'drum' \| 'random'` |  |
| `random` | `() => number` |  |

Defined in [packages/text/src/split-flap.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/text/src/split-flap.ts#L494).
