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 your setup

Install Diorama with Vite, Astro, Nuxt or Next.js, or add one script tag to a page without a build.

View as Markdown
On this page

Diorama is one package, @dioramajs/diorama, plus three.js as a peer. Most sites need only the start() call and the data-dio attribute in their markup. three.js 0.187 is required.

Choose a path

Your sitePageWhat you add
Vite, with or without a frameworkInstall with ViteA Vite plugin and start()
AstroInstall with AstroAn integration and start() in the layout
NuxtInstall with NuxtA module and a client plugin
Next.jsInstall with Next.jswithDiorama and a client component
Plain HTML, Webflow, TildaUse without a build stepOne script tag

Every path ends with the same result: images with data-dio draw through the engine, and elements with the same data-dio-key fly from one page to the next.

What comes with start()

start() registers the image effects image, ripple and bend, page transitions and asset loading. With a build plugin it also registers every effect file in your effects folder. It returns the app at once and finishes starting in the background. A second call returns the same app.

Next steps

After the install, write your first effect and add a page transition.