MCPcopy
hub / github.com/ManimCommunity/manim / shift

Method shift

manim/mobject/logo.py:284–293  ·  view source on GitHub ↗
(vector: Vector3D)

Source from the content-addressed store, hash-verified

282 left_group = VGroup(self.M, self.anim, m_clone)
283
284 def shift(vector: Vector3D) -> None:
285 self.shapes.restore()
286 left_group.align_to(self.M.saved_state, cst.LEFT)
287 if direction == "right":
288 self.shapes.shift(vector)
289 elif direction == "center":
290 self.shapes.shift(vector / 2)
291 left_group.shift(-vector / 2)
292 elif direction == "left":
293 left_group.shift(-vector)
294
295 def slide_and_uncover(mob: Mobject, alpha: float) -> None:
296 shift(alpha * (m_shape_offset + shape_sliding_overshoot) * cst.RIGHT)

Callers 1

__init__Method · 0.45

Calls 2

restoreMethod · 0.45
align_toMethod · 0.45

Tested by

no test coverage detected