TransformMatchingAbstractBase#
Qualified name: manim.animation.transform\_matching\_parts.TransformMatchingAbstractBase
- class TransformMatchingAbstractBase(mobject=None, *args, use_override=True, **kwargs)[source]#
Bases:
AnimationGroupAbstract base class for transformations that keep track of matching parts.
Subclasses have to implement the two static methods
get_mobject_parts()andget_mobject_key().Basically, this transformation first maps all submobjects returned by the
get_mobject_partsmethod to certain keys by applying theget_mobject_keymethod. Then, submobjects with matching keys are transformed into each other.- Parameters
mobject – The starting
Mobject.target_mobject – The target
Mobject.transform_mismatches – Controls whether submobjects without a matching key are transformed into each other by using
Transform. Default:False.fade_transform_mismatches – Controls whether submobjects without a matching key are transformed into each other by using
FadeTransform. Default:False.key_map – Optional. A dictionary mapping keys belonging to some of the starting mobject’s submobjects (i.e., the return values of the
get_mobject_keymethod) to some keys belonging to the target mobject’s submobjects that should be transformed although the keys don’t match.kwargs – All further keyword arguments are passed to the submobject transformations.
Note
If neither
transform_mismatchesnorfade_transform_mismatchesare set toTrue, submobjects without matching keys in the starting mobject are faded out in the direction of the unmatched submobjects in the target mobject, and unmatched submobjects in the target mobject are faded in from the direction of the unmatched submobjects in the start mobject.Methods
Clean up the
Sceneafter finishing the animation.get_mobject_keyget_mobject_partsget_shape_map