aninest-root / AnimatableTypes / Animation
Animation<Animating>
ts
type Animation<Animating> = AnimationWithoutChildren<Animating> & object & HasChildren<UnknownRoot, Animating>;
Defined in: Animate/AnimatableTypes.ts:154
The animation object. This is a recursive type, meaning that it can contain other animations.
Type declaration
children
ts
readonly children: { [P in keyof Animating]: Animating[P] extends UnknownRoot ? never : Animation<Animatable<Animating[P]>> };
Type Parameters
Animating
Animating
extends UnknownAnimatable
Example
ts
const anim: Animation<{a: Vec2}> = createAnimation({a: {x: 0, y: 0}})
// the anim object will look like this:
{
<private fields>
children: {
a: {
// holds the state of a, which is currently {x: 0, y: 0}
<private fields>
children: {}
}
}