manim
manim copied to clipboard
Improve FadeIn and FadeOut classes with error handling and type safety
Improved the FadeIn and FadeOut animation classes by adding error handling and type safety. Specifically, it introduces checks for the validity of mobjects, shift, target_position, and scale parameters, raising exceptions when incorrect types or values are provided. The creation of faded mobject copies is now validated to prevent unexpected runtime errors. Additionally, the scene cleanup process includes a try/except block around interpolate(0) to handle potential failures gracefully.