Skip to content

defineEffect

defineEffect<H, O>(spec): EffectDefinition<H, O>

Defined in: renderer/src/effects/defineEffect.ts:36

Define a named effect preset. The returned callable accepts the preset’s options and yields an EffectFactory whose built effect carries the name used by EffectsHost.findEffect().

Names are conventionally prefixed (yage:hitFlash, yage:bloom, …); the @yagejs/effects package uses yage: for its hero presets.

H extends EffectHandle

O

(options) => Effect<H>

string

EffectDefinition<H, O>

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.