Files
spore-ledlab/public/index.html
2025-10-12 17:02:47 +02:00

250 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SPORE LEDLab</title>
<link rel="stylesheet" href="styles/main.css">
</head>
<body>
<div class="container">
<!-- Main Navigation -->
<div class="main-navigation">
<div class="nav-left">
<button class="nav-tab active" data-view="stream">📺 Stream</button>
<button class="nav-tab" data-view="editor">🎨 Editor</button>
<button class="nav-tab" data-view="settings">⚙️ Settings</button>
</div>
<div class="nav-right">
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"/>
<path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
</svg>
</button>
</div>
</div>
<!-- Stream View -->
<div id="stream-view" class="view-content active">
<main class="ledlab-main">
<!-- Full Width Matrix Grid Section -->
<section class="matrix-grid-section">
<div class="node-canvas-grid" id="node-canvas-grid">
<div class="loading">Discovering nodes...</div>
</div>
</section>
<!-- Floating Control Panel (appears when node is selected) -->
<aside class="floating-controls" id="floating-controls" style="display: none;">
<div class="floating-controls-header">
<h3 class="control-title">
<span class="node-indicator"></span>
<span id="selected-node-name">No node selected</span>
</h3>
<button class="btn-close" id="close-controls-btn"></button>
</div>
<div class="floating-controls-content">
<!-- Global Controls -->
<div class="control-group">
<h4 class="control-group-subtitle">Global Settings</h4>
<div class="preset-control">
<label class="preset-label">Frame Rate (FPS)</label>
<div style="display: flex; align-items: center; gap: 0.5rem;">
<input type="range" class="preset-slider" id="fps-slider" min="1" max="60" step="1" value="20">
<span class="preset-value" id="fps-value">20</span>
</div>
</div>
</div>
<!-- Preset Selection -->
<div class="control-group">
<h4 class="control-group-subtitle">Animation Preset</h4>
<select class="preset-select" id="preset-select">
<option value="">Select a preset...</option>
</select>
<div class="preset-controls" id="preset-controls">
<!-- Dynamic controls will be inserted here -->
</div>
<button class="btn btn-primary" id="toggle-stream-btn" data-streaming="false">
<span class="btn-icon"></span>
<span class="btn-text">Start Streaming</span>
</button>
</div>
</div>
<!-- Hidden Matrix Configuration -->
<div style="display: none;">
<input type="number" id="matrix-width" min="1" max="32" value="16">
<input type="number" id="matrix-height" min="1" max="32" value="16">
<button id="apply-matrix-btn">Apply</button>
</div>
</aside>
</main>
</div>
<!-- Editor View -->
<div id="editor-view" class="view-content">
<div class="editor-container-modern">
<div class="editor-layout-modern">
<!-- Left Panel: Preset Info & Layers -->
<div class="editor-left-panel">
<!-- Preset -->
<div class="editor-section-compact editor-preset-section">
<div class="preset-header">
<h3 class="section-title-compact">Preset</h3>
<div class="preset-header-buttons">
<button class="btn btn-icon" id="editor-new-preset" title="New Preset">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14,2 14,8 20,8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
<polyline points="10,9 9,9 8,9"/>
</svg>
</button>
<button class="btn btn-icon" id="editor-save-preset" title="Save Preset">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/>
<polyline points="17,21 17,13 7,13 7,21"/>
<polyline points="7,3 7,8 15,8"/>
</svg>
</button>
<button class="btn btn-icon" id="editor-delete-preset" title="Delete Preset">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="3,6 5,6 21,6"/>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
<line x1="10" y1="11" x2="10" y2="17"/>
<line x1="14" y1="11" x2="14" y2="17"/>
</svg>
</button>
<button class="btn btn-icon" id="editor-export-json" title="Export JSON">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7,10 12,15 17,10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
</button>
<label class="btn btn-icon" title="Import JSON">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="17,8 12,3 7,8"/>
<line x1="12" y1="3" x2="12" y2="15"/>
</svg>
<input type="file" id="editor-import-json" accept=".json" style="display: none;" />
</label>
</div>
</div>
<!-- Preset Name -->
<div class="editor-input-wrapper">
<label>Name</label>
<input type="text" id="editor-preset-name" value="New Custom Preset" />
</div>
<!-- Preset Actions -->
<div class="preset-actions">
<div class="preset-actions-row">
<select class="preset-select" id="editor-load-preset">
<option value="">Load saved preset...</option>
</select>
</div>
</div>
</div>
<!-- Layers List -->
<div class="editor-section-compact editor-layers-section">
<div class="section-title-with-button">
<h3 class="section-title-compact">Layers</h3>
<button class="btn btn-primary btn-small" id="editor-add-layer"></button>
</div>
<div id="editor-layer-list" class="editor-layer-list-expandable">
<p class="editor-empty-state">No layers yet. Click "Add Layer" to get started!</p>
</div>
</div>
</div>
<!-- Right Panel: Preview & Controls -->
<div class="editor-right-panel">
<!-- Preview Controls Bar -->
<div class="editor-preview-bar">
<div class="preview-bar-controls">
<select id="editor-node-select" class="node-select-compact">
<option value="">Canvas Only</option>
</select>
<button class="btn-preview" id="editor-preview-toggle">
<span class="preview-icon">▶️</span>
<span class="preview-text">Start</span>
</button>
<span class="preview-status-compact" id="editor-preview-status">Ready</span>
</div>
<div class="preview-bar-info">
<span id="editor-canvas-size" class="info-badge">16×16</span>
<span id="editor-canvas-fps" class="info-badge">0 fps</span>
</div>
</div>
<!-- Canvas Preview -->
<div class="editor-preview-main">
<canvas id="editor-preview-canvas" class="editor-canvas-modern"></canvas>
</div>
</div>
</div>
</div>
</div>
<!-- Settings View -->
<div id="settings-view" class="view-content">
<div class="settings-section">
<h2>⚙️ Settings</h2>
<div class="settings-group">
<h3>Matrix Configuration</h3>
<div class="matrix-config">
<div class="matrix-input">
<label for="settings-matrix-width">Width</label>
<input type="number" id="settings-matrix-width" min="1" max="32" value="16">
</div>
<div class="matrix-input">
<label for="settings-matrix-height">Height</label>
<input type="number" id="settings-matrix-height" min="1" max="32" value="16">
</div>
<button class="btn btn-primary" id="settings-apply-matrix-btn">Apply Changes</button>
</div>
</div>
<div class="settings-group">
<h3>Test</h3>
<div class="btn-container">
<button class="btn btn-secondary" id="send-test-btn">Send Test Frame</button>
<button class="btn btn-secondary" id="clear-matrix-btn">Clear Matrix</button>
</div>
</div>
<div class="settings-group">
<h3>About</h3>
<p style="color: var(--text-secondary); line-height: 1.6;">
SPORE LEDLab is a powerful tool for streaming animations to LED matrices connected to SPORE nodes.
Create stunning visual effects with real-time parameter control and multi-node streaming capabilities.
</p>
</div>
</div>
</div>
</div>
<!-- Load JavaScript files -->
<script src="scripts/constants.js"></script>
<script src="scripts/theme-manager.js"></script>
<script src="scripts/framework.js"></script>
<script src="scripts/navigation.js"></script>
<script src="scripts/matrix-display.js"></script>
<script src="scripts/node-canvas-grid.js"></script>
<script src="scripts/preset-controls.js"></script>
<script src="scripts/canvas-renderer.js"></script>
<script src="scripts/preset-editor.js"></script>
<script src="scripts/ledlab-app.js"></script>
</body>
</html>