feat(demo): add HUD effect, resize handling, and tests

- Add HUD effect plugin showing FPS, effect name, intensity bar, pipeline
- Add pygame window resize handling (VIDEORESIZE event)
- Move HUD to end of chain so it renders on top
- Fix monitor stats API (returns dict, not object)
- Add tests/test_hud.py for HUD effect verification
This commit is contained in:
2026-03-16 01:25:08 -07:00
parent 0152e32115
commit e1408dcf16
4 changed files with 141 additions and 5 deletions

View File

@@ -376,7 +376,7 @@ def run_demo_mode():
registry = get_registry()
chain = get_effect_chain()
chain.set_order(["hud", "noise", "fade", "glitch", "firehose"])
chain.set_order(["noise", "fade", "glitch", "firehose", "hud"])
monitor = PerformanceMonitor()
set_monitor(monitor)
@@ -512,6 +512,13 @@ def run_demo_mode():
result = chain.process(buf, ctx)
display.show(result)
new_w, new_h = display.get_dimensions()
if new_w != w or new_h != h:
w, h = new_w, new_h
scroll_step_interval = calculate_scroll_step(config.SCROLL_DUR, h)
active = []
noise_cache = {}
frame_number += 1
time.sleep(1 / 60)