mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
position_endpoints_on -> put_start_and_end_on
This commit is contained in:
@ -535,7 +535,7 @@ class Mobject(Container):
|
|||||||
self.scale_in_place((length + buff) / length)
|
self.scale_in_place((length + buff) / length)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def position_endpoints_on(self, start, end):
|
def put_start_and_end_on(self, start, end):
|
||||||
curr_vect = self.points[-1] - self.points[0]
|
curr_vect = self.points[-1] - self.points[0]
|
||||||
if np.all(curr_vect == 0):
|
if np.all(curr_vect == 0):
|
||||||
raise Exception("Cannot position endpoints of closed loop")
|
raise Exception("Cannot position endpoints of closed loop")
|
||||||
|
@ -291,7 +291,7 @@ class TryManyPaths(PathSlidingScene):
|
|||||||
start = target_path.points[0]
|
start = target_path.points[0]
|
||||||
end = target_path.points[-1]
|
end = target_path.points[-1]
|
||||||
for path in paths:
|
for path in paths:
|
||||||
path.position_endpoints_on(start, end)
|
path.put_start_and_end_on(start, end)
|
||||||
|
|
||||||
|
|
||||||
class RollingRandolph(PathSlidingScene):
|
class RollingRandolph(PathSlidingScene):
|
||||||
@ -331,7 +331,7 @@ class NotTheCircle(PathSlidingScene):
|
|||||||
self.play(FadeOut(radius))
|
self.play(FadeOut(radius))
|
||||||
self.play(
|
self.play(
|
||||||
ApplyMethod(
|
ApplyMethod(
|
||||||
path.position_endpoints_on, start, end,
|
path.put_start_and_end_on, start, end,
|
||||||
path_func = path_along_arc(-angle)
|
path_func = path_along_arc(-angle)
|
||||||
),
|
),
|
||||||
run_time = 3
|
run_time = 3
|
||||||
|
Reference in New Issue
Block a user