Skip to content

Commit

Permalink
Remove wag method from Mobject (ManimCommunity#3539)
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco Manríquez Novoa <[email protected]>
  • Loading branch information
JasonGrace2282 and chopan050 authored Dec 22, 2023
1 parent dd327a3 commit 3037f0e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions manim/mobject/mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,20 +1337,6 @@ def R3_func(point):

return self.apply_function(R3_func)

def wag(
self, direction: Vector3 = RIGHT, axis: Vector3 = DOWN, wag_factor: float = 1.0
) -> Self:
for mob in self.family_members_with_points():
alphas = np.dot(mob.points, np.transpose(axis))
alphas -= min(alphas)
alphas /= max(alphas)
alphas = alphas**wag_factor
mob.points += np.dot(
alphas.reshape((len(alphas), 1)),
np.array(direction).reshape((1, mob.dim)),
)
return self

def reverse_points(self) -> Self:
for mob in self.family_members_with_points():
mob.apply_over_attr_arrays(lambda arr: np.array(list(reversed(arr))))
Expand Down

0 comments on commit 3037f0e

Please sign in to comment.