mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Share the aircraft 3D-model regime between flights and military
This commit is contained in:
1 parent
b027bde6ad
commit
816002e3b9
10 files changed
+992
-1773
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user