diff --git a/manimlib/constants.py b/manimlib/constants.py index dd678a41..1e24533f 100644 --- a/manimlib/constants.py +++ b/manimlib/constants.py @@ -53,6 +53,13 @@ DEGREES = TAU / 360 FFMPEG_BIN = "ffmpeg" +JOINT_TYPE_MAP = { + "auto": 0, + "round": 1, + "bevel": 2, + "miter": 3, +} + # Related to Text NOT_SETTING_FONT_MSG = ''' Warning: diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.py index 4a9ca676..e94b9e7e 100644 --- a/manimlib/mobject/types/vectorized_mobject.py +++ b/manimlib/mobject/types/vectorized_mobject.py @@ -974,14 +974,8 @@ class VMobject(Mobject): return result def get_stroke_uniforms(self): - j_map = { - "auto": 0, - "round": 1, - "bevel": 2, - "miter": 3, - } result = super().get_shader_uniforms() - result["joint_type"] = j_map[self.joint_type] + result["joint_type"] = JOINT_TYPE_MAP[self.joint_type] result["flat_stroke"] = float(self.flat_stroke) return result