ufosc / manim-data-structures

A Manim plugin that contains common data structures to create Manimations.
https://manim-data-structures.readthedocs.io
MIT License
6 stars 40 forks source link

Support .animate syntax for MArray mutators #2

Open Nikhil-42 opened 1 year ago

Nikhil-42 commented 1 year ago

Description

Remove explicit Animation construction in mutators or move the animation code to a method decorator to support .animate syntax.

Nikhil-42 commented 1 year ago

Here is an example of a typical refactor:

  1. Remove animation parameters from method signature.
  2. Return a self-reference (for method chaining).
  3. Extract mutation logic from animation function.
  4. Remove animations, references to self.__scene, internal functions, etc.

image