Share the aircraft 3D-model regime between flights and military

This commit is contained in:
Sameh Khamis committed 2026-11-03 20:55:09 -08:00
1 parent b027bde6ad
commit 816002e3b9
10 files changed
+992 -1773

No files matched your search

+3 -3
View File
@@ -370,9 +370,9 @@ function layerConstants(sourceFile) {
function normalBillboardScaleByDistance(sourceFile) {
const src = readLayerSource(path.join(ROOT, sourceFile));
const fn = src.match(/function (?:parts\.\w+\.)?_normalBillboardScaleByDistance\(\) \{([\s\S]*?)\n\}/);
assert.ok(fn, `${sourceFile}: _normalBillboardScaleByDistance not found`);
const scalar = fn[1].match(/NearFarScalar\((\d+), ([\d.]+), (\d+), ([\d.]+)\)/);
const fn = src.match(/const NORMAL_SCALE_BY_DISTANCE = ([\s\S]*?\);)/);
assert.ok(fn, `${sourceFile}: NORMAL_SCALE_BY_DISTANCE not found`);
const scalar = fn[1].match(/NearFarScalar\(\s*(\d+),\s*([\d.]+),\s*(\d+),\s*([\d.]+),?\s*\)/);
assert.ok(scalar, `${sourceFile}: billboard NearFarScalar not found`);
return scalar.slice(1).map(Number);
}