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

optics function

The lens for a radius on screen, a magnification and a thickness: the height over the page that gives `zoom` at the centre, and the glass sized so its rim looks `radius` px from there.

View as Markdown
import { optics } from '@dioramajs/text/lens'

.

function optics(
  radius: number,
  zoom: number,
  thickness: number,
  distance: number,
): Optics

Parameters

NameTypeDescription
radiusnumber
zoomnumber
thicknessnumber
distancenumber

Defined in packages/text/src/lens.ts.