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

EffectMeta interface

One effect in `meta.json`: what the definition says plus its `.doc.ts`.

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

Members

NameTypeDescription
readonly bleednumber

Extra px around the box for visibility.

readonly builtInboolean

start() registers it without options.

readonly categoryEffectCategory

The gallery group, from .doc.ts.

readonly children?readonly ChildDoc[]

Attributes and child elements the effect reads, from .doc.ts.

readonly cost{ readonly chunk: number; readonly data?: number; readonly gpu: string; readonly memory: string }

chunk: bytes min+gzip of the effect's lazy chunk, three external, data included; data: the bundled data part of it, if any.

readonly credits?string

Credits for bundled data, from .doc.ts.

readonly events?readonly EventDoc[]

DOM events the effect dispatches, from .doc.ts.

readonly examplesreadonly DocExample[]

Examples from .doc.ts.

readonly frames{ readonly note: string; readonly policy: 'function' | 'hover' | 'input' | 'update' | 'visible' | 'fps' }

The frame policy and a note for people. 'update': the update's answer decides.

readonly importstring

'@dioramajs/media/reveal', for app.attach(el, effect()).

readonly inputsreadonly string[]

Inputs the effect reads, from the probe: 'progress', 'presence', 'pointer', 'delta'…

readonly looksstring

What it looks like, two to four sentences.

readonly media?boolean

Needs the <img> or <video> as a texture.

readonly module'media' | 'text' | 'audio' | 'data' | 'backgrounds' | 'model'
| 3 more | 'globe' | 'particles' | 'blocks'

Module name.

readonly namestring

The token in data-dio.

readonly on?string

Selector of the elements the effect accepts.

readonly packagestring

npm package, '@dioramajs/media'.

readonly paramsreadonly ParamMeta[]

Every param in definition order.

readonly parts?readonly PartDoc[]

Shadow parts of the effect's own UI, from .doc.ts.

readonly presence{ readonly mode: 'fade' | 'custom'; readonly note: string }

How the copy enters and leaves pages.

readonly quality{ readonly min: QualityTier; readonly notes: { high?: string; low?: string; medium?: string } }

The lowest tier and what each tier changes.

readonly reducedMotion{ readonly mode: 'static' | 'off'; readonly note: string }

Behaviour under reduced motion.

readonly sourcestring

Path of the definition in the library repo, for a Source link.

readonly summarystring

One sentence for the lede and the gallery card.

readonly tags?readonly EffectCategory[]

Other groups it also shows in, from .doc.ts; never repeats category.

readonly targetstring

What to put it on, for people.

readonly touchstring

Behaviour on touch devices.

readonly when?string

Media query the page must match.

Also exported from @dioramajs/effects.

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