mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
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:
1 parent
e3865f462f
commit
7a61bf04a0
52 files changed
+1648
-891
No files matched your search
@@ -32,7 +32,6 @@ import {
|
||||
MARKER_PIXEL_SIZE,
|
||||
ROTATION_REFRESH_MS,
|
||||
VISIBILITY_REFRESH_MS,
|
||||
SELECTED_PIXEL_SIZE,
|
||||
TRANSIT_MODE_COLORS,
|
||||
vehicleNearView,
|
||||
} from './policy.js';
|
||||
@@ -595,7 +594,8 @@ export function createRendering({ state, services, parts }) {
|
||||
* Under a mono preset (NVG, FLIR, noir) the sprite is white-hot with a dark
|
||||
* halo sized in screen pixels; under CRT a saturated mode colour with a
|
||||
* thinner halo; otherwise the shipped mode colour and hairline. Selection
|
||||
* grows the glyph and retains the mode colour; sensors use opaque white.
|
||||
* keeps the glyph's size and mode colour, widening only its halo and
|
||||
* drawing from a crisper raster; sensors use opaque white.
|
||||
* @param {object} entry
|
||||
*/
|
||||
function applySpriteStyle(entry) {
|
||||
@@ -603,7 +603,7 @@ export function createRendering({ state, services, parts }) {
|
||||
if (!marker) return;
|
||||
const style = state._stylePreset;
|
||||
const selected = state._selectedKey === entry.key;
|
||||
const basePx = selected ? SELECTED_PIXEL_SIZE : MARKER_PIXEL_SIZE;
|
||||
const basePx = MARKER_PIXEL_SIZE;
|
||||
const halo = presetSpriteOutlinePx(style, selected);
|
||||
const displayPx = basePx * presetSpriteScale(style, selected);
|
||||
const frame = haloFrame(halo, displayPx);
|
||||
|
||||
Reference in new issue
Block a user