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

EffectInstance interface

Stable facade of an (element, name) pair.

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

The same object, with its runtime writes, survives park, dispose and re-creation for the same pair (Vue KeepAlive, cached nodes).

interface EffectInstance<P extends ParamSpec = ParamSpec>

Members

NameTypeDescription
readonly effectstring

The effect's name.

readonly elementElement

The element it runs on.

readonly errorunknown

Why it failed, when status is 'failed'.

readonly paramsLiveParams<P>

Reads give the resolved value. Writes go to this element's runtime layer, which beats attributes.

readonly statusReadonlySignal<InstanceStatus>

Where the instance is in its life.

loaded
loaded(): Promise<boolean>

Imports the definition only, without engine or setup. Resolves false if it cannot load.

reset
reset(param?: keyof P & string): void

Drops runtime writes (all, or one param) back to attributes, attach params or defaults.

set
set(values: Partial<ParamsOf<P>>): void

Writes several params at once, whole tuples included.

Also exported from @dioramajs/effects.

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