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

pick function

Where a turn shows: frame `pos` (fractional, unbounded with `loop`) of a row of `per` frames, as the two frames to mix and the share of the second.

View as Markdown
import { pick } from '@dioramajs/media/spin'

. Without loop the ends hold.

function pick(
  pos: number,
  per: number,
  loop: boolean,
  blend: boolean,
): [lo: number, hi: number, t: number]

Parameters

NameTypeDescription
posnumber
pernumber
loopboolean
blendboolean

Defined in packages/media/src/spin.ts.