mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 01:27:50 +00:00
Change default lag_ratio to something very small
This commit is contained in:
parent
ff53c57d9d
commit
776f2707a5
2 changed files with 6 additions and 7 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue