-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
220 lines (204 loc) · 9.89 KB
/
index.html
File metadata and controls
220 lines (204 loc) · 9.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glowing Polyhedra - Geodesic Cover Viewer</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap"
rel="stylesheet">
</head>
<body>
<!-- Scanline overlay -->
<div class="scanlines"></div>
<!-- Header -->
<header class="header">
<h1 class="title">
<span class="glow-text">GLOWING</span>
<span class="glow-text secondary">POLYHEDRONS</span>
</h1>
<p class="subtitle">LED Filament Object Visualization</p>
<div class="header-actions">
<button id="help-btn" class="icon-button" title="Help / Usage">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
<line x1="12" y1="17" x2="12.01" y2="17"></line>
</svg>
</button>
<a href="https://github.com/cpldcpu/GlowPoly" target="_blank" class="github-link">
<svg width="28" height="28" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
</svg>
GitHub
</a>
</div>
</header>
<!-- ... existing content ... -->
<!-- Help Modal -->
<div id="help-modal" class="modal-overlay">
<div class="modal-content help-modal-content">
<div class="modal-header">
<h2>USAGE GUIDE</h2>
<button class="modal-close" id="help-close">×</button>
</div>
<div class="help-sections">
<div class="help-section">
<h3>Interaction</h3>
<ul>
<li><strong>Rotate:</strong> Left click + drag</li>
<li><strong>Pan:</strong> Right click + drag</li>
<li><strong>Zoom:</strong> Mouse wheel / Scroll</li>
</ul>
</div>
<div class="help-section">
<h3>Model Selection</h3>
<ul>
<li><strong>Filter by Taps:</strong> Select [2] [4] [6] [8+] to filter by connection points</li>
<li><strong>Solution Type:</strong> Toggle [G]eodesic, [C]yclic, [B]idirectional, or [None]</li>
<li><strong>Select:</strong> Choose polyhedron from dropdown</li>
</ul>
</div>
<div class="help-section">
<h3>Controls</h3>
<ul>
<li><strong>Auto Rotate:</strong> Toggle automatic rotation</li>
<li><strong>Vertex Numbers:</strong> Show/hide index numbers</li>
<li><strong>Show Paths:</strong> Toggle wireframe visibility</li>
<li><strong>Flow Brightness:</strong> Scale brightness by flow weight</li>
<li><strong>Animate Flow:</strong> Visualize path direction</li>
</ul>
</div>
<div class="help-section">
<h3>Flow Analysis</h3>
<p>Click "Flow Analysis" to see detailed edge metrics. The "Pair Weights" section shows the
driving current required for each pair to achieve balanced flow.</p>
</div>
</div>
</div>
</div>
<!-- Flow Analysis Modal (existing) -->
<!-- Main container -->
<div class="main-container">
<!-- Control Panel -->
<aside class="control-panel">
<div class="panel-section">
<label class="panel-label" for="poly-select">SELECT MODEL</label>
<select id="poly-select" class="cyber-select">
<option value="">Loading...</option>
</select>
<div class="filter-group">
<span class="filter-label">Filter by taps:</span>
<div class="filter-buttons">
<label class="filter-btn"><input type="checkbox" id="filter-1" checked><span>2</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-2" checked><span>4</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-3"><span>6</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-4"><span>8+</span></label>
</div>
</div>
<div class="filter-group">
<span class="filter-label">Solution type:</span>
<div class="filter-buttons">
<label class="filter-btn"><input type="checkbox" id="filter-g" checked><span>G</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-c" checked><span>C</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-b" checked><span>B</span></label>
<label class="filter-btn"><input type="checkbox" id="filter-none"><span>None</span></label>
</div>
</div>
</div>
<div class="panel-section">
<h3 class="panel-title">STATISTICS</h3>
<div class="stats-grid">
<div class="stat-item">
<span class="stat-label">Vertices</span>
<span class="stat-value" id="stat-vertices">-</span>
</div>
<div class="stat-item">
<span class="stat-label">Edges</span>
<span class="stat-value" id="stat-edges">-</span>
</div>
<div class="stat-item">
<span class="stat-label">Taps</span>
<span class="stat-value" id="stat-taps">-</span>
</div>
<div class="stat-item">
<span class="stat-label">Path Length</span>
<span class="stat-value" id="stat-L">-</span>
</div>
</div>
</div>
<div class="panel-section">
<button id="flow-analysis-btn" class="cyber-button">Flow Analysis</button>
</div>
<div class="panel-section">
<h3 class="panel-title">PAIR WEIGHTS</h3>
<div class="pair-weights" id="pair-weights">
<p class="no-data">-</p>
</div>
</div>
<div class="panel-section">
<h3 class="panel-title">CONTROLS</h3>
<div class="controls">
<label class="toggle-label">
<input type="checkbox" id="auto-rotate" checked>
<span class="toggle-text">Auto Rotate</span>
</label>
<label class="toggle-label">
<input type="checkbox" id="show-labels">
<span class="toggle-text">Vertex Numbers</span>
</label>
<label class="toggle-label">
<input type="checkbox" id="show-paths" checked>
<span class="toggle-text">Show Paths</span>
</label>
<label class="toggle-label">
<input type="checkbox" id="flow-brightness">
<span class="toggle-text">Flow Brightness</span>
</label>
<label class="toggle-label">
<input type="checkbox" id="animate-flow">
<span class="toggle-text">Animate Flow</span>
</label>
</div>
</div>
</aside>
<!-- 3D Canvas -->
<main class="canvas-container">
<canvas id="webgl-canvas"></canvas>
<div class="loading-overlay" id="loading">
<div class="loader"></div>
<p>Initializing...</p>
</div>
</main>
</div>
<!-- Legend -->
<div class="legend" id="legend">
<!-- Populated dynamically -->
</div>
<!-- Flow Analysis Modal -->
<div class="modal-overlay" id="flow-modal">
<div class="modal-content">
<div class="modal-header">
<h2>FLOW ANALYSIS</h2>
<button class="modal-close" id="modal-close">×</button>
</div>
<div class="modal-body">
<div class="flow-stats" id="flow-stats">
<p class="no-data">Select a model with solution</p>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
}
}
</script>
<script type="module" src="app.js"></script>
</body>
</html>