-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
237 lines (224 loc) · 8.21 KB
/
index.html
File metadata and controls
237 lines (224 loc) · 8.21 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LaserGraph</title>
<link rel="stylesheet" href="https://playlaser.games/style.css">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="network-graph.css">
<link rel="stylesheet" href="score-tooltip.css">
<link rel="stylesheet" href="print.css">
<link rel="icon" type="image/x-icon" href="//playlaser.games/assets/quantonium%20PLT%20icon%20early%20access%20thick.svg">
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
</head>
<body>
<header id="noprint">
<div class="game-logo"><img src="https://playlaser.games/assets/logo wip 4 early access small.svg"
class="norender"><!--img
src="assets/Quantonium Games RGB laser transparent.svg"
onclick="window.location.href='https:\/\/quantonium.net'" class="header-right"
style="height: 50%; cursor: pointer;"-->
</div>
<!--used for spacing-->
<img src="https://playlaser.games/assets/logo wip 4 early access small.svg" class="norender">
</header>
<nav style="flex-direction: column;" class="noprint">
<div style="display: flex; flex-direction: row;"><button
onclick="window.location.href='https:\/\/playlaser.games'">
<h3>To playlaser.games</h3>
</button>
<!--button onclick="window.print()">
<h3>Print Page</h3>
</button-->
<button onclick="toggleUpload()">
<h3>Upload Dialog</h3>
</button>
</div>
</nav>
<p class="noprint">Player metrics visualization dashboard</p>
<!-- File Upload Area -->
<section class="file-upload-section" id="fileUpload" class="noprint">
<div class="error-message" id="errorMessage"></div>
<div class="upload-container" id="uploadContainer">
<div class="upload-area" id="uploadArea">
<div class="upload-content">
<svg class="upload-icon" width="48" height="48" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M14 2H6C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V8L14 2Z"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<polyline points="14,2 14,8 20,8" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
<h3>Upload Match Data</h3>
<p>Drag and drop your LJSON file here, or click to browse</p>
<button type="button" class="browse-btn" id="browseBtn">
<h3>Browse Files</h3>
</button>
</div>
<input type="file" id="fileInput" accept=".json,.ljson,application/json" style="display: none;">
</div>
<div class="file-info" id="fileInfo" style="display: none;">
<div class="file-details">
<span class="file-name" id="fileName"></span>
<span class="file-size" id="fileSize"></span>
</div>
<button type="button" class="remove-file-btn" id="removeFileBtn">×</button>
</div>
</div>
<div class="upload-actions">
<button type="button" class="load-sample-btn" id="loadSampleBtn">
<h3>Load Sample Data</h3>
</button>
<button type="button" class="process-btn" id="processBtn" disabled>
<h3>Process Data</h3>
</button>
</div>
</section>
<main id="statsView">
<div class="noprint" style="display: none">
<br>
<div id="playerTeamSelect">
<div>
<label for="teamSelect">Choose team: </label><select name="teamSelect" id="teamSelect">
<option value="">All Teams</option>
</select>
<label for="playerSelect">Choose player: </label><select name="playerSelect" id="playerSelect">
<option value="">All Players</option>
</select>
</div>
</div>
<br>
</div>
<div style="display: flex; flex-direction: row; justify-content: space-around;">
<h2 id="gameName">Match Name</h2>
<h5 id="gametype">Gametype</h5>
<br>
<h5 id="date"></h5>
<br>
<h5 id="timer"></h5>
</div>
<div>
<!--h2>Hit Timeline</h2-->
<div id="timelineChart"></div>
<div class="noprint" id="timelineRange">
<input type="range" min="0" max="100" value="0" id="timelineRangeSlider" style="display: none">
</div>
<div class="timeline-controls">
<div class="noprint">
<label for="startTime">Start:</label>
<input type="number" id="startTime" min="0" step="0.1" placeholder="0" style="width:60px;" />
<label for="endTime">End:</label>
<input type="number" id="endTime" min="0" step="0.1" placeholder="Auto" style="width:60px;" />
<button id="applyTimeRange">Apply</button>
<button id="resetTimeRange">Reset</button>
</div>
<p id="timelineRangeDisplay">Full
timeline</p>
<p id="timelineHitCount">0 Hits</p>
<button class="noprint" id="timelineRangeBtn">🔍View Detailed Analysis</button>
</div>
</div>
<div class="dashboard">
<div class="chart-container">
<!--match title and basic info-->
<h4>Scores at time: <span id="matchTime">00:00.000</span></h4>
<table>
<tr>
<thead id="scoreLegend" style="text-decoration: underline;">
<td>Player</td>
<td>Team</td>
<td>Score</td>
</thead>
</tr>
<tr>
<tbody id="playerScores"></tbody>
</tr>
</table>
</div>
<div class="chart-container">
<h2>Score Progression</h2>
<div id="scoreChart"></div>
</div>
<!-- Hexagon Radar Chart -->
<div class="chart-container">
<h2>Metrics</h2>
<div id="hexChart"></div>
<!-- Metrics Display -->
<div class="metrics-panel">
<div class="metrics-grid">
<div class="metric-card">
<h3>Trickshot</h3>
<span id="trickshotValue">-</span>
<h6>Bounces per hit / multiplier value</h6>
</div>
<div class="metric-card">
<h3>Stealth</h3>
<span id="stealthValue">-</span>
<h6>Average time between hits</h6>
</div>
<div class="metric-card">
<h3>Speed</h3>
<span id="speedValue">-</span>
<h6>Average distance between shot locations</h6>
</div>
<div class="metric-card">
<h3>RPM</h3>
<span id="rpmValue">-</span>
<h6>Rounds per minute</h6>
</div>
<div class="metric-card">
<h3>Range</h3>
<span id="rangeValue">-</span>
<h6>Average range value for hits</h6>
</div>
<div class="metric-card">
<h3>Accuracy</h3>
<span id="accuracyValue">-</span>
<h6>Shots hit / shots fired</h6>
</div>
</div>
</div>
</div>
<div class="chart-container network-chart-container">
<div class="chart-header">
<h2>Player Interaction Network</h2>
<button class="fullscreen-btn" onclick="toggleNetworkFullscreen()" title="View in fullscreen">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
<path d="M7 14H5v5h5v-2M5 10h2V5h5V3H5v7zM17 14h2v5h-5v-2M19 10h-2V5h-5V3h7v7z"
stroke="currentColor" stroke-width="2" fill="none" />
</svg>
</button>
</div>
<div id="nodeGraph"></div>
</div>
<div class="chart-container">
<h2>Target Distribution</h2>
<div id="targetChart"></div>
</div>
</div>
</main>
<script src="dataProcessor.js"></script>
<script src="visualizations/visualizations.js"></script>
<script src="visualizations/hexChart.js"></script>
<script src="visualizations/hitTimeline.js"></script>
<script src="visualizations/networkGraph.js"></script>
<script src="visualizations/scoreProgression.js"></script>
<script src="visualizations/targetDistribution.js"></script>
<script src="visualizations/playerScores.js"></script>
<script src="app.js"></script>
<!-- Fullscreen Network Graph Modal -->
<div id="networkFullscreenModal" class="fullscreen-modal">
<div class="fullscreen-header">
<h2>Player Interaction Network</h2>
<button class="close-fullscreen-btn" onclick="closeNetworkFullscreen()" title="Exit fullscreen">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" />
</svg>
</button>
</div>
<div id="nodeGraphFullscreen" class="fullscreen-content"></div>
</div>
</body>
</html>