mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
3D models only within 3 km of the camera, at true size
An aircraft, vessel, transit or rail vehicle now draws as its 3D model only when it is within 3 km of the camera, and as its icon farther away. A model already drawn is kept out to 3.6 km, so a vehicle on the edge does not flicker. Proximity and All use the same distance and still differ by how many models they allow (150 and 350). Models are drawn at their true size: the minimum pixel size that inflated distant models is gone. The camera altitude above which no model is considered is now the highest aircraft the layers draw (30 km) plus the 3.6 km, so a camera high above the ground still models an aircraft close to it. Cockpit's aircraft silhouettes keep their own 150/185 km and 400/450 km bands, since they are icons.
This commit is contained in:
1 parent
624c229bc2
commit
36624cd329
22 files changed
+260
-181
No files matched your search
@@ -225,10 +225,10 @@ export function createAircraftModels({
|
||||
return sets ? [sets.fleet.id, sets.tracked.id] : [];
|
||||
}
|
||||
|
||||
/** The FLEET's 3D-model regime: models3d enabled AND the camera zoomed in past the altitude
|
||||
* ceiling. Since 2026-08-22 the toggle DEFAULTS ON in `proximity`, which is itself the
|
||||
* budget: models only appear below MODEL_ALT_CEIL_M and only for the nearest MODEL_MAX in
|
||||
* view. The toggle still OWNS the fleet — an operator who wants every in-view plane arms
|
||||
/** The FLEET's 3D-model regime: models3d enabled AND the camera below the altitude ceiling,
|
||||
* above which no contact can be within the model radius. Since 2026-08-22 the toggle DEFAULTS
|
||||
* ON in `proximity`, which is itself the budget: models only appear within MODEL_ADD_M of the
|
||||
* camera and only for the nearest MODEL_MAX. The toggle still OWNS the fleet — an operator who wants every in-view plane arms
|
||||
* `all`, and one who wants none turns 3D off — this predicate is unchanged. The TRACKED
|
||||
* contact routes through here too (`_trackedModelRegimeActive`), with its place in the
|
||||
* fleet's cap, so selecting a contact never changes its form. */
|
||||
@@ -254,20 +254,17 @@ export function createAircraftModels({
|
||||
: mapCap;
|
||||
}
|
||||
|
||||
/** Active ADD radius (m) — new planes inside this range get a model. Mode-aware: 'all' reaches far. */
|
||||
/** ADD radius (m) — new planes inside this range get a model. Both modes
|
||||
* share it; they differ by their caps. */
|
||||
|
||||
function _modelAddDistM() {
|
||||
return state._models3dMode === 'all'
|
||||
? policy.MODEL_ALL_ADD_M
|
||||
: policy.MODEL_PROX_ADD_M;
|
||||
return policy.MODEL_ADD_M;
|
||||
}
|
||||
|
||||
/** Active KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */
|
||||
/** KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */
|
||||
|
||||
function _modelKeepDistM() {
|
||||
return state._models3dMode === 'all'
|
||||
? policy.MODEL_ALL_KEEP_M
|
||||
: policy.MODEL_PROX_KEEP_M;
|
||||
return policy.MODEL_KEEP_M;
|
||||
}
|
||||
|
||||
/** What a grounded model's ground sample sees through: the vertical sample
|
||||
@@ -585,7 +582,6 @@ export function createAircraftModels({
|
||||
specKey: _specKeyFor(meta), // type-change sync compares against this
|
||||
bellyM: spec.bellyM,
|
||||
scale: spec.scale,
|
||||
minPixelSize: policy.MODEL_MIN_PX,
|
||||
});
|
||||
record.url = resolveAsset(spec.url);
|
||||
record.gltf = _gltfOf(spec);
|
||||
@@ -690,7 +686,7 @@ export function createAircraftModels({
|
||||
* in, can never stall or freeze the centering (the old model-graphic-on-entity failure mode).
|
||||
*
|
||||
* The model draws exactly as the fleet would draw this contact: the same
|
||||
* asset at the same scale and `minPixelSize` (`MODEL_MIN_PX`), only its
|
||||
* asset at the same scale (its true size), only its
|
||||
* tint the tracked colour; whether it draws at all is the fleet's rule too
|
||||
* (`_trackedModelRegimeActive`). Selecting a contact changes its colour,
|
||||
* never its size or form. */
|
||||
@@ -736,7 +732,6 @@ export function createAircraftModels({
|
||||
specKey: _specKeyFor(meta), // type-change sync compares against this
|
||||
bellyM: spec.bellyM,
|
||||
scale: spec.scale,
|
||||
minPixelSize: policy.MODEL_MIN_PX,
|
||||
});
|
||||
record.id = icao24;
|
||||
record.url = resolveAsset(spec.url);
|
||||
|
||||
@@ -4,25 +4,18 @@ import { createAircraftModels } from './aircraftModelLayer.js';
|
||||
import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs';
|
||||
import { bindRenderer } from '../render/rendererOf.js';
|
||||
import { fromDegrees } from '../geo/ellipsoid.js';
|
||||
import * as flightsPolicy from '../layers/flights/policy.js';
|
||||
|
||||
// The flights layer's own model policy: its radii, ceiling and caps.
|
||||
const POLICY = {
|
||||
MODEL_ALT_CEIL_M: 800_000,
|
||||
...flightsPolicy,
|
||||
MODEL_MAX: 40,
|
||||
MODEL_MAX_ALL: 350,
|
||||
COCKPIT_MODEL_MAX: 60,
|
||||
MODEL_PROX_ADD_M: 150_000,
|
||||
MODEL_PROX_KEEP_M: 185_000,
|
||||
MODEL_ALL_ADD_M: 400_000,
|
||||
MODEL_ALL_KEEP_M: 450_000,
|
||||
MODEL_MIN_PX: 24,
|
||||
TRACKED_MODEL_MIN_PX: 48,
|
||||
TRACKED_MODEL_MAX_PX: 600,
|
||||
MODEL_HEADING_OFFSET_DEG: 0,
|
||||
FLEET_DR_INTERVAL_MS: 80,
|
||||
TRACKED_MODEL_MAX_LOAD_FAILS: 3,
|
||||
TRACKED_MODEL_RETRY_BACKOFF_MS: 1500,
|
||||
};
|
||||
|
||||
/** The eye's height (m): 1 km above the contacts. */
|
||||
const EYE_M = 11_000;
|
||||
|
||||
const SPEC = {
|
||||
url: 'plane.glb',
|
||||
scale: 1,
|
||||
@@ -34,9 +27,9 @@ const SPEC = {
|
||||
/**
|
||||
* A fleet of airborne contacts at `positions` (icao → ECEF), drawn by a
|
||||
* models layer over a fake draw port whose fleet set can be told to fail a
|
||||
* write. The eye sits above them at 30 km.
|
||||
* write. The eye sits at `eyeM`, by default 1 km above them (`EYE_M`).
|
||||
*/
|
||||
function fleetFixture(positions) {
|
||||
function fleetFixture(positions, { eyeM = EYE_M } = {}) {
|
||||
const base = fakeDrawPort();
|
||||
const removes = [];
|
||||
let failNextUpsert = false;
|
||||
@@ -67,7 +60,7 @@ function fleetFixture(positions) {
|
||||
};
|
||||
},
|
||||
};
|
||||
const eye = fromDegrees(-97.71, 30.21, 30_000);
|
||||
const eye = fromDegrees(-97.71, 30.21, eyeM);
|
||||
const viewer = {};
|
||||
bindRenderer(viewer, {
|
||||
draw,
|
||||
@@ -79,7 +72,7 @@ function fleetFixture(positions) {
|
||||
right: { x: 1, y: 0, z: 0 },
|
||||
fovy: Math.PI / 3,
|
||||
aspectRatio: 1,
|
||||
height: 30_000,
|
||||
height: eyeM,
|
||||
}),
|
||||
},
|
||||
});
|
||||
@@ -185,7 +178,10 @@ function fleetFixture(positions) {
|
||||
};
|
||||
}
|
||||
|
||||
const near = (k) => fromDegrees(-97.71 + k * 0.01, 30.21, 10_000);
|
||||
// About 0.5 km apart, within 2 km of the eye.
|
||||
const near = (k) => fromDegrees(-97.71 + k * 0.005, 30.21, 10_000);
|
||||
/** A contact at the eye's height, `m` metres north of it. */
|
||||
const north = (m) => fromDegrees(-97.71, 30.21 + m / 110_850, EYE_M);
|
||||
const far = (k) => fromDegrees(-90 + k * 0.01, 30.21, 10_000);
|
||||
|
||||
test('the fleet tick hands contacts to ready models and back without a gap', () => {
|
||||
@@ -326,7 +322,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as
|
||||
const position = near(1);
|
||||
const f = fleetFixture(new Map([['a1', position]]));
|
||||
assert.equal(f.fleet().spec.recede ?? null, null, 'the set does not recede');
|
||||
const eye = fromDegrees(-97.71, 30.21, 30_000);
|
||||
const eye = fromDegrees(-97.71, 30.21, EYE_M);
|
||||
const expected = (focusFactor) =>
|
||||
aircraftTreatmentAlpha({
|
||||
baseAlpha: 0.8,
|
||||
@@ -336,7 +332,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as
|
||||
eye.y - position.y,
|
||||
eye.z - position.z,
|
||||
),
|
||||
cameraHeightM: 30_000,
|
||||
cameraHeightM: EYE_M,
|
||||
});
|
||||
try {
|
||||
// Recede from the eye on, so the haze is not 1 here.
|
||||
@@ -389,3 +385,67 @@ test('a contact not there yet at the time drawn has its fleet model hidden, as o
|
||||
f.tick();
|
||||
assert.equal(f.fleet().items.get('a1').show, true, 'drawn again');
|
||||
});
|
||||
|
||||
test('aircraft draw as models only within 3 km of the camera, in either mode', () => {
|
||||
for (const mode of ['proximity', 'all']) {
|
||||
const positions = new Map([
|
||||
['inside', north(2_900)],
|
||||
['outside', north(3_100)],
|
||||
]);
|
||||
const f = fleetFixture(positions);
|
||||
f.state._models3dMode = mode;
|
||||
f.tick();
|
||||
for (const id of positions.keys())
|
||||
if (f.fleet().items.has(id)) f.draw.ready(f.fleetId, id);
|
||||
f.tick();
|
||||
assert.equal(f.shown.get('inside'), false, `${mode}: a model at 2.9 km`);
|
||||
assert.equal(f.fleet().items.get('inside').show, true);
|
||||
assert.equal(f.shown.get('outside'), true, `${mode}: an icon at 3.1 km`);
|
||||
assert.equal(f.fleet().items.has('outside'), false);
|
||||
}
|
||||
});
|
||||
|
||||
test('a model is kept out to about 3.6 km, then its icon takes over', () => {
|
||||
const positions = new Map([['a1', north(2_000)]]);
|
||||
const f = fleetFixture(positions);
|
||||
f.tick();
|
||||
f.draw.ready(f.fleetId, 'a1');
|
||||
f.tick();
|
||||
assert.equal(f.shown.get('a1'), false, 'a model at 2 km');
|
||||
positions.set('a1', north(3_500));
|
||||
f.tick();
|
||||
assert.equal(f.shown.get('a1'), false, 'kept at 3.5 km');
|
||||
assert.equal(f.fleet().items.get('a1').show, true);
|
||||
positions.set('a1', north(3_700));
|
||||
f.tick();
|
||||
assert.equal(f.shown.get('a1'), true, 'released at 3.7 km');
|
||||
assert.equal(f.fleet().items.has('a1'), false);
|
||||
positions.set('a1', north(3_300));
|
||||
f.tick();
|
||||
assert.equal(
|
||||
f.fleet().items.has('a1'),
|
||||
false,
|
||||
'not taken again until it is back within 3 km',
|
||||
);
|
||||
});
|
||||
|
||||
test('a camera high above the ground still models an aircraft within 3 km of it', () => {
|
||||
// A plane at 30 km with the camera 2 km above it: the altitude ceiling
|
||||
// sits above every contact's height plus the keep radius.
|
||||
const plane = fromDegrees(-97.71, 30.21, 30_000);
|
||||
const f = fleetFixture(new Map([['high', plane]]), { eyeM: 32_000 });
|
||||
f.tick();
|
||||
f.draw.ready(f.fleetId, 'high');
|
||||
f.tick();
|
||||
assert.equal(f.shown.get('high'), false, 'its model draws it');
|
||||
assert.equal(
|
||||
POLICY.MODEL_ALT_CEIL_M,
|
||||
POLICY.MODEL_HIGHEST_CONTACT_M + POLICY.MODEL_KEEP_M,
|
||||
);
|
||||
});
|
||||
|
||||
test('models are drawn at their true size, with no minimum pixel size', () => {
|
||||
const f = fleetFixture(new Map([['a1', near(1)]]));
|
||||
f.tick();
|
||||
assert.equal(f.fleet().items.get('a1').minPixelSize ?? 0, 0);
|
||||
});
|
||||
@@ -70,19 +70,24 @@ for (const layer of LAYERS) {
|
||||
'the tracked-model driver uses the cockpit-aware predicate');
|
||||
});
|
||||
|
||||
test(`${layer.name}: Cockpit uses standard Proximity and All radii with a lower cap`, () => {
|
||||
assert.equal(numericConstant(source, 'MODEL_PROX_ADD_M'), 150_000);
|
||||
assert.equal(numericConstant(source, 'MODEL_PROX_KEEP_M'), 185_000);
|
||||
assert.equal(numericConstant(source, 'MODEL_ALL_ADD_M'), 400_000);
|
||||
assert.equal(numericConstant(source, 'MODEL_ALL_KEEP_M'), 450_000);
|
||||
test(`${layer.name}: models draw within 3 km in both modes; Cockpit's AIR band keeps its own radii`, () => {
|
||||
assert.equal(numericConstant(source, 'MODEL_ADD_M'), 3000);
|
||||
assert.equal(numericConstant(source, 'MODEL_KEEP_M'), 3600);
|
||||
assert.equal(numericConstant(source, 'COCKPIT_MODEL_MAX'), 60);
|
||||
|
||||
const add = /^([ \t]*)function _modelAddDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
|
||||
const keep = /^([ \t]*)function _modelKeepDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
|
||||
assert.match(add, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_ADD_M\s*:\s*(?:policy\.)?MODEL_PROX_ADD_M/);
|
||||
assert.match(keep, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_KEEP_M\s*:\s*(?:policy\.)?MODEL_PROX_KEEP_M/);
|
||||
assert.doesNotMatch(add, /COCKPIT_MODEL_ADD_M/);
|
||||
assert.doesNotMatch(keep, /COCKPIT_MODEL_KEEP_M/);
|
||||
assert.match(add, /return\s+(?:policy\.)?MODEL_ADD_M;/, 'Proximity and All share the add radius');
|
||||
assert.match(keep, /return\s+(?:policy\.)?MODEL_KEEP_M;/, 'Proximity and All share the keep radius');
|
||||
|
||||
// The AIR silhouettes are icons, not models: their band stays mode-aware.
|
||||
assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_ADD_M'), 150_000);
|
||||
assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_KEEP_M'), 185_000);
|
||||
assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_ADD_M'), 400_000);
|
||||
assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_KEEP_M'), 450_000);
|
||||
const near = /^([ \t]*)function _refreshCockpitNearContacts\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
|
||||
assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_ADD_M\s*:\s*COCKPIT_AIR_PROX_ADD_M/);
|
||||
assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_KEEP_M\s*:\s*COCKPIT_AIR_PROX_KEEP_M/);
|
||||
|
||||
const cap = /^([ \t]*)function _modelCap\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
|
||||
assert.match(cap, /Math\.min\(\s*(?:policy\.)?COCKPIT_MODEL_MAX/,
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
* marker the scene itself hides behind geometry. Everything else keeps its
|
||||
* label exactly as before, which covers contacts high above the ground
|
||||
* (aircraft, satellites): their markers are drawn on top of the scene by
|
||||
* design, their 3D models can be scaled up to a minimum pixel size and so fill
|
||||
* the very pixel being read, and a label that hid while its marker stayed on
|
||||
* screen would be the worse mismatch.
|
||||
* design, their 3D models can fill the very pixel being read, and a label
|
||||
* that hid while its marker stayed on screen would be the worse mismatch.
|
||||
*
|
||||
* This file is plain arithmetic; it never touches the renderer.
|
||||
*/
|
||||
|
||||
@@ -111,8 +111,9 @@ let instances = 0;
|
||||
* @param {object} options.viewer The scene host.
|
||||
* @param {() => object|null} [options.display] `{models3d, models3dMode,
|
||||
* irBoost}`.
|
||||
* @param {object} options.policy `{altitudeCeilingM, minimumPixelSize,
|
||||
* cap, capAll, addM, addAllM, keepM, keepAllM, intervalMs}`.
|
||||
* @param {object} options.policy `{altitudeCeilingM, cap, capAll, addM,
|
||||
* keepM, intervalMs}`: both 3D modes share the add/keep radii and differ
|
||||
* by their caps. Models are drawn at their true size.
|
||||
* @param {(url: string) => string} [options.resolveAsset]
|
||||
* @param {boolean} [options.waterline] Clip each model at its waterline.
|
||||
* @param {object} [options.draw] Stands in for the viewer's draw port (tests).
|
||||
@@ -202,8 +203,7 @@ export function createFleetModelLayer({
|
||||
function refreshEligibility(items, prefs, eye) {
|
||||
const all = prefs.models3dMode === 'all';
|
||||
const cap = all ? policy.capAll : policy.cap;
|
||||
const addM = all ? policy.addAllM : policy.addM;
|
||||
const keepM = all ? policy.keepAllM : policy.keepM;
|
||||
const { addM, keepM } = policy;
|
||||
const candidates = [];
|
||||
for (const [id, item] of items) {
|
||||
if (!item.position || item.show === false || !item.spec?.url) continue;
|
||||
@@ -249,7 +249,6 @@ export function createFleetModelLayer({
|
||||
...(fleetAxisScale(item.spec)
|
||||
? { axisScale: fleetAxisScale(item.spec) }
|
||||
: {}),
|
||||
minPixelSize: policy.minimumPixelSize,
|
||||
environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled,
|
||||
...(boost
|
||||
? {
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
vesselModelSpec,
|
||||
} from './fleetModels.js';
|
||||
import { fetchPublicFile } from '../testSupport/fleetGlb.mjs';
|
||||
import { FLEET_MODEL_POLICY } from '../layers/flights/policy.js';
|
||||
import { bindFakeDraw } from '../testSupport/fakeDrawPort.mjs';
|
||||
import { eastNorthUp } from '../geo/frames.js';
|
||||
import { fromDegrees, toLonLatH } from '../geo/ellipsoid.js';
|
||||
@@ -29,15 +30,11 @@ console.info = () => {};
|
||||
const set = await loadFleetModelSet({ fetchImpl: fetchPublicFile });
|
||||
console.info = realInfo;
|
||||
|
||||
// The layers' own policy (3 km add, about 3.6 km keep), with small caps.
|
||||
const POLICY = Object.freeze({
|
||||
altitudeCeilingM: 800_000,
|
||||
minimumPixelSize: 16,
|
||||
...FLEET_MODEL_POLICY,
|
||||
cap: 2,
|
||||
capAll: 4,
|
||||
addM: 5_000,
|
||||
addAllM: 20_000,
|
||||
keepM: 6_000,
|
||||
keepAllM: 24_000,
|
||||
intervalMs: 80,
|
||||
});
|
||||
|
||||
@@ -117,7 +114,7 @@ test('the icon stays the visual until the model is ready; only the nearest are d
|
||||
);
|
||||
const near = models.items.get('near');
|
||||
assert.equal(near.scale, spec.scale, 'drawn life size');
|
||||
assert.equal(near.minPixelSize, POLICY.minimumPixelSize);
|
||||
assert.equal(near.minPixelSize ?? 0, 0, 'at its true size: no pixel floor');
|
||||
assert.equal(near.meta, 'near', 'picked as its vehicle');
|
||||
assert.equal(near.show, false, 'hidden until ready');
|
||||
|
||||
@@ -158,6 +155,38 @@ test('the icon stays the visual until the model is ready; only the nearest are d
|
||||
assert.equal(models.disposed, true);
|
||||
});
|
||||
|
||||
test('vehicles draw as models within 3 km in either mode, and keep them to about 3.6 km', () => {
|
||||
// The camera 1 km up: a vehicle `metres` east is sqrt(1 km² + metres²) away.
|
||||
const at = (km) => Math.sqrt(km * km - 1) * 1_000;
|
||||
for (const mode of ['proximity', 'all']) {
|
||||
const { viewer, draw } = fakeViewer();
|
||||
const layer = createFleetModelLayer({
|
||||
viewer,
|
||||
display: () => ({ models3d: true, models3dMode: mode }),
|
||||
policy: POLICY,
|
||||
});
|
||||
const spec = transitModelSpec(set, { mode: 'tram' });
|
||||
const items = new Map([
|
||||
['in', itemAt(at(2.9), spec, { pickId: 'in' })],
|
||||
['out', itemAt(at(3.1), spec, { pickId: 'out' })],
|
||||
]);
|
||||
layer.frame(items, 0);
|
||||
const models = modelSet(draw);
|
||||
assert.deepEqual(
|
||||
[...models.items.keys()],
|
||||
['in'],
|
||||
`${mode}: 2.9 km, not 3.1 km`,
|
||||
);
|
||||
items.set('in', itemAt(at(3.5), spec, { pickId: 'in' }));
|
||||
layer.frame(items, 100);
|
||||
assert.ok(models.items.has('in'), `${mode}: kept at 3.5 km`);
|
||||
items.set('in', itemAt(at(3.7), spec, { pickId: 'in' }));
|
||||
layer.frame(items, 200);
|
||||
assert.equal(models.items.size, 0, `${mode}: released at 3.7 km`);
|
||||
layer.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
test('models stay off above the altitude ceiling', () => {
|
||||
const { viewer, draw } = fakeViewer(POLICY.altitudeCeilingM + 1);
|
||||
const layer = createFleetModelLayer({
|
||||
|
||||
@@ -50,7 +50,6 @@ import {
|
||||
} from '../../data/modelVisualAnchor.js';
|
||||
import {
|
||||
FOCUS_EVIDENCE_DEV,
|
||||
MODEL_MIN_PX,
|
||||
TRACKED_BILLBOARD_SCALE_BY_DISTANCE,
|
||||
DR_CORRECTION_MS,
|
||||
COURSE_SLEW_DT_MAX_SEC,
|
||||
@@ -415,11 +414,11 @@ export function createMotion({
|
||||
const spec = parts.rendering._modelSpec(
|
||||
flightState.records.data.get(icao24),
|
||||
);
|
||||
// Drawn as the fleet draws it: its own size, never under MODEL_MIN_PX.
|
||||
// Drawn as the fleet draws it: at its true size.
|
||||
const focalLengthPx = viewportHeightPx / (2 * Math.tan(pose.fovy / 2));
|
||||
const projectedDiameterPx =
|
||||
(2 * spec.nativeRadiusM * spec.scale * focalLengthPx) / rangeM;
|
||||
return Math.max(MODEL_MIN_PX, projectedDiameterPx);
|
||||
return projectedDiameterPx;
|
||||
}
|
||||
|
||||
const sprite = readEntityRecord(flightState._trackedEntity)?.sprite;
|
||||
@@ -645,9 +644,8 @@ export function createMotion({
|
||||
/** Trail endpoint for the rendered tracked owner. Brackets/readouts stay on
|
||||
* the visual centre; only the trail moves to the model's lower-centre hardpoint. */
|
||||
/** The tracked model's rendered bounding radius (m), or 0 when no model of this
|
||||
* contact is drawing. Carries the scale it is drawn at, which may be
|
||||
* above `scale` to satisfy its pixel floor — the trail head has to be judged
|
||||
* against the size the operator SEES, not the nominal one. */
|
||||
* contact is drawing, at the scale it is drawn at — the trail head has to
|
||||
* be judged against the size the operator SEES. */
|
||||
/** World-space origin of the tracked model, or null when no model of this
|
||||
* contact is drawing. This is the centre the rendered bounding sphere is
|
||||
* measured from, so the trail clip and the envelope agree on one frame. */
|
||||
|
||||
@@ -39,18 +39,27 @@ export const EMERGENCY_TINT = rgba(EMERGENCY_TINT_CSS);
|
||||
export const GROUND_SCALE = 0.8;
|
||||
|
||||
// --- 3D model rendering (B3) ---------------------------------------------------------
|
||||
// When enabled, aircraft render as 3D glTF models once the camera is below MODEL_ALT_CEIL_M
|
||||
// (zoomed in); higher up they stay flat billboards. Eligibility is FRUSTUM-based (on-screen), and
|
||||
// the slots go to either the nearest planes ('proximity') or every in-view plane ('all'), each
|
||||
// backed by a hard cap so a draw-call explosion can't tank the frame (no instancing yet).
|
||||
// When enabled, an aircraft draws as its 3D glTF model only within MODEL_ADD_M of the camera
|
||||
// (eye to aircraft); farther away it stays its icon. Models are drawn at their true size, with no
|
||||
// minimum pixel size, so a model never balloons past its real extent. Eligibility is distance-based
|
||||
// with on-screen priority, and the slots go to either the nearest planes ('proximity') or every
|
||||
// in-range plane ('all'): the two modes share the radius and differ by their caps, each a hard
|
||||
// bound on the frame cost (every model is its own draw call).
|
||||
|
||||
export const MODEL_ALT_CEIL_M = 800000;
|
||||
// m: below this camera altitude, draw 3D models (raised so it's easy to trigger)
|
||||
export const MODEL_ADD_M = 3000;
|
||||
// model NEW planes within 3 km of the camera
|
||||
|
||||
export const MODEL_MIN_PX = 24;
|
||||
// floor so distant models stay visible WITHOUT ballooning into a giant
|
||||
// min-pixel blob (was 54 — far planes at the All radius became white
|
||||
// star-bursts); ~matches the 2D icon size so the model↔billboard read is consistent
|
||||
export const MODEL_KEEP_M = 3600;
|
||||
// KEEP modeled planes out to 3.6 km: the hysteresis band (KEEP > ADD) stops a plane on the edge
|
||||
// from releasing and reloading its model as the camera moves (the zoom/pan flicker)
|
||||
|
||||
export const MODEL_HIGHEST_CONTACT_M = 30000;
|
||||
// m above the ellipsoid: no aircraft the layers draw flies higher (airliners cruise near 12 km,
|
||||
// the highest-flying aircraft near 21 km)
|
||||
|
||||
export const MODEL_ALT_CEIL_M = MODEL_HIGHEST_CONTACT_M + MODEL_KEEP_M;
|
||||
// m: above this camera altitude no contact can be within MODEL_KEEP_M, so no model is
|
||||
// considered at all (the eligibility pass is skipped)
|
||||
|
||||
// Per-mode caps. Each model is its own draw call (no instancing yet), so these bound the frame cost.
|
||||
|
||||
@@ -58,29 +67,22 @@ export const MODEL_MAX = 150;
|
||||
// 'proximity' cap (the planes immediately around you)
|
||||
|
||||
export const MODEL_MAX_ALL = 350;
|
||||
// 'all' cap (everything out to ~the horizon)
|
||||
// Per-mode ADD / KEEP radii. The two modes differ by RADIUS, not just cap — otherwise they look
|
||||
// IDENTICAL whenever fewer than a cap's worth of planes are in range (field bug: Proximity and All
|
||||
// rendered the same). 'proximity' = a tight ring; 'all' = roughly to the horizon (state-scale). Each
|
||||
// band has hysteresis (KEEP > ADD) so a plane doesn't release+reload its model when it straddles the
|
||||
// add edge (the zoom/pan flicker). Beyond ADD a model would force-clamp to minimumPixelSize into a
|
||||
// giant floating blob (the old 422 km airport-cluster bug), so far planes stay 2D dots; the cap +
|
||||
// on-screen priority then spend the model slots on planes you can actually see.
|
||||
|
||||
export const MODEL_PROX_ADD_M = 150000;
|
||||
// proximity: model NEW planes within 150 km
|
||||
|
||||
export const MODEL_PROX_KEEP_M = 185000;
|
||||
// proximity: KEEP modeled planes out to 185 km
|
||||
// 'all' cap (every plane in range)
|
||||
|
||||
export const COCKPIT_MODEL_MAX = 60;
|
||||
// max concurrent GLBs in cockpit (never raises the map cap)
|
||||
|
||||
export const MODEL_ALL_ADD_M = 400000;
|
||||
// all: model NEW planes within 400 km (~to the horizon)
|
||||
// Cockpit's AIR band: contacts within it draw as aircraft silhouettes, beyond
|
||||
// it as compact dots. Independent of the 3D model radius; per 3D mode, each
|
||||
// with its keep hysteresis.
|
||||
|
||||
export const MODEL_ALL_KEEP_M = 450000;
|
||||
// all: KEEP modeled planes out to 450 km
|
||||
export const COCKPIT_AIR_PROX_ADD_M = 150000;
|
||||
|
||||
export const COCKPIT_AIR_PROX_KEEP_M = 185000;
|
||||
|
||||
export const COCKPIT_AIR_ALL_ADD_M = 400000;
|
||||
|
||||
export const COCKPIT_AIR_ALL_KEEP_M = 450000;
|
||||
|
||||
export const MODEL_HEADING_OFFSET_DEG = 180;
|
||||
// every fleet model is nose -X: opposite the renderer's heading 0
|
||||
@@ -201,18 +203,15 @@ export const FLEET_DR_INTERVAL_MS = 80;
|
||||
/**
|
||||
* The icon-to-model rules the aircraft layers follow, as the Vessels, Transit
|
||||
* and Rail layers take them (`createFleetModelLayer`): the same altitude
|
||||
* ceiling, minimum pixel size, proximity/all caps, add/keep radii and
|
||||
* eligibility cadence, so every layer turns icons into models at one distance.
|
||||
* ceiling, proximity/all caps, add/keep radii and eligibility cadence, so
|
||||
* every layer turns icons into models at one distance, drawn at true size.
|
||||
*/
|
||||
export const FLEET_MODEL_POLICY = Object.freeze({
|
||||
altitudeCeilingM: MODEL_ALT_CEIL_M,
|
||||
minimumPixelSize: MODEL_MIN_PX,
|
||||
cap: MODEL_MAX,
|
||||
capAll: MODEL_MAX_ALL,
|
||||
addM: MODEL_PROX_ADD_M,
|
||||
addAllM: MODEL_ALL_ADD_M,
|
||||
keepM: MODEL_PROX_KEEP_M,
|
||||
keepAllM: MODEL_ALL_KEEP_M,
|
||||
addM: MODEL_ADD_M,
|
||||
keepM: MODEL_KEEP_M,
|
||||
intervalMs: FLEET_DR_INTERVAL_MS,
|
||||
});
|
||||
|
||||
|
||||
@@ -345,11 +345,11 @@ export function createQueries({
|
||||
|
||||
/**
|
||||
* Live layer params.
|
||||
* `models3d` toggles 3D glTF model rendering for the FLEET (altitude-gated): when on,
|
||||
* surrounding aircraft become 3D models once the camera is zoomed in past MODEL_ALT_CEIL_M.
|
||||
* `models3d` toggles 3D glTF model rendering for the FLEET: when on, aircraft within
|
||||
* MODEL_ADD_M (3 km) of the camera become 3D models, drawn at their true size.
|
||||
* The TRACKED contact follows the same rule (`_trackedModelRegimeActive`), so selecting
|
||||
* a contact never turns its icon into a model or its model into an icon.
|
||||
* `models3dMode` is 'proximity' (nearest MODEL_MAX in view) or 'all' (every in-view plane).
|
||||
* `models3dMode` is 'proximity' (cap MODEL_MAX) or 'all' (cap MODEL_MAX_ALL); both use the 3 km radius.
|
||||
* @param {{models3d?: boolean, models3dMode?: 'proximity'|'all', selectedFlightsTrackingId?: string|null}} params
|
||||
*/
|
||||
setParams(params = {}, { origin = 'programmatic' } = {}) {
|
||||
|
||||
@@ -28,6 +28,10 @@ import {
|
||||
} from '../../data/trackingClickGesture.js';
|
||||
import { inputFor } from '../../input/dispatcher.js';
|
||||
import {
|
||||
COCKPIT_AIR_ALL_ADD_M,
|
||||
COCKPIT_AIR_ALL_KEEP_M,
|
||||
COCKPIT_AIR_PROX_ADD_M,
|
||||
COCKPIT_AIR_PROX_KEEP_M,
|
||||
TRAIL_MAX_POINTS,
|
||||
TRAIL_COLOR,
|
||||
CYAN_TRANSPARENT,
|
||||
@@ -222,11 +226,13 @@ export function createTracking({
|
||||
);
|
||||
distancesSquared.push([icao24, distanceSquared(eye, position)]);
|
||||
}
|
||||
// The AIR band follows the 3D mode, not the 3D model radius.
|
||||
const all = flightState._models3dMode === 'all';
|
||||
const next = nextCockpitNearContacts(
|
||||
previous,
|
||||
distancesSquared,
|
||||
parts.rendering._modelAddDistM(),
|
||||
parts.rendering._modelKeepDistM(),
|
||||
all ? COCKPIT_AIR_ALL_ADD_M : COCKPIT_AIR_PROX_ADD_M,
|
||||
all ? COCKPIT_AIR_ALL_KEEP_M : COCKPIT_AIR_PROX_KEEP_M,
|
||||
);
|
||||
flightState._cockpitNearContacts = next;
|
||||
for (const icao24 of previous)
|
||||
|
||||
@@ -196,13 +196,14 @@ function fakeFeeds(initial = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
/** A viewer whose camera looks down on (0°, 0°) from 50 km. */
|
||||
/** A viewer whose camera looks down on (0°, 0°) from 2 km: within the 3 km
|
||||
* model radius of an aircraft there on the ground or at 10,000 ft. */
|
||||
function modelViewer() {
|
||||
return fakeViewer(
|
||||
{ scene: {} },
|
||||
{
|
||||
height: 50_000,
|
||||
position: { x: 6_378_137 + 50_000, y: 0, z: 0 },
|
||||
height: 2_000,
|
||||
position: { x: 6_378_137 + 2_000, y: 0, z: 0 },
|
||||
direction: { x: -1, y: 0, z: 0 },
|
||||
},
|
||||
);
|
||||
|
||||
@@ -11,15 +11,12 @@ import { aircraftLayerModelSpec } from '../flights/modelSpec.js';
|
||||
import { fleetModelSet, loadFleetModelSet } from '../../data/fleetModels.js';
|
||||
import {
|
||||
FLEET_DR_INTERVAL_MS,
|
||||
MODEL_ALL_ADD_M,
|
||||
MODEL_ALL_KEEP_M,
|
||||
MODEL_ADD_M,
|
||||
MODEL_ALT_CEIL_M,
|
||||
MODEL_HEADING_OFFSET_DEG,
|
||||
MODEL_KEEP_M,
|
||||
MODEL_MAX,
|
||||
MODEL_MAX_ALL,
|
||||
MODEL_MIN_PX,
|
||||
MODEL_PROX_ADD_M,
|
||||
MODEL_PROX_KEEP_M,
|
||||
} from '../flights/policy.js';
|
||||
import {
|
||||
AIRCRAFT_ENVIRONMENT_MAP_OPTIONS,
|
||||
@@ -173,19 +170,17 @@ export function createLocalAdsbModels({
|
||||
function refreshEligibility(markers, preferences, pose) {
|
||||
const all = preferences.models3dMode === 'all';
|
||||
const cap = all ? MODEL_MAX_ALL : MODEL_MAX;
|
||||
const addM = all ? MODEL_ALL_ADD_M : MODEL_PROX_ADD_M;
|
||||
const keepM = all ? MODEL_ALL_KEEP_M : MODEL_PROX_KEEP_M;
|
||||
const candidates = [];
|
||||
for (const [id, marker] of markers) {
|
||||
if (!marker.position) continue;
|
||||
const distanceSq = distanceSquared(pose.position, marker.position);
|
||||
if (distanceSq > keepM * keepM) continue;
|
||||
if (distanceSq > MODEL_KEEP_M * MODEL_KEEP_M) continue;
|
||||
candidates.push([id, distanceSq, inView(pose, marker.position)]);
|
||||
}
|
||||
candidates.sort((a, b) => a[1] - b[1]);
|
||||
eligible = selectModelEligible(candidates, {
|
||||
cap,
|
||||
addDistSq: addM * addM,
|
||||
addDistSq: MODEL_ADD_M * MODEL_ADD_M,
|
||||
isModeled: (id) => models.has(id),
|
||||
});
|
||||
release([...models.keys()].filter((id) => !eligible.has(id)));
|
||||
@@ -263,7 +258,6 @@ export function createLocalAdsbModels({
|
||||
roll: 0,
|
||||
},
|
||||
scale: spec.scale,
|
||||
minPixelSize: MODEL_MIN_PX,
|
||||
// The mesh's own colours (white, multiplied).
|
||||
tint: WHITE,
|
||||
colorBlend: aircraftModelBlend(false),
|
||||
|
||||
@@ -44,7 +44,6 @@ import {
|
||||
import {
|
||||
displayDelayMs,
|
||||
followsClock,
|
||||
MODEL_MIN_PX,
|
||||
BILLBOARD_SCALE,
|
||||
TRACKED_BILLBOARD_SCALE_BY_DISTANCE,
|
||||
DR_CORRECTION_MS,
|
||||
@@ -312,11 +311,11 @@ export function createMotion({
|
||||
const spec = parts.rendering._modelSpec(
|
||||
flightState.records.data.get(icao24),
|
||||
);
|
||||
// Drawn as the fleet draws it: its own size, never under MODEL_MIN_PX.
|
||||
// Drawn as the fleet draws it: at its true size.
|
||||
const focalLengthPx = viewportHeightPx / (2 * Math.tan(pose.fovy / 2));
|
||||
const projectedDiameterPx =
|
||||
(2 * spec.nativeRadiusM * spec.scale * focalLengthPx) / rangeM;
|
||||
return Math.max(MODEL_MIN_PX, projectedDiameterPx);
|
||||
return projectedDiameterPx;
|
||||
}
|
||||
|
||||
const sprite = readEntityRecord(flightState._trackedEntity)?.sprite;
|
||||
@@ -515,9 +514,8 @@ export function createMotion({
|
||||
}
|
||||
|
||||
/** The tracked model's rendered bounding radius (m), or 0 when no model of this
|
||||
* contact is drawing. Carries the scale it is drawn at, which may be
|
||||
* above `scale` to satisfy its pixel floor — the trail head has to be judged
|
||||
* against the size the operator SEES, not the nominal one. */
|
||||
* contact is drawing, at the scale it is drawn at — the trail head has to
|
||||
* be judged against the size the operator SEES. */
|
||||
/** World-space origin of the tracked model, or null when no model of this
|
||||
* contact is drawing. This is the centre the rendered bounding sphere is
|
||||
* measured from, so the trail clip and the envelope agree on one frame. */
|
||||
|
||||
@@ -61,21 +61,26 @@ export const MODEL_WHITE = rgba('#FFFFFF');
|
||||
export const GROUND_SCALE = 0.8;
|
||||
|
||||
// --- 3D model rendering (mirrors flights.js) -----------------------------------------
|
||||
// When enabled, military aircraft render as 3D glTF models once the camera is below
|
||||
// MODEL_ALT_CEIL_M (zoomed in); higher up they stay flat billboards. Eligibility is
|
||||
// FRUSTUM-based (on-screen), and the slots go to either the nearest planes ('proximity')
|
||||
// or every in-view plane ('all'), each backed by a hard cap so a draw-call explosion
|
||||
// can't tank the frame (no instancing yet). Each aircraft draws the fleet model of its
|
||||
// type, as the flights layer does; the amber tint sets this layer apart.
|
||||
// When enabled, a military aircraft draws as its 3D glTF model only within MODEL_ADD_M of the
|
||||
// camera (eye to aircraft); farther away it stays its icon. Models are drawn at their true size,
|
||||
// with no minimum pixel size. Eligibility is distance-based with on-screen priority, and the slots
|
||||
// go to either the nearest planes ('proximity') or every in-range plane ('all'): the two modes share
|
||||
// the radius and differ by their caps. Each aircraft draws the fleet model of its type, as the
|
||||
// flights layer does; the amber tint sets this layer apart.
|
||||
|
||||
export const MODEL_ALT_CEIL_M = 800000;
|
||||
// m: below this camera altitude, draw 3D models (raised so it's easy to trigger)
|
||||
export const MODEL_ADD_M = 3000;
|
||||
// model NEW planes within 3 km of the camera (mirror of flights.js)
|
||||
|
||||
export const MODEL_MIN_PX = 24;
|
||||
// floor so distant models stay visible without ballooning into a min-pixel blob (mirror of flights.js)
|
||||
export const MODEL_KEEP_M = 3600;
|
||||
// KEEP modeled planes out to 3.6 km (hysteresis, mirror of flights.js)
|
||||
|
||||
// Per-mode caps + radii — mirror of flights.js. Modes differ by RADIUS (not just cap) so Proximity
|
||||
// and All aren't identical when few planes are in range; on-screen planes win the cap (see flights.js).
|
||||
export const MODEL_HIGHEST_CONTACT_M = 30000;
|
||||
// m above the ellipsoid: no aircraft the layer draws flies higher (mirror of flights.js)
|
||||
|
||||
export const MODEL_ALT_CEIL_M = MODEL_HIGHEST_CONTACT_M + MODEL_KEEP_M;
|
||||
// m: above this camera altitude no contact can be within MODEL_KEEP_M (mirror of flights.js)
|
||||
|
||||
// Per-mode caps — mirror of flights.js; on-screen planes win the cap (see flights.js).
|
||||
|
||||
export const MODEL_MAX = 150;
|
||||
// 'proximity' cap
|
||||
@@ -83,24 +88,20 @@ export const MODEL_MAX = 150;
|
||||
export const MODEL_MAX_ALL = 350;
|
||||
// 'all' cap
|
||||
|
||||
export const MODEL_PROX_ADD_M = 150000;
|
||||
// proximity: model NEW planes within 150 km
|
||||
|
||||
export const MODEL_PROX_KEEP_M = 185000;
|
||||
// proximity: KEEP modeled planes out to 185 km
|
||||
|
||||
// Cockpit keeps the standard Display radii but lowers the GLB budget. Contacts
|
||||
// inside the selected band remain AIR silhouettes when they cannot own a model;
|
||||
// contacts outside the band use compact dots.
|
||||
|
||||
export const COCKPIT_MODEL_MAX = 60;
|
||||
// max concurrent GLBs in cockpit (never raises the map cap)
|
||||
|
||||
export const MODEL_ALL_ADD_M = 400000;
|
||||
// all: model NEW planes within 400 km (~to the horizon)
|
||||
// Cockpit's AIR band (mirror of flights.js): contacts inside it remain AIR
|
||||
// silhouettes when they cannot own a model; contacts outside it use compact
|
||||
// dots. Independent of the 3D model radius.
|
||||
|
||||
export const MODEL_ALL_KEEP_M = 450000;
|
||||
// all: KEEP modeled planes out to 450 km
|
||||
export const COCKPIT_AIR_PROX_ADD_M = 150000;
|
||||
|
||||
export const COCKPIT_AIR_PROX_KEEP_M = 185000;
|
||||
|
||||
export const COCKPIT_AIR_ALL_ADD_M = 400000;
|
||||
|
||||
export const COCKPIT_AIR_ALL_KEEP_M = 450000;
|
||||
|
||||
export const MODEL_HEADING_OFFSET_DEG = 180;
|
||||
// every fleet model is nose -X: opposite Cesium heading 0
|
||||
|
||||
@@ -249,11 +249,11 @@ export function createQueries({
|
||||
|
||||
/**
|
||||
* Live layer params.
|
||||
* `models3d` toggles 3D glTF jet-model rendering for the FLEET (altitude-gated): when on,
|
||||
* surrounding military aircraft become 3D models once the camera is zoomed in past
|
||||
* MODEL_ALT_CEIL_M. The TRACKED contact follows the same rule (`_trackedModelRegimeActive`),
|
||||
* `models3d` toggles 3D glTF jet-model rendering for the FLEET: when on, military
|
||||
* aircraft within MODEL_ADD_M (3 km) of the camera become 3D models, drawn at their true
|
||||
* size. The TRACKED contact follows the same rule (`_trackedModelRegimeActive`),
|
||||
* so selecting a contact never turns its icon into a model or its model into an icon.
|
||||
* `models3dMode` is 'proximity' (nearest MODEL_MAX in view) or 'all' (every in-view plane).
|
||||
* `models3dMode` is 'proximity' (cap MODEL_MAX) or 'all' (cap MODEL_MAX_ALL); both use the 3 km radius.
|
||||
* @param {{models3d?: boolean, models3dMode?: 'proximity'|'all', selectedMilitaryTrackingId?: string|null}} params
|
||||
*/
|
||||
setParams(params = {}, { origin = 'programmatic' } = {}) {
|
||||
|
||||
@@ -27,6 +27,10 @@ import {
|
||||
} from '../../data/trackingClickGesture.js';
|
||||
import { inputFor } from '../../input/dispatcher.js';
|
||||
import {
|
||||
COCKPIT_AIR_ALL_ADD_M,
|
||||
COCKPIT_AIR_ALL_KEEP_M,
|
||||
COCKPIT_AIR_PROX_ADD_M,
|
||||
COCKPIT_AIR_PROX_KEEP_M,
|
||||
TRAIL_MAX_POINTS,
|
||||
displayDelayMs,
|
||||
followsClock,
|
||||
@@ -212,11 +216,13 @@ export function createTracking({
|
||||
);
|
||||
distancesSquared.push([icao24, distanceSquared(eye, position)]);
|
||||
}
|
||||
// The AIR band follows the 3D mode, not the 3D model radius.
|
||||
const all = flightState._models3dMode === 'all';
|
||||
const next = nextCockpitNearContacts(
|
||||
previous,
|
||||
distancesSquared,
|
||||
parts.rendering._modelAddDistM(),
|
||||
parts.rendering._modelKeepDistM(),
|
||||
all ? COCKPIT_AIR_ALL_ADD_M : COCKPIT_AIR_PROX_ADD_M,
|
||||
all ? COCKPIT_AIR_ALL_KEEP_M : COCKPIT_AIR_PROX_KEEP_M,
|
||||
);
|
||||
flightState._cockpitNearContacts = next;
|
||||
for (const icao24 of previous)
|
||||
|
||||
@@ -978,11 +978,7 @@ export function createRendering({ state, services, parts }) {
|
||||
if (now - modelCandidatesAtMs >= MODEL_CANDIDATES_MS) {
|
||||
modelCandidatesAtMs = now;
|
||||
const eye = cameraPose()?.position;
|
||||
const policy = services.fleet.policy;
|
||||
const keepM =
|
||||
services.fleet.display?.()?.models3dMode === 'all'
|
||||
? policy.keepAllM
|
||||
: policy.keepM;
|
||||
const keepM = services.fleet.policy.keepM;
|
||||
const limitSq = keepM * keepM * 1.44;
|
||||
if (eye)
|
||||
for (const entry of state._trains.values()) {
|
||||
|
||||
@@ -614,11 +614,7 @@ export function createRendering({
|
||||
? findCamera(state.viewer)?.pose()?.position
|
||||
: null;
|
||||
if (!eye) return;
|
||||
const policy = services.fleet.policy;
|
||||
const keepM =
|
||||
services.fleet.display?.()?.models3dMode === 'all'
|
||||
? policy.keepAllM
|
||||
: policy.keepM;
|
||||
const keepM = services.fleet.policy.keepM;
|
||||
const limitSq = keepM * keepM * 1.44;
|
||||
for (const record of state.records.all) {
|
||||
const waterline = getVisual(record).waterline;
|
||||
|
||||
@@ -7,13 +7,10 @@ import { fetchPublicFile } from './fleetGlb.mjs';
|
||||
/** A model policy whose eligibility is read again on every frame. */
|
||||
export const FLEET_TEST_POLICY = Object.freeze({
|
||||
altitudeCeilingM: 800_000,
|
||||
minimumPixelSize: 16,
|
||||
cap: 4,
|
||||
capAll: 8,
|
||||
addM: 5_000,
|
||||
addAllM: 20_000,
|
||||
keepM: 6_000,
|
||||
keepAllM: 24_000,
|
||||
intervalMs: 0,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user