mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Move joint type map to constants
This commit is contained in:
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user