-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenwd.html
More file actions
205 lines (197 loc) · 8.83 KB
/
openwd.html
File metadata and controls
205 lines (197 loc) · 8.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#000000">
<title>WDMap - Wardriving Map - GhostESP</title>
<meta name="description" content="WDMap - Client-side wardriving map for WiGLE CSV files. Visualize WiFi and BLE networks with GPS coordinates directly in your browser.">
<meta name="keywords" content="WDMap, wardriving, WiGLE, WiFi map, BLE map, GPS, ESP32, GhostESP, wardrive, network mapping">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/openwd.css">
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
</head>
<body>
<canvas id="dotTerrain"></canvas>
<script>
(function() {
var canvas = document.getElementById('dotTerrain');
if (!canvas) return;
var ctx = canvas.getContext('2d');
var SPACING = 28;
var dots = [];
var ripples = [];
var mouseX = -9999, mouseY = -9999;
var lastX = 0, lastY = 0;
var smoothMouseX = -9999, smoothMouseY = -9999;
function init() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
dots = [];
var cols = Math.ceil(canvas.width / SPACING) + 1;
var rows = Math.ceil(canvas.height / SPACING) + 1;
for (var r = 0; r < rows; r++) {
for (var c = 0; c < cols; c++) {
dots.push({ baseX: c * SPACING, baseY: r * SPACING, x: 0, y: 0, brightness: 0.15, targetBrightness: 0.15, radius: 1.5, targetRadius: 1.5 });
}
}
}
document.addEventListener('mousemove', function(e) {
mouseX = e.clientX;
mouseY = e.clientY;
var dx = e.clientX - lastX;
var dy = e.clientY - lastY;
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist > 30) {
ripples.push({ x: e.clientX, y: e.clientY, radius: 0, strength: 1 });
lastX = e.clientX;
lastY = e.clientY;
}
});
function animate() {
smoothMouseX += (mouseX - smoothMouseX) * 0.2;
smoothMouseY += (mouseY - smoothMouseY) * 0.2;
for (var i = ripples.length - 1; i >= 0; i--) {
ripples[i].radius += 7;
ripples[i].strength *= 0.97;
if (ripples[i].strength < 0.01) ripples.splice(i, 1);
}
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (var d = 0; d < dots.length; d++) {
var dot = dots[d];
var bx = dot.baseX + SPACING / 2;
var by = dot.baseY + SPACING / 2;
dot.targetBrightness = 0.2;
dot.targetRadius = 1.8;
var mdx = bx - smoothMouseX;
var mdy = by - smoothMouseY;
var mdist = Math.sqrt(mdx * mdx + mdy * mdy);
if (mdist < 220) {
var factor = 1 - mdist / 220;
factor = factor * factor;
dot.targetBrightness = 0.2 + factor * 0.6;
dot.targetRadius = 1.8 + factor * 3;
}
for (var r = 0; r < ripples.length; r++) {
var rip = ripples[r];
var rdx = bx - rip.x;
var rdy = by - rip.y;
var rdist = Math.sqrt(rdx * rdx + rdy * rdy);
var wavePos = rdist - rip.radius;
var waveWidth = 120;
if (wavePos > -40 && wavePos < waveWidth) {
var falloff = 1 - Math.max(0, wavePos) / waveWidth;
falloff = falloff * falloff;
var edgeFactor = 1 - Math.abs(wavePos + 20) / 60;
edgeFactor = Math.max(0, edgeFactor);
var bump = (falloff * 0.5 + edgeFactor * 0.5) * rip.strength * 0.6;
dot.targetBrightness = Math.max(dot.targetBrightness, 0.2 + bump);
dot.targetRadius = Math.max(dot.targetRadius, 1.8 + bump * 3);
}
}
dot.brightness += (dot.targetBrightness - dot.brightness) * 0.3;
dot.radius += (dot.targetRadius - dot.radius) * 0.3;
ctx.beginPath();
ctx.arc(bx, by, dot.radius, 0, Math.PI * 2);
ctx.fillStyle = 'rgba(255,255,255,' + dot.brightness + ')';
ctx.fill();
}
requestAnimationFrame(animate);
}
window.addEventListener('resize', init);
init();
animate();
})();
</script>
<nav id="nav"></nav>
<div class="openwd-container">
<header class="openwd-header">
<h1>WDMap</h1>
<p class="header-description">Client-side wardriving map for WiGLE v1.6 CSV files</p>
</header>
<main class="openwd-main">
<div class="openwd-toolbar">
<div class="toolbar-row">
<div class="import-controls">
<input id="file-input" type="file" multiple accept=".csv,text/csv">
<button id="import-btn" class="btn btn-primary">Import CSV</button>
<input id="export-btn" type="button" class="btn" value="Export">
<input id="load-input" type="file" accept=".json" style="display:none">
<input id="load-btn" type="button" class="btn" value="Load">
<button id="clear-btn" class="btn btn-danger">Clear</button>
</div>
<div class="toolbar-actions">
<button id="filter-toggle" class="btn btn-ghost" aria-expanded="false">Filters</button>
<button id="privacy-toggle" class="btn btn-ghost" aria-pressed="false">Privacy</button>
<button id="animate-btn" class="btn btn-primary">Animate</button>
</div>
</div>
<div id="filter-panel" class="filter-panel" aria-hidden="true">
<div class="filter-panel-row">
<select id="filter-type">
<option value="ALL">All Types</option>
<option value="WIFI">WiFi</option>
<option value="BLE">BLE</option>
</select>
<input id="filter-search" type="text" placeholder="Search SSID/MAC...">
<input id="filter-rssi-min" type="number" min="-140" max="0" placeholder="RSSI Min">
<input id="filter-rssi-max" type="number" min="-140" max="0" placeholder="RSSI Max">
</div>
<div class="filter-panel-actions">
<button id="apply-filters" class="btn">Apply</button>
<button id="reset-filters" class="btn btn-ghost">Reset</button>
</div>
</div>
</div>
<div id="import-status" class="status"></div>
</div>
<div class="app-shell">
<aside class="panel">
<section class="card">
<h2>Datasets</h2>
<div id="dataset-list" class="dataset-list"></div>
</section>
</aside>
<main class="map-wrap">
<div id="map"></div>
<div class="time-slider-float">
<span class="time-label">Time</span>
<input type="range" id="time-slider" class="time-slider" min="0" max="100" value="100">
<span id="time-display" class="time-display">All time</span>
<label class="time-toggle">
<input type="checkbox" id="time-all-toggle" checked>
All time
</label>
</div>
<div id="animate-overlay" class="animate-overlay" style="display:none">
<div class="animate-stats">
<div class="animate-stat-year" id="animate-year">2024</div>
<div class="animate-stat-label" id="animate-date">January</div>
<div class="animate-stat-main" id="animate-count">0</div>
<div class="animate-stat-sub" id="animate-type">networks found</div>
<div class="animate-stat-wifi" id="animate-wifi">0 WiFi</div>
<div class="animate-stat-ble" id="animate-ble">0 BLE</div>
</div>
</div>
</main>
</div>
</main>
</div>
<footer class="footer">
<div class="container">
<p>OpenWD - Wardriving map for WiGLE CSV files</p>
</div>
</footer>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/papaparse.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/supercluster.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"></script>
<script src="https://unpkg.com/lucide@latest" defer></script>
<script src="js/components.js" defer></script>
<script src="js/openwd.js" defer></script>
</body>
</html>