diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index 078efff..899edd4 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -551,14 +551,18 @@ def _glitch_scanlines(): # the starting position, so the snap is invisible -- a standard # infinite-scrolling-texture trick -- while the translate distance # never has to leave the small range already confirmed safe. + # SCANLINE_PERIOD=4 over ART_SLOT=32 gives 8 evenly-spaced candidate + # positions (0, 4, 8, ..., 28); skipping 2 of those 8 (rather than + # changing the period itself, which the sweep's periodicity depends + # on) to land on 6 visible lines. Skipping two *interspersed* + # positions instead of the last two in the run -- which left an 8px + # gap with nothing in it at the bottom of every cycle -- spreads the + # resulting two, slightly-larger gaps across the full height instead. + SCANLINE_SKIP = (12, 28) tall = ART_SLOT + SCANLINE_PERIOD lines = [] for y in range(tall): - # SCANLINE_PERIOD=4 over ART_SLOT=32 gives 8 evenly-spaced lines - # per window; skipping 2 of those 8 positions (dropping the last - # two in each 32-row repeat, rather than changing the period - # itself) keeps the period dividing evenly into things cleanly. - if y % SCANLINE_PERIOD == 0 and (y % ART_SLOT) < ART_SLOT - 2 * SCANLINE_PERIOD: + if y % SCANLINE_PERIOD == 0 and (y % ART_SLOT) not in SCANLINE_SKIP: lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000080")) else: lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000000"))