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

EffectsOptions interface

Options of the `effects` preset.

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

Members

NameTypeDescription
readonly effectsEffectEntries

Effects, loaders or entries by name. The key is the token in markup.

readonly enabledboolean | 'auto'

'auto' (default) is off under Save-Data and unavailable without WebGPU or WebGL 2. true ignores Save-Data but not a missing GPU: the page stays plain, as with 'auto'. false is off.

readonly extendreadonly (() => PluginEntry | readonly PluginEntry[] | Promise<PluginEntry | readonly PluginEntry[]>)[]

Plugins that need three (e.g. postfx, quality). Each is used after render in its own transaction: () => import('@dioramajs/quality').then((m) => m.quality()).

readonly load'near' | 'eager' | 'manual'

'near' (default) boots when the first effect element nears the viewport, 'eager' at app:start, 'manual' only on load().

readonly marginstring

IntersectionObserver rootMargin that starts loading. Default '100% 0px', one viewport ahead.

readonly markupboolean

Read data-dio markup. Default true.

readonly prefetchboolean

Downloads the engine in idle time after window load. Default true, never under Save-Data.

readonly renderPartial<RenderOptions>

Options for render when effects adds it. Ignored with a warning if the app already has render.

readonly rootstring | ParentNode | undefined

Scanned subtree, default document.documentElement. A selector is re-resolved: the observer watches the document and filters candidates with el.closest(root).

Also exported from @dioramajs/effects.

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