mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Tighten callout fade comments and docs
This commit is contained in:
1 parent
910e63a56a
commit
c9f40a837c
7 files changed
+19
-29
No files matched your search
@@ -110,10 +110,7 @@ const THEME_MAP = DETECTION_THEME_MAP;
|
||||
const SPARSE_ZONE_FRACTION = 0.5;
|
||||
/** Solve cadence for membership/collision; accepted identities still reproject every frame. */
|
||||
const LABEL_SOLVE_INTERVAL_MS = 125;
|
||||
/**
|
||||
* A contact's own card at this opacity or more hides its callout; below it the
|
||||
* callout fades in, so a card fading in or out never snaps the callout.
|
||||
*/
|
||||
/** Own-card opacity that fully hides a callout; below it the callout fades in. */
|
||||
const CARD_ALPHA_HIDING_CALLOUT = 0.5;
|
||||
/** Alpha bands retain bracket batching while approximating a continuous radial fade. */
|
||||
const BRACKET_ALPHA_STEPS = 4;
|
||||
@@ -1149,8 +1146,8 @@ function _paintCalloutLane(frame) {
|
||||
ctx.textBaseline = 'alphabetic';
|
||||
for (let i = 0; i < _calloutCount; i++) {
|
||||
const row = _calloutPool[i];
|
||||
// Under the contact's own card (an ambient vessel card) the callout would
|
||||
// show through the plate. Only a card painting this frame counts.
|
||||
// The callout would show through its contact's own card: fade it by the
|
||||
// opacity that card paints with this frame.
|
||||
const cardAlpha =
|
||||
row.cardEntryId === ''
|
||||
? 0
|
||||
|
||||
@@ -589,10 +589,8 @@ test('every style paints its OWN plate token through the production callout path
|
||||
});
|
||||
|
||||
test('a callout gives way to its contact\'s own card only while that card paints', () => {
|
||||
// A vessel's ambient card already shows its name, speed and course, and the
|
||||
// callout drawn beneath it shows through the card's plate. The host paints
|
||||
// only part of the published cards (shared budget, collisions, UI chrome),
|
||||
// so a contact whose card was published but not painted keeps its callout.
|
||||
// The callout shows through its card's plate. The host paints only some
|
||||
// published cards (budget, collisions, UI chrome); an unpainted one keeps it.
|
||||
const env = installEnvironment({ width: 900, height: 600, dpr: 1 });
|
||||
try {
|
||||
const ships = [
|
||||
|
||||
Reference in new issue
Block a user