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

CoverApi interface

The `cover` service.

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

Members

NameTypeDescription
readonly stateReadonlySignal<CoverState>

Where the cover is.

close
close(at?: CoverOrigin): Promise<boolean>

Closes the cover over the page from at, or the viewport centre. Resolves true once the page is covered, false at once when the cover can't play (reduced motion, no 3D, the engine not ready in time). Opens again by itself when the page changes, or after timeout.

load
load(): Promise<boolean>

Loads the engine and the cover now. Resolves false when the cover can't play.

open
open(): void

Opens the cover now, without waiting for a page change.

Also exported from @dioramajs/transitions/cover.

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