mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-21 16:37:21 +08:00
22 lines
516 B
Python
22 lines
516 B
Python
from moviepy import Clip, vfx
|
|
|
|
|
|
# FadeIn
|
|
def fadein_transition(clip: Clip, t: float) -> Clip:
|
|
return clip.with_effects([vfx.FadeIn(t)])
|
|
|
|
|
|
# FadeOut
|
|
def fadeout_transition(clip: Clip, t: float) -> Clip:
|
|
return clip.with_effects([vfx.FadeOut(t)])
|
|
|
|
|
|
# SlideIn
|
|
def slidein_transition(clip: Clip, t: float, side: str) -> Clip:
|
|
return clip.with_effects([vfx.SlideIn(t, side)])
|
|
|
|
|
|
# SlideOut
|
|
def slideout_transition(clip: Clip, t: float, side: str) -> Clip:
|
|
return clip.with_effects([vfx.SlideOut(t, side)])
|