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

@dioramajs/media/flipbook

Exports of @dioramajs/media/flipbook.

View as Markdown
On this page
import { default, first, pageSize } from '@dioramajs/media/flipbook'

Functions

firstThe first page of `spread`, what `index` names it by.
pageSizePage width and height of a book of `aspect` pages contained in the box.
positionWhere `index` is in spreads: a whole spread at its first page, a turn between two.
sidesThe left and right page of `spread`, -1 where there is none.
spineWhere the spine stands at spread position `at`, in page widths from the box centre. A book with a cover, closed on it or on the back cover, stands in the middle of the box, and so does every open spread; between two spreads it slides with the turn. One page a spread: its left edge.
spreadOfThe spread that holds `page`.
spreadsNumber of spreads.
twoUpTwo pages side by side when the box holds them at three quarters of a page's height or more.

Constants

defaultThe page images of a container as a book: spreads whose pages bend as they turn by drag, click or keys. Without WebGL the pages are the site's layout. Fires `dio:index` when a spread is reached.

Interfaces

BookHow the pages fall into spreads.