Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

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.

View as Markdown
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

NameTypeDescription
drumFacesreadonly string[]
fromstring
tostring
flipsnumber
motion'drum' | 'random'
random() => number

Defined in packages/text/src/split-flap.ts.