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

Method set_coord

manim/mobject/mobject.py:1855–1860  ·  view source on GitHub ↗
(self, value, dim: int, direction: Vector3DLike = ORIGIN)

Source from the content-addressed store, hash-verified

1853 return self.rescale_to_fit(depth, 2, stretch=True, **kwargs)
1854
1855 def set_coord(self, value, dim: int, direction: Vector3DLike = ORIGIN) -> Self:
1856 curr = self.get_coord(dim, direction)
1857 shift_vect = np.zeros(self.dim)
1858 shift_vect[dim] = value - curr
1859 self.shift(shift_vect)
1860 return self
1861
1862 def set_x(self, x: float, direction: Vector3DLike = ORIGIN) -> Self:
1863 """Set x value of the center of the :class:`~.Mobject` (``int`` or ``float``)"""

Callers 5

set_xMethod · 0.95
set_yMethod · 0.95
set_zMethod · 0.95
match_coordMethod · 0.95
align_toMethod · 0.95

Calls 2

get_coordMethod · 0.95
shiftMethod · 0.95

Tested by

no test coverage detected