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

SurfaceInput interface

Input of a colour transform.

View as Markdown
import type { SurfaceInput } from '@dioramajs/diorama/effects'

The final alpha is then multiplied by u.opacity and the clip mask.

interface SurfaceInput

Members

NameTypeDescription
readonly boxNode<'vec2'>

Box UV before transforms.

readonly radiusNode<'float'>

border-radius mask at box UV. sample() includes it; a transform drawing its own colour multiplies by it.

readonly uvNode<'vec2'>

Box UV after all uv transforms.

sample
sample(uv: Node<'vec2'>): Node<'vec4'>

The element's media at box UV with crop, contain and radius masks applied; vec4(0) without media.

Also exported from @dioramajs/effects.

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