U
    a¨+d[  ã                   @   s&   d dl Zd dlmZ eddd„ƒZdS )é    N)Úrequires_durationc                    s@   ˆdkrˆ j rdndddg‰t ˆ¡‰‡ ‡‡fdd„}ˆ  |¡S )aW  
    Makes the clip progressively fade to some color (black by default),
    over ``duration`` seconds at the end of the clip. Can be used for
    masks too, where the final color must be a number between 0 and 1.
    For cross-fading (progressive appearance or disappearance of a clip
    over another clip, see ``composition.crossfade``
    Nr   c                    sD   ˆ j | ˆkr| |ƒS dˆ j |  ˆ }|| |ƒ d| ˆ  S d S )Ng      ð?é   )Úduration)ZgfÚtZfading©Úclipr   Úfinal_color© ú</tmp/pip-unpacked-wheel-0yp4gafk/moviepy/video/fx/fadeout.pyÚfl   s    zfadeout.<locals>.fl)ZismaskÚnpÚarrayr   )r   r   r   r   r	   r   r
   Úfadeout   s
    

r   )N)Znumpyr   Zmoviepy.decoratorsr   r   r	   r	   r	   r
   Ú<module>   s   