mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
refactor(ui): separate visual effects and animation ownership
This commit is contained in:
1 parent
5f60d86bc9
commit
c30f7cc3be
15 files changed
+684
-308
No files matched your search
@@ -41,7 +41,9 @@ import {
|
||||
} from './scopeMask.js';
|
||||
import { ShareLinkManager } from './sharelink.js';
|
||||
|
||||
const uiSource = fs.readFileSync(new URL('./ui.js', import.meta.url), 'utf8');
|
||||
// Follow the UI wiring and its extracted preset definitions.
|
||||
const uiSource = fs.readFileSync(new URL('./ui.js', import.meta.url), 'utf8')
|
||||
+ '\n' + fs.readFileSync(new URL('./ui/visualPresets.js', import.meta.url), 'utf8');
|
||||
const indexHtml = fs.readFileSync(new URL('../index.html', import.meta.url), 'utf8');
|
||||
const shareSource = fs.readFileSync(new URL('./sharelink.js', import.meta.url), 'utf8');
|
||||
|
||||
@@ -210,7 +212,7 @@ test('first run opens with detection on, in every style, using the one tactical
|
||||
// Normal used to start OFF while only CRT/NVG/FLIR auto-applied the preset.
|
||||
// It is now the baseline for all of them, reusing the SAME frozen object, so
|
||||
// "the tactical look" cannot fork into two definitions.
|
||||
assert.match(uiSource, /const MILITARY_DETECTION_PRESET = Object\.freeze\(\{ mode: 'dense', densityPct: 75 \}\);/,
|
||||
assert.match(uiSource, /const MILITARY_DETECTION_PRESET = Object\.freeze\(\{\s*mode: 'dense',\s*densityPct: 75,?\s*\}\);/,
|
||||
'the tactical look is still Dense @ 75%');
|
||||
const baseline = uiBlock('const GLOBAL_POST_DEFAULTS = {', '\n};');
|
||||
assert.match(baseline, /detectionMode: MILITARY_DETECTION_PRESET\.mode\.toUpperCase\(\),/,
|
||||
|
||||
Reference in new issue
Block a user