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/scrub

Exports of @dioramajs/media/scrub.

View as Markdown
import { default } from '@dioramajs/media/scrub'

Constants

defaultA `<video>` scrubbed by scroll: its time follows the pin of the sticky section it plays in, both ways, like the product films on Apple's pages. Seeks never queue: while one runs only the latest wanted time waits, so a long GOP stalls instead of piling up. Each decoded frame is copied into one of two textures and crossfades from the one before over the time the frames take to come, at most `blend`, so the picture moves smoothly between slow seeks and stays sharp when they are quick. At rest the video is the DOM; under reduced motion it keeps its poster.