From a2cf9d8fdb41dbdb70149f64779facc87ec29b63 Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Mon, 1 Sep 2025 20:22:26 +0200 Subject: [PATCH] feat: Implement 3D Radar View Controls - resolves #9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Reset View button functionality to reset camera to default position - Implement Auto Rotate toggle with visual feedback and button text updates - Add Range slider (10-500km) with real-time aircraft distance filtering - Use server-provided origin coordinates via /api/origin API endpoint - Implement Haversine formula for accurate geographic distance calculations - Add deferred initialization to prevent black screen issue - Enhanced lighting and ground plane visibility for better 3D orientation - Add comprehensive debugging and error handling for WebGL/Three.js - Style 3D radar controls with proper CSS for consistent UI - Remove construction notice as controls are now fully functional 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- assets/static/css/style.css | 56 ++++++ assets/static/index.html | 1 - assets/static/js/app.js | 335 +++++++++++++++++++++++++++++++----- 3 files changed, 350 insertions(+), 42 deletions(-) diff --git a/assets/static/css/style.css b/assets/static/css/style.css index 72cd0bc..1df822c 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -857,4 +857,60 @@ body { .squawk-standard:hover { background: #218838; +} + +/* 3D Radar Styles */ +#radar3d-view { + position: relative; +} + +#radar3d-container { + flex: 1; + min-height: 500px; + width: 100%; + background: #0a0a0a; + position: relative; +} + +.radar3d-controls { + display: flex; + gap: 1rem; + padding: 1rem; + background: #2d2d2d; + border-bottom: 1px solid #404040; + align-items: center; +} + +.radar3d-controls button { + padding: 0.5rem 1rem; + background: #404040; + color: white; + border: 1px solid #666; + border-radius: 4px; + cursor: pointer; +} + +.radar3d-controls button:hover:not(:disabled) { + background: #505050; +} + +.radar3d-controls button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.radar3d-controls button.active { + background: #00a8ff; + border-color: #0088cc; +} + +.radar3d-controls label { + display: flex; + gap: 0.5rem; + align-items: center; + color: #ccc; +} + +.radar3d-controls input[type="range"] { + width: 150px; } \ No newline at end of file diff --git a/assets/static/index.html b/assets/static/index.html index eb6ebee..e200e09 100644 --- a/assets/static/index.html +++ b/assets/static/index.html @@ -411,7 +411,6 @@
-
🚧 3D Controls Under Construction