| 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) |