
    lj                    x    d dl mZ dgZd dlmZ d dlmZ d dlmZ d dl	m
Z
 ddlT d	d
lmZ  G d de          ZdS )    )annotations	Broadcast)Sequence)Any)Restore)Mobject   )*   )LaggedStartc                  6     e Zd ZdZedddddddfd fdZ xZS )r   a  Broadcast a mobject starting from an ``initial_width``, up to the actual size of the mobject.

    Parameters
    ----------
    mobject
        The mobject to be broadcast.
    focal_point
        The center of the broadcast, by default ORIGIN.
    n_mobs
        The number of mobjects that emerge from the focal point, by default 5.
    initial_opacity
        The starting stroke opacity of the mobjects emitted from the broadcast, by default 1.
    final_opacity
        The final stroke opacity of the mobjects emitted from the broadcast, by default 0.
    initial_width
        The initial width of the mobjects, by default 0.0.
    remover
        Whether the mobjects should be removed from the scene after the animation, by default True.
    lag_ratio
        The time between each iteration of the mobject, by default 0.2.
    run_time
        The total duration of the animation, by default 3.
    kwargs
        Additional arguments to be passed to :class:`~.LaggedStart`.

    Examples
    ---------

    .. manim:: BroadcastExample

        class BroadcastExample(Scene):
            def construct(self):
                mob = Circle(radius=4, color=TEAL_A)
                self.play(Broadcast(mob))
       r   r   g        Tg?   mobjectr   focal_pointSequence[float]n_mobsintinitial_opacityfloatfinal_opacityinitial_widthremoverbool	lag_ratiorun_timekwargsr   c
                   || _         || _        || _        || _        || _        g }t          |j                  }t          | j                  D ]}|                                }|r|	                    | j                   n|
                    | j                   |                    | j                    |                                 |                    | j                   |r|	                    | j                   n|
                    | j                   |                    t          ||                      t!                      j        ||	|d|
 d S )N)opacity)width)r   )r   r   )r   r   r   r   r   r   fill_opacityrangecopyset_opacity
set_strokemove_to
save_statesetappendr   super__init__)selfr   r   r   r   r   r   r   r   r   r   animsfill_o_mob	__class__s                  V/home/agentuser/manim-venv/lib/python3.11/site-packages/manim/animation/specialized.pyr+   zBroadcast.__init__4   s^    '.** g*++t{## 	8 	8A,,..C ; 23333t'9:::KK()))NNGG$,G--- = 45555t';<<<LLg6667777%(iRR6RRRRR    )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )__name__
__module____qualname____doc__ORIGINr+   __classcell__)r1   s   @r2   r   r      sr        " "N (.!" "+S +S +S +S +S +S +S +S +S +S +Sr3   N)
__future__r   __all__collections.abcr   typingr   manim.animation.transformr   manim.mobject.mobjectr   	constantscompositionr   r    r3   r2   <module>rC      s    " " " " " "- $ $ $ $ $ $       - - - - - - ) ) ) ) ) )     $ $ $ $ $ $PS PS PS PS PS PS PS PS PS PSr3   