mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-05 14:55:08 +00:00
Vegas bakes each plugin's pictures into one strip, so a card already on its way across the panel keeps what it showed when it was drawn. This adds the API and bookkeeping for content that can be updated in place; the worker that redraws and swaps it follows separately. No shipped plugin implements the hook yet, so nothing changes for users. Plugin API (core 3.8.0), all no-ops by default: - BasePlugin.get_vegas_elements() -> [VegasElement(key, image, version, live, refresh_hz)]: named, fixed-width pieces of Vegas content. - BasePlugin.redraw_vegas_element(key, width, height, at): a lock-free redraw for content that changes with time. - BasePlugin.notify_vegas_data_changed(): data that lands outside update(). - src/plugin_system/vegas_elements.py (VegasElement, re-exported from base_plugin). Core: - PluginAdapter asks a plugin that implements the hook for elements on the background fetch only (under its lock, on its own canvas); every other path keeps get_vegas_content(). Live elements are pinned (padded with content_padding, never trimmed), tagged with their key, digest and data epoch in Image.info so the existing cache and group plumbing carry them unchanged, and untagged if a width budget crops them. - RenderPipeline records where each live element lands (ElementRecord), in absolute strip columns a trim does not move; the block-start arithmetic is shared with the STATIC markers. - PluginManager update listeners (add/remove_update_listener, notify_data_changed): told the moment update() completes, not at the next ~4s Vegas poll. The coordinator uses one to move each plugin's data epoch on. - vegas_scroll.live_refresh (kill switch), live_max_hz, live_min_interval, live_lead_screens; per-plugin core-owned vegas_live. Live elements are off under multi-display sync, in swap mode and with offscreen_prefetch off. - scripts/check_plugin.py checks the element contract (src/plugin_system/testing/vegas.py); test/fixtures/plugins/vegas-live-stub is a working example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
1.1 KiB
JSON
40 lines
1.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Enable the stub (test fixture only)."
|
|
},
|
|
"cards": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 32,
|
|
"default": 6,
|
|
"description": "How many keyed cards to return."
|
|
},
|
|
"card_width": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 512,
|
|
"default": 0,
|
|
"description": "Card width in px; 0 sizes cards from the render width."
|
|
},
|
|
"map_hz": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 30,
|
|
"default": 4,
|
|
"description": "refresh_hz of the full-width animated element; 0 leaves it out."
|
|
},
|
|
"dot_speed": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 200,
|
|
"default": 20,
|
|
"description": "How fast the animated element's dot moves, in px per second."
|
|
}
|
|
}
|
|
}
|