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

AnimatePolicy type

When an effect asks for frames beyond input and its update's answer: - 'input' (default): frames only on input (scroll, pointer, resize, param writes).

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

. - 'hover': also while hovered or hover decays. - 'visible': every frame while on screen. - a function: checked after update, true requests the next frame. The runtime also asks it between frames whether a burst in ctx.overlay still flies, which an update's answer cannot tell before the next frame (a click that starts a burst and hides its element). - { fps }: time frames at most fps a second while visible, 0 means none. Input frames run at full rate.

type AnimatePolicy<P extends ParamSpec> = 'input' | 'hover' | 'visible' | (ctx: EffectContext<P>) => boolean | { readonly fps: number | (ctx: EffectContext<P>) => number }

Also exported from @dioramajs/effects.

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