Incrementally show a VMobject. Parameters ---------- mobject The VMobject to animate. Raises ------ :class:`TypeError` If ``mobject`` is not an instance of :class:`~.VMobject`. Examples -------- .. manim:: CreateScene class CreateScene(
| 138 | |
| 139 | |
| 140 | class Create(ShowPartial): |
| 141 | """Incrementally show a VMobject. |
| 142 | |
| 143 | Parameters |
| 144 | ---------- |
| 145 | mobject |
| 146 | The VMobject to animate. |
| 147 | |
| 148 | Raises |
| 149 | ------ |
| 150 | :class:`TypeError` |
| 151 | If ``mobject`` is not an instance of :class:`~.VMobject`. |
| 152 | |
| 153 | Examples |
| 154 | -------- |
| 155 | .. manim:: CreateScene |
| 156 | |
| 157 | class CreateScene(Scene): |
| 158 | def construct(self): |
| 159 | self.play(Create(Square())) |
| 160 | |
| 161 | See Also |
| 162 | -------- |
| 163 | :class:`~.ShowPassingFlash` |
| 164 | |
| 165 | """ |
| 166 | |
| 167 | def __init__( |
| 168 | self, |
| 169 | mobject: VMobject | OpenGLVMobject | OpenGLSurface, |
| 170 | lag_ratio: float = 1.0, |
| 171 | introducer: bool = True, |
| 172 | **kwargs, |
| 173 | ) -> None: |
| 174 | super().__init__(mobject, lag_ratio=lag_ratio, introducer=introducer, **kwargs) |
| 175 | |
| 176 | def _get_bounds(self, alpha: float) -> tuple[float, float]: |
| 177 | return (0, alpha) |
| 178 | |
| 179 | |
| 180 | class Uncreate(Create): |
no outgoing calls