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

LenisLike interface

The part of Lenis 1.3 the adapter uses.

View as Markdown
import type { LenisLike } from '@dioramajs/diorama/lenis'
interface LenisLike

Members

NameTypeDescription
readonly actualScrollnumber

Native scroll position, px.

readonly animatedScrollnumber

Smoothed scroll position, px.

destroy() => void

Removes Lenis from the page.

readonly isHorizontalboolean

Whether Lenis scrolls horizontally.

readonly isScrollingboolean | 'native' | 'smooth'

Whether and how Lenis is scrolling.

readonly limitnumber

Maximum scroll, px.

readonly options{ autoRaf?: boolean; readonly infinite?: boolean; readonly wrapper?: Window | Element }

Lenis options the adapter reads.

raf(time: number) => void

Advances Lenis to time, ms.

scrollTo(...args: never[]) => void

Scrolls to a target.

timenumber

Lenis time, ms. The pump writes it to keep Lenis on the driver's clock.

on
on(event: 'scroll' | 'virtual-scroll', callback: () => void): () => void

Listens to a Lenis event. Returns the unsubscribe function.

Also exported from @dioramajs/lenis.

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