mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 08:54:38 +08:00
Much pythagoras, plus better point thickness and display implementations
This commit is contained in:
@ -94,7 +94,7 @@ class OpenInterval(CompoundMobject):
|
||||
|
||||
class Piano(ImageMobject):
|
||||
DEFAULT_CONFIG = {
|
||||
"should_buffer_points" : False,
|
||||
"point_thickness" : 1,
|
||||
"invert" : False,
|
||||
"scale_value" : 0.5
|
||||
}
|
||||
@ -112,7 +112,7 @@ class Piano(ImageMobject):
|
||||
for count in range(14):
|
||||
key = Mobject(
|
||||
color = "white",
|
||||
should_buffer_points = False
|
||||
point_thickness = 1
|
||||
)
|
||||
x0 = left + count*self.ivory_jump
|
||||
x1 = x0 + self.ivory_jump
|
||||
@ -663,7 +663,7 @@ class ConstructPiano(Scene):
|
||||
askew = deepcopy(keys[-1])
|
||||
keys[-1].rotate_in_place(np.pi/5)
|
||||
for key in keys:
|
||||
key.should_buffer_points = False
|
||||
key.point_thickness = 1
|
||||
key_copy = deepcopy(key).to_corner(DOWN+LEFT)
|
||||
key_copy.scale_in_place(0.25)
|
||||
key_copy.shift(1.8*random.random()*SPACE_WIDTH*RIGHT)
|
||||
|
Reference in New Issue
Block a user