Skip to main content

Function: overrideAnimation()

overrideAnimation(methodName, className, animFunc): void

Defined in: src/animation/AnimationUtilities.ts:32

overrideAnimation - Register a custom animation for a mobject method

When using the .animate pattern, if a method has a registered override, the override animation will be used instead of the default interpolation.

Parameters​

methodName​

string

The name of the method to override

className​

string

The class name to scope the override to

animFunc​

AnimationOverrideFunc

The function that creates the override animation

Returns​

void

Example​

// Register a custom animation for clearContent
overrideAnimation('clearContent', 'MyMobject', (mobject, args) => {
return new Uncreate(mobject, args);
});