mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 22:17:46 +00:00
Move joint type map to constants
This commit is contained in:
parent
8d14b66583
commit
bf73938fd1
2 changed files with 8 additions and 7 deletions
|
|
@ -53,6 +53,13 @@ DEGREES = TAU / 360
|
||||||
|
|
||||||
FFMPEG_BIN = "ffmpeg"
|
FFMPEG_BIN = "ffmpeg"
|
||||||
|
|
||||||
|
JOINT_TYPE_MAP = {
|
||||||
|
"auto": 0,
|
||||||
|
"round": 1,
|
||||||
|
"bevel": 2,
|
||||||
|
"miter": 3,
|
||||||
|
}
|
||||||
|
|
||||||
# Related to Text
|
# Related to Text
|
||||||
NOT_SETTING_FONT_MSG = '''
|
NOT_SETTING_FONT_MSG = '''
|
||||||
Warning:
|
Warning:
|
||||||
|
|
|
||||||
|
|
@ -974,14 +974,8 @@ class VMobject(Mobject):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def get_stroke_uniforms(self):
|
def get_stroke_uniforms(self):
|
||||||
j_map = {
|
|
||||||
"auto": 0,
|
|
||||||
"round": 1,
|
|
||||||
"bevel": 2,
|
|
||||||
"miter": 3,
|
|
||||||
}
|
|
||||||
result = super().get_shader_uniforms()
|
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)
|
result["flat_stroke"] = float(self.flat_stroke)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue