effect-motion
API Referenceeffect-motionNamespacesInstanceType aliases

InstanceOrEffect

type InstanceOrEffect<Tag, E, R> =

Type Alias: InstanceOrEffect<Tag, E, R>

type InstanceOrEffect<Tag, E, R> =
  | Instance<Tag>
| Effect.Effect<Instance<Tag>, E, R>;

Defined in: packages/motion/src/Instance.ts:104

An instance, or an un-yielded instantiate effect that produces one.

Type Parameters

Type ParameterDefault type
Tag extends EntityTagEntityTag
Enever
Rnever

Remarks

Animators accept both, so a scene can animate straight off an instantiate call without binding it to a variable first — the create step and the first animation read as one expression.

On this page