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

Transition interface

Thenable.

View as Markdown
import type { Transition } from '@dioramajs/diorama/transitions'

Resolves with the result and never rejects.

interface Transition extends PromiseLike<TransitionResult>

Members

NameTypeDescription
readonly autoboolean

Created by auto mode or a late partner rather than by app.transition.

readonly enteringreadonly Presence[]

New copies in view. Only with enter > 0 or in a browser view transition.

readonly finishedPromise<TransitionResult>

Never rejects.

readonly flightsreadonly Flight[]

Filled when flying starts.

readonly leavingreadonly Presence[]

Unpaired copies of removed elements. Only with leave > 0 or in a browser view transition.

readonly phaseReadonlySignal<TransitionPhase>

Current phase.

readonly swappedPromise<void>

Settles with the swap, or rejects with its error. If this transition is still current it also waits for the new page's reconcile. Supersede, abort and timeout don't settle it early.

abort
abort(): void

Lands everything now and ends with aborted.

finish
finish(): void

Lands everything now. Copies jump to their targets and fades end.

then
then<TResult1 = TransitionResult, TResult2 = never>(
  onfulfilled?: (value: TransitionResult) => TResult1 | PromiseLike<TResult1> | null,
  onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2> | null,
): PromiseLike<TResult1 | TResult2>

Attaches callbacks for the resolution and/or rejection of the Promise.

Also exported from @dioramajs/transitions.

Defined in packages/transitions/src/types.ts.