refactor(ui): engine-specific sharpen defaults instead of reading 49 as 80

The baseline and the style presets name ENGINE_SHARPEN_DEFAULT, which
resolves to 49 % on Cesium and 80 % on Navara. Share links and explicit
calls restore their value unchanged.
This commit is contained in:
German Khokhlov committed 2026-10-16 14:29:31 +04:00
1 parent abf16ae8af
commit a8a2ad5582
4 files changed
+73 -66

No files matched your search

+5
View File
@@ -182,6 +182,7 @@ test('on Navara, presets set the Sharpen slider to 80 % and the engine draws it'
governorRequestRender() {},
holdContinuousRender() {},
releaseContinuousRender() {},
setKeyholeFadeTuning() {},
},
readHud: () => ({ getVariant: () => 'tactical', setMode() {} }),
});
@@ -195,5 +196,9 @@ test('on Navara, presets set the Sharpen slider to 80 % and the engine draws it'
{ enabled: true },
{ amount: 1.7000000000000002 },
]);
// A share link carries an explicit value: 49 stays 49 on Navara.
await owner.restoreShareState({ sharpenIntensity: 49, sharpen: true });
assert.equal(elements._sharpenSlider.value, '49');
assert.deepEqual(sharpen.at(-1), { amount: 1.08 });
owner.destroy();
});