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

effect function

Short form of `defineEffect`: defaults, optional options, setup.

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

An unnamed effect takes its registry key (the file name when a build plugin finds it).

export default effect({ strength: 1 }, ({ surface, u }) => { ... })
function effect(setup: EffectSetup<Empty>): Effect<Empty>
function effect<P extends ParamSpec>(
  params: P & CheckSpec<P>,
  setup: EffectSetup<ColorsIn<P>>,
): Effect<WidenSpec<P>>
function effect<P extends ParamSpec>(
  params: P & CheckSpec<P>,
  options: EffectOptions<ColorsIn<P>>,
  setup: EffectSetup<ColorsIn<P>>,
): Effect<WidenSpec<P>>

Parameters

NameTypeDescription
setupEffectSetup<Empty>
NameTypeDescription
paramsP & CheckSpec<P>
setupEffectSetup<ColorsIn<P>>
NameTypeDescription
paramsP & CheckSpec<P>
optionsEffectOptions<ColorsIn<P>>
setupEffectSetup<ColorsIn<P>>

Also exported from @dioramajs/diorama/auto, @dioramajs/diorama/effects, @dioramajs/effects, @dioramajs/effects/effect.

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