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

EffectHandle interface

Calling the handle detaches it, like kernel handles.

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

scope.onDispose(handle) ties it to a scope.

EffectHandle(): void

Members

NameTypeDescription
readonly effectstring

The effect's name.

readonly instancesreadonly EffectInstance<P>[]

Live instances only, never disposed.

readonly paramsLiveParams<P>

Runtime layer for every covered instance, now and later. Accessor properties, so tweenable.

detach
detach(): void

Detaches every instance the handle covers. Same as calling it.

loaded
loaded(): Promise<boolean>

Loads the definition only, so every param gets its accessor and default. Use before tweens.

ready
ready(): Promise<void>

Settles when every current instance near the viewport has left waiting and loading.

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

Drops the handle's 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/diorama/auto, @dioramajs/diorama/effects, @dioramajs/effects.

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