Add live LED strip preview via WebSocket on target cards

Stream real-time LED colors from running WLED targets to the browser via
binary WebSocket (RGB bytes, throttled to ~15 fps). Toggle button on
target card opens a compact canvas strip that renders each frame using
ImageData. Cached last frame is re-rendered after card reconciliation to
prevent flicker during auto-refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 17:47:40 +03:00
parent a6253e8d96
commit 053a56eed3
8 changed files with 234 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ import {
showTargetEditor, closeTargetEditorModal, forceCloseTargetEditorModal, saveTargetEditor,
startTargetProcessing, stopTargetProcessing,
startTargetOverlay, stopTargetOverlay, deleteTarget,
cloneTarget,
cloneTarget, toggleLedPreview,
} from './features/targets.js';
// Layer 5: color-strip sources
@@ -295,6 +295,7 @@ Object.assign(window, {
stopTargetOverlay,
deleteTarget,
cloneTarget,
toggleLedPreview,
// color-strip sources
showCSSEditor,