feat(selection): selecting a contact keeps its size and the camera's view: aircraft, vessels, trains and transit vehicles keep their form and size when selected (colour only); a click follows from the camera's own distance and angle, the contact gliding to the centre over one second (FollowTarget transitionS, shared rule render/camera/followTransition, conformance camera.follow.transition)

This commit is contained in:
Sameh Khamis committed 2026-11-13 15:02:28 -08:00
1 parent e3865f462f
commit 7a61bf04a0
52 files changed
+1648 -891

No files matched your search

+6 -2
View File
@@ -170,7 +170,10 @@ const _b64 = (s) =>
* little minification.
*/
const FLEET_RASTER_PX = 48;
/** The selected vehicle draws bigger and deserves a crisper source. */
/**
* Source size for the selected vehicle: drawn at the fleet's size, from a
* crisper raster under its wider halo.
*/
export const SELECTED_ICON_PX = 96;
/**
@@ -240,7 +243,8 @@ export function transitIcon(kind, px = FLEET_RASTER_PX, options = {}) {
);
const style =
profile === 'mono' ? 'thermal' : profile === 'crt' ? 'retro' : 'normal';
const displayPx = (selected ? 30 : 20) * presetSpriteScale(style, selected);
// Selected or not, the glyph is drawn at the fleet's size.
const displayPx = FLEET_SCREEN_PX * presetSpriteScale(style, selected);
const frame = haloFrame(presetSpriteOutlinePx(style, selected), displayPx);
const heading = options.heading !== false;
const bodies = heading ? HEADING_BODIES : NEUTRAL_BODIES;