From 23d469d008a4f8a8765b158fd56420545d9ae48d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 Jun 2026 09:44:46 -0700 Subject: [PATCH] Add balloon, glider, and UAV sprites with admin sprite management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New dedicated pixel art sprites for ADS-B emitter categories B2 (lighter-than-air → balloon), B1 (glider/sailplane → glider), and B6 (UAV → uav), replacing the previous fallback to smallProp. Adds an admin Sprites tab for previewing and uploading replacement PNGs for all 9 aircraft sprite types. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 8 ++-- admin/admin.css | 99 +++++++++++++++++++++++++++++++++++++++++++++ admin/admin.html | 15 +++++++ admin/admin.js | 75 ++++++++++++++++++++++++++++++++++ ads-bit.js | 16 +++++--- images/balloon.png | Bin 0 -> 1410 bytes images/glider.png | Bin 0 -> 1021 bytes images/uav.png | Bin 0 -> 1112 bytes server.py | 73 +++++++++++++++++++++++++++++++++ 9 files changed, 277 insertions(+), 9 deletions(-) create mode 100644 images/balloon.png create mode 100644 images/glider.png create mode 100644 images/uav.png diff --git a/CLAUDE.md b/CLAUDE.md index 94a1c17..6905aa7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -52,7 +52,7 @@ Access at http://localhost:{web_port} (configured in config.json) ### Sprite Assets All PNG sprites face right (eastward) and are flipped in-canvas for westbound aircraft: -- 6 aircraft types: smallProp, regionalJet, narrowBody, wideBody, heavy, helicopter +- 9 aircraft types: smallProp, regionalJet, narrowBody, wideBody, heavy, helicopter, balloon, glider, uav - Directional backgrounds: north.png, south.png, east.png, west.png (1536x1024, shown based on view direction) - Celestial: sun.png, moon_6_phases.png (2x3 sprite sheet) - Weather: happycloud.png (clear), raincloud.png (rain/snow) @@ -75,10 +75,10 @@ Mapping from DO-260B emitter categories to sprite types: | A5 | Heavy (> 300,000 lbs) | wideBody or heavy (by altitude/speed) | | A6 | High performance (> 5g, > 400 kts) | narrowBody | | A7 | Rotorcraft | helicopter | -| B1 | Glider / sailplane | smallProp | -| B2 | Lighter-than-air | smallProp | +| B1 | Glider / sailplane | glider | +| B2 | Lighter-than-air | balloon | | B4 | Skydiver drop plane | smallProp | -| B6 | UAV | smallProp | +| B6 | UAV | uav | Once an emitter category is received for an aircraft, it is locked in and heuristic re-evaluation is skipped. diff --git a/admin/admin.css b/admin/admin.css index 8b8350c..868b5ca 100644 --- a/admin/admin.css +++ b/admin/admin.css @@ -348,6 +348,101 @@ textarea { color: #fff; } +/* Sprite Management */ +.sprite-info { + background: rgba(0, 0, 0, 0.3); + border: 2px solid #5c94fc; + border-radius: 8px; + padding: 14px 18px; + margin-bottom: 20px; +} + +.sprite-info h3 { + font-family: 'Press Start 2P', monospace; + font-size: 10px; + color: #fcd444; + margin-bottom: 10px; +} + +.sprite-info p { + font-size: 12px; + color: #b4d4ec; + margin-bottom: 4px; + line-height: 1.6; +} + +.sprite-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 14px; +} + +.sprite-card { + background: rgba(0, 0, 0, 0.4); + border: 2px solid #5c94fc; + border-radius: 8px; + padding: 14px; + text-align: center; +} + +.sprite-card h4 { + font-family: 'Press Start 2P', monospace; + font-size: 10px; + color: #fcfcfc; + margin-bottom: 4px; +} + +.sprite-card .sprite-categories { + font-size: 10px; + color: #888; + margin-bottom: 10px; +} + +.sprite-preview { + background: rgba(0, 0, 0, 0.3); + border: 1px solid #444; + border-radius: 4px; + padding: 6px; + margin-bottom: 10px; + display: flex; + align-items: center; + justify-content: center; + min-height: 80px; +} + +.sprite-preview img { + max-width: 100%; + height: auto; + max-height: 80px; + image-rendering: pixelated; +} + +.sprite-preview .no-sprite { + color: #666; + font-size: 11px; +} + +.sprite-upload-label { + display: inline-block; + font-family: 'Press Start 2P', monospace; + font-size: 8px; + padding: 6px 12px; + border: 2px solid #5c94fc; + border-radius: 6px; + background: rgba(92, 148, 252, 0.2); + color: #fcfcfc; + cursor: pointer; + transition: all 0.15s; +} + +.sprite-upload-label:hover { + background: rgba(92, 148, 252, 0.4); +} + +.sprite-upload-input { + display: none; +} + /* Mobile */ @media (max-width: 768px) { .admin-header { @@ -389,4 +484,8 @@ textarea { .button-row .btn { width: 100%; } + + .sprite-grid { + grid-template-columns: repeat(2, 1fr); + } } diff --git a/admin/admin.html b/admin/admin.html index e414697..0dcdb9d 100644 --- a/admin/admin.html +++ b/admin/admin.html @@ -40,6 +40,7 @@ + @@ -201,6 +202,20 @@ + + +