Change default lag_ratio to something very small

This commit is contained in:
Grant Sanderson 2019-02-11 22:25:22 -08:00
parent ff53c57d9d
commit 776f2707a5
2 changed files with 6 additions and 7 deletions

View file

@ -2,12 +2,15 @@ from copy import deepcopy
import numpy as np
from manimlib.constants import DEFAULT_ANIMATION_RUN_TIME
from manimlib.mobject.mobject import Mobject
from manimlib.utils.config_ops import digest_config
from 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 + 1
value = alpha * full_length
lower = index * lag_ratio
return np.clip(
(value - lower),
0, 1,
)
return np.clip((value - lower), 0, 1)
# Getters and setters
def set_run_time(self, run_time):

View file

@ -131,7 +131,6 @@ DEFAULT_MOBJECT_TO_MOBJECT_BUFFER = MED_SMALL_BUFF
# All in seconds
DEFAULT_ANIMATION_RUN_TIME = 1.0
DEFAULT_POINTWISE_FUNCTION_RUN_TIME = 3.0
DEFAULT_WAIT_TIME = 1.0