A community-maintained Python framework for creating mathematical animations.
Change default lag_ratio to something very small
Grant Sanderson776f2707a5a9
diff --git a/manimlib/animation/animation.py b/manimlib/animation/animation.pyindex 1052937cb..25840b02d 100644--- a/manimlib/animation/animation.py+++ b/manimlib/animation/animation.py@@ -2,12 +2,15 @@ from copy import deepcopyimport numpy as np-from manimlib.constants import DEFAULT_ANIMATION_RUN_TIMEfrom manimlib.mobject.mobject import Mobjectfrom manimlib.utils.config_ops import digest_configfrom manimlib.utils.rate_functions import smooth+DEFAULT_ANIMATION_RUN_TIME = 1.0+DEFAULT_ANIMATION_LAG_RATIO = 0.005++class Animation(object):CONFIG = {"run_time": DEFAULT_ANIMATION_RUN_TIME,@@ -20,7 +23,7 @@ class Animation(object):# If 1, it is applied to each successively.# If 0 < lag_ratio < 1, its applied to each# with lagged start times- "lag_ratio": 0,+ "lag_ratio": DEFAULT_ANIMATION_LAG_RATIO,"suspend_mobject_updating": True,}@@ -132,10 +135,7 @@ class Animation(object):full_length = (num_submobjects - 1) * lag_ratio + 1value = alpha * full_lengthlower = index * lag_ratio- return np.clip(- (value - lower),- 0, 1,- )+ return np.clip((value - lower), 0, 1)# Getters and settersdef set_run_time(self, run_time):diff --git a/manimlib/constants.py b/manimlib/constants.pyindex 20fae7fd1..85fcbb850 100644--- a/manimlib/constants.py+++ b/manimlib/constants.py@@ -131,7 +131,6 @@ DEFAULT_MOBJECT_TO_MOBJECT_BUFFER = MED_SMALL_BUFF# All in seconds-DEFAULT_ANIMATION_RUN_TIME = 1.0DEFAULT_POINTWISE_FUNCTION_RUN_TIME = 3.0DEFAULT_WAIT_TIME = 1.0