"""What the upright clips for Shorts and Reels share: the frame, a hook in the top third, a label low down, and the same six-second end card on the song's last hit.""" from cut import Logo, Type from looks import LOGO SIZE = (1080, 1920) PUNCH, SHAKE, ABERRATE = 0.016, 4.0, 1.6 CARD = (159.0, 165.0) def hook(lines, at, end, size=96, y=0.13, how="slam"): """Up to three short lines, stacked from y down.""" return [Type(text, at, end, size, y=y + i * size * 1.05 / 1920, how=how) for i, text in enumerate(lines)] def label(text, at, end, size=104, y=0.74): return Type(text, at, end, size, y=y, how="slam") def card(): a, b = CARD return [Logo(LOGO, a, b, 940, 0.4), Type("WISHLIST ON STEAM", a + 0.6, b, 84, y=0.6, how="rise"), Type("CO-OP FOR 1 TO 16 PLAYERS", a + 1.0, b, 54, y=0.66, how="rise", colour=(226, 240, 200))] def BLACK(t): """In from black over a quarter second, out over the last second.""" return 0.0 if t < CARD[1] - 1.0 else min(1.0, (t - CARD[1] + 1.0) / 0.9)