231 lines
12 KiB
HTML
231 lines
12 KiB
HTML
<!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 Info -->
|
||
<div class="editor-section-compact">
|
||
<h3 class="section-title-compact">Preset Info</h3>
|
||
<div class="editor-input-wrapper">
|
||
<label>Name</label>
|
||
<input type="text" id="editor-preset-name" value="New Custom Preset" />
|
||
</div>
|
||
<div class="editor-input-wrapper">
|
||
<label>Description</label>
|
||
<textarea id="editor-preset-desc" rows="3">A custom configurable preset</textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Add Layer Section -->
|
||
<div class="editor-section-compact">
|
||
<h3 class="section-title-compact">Add Layer</h3>
|
||
<div class="editor-input-wrapper">
|
||
<label>Layer Type</label>
|
||
<select id="editor-layer-type">
|
||
<option value="shape">Shape</option>
|
||
<option value="pattern">Pattern</option>
|
||
</select>
|
||
</div>
|
||
<button class="btn btn-primary btn-full-width" id="editor-add-layer">➕ Add Layer</button>
|
||
</div>
|
||
|
||
<!-- Layers List -->
|
||
<div class="editor-section-compact editor-layers-section">
|
||
<h3 class="section-title-compact">Layers</h3>
|
||
<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>
|
||
|
||
<!-- Manage Section -->
|
||
<div class="editor-section-compact">
|
||
<h3 class="section-title-compact">Manage</h3>
|
||
<div class="editor-actions">
|
||
<button class="btn btn-primary" id="editor-new-preset">📄 New</button>
|
||
<button class="btn btn-success" id="editor-save-preset">💾 Save</button>
|
||
<button class="btn btn-danger" id="editor-delete-preset">🗑️ Delete</button>
|
||
</div>
|
||
<div class="editor-actions">
|
||
<select class="preset-select" id="editor-load-preset">
|
||
<option value="">Load saved preset...</option>
|
||
</select>
|
||
</div>
|
||
<div class="editor-actions">
|
||
<button class="btn btn-secondary" id="editor-export-json">📤 Export JSON</button>
|
||
<label class="btn btn-secondary" style="margin: 0; text-align: center;">
|
||
📥 Import JSON
|
||
<input type="file" id="editor-import-json" accept=".json" style="display: none;" />
|
||
</label>
|
||
</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>
|