forked from genewildish/Mainline
feat(figment): complete pipeline integration with native effect plugin
- Add engine/effects/plugins/figment.py (native pipeline implementation) - Add engine/figment_render.py, engine/figment_trigger.py, engine/themes.py - Add 3 SVG assets in figments/ (Mexican/Aztec motif) - Add engine/display/backends/animation_report.py for debugging - Add engine/pipeline/adapters/frame_capture.py for frame capture - Add test-figment preset to presets.toml - Add cairosvg optional dependency to pyproject.toml - Update EffectPluginStage to support is_overlay attribute (for overlay effects) - Add comprehensive tests: test_figment_effect.py, test_figment_pipeline.py, test_figment_render.py - Remove obsolete test_ui_simple.py - Update TODO.md with test cleanup plan - Refactor test_adapters.py to use real components instead of mocks This completes the figment SVG overlay feature integration using the modern pipeline architecture, avoiding legacy effects_plugins. All tests pass (758 total).
This commit is contained in:
36
engine/figment_trigger.py
Normal file
36
engine/figment_trigger.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
Figment trigger protocol and command types.
|
||||
|
||||
Defines the extensible input abstraction for triggering figment displays
|
||||
from any control surface (ntfy, MQTT, serial, etc.).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import Protocol
|
||||
|
||||
|
||||
class FigmentAction(Enum):
|
||||
TRIGGER = "trigger"
|
||||
SET_INTENSITY = "set_intensity"
|
||||
SET_INTERVAL = "set_interval"
|
||||
SET_COLOR = "set_color"
|
||||
STOP = "stop"
|
||||
|
||||
|
||||
@dataclass
|
||||
class FigmentCommand:
|
||||
action: FigmentAction
|
||||
value: float | str | None = None
|
||||
|
||||
|
||||
class FigmentTrigger(Protocol):
|
||||
"""Protocol for figment trigger sources.
|
||||
|
||||
Any input source (ntfy, MQTT, serial) can implement this
|
||||
to trigger and control figment displays.
|
||||
"""
|
||||
|
||||
def poll(self) -> FigmentCommand | None: ...
|
||||
Reference in New Issue
Block a user