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

flags function

Reads a switch list param such as `close="esc backdrop swipe"`: the known names it holds, in any order, separated by spaces or commas.

View as Markdown
import { flags } from '@dioramajs/diorama/kit'

. 'all' or '*' turns on all of them, an empty string none. Unknown names are left out and returned, so the effect can note them once.

function flags<T extends string>(
  value: string,
  known: readonly T[],
): { readonly on: ReadonlySet<T>; readonly unknown: readonly string[] }

Parameters

NameTypeDescription
valuestring
knownreadonly T[]

Also exported from @dioramajs/effects/kit.

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