Re-enable the RGB-split glitch bands alongside the base jitter

Restores _glitch_band into _glitch_jitter's Sequence states (the
function and its supporting GLITCH_STATE_POOL/_glitch_states_for_cycle
were already in the file, just unused since bands were disabled a few
commits back during the jitter debugging work). Each state is now a
Stack of the base-art shift plus two tinted, shifted bands, matching the
original combined design from before bands were turned off -- just
built on the current, fixed jitter architecture (_glitch_hold-wrapped
Sequence states, operating on the static _glitch_rest_art).

Verified: 0 black-corner hits across 222 frames, 320KB typical / 314KB
worst-case (strong zoom + random position) payload, both comfortably
under the 460KB device limit.
This commit is contained in:
poprhythm committed 2026-10-09 16:59:30 -04:00
1 parent 385e20785c
commit eee2125421
1 file changed
+17 -12
+17 -12
View File
@@ -548,25 +548,30 @@ def _glitch_jitter(zoom):
children = []
for cycle_index in range(GLITCH_REPEATS):
for _ in range(GLITCH_STATES_PER_CYCLE):
for top1, h1, shift1, hue1, top2, h2, shift2, hue2 in _glitch_states_for_cycle(cycle_index):
# Capped to +-1px -- a full-frame shift reads very differently
# than a thin band shifting, so it stays subtle. Randomized
# rather than a fixed alternating +1/-1 (too mechanically
# regular) or derived from shift1/shift2 (several
# rather than derived from shift1/shift2 (several
# GLITCH_STATE_POOL entries have those nearly or exactly
# cancel out, e.g. -2 and 2, which silently zeroed out the
# jitter in about half the states when this was tried before).
#
# A filter.Hue tint was also tried, to make this more visible
# without a bigger (riskier) shift -- reverted, it tinted
# _glitch_shift's own blank margin along with the real art in
# both orderings tried, either as a visible color strip on
# whichever edge got padded, or (once the margin was kept
# genuinely untinted) as a real black border. Plain shift,
# no color tint -- confirmed 0 black-corner hits.
# A filter.Hue tint on the base jitter itself (not the bands
# below, which already carry their own) was also tried, to
# make the shift more visible without a bigger (riskier)
# shift -- reverted, it tinted _glitch_shift's own blank
# margin along with the real art in both orderings tried,
# either as a visible color strip on whichever edge got
# padded, or (once the margin was kept genuinely untinted) as
# a real black border. Plain shift, no extra color tint on
# the base jitter -- confirmed 0 black-corner hits.
shift = random.number(0, 2) - 1 # random.number requires min >= 0
shifted = render.Box(width = ART_SLOT, height = ART_SLOT, child = _glitch_shift(zoom, shift))
children.append(_glitch_hold(shifted, GLITCH_HOLD_TICKS))
state = render.Stack(children = [
render.Box(width = ART_SLOT, height = ART_SLOT, child = _glitch_shift(zoom, shift)),
_glitch_band(zoom, top1, h1, shift1, hue1),
_glitch_band(zoom, top2, h2, shift2, hue2),
])
children.append(_glitch_hold(state, GLITCH_HOLD_TICKS))
children.append(pause)
return render.Sequence(children = children)
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.