Spread the 6 scanlines evenly across the full height

Skipping the last two of the 8 candidate positions (at y=24, 28) left an
8px gap with nothing in it at the bottom of every 32-row cycle. Skipping
two interspersed positions instead (y=12, 28) spreads the resulting
slightly-larger gaps across the full height instead of clustering them
in one spot.
This commit is contained in:
poprhythm committed 2026-10-09 15:51:39 -04:00
1 parent ef38fabebb
commit 1b2c96a42e
1 file changed
+9 -5
+9 -5
View File
@@ -551,14 +551,18 @@ def _glitch_scanlines():
# the starting position, so the snap is invisible -- a standard # the starting position, so the snap is invisible -- a standard
# infinite-scrolling-texture trick -- while the translate distance # infinite-scrolling-texture trick -- while the translate distance
# never has to leave the small range already confirmed safe. # 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 tall = ART_SLOT + SCANLINE_PERIOD
lines = [] lines = []
for y in range(tall): for y in range(tall):
# SCANLINE_PERIOD=4 over ART_SLOT=32 gives 8 evenly-spaced lines if y % SCANLINE_PERIOD == 0 and (y % ART_SLOT) not in SCANLINE_SKIP:
# 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:
lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000080")) lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000080"))
else: else:
lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000000")) lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000000"))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.