Skip to content

Documentation / Animatable / createParentAnimation

createParentAnimation() ​

ts
function createParentAnimation<Animating>(children, timing): Animation<Animating>;

Defined in: Animate/Animatable.ts:182

Creates a parent animation from a dictionary of children which will function the same as though the parent and children were created at once.

Type Parameters ​

Animating ​

Animating extends Animatable<unknown>

Parameters ​

children ​

ParentAnimatable<Animating>

a dictionary of children animations and numbers. Note that LocalAnimatable objects are not allowed.

timing ​

Interp

The timing function which will only be applied to the numbers in the provided children dictionary.

Returns ​

Animation<Animating>

Example ​

ts
const a = createAnimation({x: 0, y: 0})
const b = createAnimation({x: 1, y: 0})
const anim = createParentAnimation({a, b, c: 1})