feat(map): add functional sector grid v2
This commit is contained in:
@@ -23,7 +23,17 @@ const settings = {
|
||||
};
|
||||
|
||||
test("canonical defaults preserve the exact effective MMAP/MOSCOWMAP five-LOD donor profile", () => {
|
||||
assert.deepEqual(DEFAULT_GRID_LOD_PROFILES, [
|
||||
const donorProfiles = DEFAULT_GRID_LOD_PROFILES.map(({
|
||||
majorLinesEnabled: _majorLinesEnabled,
|
||||
majorLabelsEnabled: _majorLabelsEnabled,
|
||||
majorLineWidthMultiplier: _majorLineWidthMultiplier,
|
||||
volumeEnabled: _volumeEnabled,
|
||||
volumeMinimumHeightMeters: _volumeMinimumHeightMeters,
|
||||
volumeMaximumHeightMeters: _volumeMaximumHeightMeters,
|
||||
volumeBandHeightMeters: _volumeBandHeightMeters,
|
||||
...profile
|
||||
}) => profile);
|
||||
assert.deepEqual(donorProfiles, [
|
||||
{
|
||||
maxHeightKm: 10,
|
||||
stepKm: 1,
|
||||
@@ -150,6 +160,21 @@ test("canonical defaults preserve the exact effective MMAP/MOSCOWMAP five-LOD do
|
||||
graticuleOpacity: 8,
|
||||
},
|
||||
]);
|
||||
assert.deepEqual(DEFAULT_GRID_LOD_PROFILES.map((profile) => ({
|
||||
majorLinesEnabled: profile.majorLinesEnabled,
|
||||
majorLabelsEnabled: profile.majorLabelsEnabled,
|
||||
majorLineWidthMultiplier: profile.majorLineWidthMultiplier,
|
||||
volumeEnabled: profile.volumeEnabled,
|
||||
volumeMinimumHeightMeters: profile.volumeMinimumHeightMeters,
|
||||
volumeMaximumHeightMeters: profile.volumeMaximumHeightMeters,
|
||||
volumeBandHeightMeters: profile.volumeBandHeightMeters,
|
||||
})), [
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 300, volumeBandHeightMeters: 300 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
]);
|
||||
});
|
||||
|
||||
test("LOD selection keeps three spatial bands, two graticule bands and the independent 10,000 km cutoff", () => {
|
||||
@@ -264,6 +289,15 @@ test("renderer uses fixed ENU sectors, angular graticules and a non-blank double
|
||||
assert.match(source, /lod\.graticuleLineWidthPx/);
|
||||
assert.match(source, /arcType: ArcType\.RHUMB/);
|
||||
assert.match(source, /clampToGround: false/);
|
||||
assert.match(source, /majorLineWidthMultiplier/);
|
||||
assert.match(source, /isLocalMajorLineIndex/);
|
||||
assert.match(source, /isGraticuleMajorLineValue/);
|
||||
assert.match(source, /new LabelCollection\(\)/);
|
||||
assert.match(source, /const maximumLabels = 48/);
|
||||
assert.match(source, /materializeLocalSelection/);
|
||||
assert.match(source, /localVolumeAt\(/);
|
||||
assert.match(source, /focusGridSector/);
|
||||
assert.match(source, /selectedGridSector/);
|
||||
assert.match(source, /mountResources\(resources\)[\s\S]*?const previous = this\.current;[\s\S]*?removeResources\(previous\.resources\)/);
|
||||
assert.doesNotMatch(source, /function rebuildElevatedGrid[\s\S]*?entities\.removeAll\(\)/);
|
||||
assert.doesNotMatch(source, /Math\.min\(40,[\s\S]*?safeRadiusKm \/ safeStepKm/);
|
||||
|
||||
Reference in New Issue
Block a user