
# Perform the Effect, assume clip1 & clip2 are supplied
black = BlankClip(width=clip1.Width,height=clip1.Height,color=color_black,length=clip1.FrameCount, fps=clip1.FrameRate)
white = BlankClip(width=clip1.Width,height=clip1.Height,color=color_white,length=clip1.FrameCount, fps=clip1.FrameRate)

# Left->Right -Use MOVE mode for speed
tmask = LineAnim(black, white, x_start=-clip1.Width/2, x_end=clip1.Width/2)

clipx = clip1.SWScale(colorspace="RGB32")
clipy = clip2.SWScale(colorspace="RGB32")

slide1 = LineAnim(black, clipx, x_end=clip1.Width-1, w_end=2) # Trick, AVS has a minor fault on subpixel resizing
slide2 = LineAnim(black, clipy, x_start=-clip1.Width/2, x_end=clip1.Width/2)

# clip1.FrameCount the 2 slide
trans = Overlay(slide1, slide2, mask=tmask).SWScale(colorspace="YV12")
