@adatechnology/game-vehicles-fleet 6.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +278 -5
- package/dist/index.global.js +318 -156
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +318 -156
- package/dist/index.js.map +1 -1
- package/package.json +13 -4
package/dist/index.js
CHANGED
|
@@ -3748,6 +3748,34 @@ function createScenarios(name) {
|
|
|
3748
3748
|
];
|
|
3749
3749
|
}
|
|
3750
3750
|
|
|
3751
|
+
// src/spokes.ts
|
|
3752
|
+
var THICKNESS_STEP = 0.0625;
|
|
3753
|
+
var THINNEST = 0.15;
|
|
3754
|
+
var CLEARANCE = 15e-4;
|
|
3755
|
+
var SPOKE_HALF_THICKNESS = 0.02;
|
|
3756
|
+
var DISH_HALF_THICKNESS = 0.025;
|
|
3757
|
+
function sharesPlaneWithDish(reach, scale) {
|
|
3758
|
+
const dishReach = reach * 0.9;
|
|
3759
|
+
const outer = Math.abs(reach + SPOKE_HALF_THICKNESS * scale - (dishReach + DISH_HALF_THICKNESS));
|
|
3760
|
+
const inner = Math.abs(reach - SPOKE_HALF_THICKNESS * scale - (dishReach - DISH_HALF_THICKNESS));
|
|
3761
|
+
return outer < CLEARANCE || inner < CLEARANCE;
|
|
3762
|
+
}
|
|
3763
|
+
function separateSpokes(context) {
|
|
3764
|
+
for (const wheel of context.wheels) {
|
|
3765
|
+
let previous = 1 + THICKNESS_STEP;
|
|
3766
|
+
for (const child of wheel.children) {
|
|
3767
|
+
const mesh = child;
|
|
3768
|
+
const type = mesh.geometry?.type;
|
|
3769
|
+
if (!mesh.isMesh || type !== "BufferGeometry" && type !== "BoxGeometry" || mesh.position.z === 0) continue;
|
|
3770
|
+
const reach = Math.abs(mesh.position.z);
|
|
3771
|
+
let scale = previous - THICKNESS_STEP;
|
|
3772
|
+
while (sharesPlaneWithDish(reach, scale) && scale > THINNEST) scale -= THICKNESS_STEP / 2;
|
|
3773
|
+
mesh.scale.z = Math.max(scale, THINNEST);
|
|
3774
|
+
previous = scale;
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3751
3779
|
// src/vehicles/boats-extra.ts
|
|
3752
3780
|
function installBoatsExtra(fx) {
|
|
3753
3781
|
const kit = fx.kit;
|
|
@@ -4182,12 +4210,12 @@ function installBoatsExtra(fx) {
|
|
|
4182
4210
|
cs.castShadow = false;
|
|
4183
4211
|
[1, -1].forEach(function(s) {
|
|
4184
4212
|
c.roundBox(2.6, 0.06, 0.42, 0.02, teak, -2.45, 0.86, s * 0.82);
|
|
4185
|
-
c.roundBox(2.6, 0.
|
|
4213
|
+
c.roundBox(2.6, 0.376, 0.06, 0.02, white, -2.45, 0.671, s * 0.6);
|
|
4186
4214
|
c.roundBox(2.8, 0.22, 0.05, 0.02, white, -2.4, 1.02, s * (H.sheerAt(-2.4).z - 0.32));
|
|
4187
4215
|
c.cylinder(0.06, 0.07, 0.11, MT.chrome, -1.6, 1.15, s * 1.06);
|
|
4188
4216
|
c.cylinder(0.035, 0.035, 0.02, MT.chrome, -1.6, 1.21, s * 1.06);
|
|
4189
4217
|
});
|
|
4190
|
-
c.roundBox(0.3, 0.
|
|
4218
|
+
c.roundBox(0.3, 0.376, 1.2, 0.03, white, -3.75, 0.671, 0);
|
|
4191
4219
|
c.seatTops.push({ x: -2.6, y: 0.9, z: 0.82, w: 0.42, l: 2.4 }, { x: -2.6, y: 0.9, z: -0.82, w: 0.42, l: 2.4 });
|
|
4192
4220
|
const trST = [
|
|
4193
4221
|
[-1.1, 0.8, 1.56, 2, 6],
|
|
@@ -4596,9 +4624,9 @@ function installBoatsExtra(fx) {
|
|
|
4596
4624
|
});
|
|
4597
4625
|
c.roundBox(1.6, 0.03, 0.1, 0.01, MT.wood, 0.3, 0.05, 0.38, { rot: [0.2, 0, 0] });
|
|
4598
4626
|
c.roundBox(1.6, 0.03, 0.1, 0.01, MT.wood, 0.3, 0.06, 0.28, { rot: [0.2, 0, 0] });
|
|
4599
|
-
c.roundBox(0.36, 0.24, 0.26, 0.03, CM("#ffffff", { roughness: 0.5 }), 1.25, 0.
|
|
4627
|
+
c.roundBox(0.36, 0.24, 0.26, 0.03, CM("#ffffff", { roughness: 0.5 }), 1.25, 0.142, 0.15);
|
|
4600
4628
|
c.roundBox(0.1, 0.03, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.282);
|
|
4601
|
-
c.roundBox(0.03, 0.1, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.
|
|
4629
|
+
c.roundBox(0.03, 0.1, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.284);
|
|
4602
4630
|
const buoy = c.add(new THREE.TorusGeometry(0.24, 0.06, 10, 24), CM("#f0f0ea", { roughness: 0.6 }), 1.1, 0.1, -0.2);
|
|
4603
4631
|
buoy.rotation.x = PI / 2;
|
|
4604
4632
|
const motor = EA.outboard(c, -1.99, 0.55, 0, { k: 1, tiller: true, label: "40", col: "#1d1f22" });
|
|
@@ -4734,7 +4762,7 @@ function installBoatsExtra(fx) {
|
|
|
4734
4762
|
return Math.min(0.06 - y, x - x0 - 0.04);
|
|
4735
4763
|
}),
|
|
4736
4764
|
CM("#1d2023", { roughness: 0.6 }),
|
|
4737
|
-
{ sz: 1.004, dy: 3e-3 }
|
|
4765
|
+
{ sz: 1.004, dy: 3e-3, ends: false }
|
|
4738
4766
|
);
|
|
4739
4767
|
EA.sheerTube(c, H, x0 + 0.02, 6.2, 0.07, blk, { dy: -0.1, dz: 0.02 });
|
|
4740
4768
|
const deck = c.add(EA.deckGeo(H, x0 + 0.02, 6.32, { n: 40, m: 10, crown: 0.05 }), deckC);
|
|
@@ -4999,6 +5027,20 @@ function installBoatsExtra(fx) {
|
|
|
4999
5027
|
);
|
|
5000
5028
|
}
|
|
5001
5029
|
|
|
5030
|
+
// src/vehicles/moving-parts.ts
|
|
5031
|
+
var WIPER_SWEEP = 1.5;
|
|
5032
|
+
function tagWiper(params) {
|
|
5033
|
+
var _a;
|
|
5034
|
+
const tag = { arm: params.index, sweep: WIPER_SWEEP, spindle: [params.spindle.x, params.spindle.y, params.spindle.z], axis: [params.normal.x, params.normal.y, params.normal.z] };
|
|
5035
|
+
(_a = params.context).wipers ?? (_a.wipers = []);
|
|
5036
|
+
for (const part of params.parts) params.context.wipers.push({ part, tag });
|
|
5037
|
+
}
|
|
5038
|
+
function markSunroof(pane, slide) {
|
|
5039
|
+
pane.name = "sunroof";
|
|
5040
|
+
pane.userData.sunroof = { slide };
|
|
5041
|
+
return pane;
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5002
5044
|
// src/vehicles/cars-extra.ts
|
|
5003
5045
|
function installCarsExtra(fx) {
|
|
5004
5046
|
const kit = fx.kit;
|
|
@@ -5496,7 +5538,7 @@ function installCarsExtra(fx) {
|
|
|
5496
5538
|
off: 3e-3,
|
|
5497
5539
|
nv: 4
|
|
5498
5540
|
});
|
|
5499
|
-
skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
5541
|
+
const reflector = skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
5500
5542
|
(o.proj || []).forEach(function(q) {
|
|
5501
5543
|
const r = sh(q[0]), y = (r[0] + r[1]) / 2 + (q[1] || 0), s = Gd.at(q[0], y), rad = q[2] || Math.min(0.034, (r[1] - r[0]) * 0.4);
|
|
5502
5544
|
const cup = onSurf(c.cylinder(rad * 1.35, rad * 1.2, 0.012, LH, 0, 0, 0), s, 8e-3);
|
|
@@ -5527,7 +5569,7 @@ function installCarsExtra(fx) {
|
|
|
5527
5569
|
lens.push(ln);
|
|
5528
5570
|
if (!inner.length) inner.push(ln);
|
|
5529
5571
|
const cs = Gd.at(0.5, (rg[0] + rg[1]) / 2).p;
|
|
5530
|
-
regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs);
|
|
5572
|
+
Object.assign(regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs), { reflector: [reflector] });
|
|
5531
5573
|
return Gd;
|
|
5532
5574
|
};
|
|
5533
5575
|
K.tail = function(sd, o) {
|
|
@@ -5868,7 +5910,7 @@ function installCarsExtra(fx) {
|
|
|
5868
5910
|
c.roundBox(0.02, 0.09, 0.16, 0.02, MT.chrome, mx - 0.065, my + 0.02, sd * (mz0 + 0.14));
|
|
5869
5911
|
if (s.mirrorBlink !== false) c.roundBox(0.02, 0.012, 0.12, 5e-3, MT.amber, mx + 0.03, my - 0.025, sd * (mz0 + 0.17));
|
|
5870
5912
|
(s.seams || []).forEach(function(q) {
|
|
5871
|
-
const x =
|
|
5913
|
+
const r = q, x = r.length ? r[0] : q, y0 = r.length ? r[1] : by + 0.09, y1 = r.length ? r[2] : gh.belt - 0.03;
|
|
5872
5914
|
c.roundBox(8e-3, y1 - y0, 6e-3, 3e-3, MT.dark, x, (y0 + y1) / 2, sd * (hw + 1e-3));
|
|
5873
5915
|
});
|
|
5874
5916
|
(s.handles || []).forEach(function(x) {
|
|
@@ -5913,12 +5955,18 @@ function installCarsExtra(fx) {
|
|
|
5913
5955
|
(s.wiper === 1 ? [[0.12, 0.66, -0.5]] : [
|
|
5914
5956
|
[-0.3, 0.42, -0.36],
|
|
5915
5957
|
[0.2, 0.42, -0.36]
|
|
5916
|
-
]).forEach(function(q) {
|
|
5958
|
+
]).forEach(function(q, index) {
|
|
5917
5959
|
const p0 = new V3(gh.fb, gh.belt, q[0]).addScaledVector(wd, 0.07).addScaledVector(wn, 0.035), p1 = p0.clone().addScaledVector(wd, q[1] * 0.42);
|
|
5918
5960
|
p1.z += q[2];
|
|
5919
|
-
c.rod(p0, p1, 9e-3, MT.trim);
|
|
5920
|
-
c.cylinder(0.018, 0.018, 0.03, MT.trim, p0.x, p0.y, p0.z);
|
|
5961
|
+
const blade = c.rod(p0, p1, 9e-3, MT.trim);
|
|
5962
|
+
const cap = c.cylinder(0.018, 0.018, 0.03, MT.trim, p0.x, p0.y, p0.z);
|
|
5963
|
+
tagWiper({ context: c, parts: [blade, cap], spindle: p0, normal: wn, index });
|
|
5921
5964
|
});
|
|
5965
|
+
if (s.sunroof) {
|
|
5966
|
+
const sx = gh.rt + (gh.ft - gh.rt) * 0.62, sl = 0.62, sw = 2 * (halfAt(gh.Wg, T, gh.roof) - 0.24), sy = roofAt(gh, sx), tilt = Math.atan2(roofAt(gh, sx + 0.3) - roofAt(gh, sx - 0.3), 0.6);
|
|
5967
|
+
c.roundBox(sl, 8e-3, sw, 0.01, PLASTIC, sx, sy + 4e-3, 0, { rot: [0, 0, tilt] }).castShadow = false;
|
|
5968
|
+
markSunroof(c.roundBox(sl + 0.03, 0.012, sw + 0.03, 0.01, MT.tint, sx, sy + 0.013, 0, { rot: [0, 0, tilt] }), sl * 0.85);
|
|
5969
|
+
}
|
|
5922
5970
|
if (s.fin !== false)
|
|
5923
5971
|
c.sphere(0.1, s.roofCol ? c.paint(s.roofCol) : GLOSS, gh.rt + 0.2, roofAt(gh, gh.rt + 0.2) + 0.045, 0, 1, 0.45, 0.28, {
|
|
5924
5972
|
tl: PI / 2
|
|
@@ -6050,7 +6098,9 @@ function installCarsExtra(fx) {
|
|
|
6050
6098
|
function fogLamp(c, s, r) {
|
|
6051
6099
|
onSurf(c.cylinder(r * 1.4, r * 1.4, 0.014, LH, 0, 0, 0), s, 6e-3).castShadow = false;
|
|
6052
6100
|
onSurf(c.cylinder(r, r, 0.012, REFL, 0, 0, 0), s, 0.012).castShadow = false;
|
|
6053
|
-
onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016)
|
|
6101
|
+
const bulb = onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016);
|
|
6102
|
+
bulb.castShadow = false;
|
|
6103
|
+
(c.fogBulbs ?? (c.fogBulbs = [])).push(bulb);
|
|
6054
6104
|
}
|
|
6055
6105
|
function crease(c, I, sd, pts, o) {
|
|
6056
6106
|
o = o || {};
|
|
@@ -6892,6 +6942,7 @@ function installCarsExtra(fx) {
|
|
|
6892
6942
|
function(c) {
|
|
6893
6943
|
const hex = "#8c2b2b";
|
|
6894
6944
|
car(c, {
|
|
6945
|
+
sunroof: fx.hasSunroof("turbo_hatch"),
|
|
6895
6946
|
W: 1.751,
|
|
6896
6947
|
col: hex,
|
|
6897
6948
|
shelf: 0.42,
|
|
@@ -7169,6 +7220,7 @@ function installCarsExtra(fx) {
|
|
|
7169
7220
|
function(c) {
|
|
7170
7221
|
const hex = "#5a5f66";
|
|
7171
7222
|
car(c, {
|
|
7223
|
+
sunroof: fx.hasSunroof("fastback_sedan"),
|
|
7172
7224
|
W: 1.799,
|
|
7173
7225
|
col: hex,
|
|
7174
7226
|
bottomY: 0.2,
|
|
@@ -7463,6 +7515,8 @@ function installCarsExtra(fx) {
|
|
|
7463
7515
|
fx.register(
|
|
7464
7516
|
{
|
|
7465
7517
|
key: "classic_six_sedan",
|
|
7518
|
+
// glass headlight lenses, as on cars of its time: they shatter (a modern car's are polycarbonate)
|
|
7519
|
+
headlightLens: "glass",
|
|
7466
7520
|
group: "cars",
|
|
7467
7521
|
name: trl("vehicles.classic_six_sedan.name"),
|
|
7468
7522
|
inspired: trl("vehicles.classic_six_sedan.inspired"),
|
|
@@ -7803,7 +7857,7 @@ function installCarsExtra(fx) {
|
|
|
7803
7857
|
[0.62, 0.48, -0.48, -0.62].forEach(function(z) {
|
|
7804
7858
|
const s = dg.at(dg.uz(z), 0.25);
|
|
7805
7859
|
c2.cylinder(0.045, 0.045, 0.1, EXH, s.p.x - 0.02, 0.25, z, "x");
|
|
7806
|
-
c2.cylinder(0.036, 0.036, 0.
|
|
7860
|
+
c2.cylinder(0.036, 0.036, 0.106, MT.dark, s.p.x - 0.02, 0.25, z, "x");
|
|
7807
7861
|
});
|
|
7808
7862
|
const lip = K.grid(-1, 0, { z1: 0.7, y0: 0.88, y1: 0.97, du: 0.03, dv: 0.02 });
|
|
7809
7863
|
K.skin(lip, GLOSS, { u0: 0.05, u1: 0.95, yb: 0.925, yt: 0.955, off: 0.016, thick: 0.02, nv: 2 });
|
|
@@ -8218,7 +8272,7 @@ function installHeavy(fx) {
|
|
|
8218
8272
|
side: s,
|
|
8219
8273
|
noPart: true
|
|
8220
8274
|
});
|
|
8221
|
-
c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.
|
|
8275
|
+
c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.119, by - bh * 0.3, s * 0.35);
|
|
8222
8276
|
});
|
|
8223
8277
|
}
|
|
8224
8278
|
c.roundBox(0.06, 0.06, 0.12, 0.02, MT.steel, bx + 0.13, by - bh * 0.35, 0);
|
|
@@ -8321,7 +8375,7 @@ function installHeavy(fx) {
|
|
|
8321
8375
|
-(W - 0.2) / 2 + (k + 0.5) * (W - 0.2) / 8
|
|
8322
8376
|
);
|
|
8323
8377
|
[1, -1].forEach(function(s) {
|
|
8324
|
-
c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.
|
|
8378
|
+
c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.118, ry - 0.2, s * 0.43);
|
|
8325
8379
|
});
|
|
8326
8380
|
m.rearBumper = bar;
|
|
8327
8381
|
c.part("bumper", trl("labels.rear_bumper"), bar, new V3(rear, 0.52, 0), 1);
|
|
@@ -9329,6 +9383,7 @@ function installHeavy(fx) {
|
|
|
9329
9383
|
hood: true
|
|
9330
9384
|
},
|
|
9331
9385
|
function(c) {
|
|
9386
|
+
c.meta.armor = "III";
|
|
9332
9387
|
const f = 3.75, W = 2.32, len = 1.85, ax = 2.5, wr = 0.506, ww = 0.28, col = "#56616b";
|
|
9333
9388
|
c.meta.bullet = true;
|
|
9334
9389
|
c.meta.cabLength = len + 0.15;
|
|
@@ -9382,7 +9437,7 @@ function installHeavy(fx) {
|
|
|
9382
9437
|
});
|
|
9383
9438
|
const vg = c.roundBox(0.32, 0.2, 0.03, 0.03, MT.armorGlass, 1.3, 2.45, zs);
|
|
9384
9439
|
kit.asGlass(c, vg, s > 0 ? lbl("right_armored_viewport") : lbl("left_armored_viewport"), "laminated");
|
|
9385
|
-
c.roundBox(0.4, 0.28, 0.02, 0.03, plate, 1.3, 2.45, zs - s *
|
|
9440
|
+
c.roundBox(0.4, 0.28, 0.02, 0.03, plate, 1.3, 2.45, zs - s * 8e-3);
|
|
9386
9441
|
for (let x = rear + 0.2; x < bx0; x += 0.3) {
|
|
9387
9442
|
c.sphere(0.018, MT.steel, x, 1.2, zs);
|
|
9388
9443
|
c.sphere(0.018, MT.steel, x, 2.98, zs);
|
|
@@ -9401,8 +9456,10 @@ function installHeavy(fx) {
|
|
|
9401
9456
|
c.cylinder(0.36, 0.38, 0.1, plate, -1.3, 3.13, 0);
|
|
9402
9457
|
c.cylinder(0.3, 0.3, 0.05, MT.steel, -1.3, 3.2, 0);
|
|
9403
9458
|
c.roundBox(0.2, 0.08, 1.3, 0.03, MT.trim, bx0 - 0.25, 3.13, 0);
|
|
9404
|
-
[-0.45, 0, 0.45].forEach(function(z) {
|
|
9405
|
-
c.roundBox(0.14, 0.08, 0.3, 0.03, MT.amber, bx0 - 0.25, 3.2, z);
|
|
9459
|
+
[-0.45, 0, 0.45].forEach(function(z, i) {
|
|
9460
|
+
const lamp = c.roundBox(0.14, 0.08, 0.3, 0.03, MT.amber, bx0 - 0.25, 3.2, z);
|
|
9461
|
+
lamp.userData.lamp = "beacon";
|
|
9462
|
+
lamp.userData.beaconSide = i % 2;
|
|
9406
9463
|
});
|
|
9407
9464
|
c.rod(new V3(-2.5, 3.08, 0.6), new V3(-2.5, 3.6, 0.6), 8e-3, MT.trim);
|
|
9408
9465
|
c.rod(new V3(-2.8, 3.08, -0.6), new V3(-2.8, 3.4, -0.6), 0.01, MT.trim);
|
|
@@ -9489,7 +9546,7 @@ function installHeavy(fx) {
|
|
|
9489
9546
|
const hx0 = 0.02, hx1 = 1.84 + FX, hy = 1.48;
|
|
9490
9547
|
[1, -1].forEach(function(s) {
|
|
9491
9548
|
c.roundBox(hx1 - hx0, 0.38, 0.035, 0.02, paint, (hx0 + hx1) / 2, 1.22, s * 0.36, { def: true });
|
|
9492
|
-
for (let j = 0; j < 5; j++) c.roundBox(0.22, 0.025, 0.012, 8e-3, MT.dark, 0.75 + j * 0.16, 1.24, s * 0.38);
|
|
9549
|
+
for (let j = 0; j < 5; j++) c.roundBox(0.22, 0.025, 0.012, 8e-3, MT.dark, 0.75 + j * 0.16, 1.24, s * (0.38 + j % 2 * 3e-3));
|
|
9493
9550
|
c.roundBox(1, 0.03, 0.02, 0.01, CM("#e9e6dd"), 0.55, 1.36, s * 0.38);
|
|
9494
9551
|
c.text("275", 0.3, 0.14, 0.32, 1.2, s * 0.384, s > 0 ? "+z" : "-z", { fg: "#f2efe6" });
|
|
9495
9552
|
});
|
|
@@ -9965,7 +10022,7 @@ function installHelicoptersExtra(fx) {
|
|
|
9965
10022
|
const hs = c.add(
|
|
9966
10023
|
EA.foilGeo(
|
|
9967
10024
|
[
|
|
9968
|
-
{ p: [-3.9, 1.44,
|
|
10025
|
+
{ p: [-3.9, 1.44, s * 2e-3], c: 0.3, t: 0.1 },
|
|
9969
10026
|
{ p: [-3.95, 1.44, s * 0.42], c: 0.22, t: 0.09 }
|
|
9970
10027
|
],
|
|
9971
10028
|
{ up: "y", n: 8 }
|
|
@@ -10204,7 +10261,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10204
10261
|
},
|
|
10205
10262
|
lbl("chin_windows"),
|
|
10206
10263
|
"tempered",
|
|
10207
|
-
{ pos: new V3(2.3, 0.88, 0) }
|
|
10264
|
+
{ pos: new V3(2.3, 0.88, 0), k: 0.988 }
|
|
10208
10265
|
);
|
|
10209
10266
|
[1, -1].forEach(function(s) {
|
|
10210
10267
|
EA.fuseGlass(
|
|
@@ -10304,7 +10361,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10304
10361
|
tipCol: "#e6e4dd",
|
|
10305
10362
|
phase: 0.25
|
|
10306
10363
|
});
|
|
10307
|
-
c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.
|
|
10364
|
+
c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.797, 0);
|
|
10308
10365
|
const bm = boom(
|
|
10309
10366
|
c,
|
|
10310
10367
|
EA,
|
|
@@ -10338,7 +10395,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10338
10395
|
const hs = c.add(
|
|
10339
10396
|
EA.foilGeo(
|
|
10340
10397
|
[
|
|
10341
|
-
{ p: [-4.05, 1.68,
|
|
10398
|
+
{ p: [-4.05, 1.68, s * 2e-3], c: 0.42, t: 0.12, cam: -0.04 },
|
|
10342
10399
|
{ p: [-4.1, 1.68, s * 0.99], c: 0.38, t: 0.11, cam: -0.04 }
|
|
10343
10400
|
],
|
|
10344
10401
|
{ up: "y", n: 8 }
|
|
@@ -10587,7 +10644,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10587
10644
|
},
|
|
10588
10645
|
lbl("chin_windows"),
|
|
10589
10646
|
"tempered",
|
|
10590
|
-
{ pos: new V3(3.05, 0.95, 0) }
|
|
10647
|
+
{ pos: new V3(3.05, 0.95, 0), k: 0.988 }
|
|
10591
10648
|
);
|
|
10592
10649
|
[1, -1].forEach(function(s) {
|
|
10593
10650
|
EA.fuseGlass(c, ST, EA.sideKeepP(fdP, 0.6, s), s > 0 ? lbl("co_pilot_door_window") : lbl("pilot_door_window"), "tempered", {
|
|
@@ -10752,7 +10809,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10752
10809
|
const hs = c.add(
|
|
10753
10810
|
EA.foilGeo(
|
|
10754
10811
|
[
|
|
10755
|
-
{ p: [-5.75, 2.1,
|
|
10812
|
+
{ p: [-5.75, 2.1, s * 2e-3], c: 0.62, t: 0.12, cam: -0.03 },
|
|
10756
10813
|
{ p: [-5.85, 2.1, s * 1.05], c: 0.52, t: 0.11, cam: -0.03 }
|
|
10757
10814
|
],
|
|
10758
10815
|
{ up: "y", n: 8 }
|
|
@@ -11165,7 +11222,7 @@ function installHelicoptersExtra(fx) {
|
|
|
11165
11222
|
EA.colorize(
|
|
11166
11223
|
EA.foilGeo(
|
|
11167
11224
|
[
|
|
11168
|
-
{ p: [-8.3, 2.75,
|
|
11225
|
+
{ p: [-8.3, 2.75, s * 2e-3], c: 1, t: 0.1 },
|
|
11169
11226
|
{ p: [-8.5, 2.75, s * 1.85], c: 0.7, t: 0.09 }
|
|
11170
11227
|
],
|
|
11171
11228
|
{ up: "y", n: 8 }
|
|
@@ -12237,7 +12294,7 @@ function installMilitary(fx) {
|
|
|
12237
12294
|
const floor = c.roundBox(L, 0.1, W, 0.02, wood, cx, y0, 0, { def: true });
|
|
12238
12295
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, 0.45);
|
|
12239
12296
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, -0.45);
|
|
12240
|
-
for (let xs = x1 + 0.2; xs < x0; xs += 0.55) c.roundBox(0.08, 0.1, W - 0.05, 0.02, MT.trim, xs, y0 - 0.
|
|
12297
|
+
for (let xs = x1 + 0.2; xs < x0; xs += 0.55) c.roundBox(0.08, 0.1, W - 0.05, 0.02, MT.trim, xs, y0 - 0.102, 0);
|
|
12241
12298
|
const sides = [];
|
|
12242
12299
|
[1, -1].forEach(function(s) {
|
|
12243
12300
|
const sd = c.roundBox(L, sideH, 0.06, 0.02, wood, cx, y0 + sideH / 2 + 0.05, s * (W / 2 - 0.03), { def: true });
|
|
@@ -12248,7 +12305,7 @@ function installMilitary(fx) {
|
|
|
12248
12305
|
c.roundBox(L, 0.03, 0.015, 6e-3, CM("#3a3c2e", { roughness: 0.9 }), cx, y0 + 0.05 + sideH * t * 2, s * (W / 2 + 2e-3));
|
|
12249
12306
|
});
|
|
12250
12307
|
});
|
|
12251
|
-
c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.
|
|
12308
|
+
c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.028, y0 + sideH / 2 + 0.05, 0, { def: true });
|
|
12252
12309
|
const tg = c.roundBox(0.06, sideH * 0.7, W - 0.1, 0.02, wood, x1 - 0.02, y0 - sideH * 0.3, 0);
|
|
12253
12310
|
tg.rotation.z = 0.08;
|
|
12254
12311
|
const top = y0 + sideH + bowH, yb = y0 + sideH + 0.05, nseg = 20, pos = [], idx = [];
|
|
@@ -12642,7 +12699,7 @@ function installMilitary(fx) {
|
|
|
12642
12699
|
top: roofY + 0.03,
|
|
12643
12700
|
k: 0.28,
|
|
12644
12701
|
holes,
|
|
12645
|
-
archInner: W / 2 - ww - 0.
|
|
12702
|
+
archInner: W / 2 - ww - 0.098,
|
|
12646
12703
|
sub: 0.18,
|
|
12647
12704
|
bev: 0.025
|
|
12648
12705
|
});
|
|
@@ -12975,8 +13032,7 @@ function installMilitary(fx) {
|
|
|
12975
13032
|
[1.3, roofY, 0.1],
|
|
12976
13033
|
[F - 0.04, 1.02, 0.06],
|
|
12977
13034
|
[F, 0.9, 0.05],
|
|
12978
|
-
[2.05, 0.46, 0.06]
|
|
12979
|
-
[-1.4, 0.44, 0.04]
|
|
13035
|
+
[2.05, 0.46, 0.06]
|
|
12980
13036
|
];
|
|
12981
13037
|
const arches = axles.map(function(x) {
|
|
12982
13038
|
return [x, wr, wr + 0.09];
|
|
@@ -13054,8 +13110,8 @@ function installMilitary(fx) {
|
|
|
13054
13110
|
[1, -1].forEach(function(s) {
|
|
13055
13111
|
c.roundBox(1.6, 0.16, 0.12, 0.04, OLIVE_STEEL, (axles[1] + axles[2]) / 2, wr, s * (W / 2 - ww - 0.1));
|
|
13056
13112
|
c.cylinder(0.12, 0.12, 0.2, OLIVE_STEEL, (axles[1] + axles[2]) / 2, wr, s * (W / 2 - ww - 0.1), "z");
|
|
13057
|
-
c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.
|
|
13058
|
-
c.roundBox(2.35, 0.05, 0.32, 0.02, paintMat(c, col), (axles[1] + axles[2]) / 2, 1.12, s * (W / 2 - 0.
|
|
13113
|
+
c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.158), { def: true });
|
|
13114
|
+
c.roundBox(2.35, 0.05, 0.32, 0.02, paintMat(c, col), (axles[1] + axles[2]) / 2, 1.12, s * (W / 2 - 0.158), { def: true });
|
|
13059
13115
|
c.roundBox(1.2, 0.26, 0.28, 0.03, paintMat(c, OLIVE2), -1.45, 1.28, s * (W / 2 - 0.17));
|
|
13060
13116
|
[-0.95, -1.95].forEach(function(x) {
|
|
13061
13117
|
c.roundBox(0.3, 0.2, 0.02, 0.01, MT.dark, x, 1.28, s * (W / 2 - 0.025));
|
|
@@ -13212,7 +13268,7 @@ function installMilitary(fx) {
|
|
|
13212
13268
|
m.kind = "car";
|
|
13213
13269
|
m.bullet = true;
|
|
13214
13270
|
const low = c.roundBox(6.6, 0.62, 2, 0.08, paintMat(c, col), -0.1, 0.78, 0, { def: true, sub: 0.3 });
|
|
13215
|
-
c.roundBox(0.55, 0.62, 2, 0.06, paintMat(c, col), 3.1, 0.8, 0, { def: true, rot: [0, 0, -0.95] });
|
|
13271
|
+
c.roundBox(0.55, 0.62, 2.004, 0.06, paintMat(c, col), 3.1, 0.8, 0, { def: true, rot: [0, 0, -0.95] });
|
|
13216
13272
|
const items = [
|
|
13217
13273
|
[R, 1.05, 0.04],
|
|
13218
13274
|
[R - 0.02, deckY - 0.04, 0.05],
|
|
@@ -13255,7 +13311,7 @@ function installMilitary(fx) {
|
|
|
13255
13311
|
(ex0 + ex1) / 2
|
|
13256
13312
|
);
|
|
13257
13313
|
scale(c, nB, bcen, 1.45);
|
|
13258
|
-
c.roundBox(ex1 - ex0 - 0.1, 0.
|
|
13314
|
+
c.roundBox(ex1 - ex0 - 0.1, 0.012, 2.1, 0.01, BAY_LIGHT, bcen.x, 0.957, 0);
|
|
13259
13315
|
[1, -1].forEach(function(sd) {
|
|
13260
13316
|
c.roundBox(ex1 - ex0 - 0.1, 0.55, 0.02, 0.01, BAY_LIGHT, bcen.x, 1.25, sd * 1.08);
|
|
13261
13317
|
});
|
|
@@ -13281,12 +13337,12 @@ function installMilitary(fx) {
|
|
|
13281
13337
|
c.roundBox(0.55, 0.42, 0.03, 0.01, MT.rubber, 2.95, 0.86, s * (W / 2 + 0.05));
|
|
13282
13338
|
c.part("armor", s > 0 ? trl("labels.right_skirt") : trl("labels.left_skirt"), sk, new V3(-0.2, 0.86, s * W / 2), 1.2);
|
|
13283
13339
|
c.roundBox(0.5, 0.03, 0.6, 0.01, paintMat(c, col), F - 0.25, 1.08, s * tz, { rot: [0, 0, -0.35] });
|
|
13284
|
-
c.roundBox(0.03, 0.5, 0.55, 0.01, MT.rubber, R + 0.
|
|
13340
|
+
c.roundBox(0.03, 0.5, 0.55, 0.01, MT.rubber, R + 0.015, 0.85, s * tz);
|
|
13285
13341
|
star(c, 0.6, 1.3, s * (H.half(1.3) + 0.01), 0.17, s > 0 ? "+z" : "-z", { ring: true });
|
|
13286
13342
|
c.text(trl("texts.army"), 1, 0.16, -1.5, 1.3, s * (H.half(1.3) + 0.01), s > 0 ? "+z" : "-z", { fg: "#dcdace", size: 0.7 });
|
|
13287
13343
|
guardedHeadlight(c, 2.95, gl(2.95) + 0.16, s * 1.3, s, { style: "round" });
|
|
13288
13344
|
c.roundBox(0.1, 0.16, 0.08, 0.02, OLIVE_STEEL, 2.9, gl(2.9) + 0.04, s * 1.3);
|
|
13289
|
-
c.roundBox(0.1, 0.18, 0.3, 0.03, OLIVE_STEEL, R - 0.
|
|
13345
|
+
c.roundBox(0.1, 0.18, 0.3, 0.03, OLIVE_STEEL, R - 0.037, 1.35, s * 1.25);
|
|
13290
13346
|
kit.taillight(c, { style: "round2", x: R - 0.08, y: 1.35, z: s * 1.25, w: 0.2, h: 0.09, d: 0.05, side: s });
|
|
13291
13347
|
c.tube(
|
|
13292
13348
|
[
|
|
@@ -13328,7 +13384,7 @@ function installMilitary(fx) {
|
|
|
13328
13384
|
{ rot: [0, 0, -0.18] }
|
|
13329
13385
|
);
|
|
13330
13386
|
hatch(c, 2.05, roofY - 0.1, -0.78, 0.28, 0, OLIVE_STEEL, { yaw: 0 });
|
|
13331
|
-
kit.seat(c, 1.95, 0.62, -0.
|
|
13387
|
+
kit.seat(c, 1.95, 0.62, -0.76, { w: 0.44, h: 0.34, back: 0.5, lean: 0.5, mat: CM("#2f3226", { roughness: 0.9 }) });
|
|
13332
13388
|
[-0.95, -0.78, -0.61].forEach(function(z, i) {
|
|
13333
13389
|
periscope(c, 2.3, roofY - 0.08, z, 0.14, i === 1 ? lbl("driver_periscope") : null);
|
|
13334
13390
|
});
|
|
@@ -13450,14 +13506,14 @@ function installMilitary(fx) {
|
|
|
13450
13506
|
const g = new THREE.Group();
|
|
13451
13507
|
g.position.set(x, y, z);
|
|
13452
13508
|
c.vehicle.add(g);
|
|
13453
|
-
const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * 0.8, 24), wm);
|
|
13509
|
+
const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * (opt.width ?? 0.8), 24), wm);
|
|
13454
13510
|
wmsh.rotation.x = PI / 2;
|
|
13455
13511
|
wmsh.castShadow = true;
|
|
13456
13512
|
g.add(wmsh);
|
|
13457
13513
|
if (opt.tires)
|
|
13458
13514
|
[-1, 1].forEach(function(q) {
|
|
13459
13515
|
const t = new THREE.Mesh(new THREE.TorusGeometry(rad - 0.035, 0.035, 6, 24), MT.rubber);
|
|
13460
|
-
t.position.z = q * w * 0.22;
|
|
13516
|
+
t.position.z = q * w * (opt.tireAt ?? 0.22);
|
|
13461
13517
|
g.add(t);
|
|
13462
13518
|
});
|
|
13463
13519
|
const hb = new THREE.Mesh(new THREE.CylinderGeometry(rad * 0.32, rad * 0.32, w * 0.86, 10), MT.steel);
|
|
@@ -13474,21 +13530,21 @@ function installMilitary(fx) {
|
|
|
13474
13530
|
for (let k = 0; k < 6; k++) {
|
|
13475
13531
|
const b = new THREE.Mesh(G.roundedBox(rad * 1.5, 0.05, 0.04, 0.01), wm);
|
|
13476
13532
|
b.rotation.z = k / 6 * PI;
|
|
13477
|
-
b.position.z = (z > 0 ? 1 : -1) * w * 0.42;
|
|
13533
|
+
b.position.z = (z > 0 ? 1 : -1) * (w * 0.42 + k * 3e-3);
|
|
13478
13534
|
g.add(b);
|
|
13479
13535
|
}
|
|
13480
13536
|
c.spin.push({ o: g, axis: "z", v: 0, track: true });
|
|
13481
13537
|
return g;
|
|
13482
13538
|
}
|
|
13483
13539
|
for (let i = 0; i < n; i++) wheel(xs + i * sp, r + th, r, { tires: true });
|
|
13484
|
-
wheel(x0, yS, rS, { teeth: true });
|
|
13485
|
-
wheel(x1, yI, rI, { spokes: true, tires: true });
|
|
13540
|
+
wheel(x0, yS, rS, { teeth: true, width: 0.76 });
|
|
13541
|
+
wheel(x1, yI, rI, { spokes: true, tires: true, width: 0.76, tireAt: 0.2 });
|
|
13486
13542
|
const topY = function(x) {
|
|
13487
13543
|
return yS + rS + th / 2 + (yI + rI - yS - rS) * (x - x0) / (x1 - x0);
|
|
13488
13544
|
};
|
|
13489
13545
|
for (let q = 0; q < 4; q++) {
|
|
13490
13546
|
const xr = x0 + (x1 - x0) * (0.2 + q * 0.2);
|
|
13491
|
-
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, {});
|
|
13547
|
+
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, { width: 0.7 });
|
|
13492
13548
|
}
|
|
13493
13549
|
const path = [], segs = 12;
|
|
13494
13550
|
function arc(cx, cy, rad, a0, a1) {
|
|
@@ -13512,7 +13568,7 @@ function installMilitary(fx) {
|
|
|
13512
13568
|
const curve = new THREE.SplineCurve(pts.concat([pts[0]])), lenT = curve.getLength(), nl = Math.round(lenT / 0.15), links = [];
|
|
13513
13569
|
for (let l = 0; l < nl; l++) {
|
|
13514
13570
|
const t = l / nl, p = curve.getPointAt(t), tg = curve.getTangentAt(t), ang = Math.atan2(tg.y, tg.x);
|
|
13515
|
-
const lg = G.roundedBox(0.13, th, w, 0.015);
|
|
13571
|
+
const lg = G.roundedBox(0.13, th, w - l % 2 * 4e-3, 0.015);
|
|
13516
13572
|
lg.applyMatrix4(new THREE.Matrix4().makeRotationZ(ang).setPosition(p.x, p.y, 0));
|
|
13517
13573
|
links.push(lg);
|
|
13518
13574
|
const gh2 = G.roundedBox(0.05, 0.05, 0.05, 0.01);
|
|
@@ -14534,7 +14590,7 @@ function installMotorcyclesCars(fx) {
|
|
|
14534
14590
|
off: 3e-3,
|
|
14535
14591
|
nv: 4
|
|
14536
14592
|
});
|
|
14537
|
-
skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
14593
|
+
const reflector = skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
14538
14594
|
(o.proj || []).forEach(function(q) {
|
|
14539
14595
|
const r = sh(q[0]), y = (r[0] + r[1]) / 2 + (q[1] || 0), s = Gd.at(q[0], y), rad = q[2] || Math.min(0.034, (r[1] - r[0]) * 0.4);
|
|
14540
14596
|
const cup = onSurf(c.cylinder(rad * 1.35, rad * 1.2, 0.012, LH, 0, 0, 0), s, 8e-3);
|
|
@@ -14565,7 +14621,7 @@ function installMotorcyclesCars(fx) {
|
|
|
14565
14621
|
lens.push(ln);
|
|
14566
14622
|
if (!inner.length) inner.push(ln);
|
|
14567
14623
|
const cs = Gd.at(0.5, (rg[0] + rg[1]) / 2).p;
|
|
14568
|
-
regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs);
|
|
14624
|
+
Object.assign(regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs), { reflector: [reflector] });
|
|
14569
14625
|
return Gd;
|
|
14570
14626
|
};
|
|
14571
14627
|
K.tail = function(sd, o) {
|
|
@@ -14925,8 +14981,11 @@ function installMotorcyclesCars(fx) {
|
|
|
14925
14981
|
);
|
|
14926
14982
|
});
|
|
14927
14983
|
const wy = gh.belt + 0.06, wx = gh.fb - 0.03;
|
|
14928
|
-
[-0.3, 0.2].forEach(function(z) {
|
|
14929
|
-
|
|
14984
|
+
[-0.3, 0.2].forEach(function(z, index) {
|
|
14985
|
+
const spindle = new V3(wx + 0.02, wy, z + 0.02);
|
|
14986
|
+
const blade = c.rod(spindle, new V3(wx - 0.13, wy + 0.13, z - 0.36), 9e-3, MT.trim);
|
|
14987
|
+
const along = new V3(gh.ft - gh.fb, gh.roof - gh.belt, 0).normalize();
|
|
14988
|
+
tagWiper({ context: c, parts: [blade], spindle, normal: new V3(along.y, -along.x, 0), index });
|
|
14930
14989
|
});
|
|
14931
14990
|
if (s.fin !== false)
|
|
14932
14991
|
c.sphere(0.1, s.roofCol ? c.paint(s.roofCol) : GLOSS, gh.rt + 0.2, roofAt(gh, gh.rt + 0.2) + 0.045, 0, 1, 0.45, 0.28, {
|
|
@@ -15059,7 +15118,9 @@ function installMotorcyclesCars(fx) {
|
|
|
15059
15118
|
function fogLamp(c, s, r) {
|
|
15060
15119
|
onSurf(c.cylinder(r * 1.4, r * 1.4, 0.014, LH, 0, 0, 0), s, 6e-3).castShadow = false;
|
|
15061
15120
|
onSurf(c.cylinder(r, r, 0.012, REFL, 0, 0, 0), s, 0.012).castShadow = false;
|
|
15062
|
-
onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016)
|
|
15121
|
+
const bulb = onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016);
|
|
15122
|
+
bulb.castShadow = false;
|
|
15123
|
+
(c.fogBulbs ?? (c.fogBulbs = [])).push(bulb);
|
|
15063
15124
|
}
|
|
15064
15125
|
function crease(c, I, sd, pts, o) {
|
|
15065
15126
|
o = o || {};
|
|
@@ -16407,7 +16468,7 @@ function installMotorcyclesCars(fx) {
|
|
|
16407
16468
|
K.skin(Gs2, CM(blueP, { roughness: 0.45, metalness: 0.2 }), { yb: 0.775, yt: 0.83, off: 7e-3, nv: 1, u0: 0.01, u1: 0.99 });
|
|
16408
16469
|
K.skin(Gs2, CM(yellowP, { roughness: 0.45, metalness: 0.2 }), { yb: 0.746, yt: 0.77, off: 7e-3, nv: 1, u0: 0.01, u1: 0.99 });
|
|
16409
16470
|
}
|
|
16410
|
-
const f = sd > 0 ? "+z" : "-z", pt = Gd.at(
|
|
16471
|
+
const f = sd > 0 ? "+z" : "-z", pt = Gd.at(0.5, 0.62).p;
|
|
16411
16472
|
if (highwayPolice)
|
|
16412
16473
|
c2.text(trl("texts.federal_highway_police"), 1.9, 0.13, -0.32, 0.6, sd * (Math.abs(pt.z) + 0.012), f, {
|
|
16413
16474
|
fg: blueP,
|
|
@@ -16445,6 +16506,10 @@ function installMotorcyclesCars(fx) {
|
|
|
16445
16506
|
}
|
|
16446
16507
|
}
|
|
16447
16508
|
});
|
|
16509
|
+
beacon[1].userData.lamp = "beacon";
|
|
16510
|
+
beacon[1].userData.beaconSide = 0;
|
|
16511
|
+
beacon[2].userData.lamp = "beacon";
|
|
16512
|
+
beacon[2].userData.beaconSide = 1;
|
|
16448
16513
|
c2.meta.top = top + 0.15;
|
|
16449
16514
|
c2.meta.roof.y = Math.max(c2.meta.roof.y, top + 0.15);
|
|
16450
16515
|
const fx2 = I.fxB + 0.12, push = [];
|
|
@@ -17209,9 +17274,9 @@ function installMotorcyclesCars(fx) {
|
|
|
17209
17274
|
],
|
|
17210
17275
|
col
|
|
17211
17276
|
);
|
|
17212
|
-
lamp(c, { style: "rect", x: 0.
|
|
17277
|
+
lamp(c, { style: "rect", x: 0.575, y: 0.91, z: 0, w: 0.2, h: 0.11, d: 0.08, side: 1, label: trl("labels.headlight") });
|
|
17213
17278
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
17214
|
-
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.
|
|
17279
|
+
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
|
|
17215
17280
|
handlebar(c, 0.36, 1.03, 0.37, { rise: 0.04, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
17216
17281
|
[1, -1].forEach(function(s) {
|
|
17217
17282
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
@@ -17413,7 +17478,7 @@ function installMotorcyclesCars(fx) {
|
|
|
17413
17478
|
body(
|
|
17414
17479
|
c,
|
|
17415
17480
|
[
|
|
17416
|
-
[0.
|
|
17481
|
+
[0.435, 1.13, 0.85, 0.24, 2.6],
|
|
17417
17482
|
[0.55, 1.11, 0.87, 0.24, 2.6],
|
|
17418
17483
|
[0.6, 1.05, 0.91, 0.16, 2.4]
|
|
17419
17484
|
],
|
|
@@ -17485,7 +17550,8 @@ function installMotorcyclesCars(fx) {
|
|
|
17485
17550
|
const fw = kit.spokedWheel(c, 0.78, 0.325, 0.06, { spokes: 40, knobby: true, disc: true, label: trl("labels.front_tire") });
|
|
17486
17551
|
const rw = kit.spokedWheel(c, -0.72, 0.318, 0.08, { spokes: 40, knobby: true, label: trl("labels.rear_tire") });
|
|
17487
17552
|
[fw, rw].forEach(function(g) {
|
|
17488
|
-
g.children.forEach(function(
|
|
17553
|
+
g.children.forEach(function(o) {
|
|
17554
|
+
const ch = o;
|
|
17489
17555
|
if (ch.geometry && ch.geometry.type === "TorusGeometry" && ch.material === MT.chrome) ch.material = rimGold;
|
|
17490
17556
|
});
|
|
17491
17557
|
});
|
|
@@ -17579,7 +17645,7 @@ function installMotorcyclesCars(fx) {
|
|
|
17579
17645
|
body(
|
|
17580
17646
|
c,
|
|
17581
17647
|
[
|
|
17582
|
-
[0.
|
|
17648
|
+
[0.615, 1.32, 0.98, 0.3, 2.6],
|
|
17583
17649
|
[0.72, 1.28, 1, 0.3, 2.6],
|
|
17584
17650
|
[0.78, 1.2, 1.02, 0.22, 2.4]
|
|
17585
17651
|
],
|
|
@@ -17747,7 +17813,9 @@ function installMotorcyclesCars(fx) {
|
|
|
17747
17813
|
c.roundBox(0.5, 0.018, 6e-3, 2e-3, c.paint("#f2c21a"), -0.7, 0.825, z);
|
|
17748
17814
|
c.text("PRF", 0.2, 0.08, -0.7, 0.73, z + s * 2e-3, f, { fg: "#1f3f8f", size: 0.85 });
|
|
17749
17815
|
c.text(trl("texts.federal_highway_police"), 0.3, 0.035, 0.24, 1, s * 0.3, f, { fg: "#f4f2ea", w: 1024, h: 120, size: 0.8 });
|
|
17750
|
-
c.roundBox(0.05, 0.05, 0.04, 0.012, s > 0 ? MT.blue : MT.tail, 0.62, 0.95, s * 0.3, { def: true });
|
|
17816
|
+
const flasher = c.roundBox(0.05, 0.05, 0.04, 0.012, s > 0 ? MT.blue : MT.tail, 0.62, 0.95, s * 0.3, { def: true });
|
|
17817
|
+
flasher.userData.lamp = "beacon";
|
|
17818
|
+
flasher.userData.beaconSide = s > 0 ? 1 : 0;
|
|
17751
17819
|
});
|
|
17752
17820
|
c.cylinder(0.04, 0.045, 0.06, MT.trim, 0.66, 0.66, 0.36, "x");
|
|
17753
17821
|
}
|
|
@@ -18000,6 +18068,8 @@ function installMotorcyclesCars(fx) {
|
|
|
18000
18068
|
fx.register(
|
|
18001
18069
|
{
|
|
18002
18070
|
key: "beetle",
|
|
18071
|
+
// glass headlight lenses, as on cars of its time: they shatter (a modern car's are polycarbonate)
|
|
18072
|
+
headlightLens: "glass",
|
|
18003
18073
|
group: "cars",
|
|
18004
18074
|
name: trl("vehicles.beetle.name"),
|
|
18005
18075
|
inspired: trl("vehicles.beetle.inspired"),
|
|
@@ -18508,8 +18578,8 @@ function installMotorcyclesExtra(fx) {
|
|
|
18508
18578
|
return b;
|
|
18509
18579
|
}
|
|
18510
18580
|
function plateMoto(c, x, y, txt) {
|
|
18511
|
-
c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x +
|
|
18512
|
-
c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x, y, 0, "-x", {
|
|
18581
|
+
c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x + 9e-3, y, 0);
|
|
18582
|
+
c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x - 3e-3, y, 0, "-x", {
|
|
18513
18583
|
w: 300,
|
|
18514
18584
|
h: 220,
|
|
18515
18585
|
bg: "#f2f2ee",
|
|
@@ -18624,7 +18694,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
18624
18694
|
g.add(d);
|
|
18625
18695
|
for (let q = 0; q < 12; q++) {
|
|
18626
18696
|
const a2 = q / 12 * PI * 2, sl = new THREE.Mesh(G.roundedBox(rimR * 0.42, 0.016, 6e-3, 5e-3), o.slot || CM("#1c1e21", { metalness: 0.5, roughness: 0.4 }));
|
|
18627
|
-
sl.position.set(Math.cos(a2) * rimR * 0.62, Math.sin(a2) * rimR * 0.62, s * (hw * 0.72 +
|
|
18697
|
+
sl.position.set(Math.cos(a2) * rimR * 0.62, Math.sin(a2) * rimR * 0.62, s * (hw * 0.72 + 0.0105));
|
|
18628
18698
|
sl.rotation.z = a2;
|
|
18629
18699
|
g.add(sl);
|
|
18630
18700
|
}
|
|
@@ -18722,7 +18792,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
18722
18792
|
body(
|
|
18723
18793
|
c,
|
|
18724
18794
|
[
|
|
18725
|
-
[0.
|
|
18795
|
+
[0.335, 0.36, 0.29, 0.28, 2.6],
|
|
18726
18796
|
[0.46, 0.38, 0.31, 0.46, 3],
|
|
18727
18797
|
[0.6, 0.41, 0.34, 0.5, 3],
|
|
18728
18798
|
[0.74, 0.43, 0.37, 0.46, 2.8],
|
|
@@ -19130,7 +19200,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19130
19200
|
body(
|
|
19131
19201
|
c,
|
|
19132
19202
|
[
|
|
19133
|
-
[0.
|
|
19203
|
+
[0.415, 1.05, 0.82, 0.26, 2.6],
|
|
19134
19204
|
[0.52, 1.03, 0.83, 0.28, 2.6],
|
|
19135
19205
|
[0.59, 0.99, 0.85, 0.22, 2.4],
|
|
19136
19206
|
[0.62, 0.95, 0.87, 0.1, 2.2]
|
|
@@ -19151,7 +19221,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19151
19221
|
});
|
|
19152
19222
|
c.roundBox(0.015, 0.1, 0.2, 0.02, SMOKEG, 0.55, 1.035, 0, { rot: [0, 0, 0.55] });
|
|
19153
19223
|
c.roundBox(0.07, 0.03, 0.16, 0.01, CM("#121518", { roughness: 0.25, metalness: 0.3 }), 0.44, 1.07, 0, { rot: [0, 0, 0.5] });
|
|
19154
|
-
c.roundBox(0.04, 0.032, 0.1, 6e-3, MT.gauge, 0.45, 1.
|
|
19224
|
+
c.roundBox(0.04, 0.032, 0.1, 6e-3, MT.gauge, 0.45, 1.078, 0, { rot: [0, 0, 0.5] });
|
|
19155
19225
|
[1, -1].forEach(function(s) {
|
|
19156
19226
|
blinker(c, 0.5, 0.92, s * 0.16, true);
|
|
19157
19227
|
});
|
|
@@ -19568,7 +19638,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19568
19638
|
});
|
|
19569
19639
|
c.cylinder(0.12, 0.12, 0.07, CH, 0.2, 0.56, 0.17, "z");
|
|
19570
19640
|
c.cylinder(0.1, 0.1, 0.012, CM("#9ea3a7", { metalness: 0.55, roughness: 0.35 }), 0.2, 0.56, 0.21, "z");
|
|
19571
|
-
c.text("114", 0.1, 0.04, 0.2, 0.56, 0.
|
|
19641
|
+
c.text("114", 0.1, 0.04, 0.2, 0.56, 0.219, "+z", { fg: "#1b1c1f", size: 0.85 });
|
|
19572
19642
|
c.sphere(0.17, CH, -0.06, 0.32, -0.17, 1.35, 0.85, 0.28);
|
|
19573
19643
|
c.cylinder(0.07, 0.07, 0.02, CH, -0.02, 0.3, -0.215, "z");
|
|
19574
19644
|
c.roundBox(0.86, 0.035, 0.02, 0.015, CM("#1a1a1a", { roughness: 0.8 }), -0.43, 0.32, 0.15, { rot: [0, 0, 0] });
|
|
@@ -19963,12 +20033,12 @@ function installMotorcyclesExtra(fx) {
|
|
|
19963
20033
|
col
|
|
19964
20034
|
);
|
|
19965
20035
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
19966
|
-
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.
|
|
20036
|
+
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
|
|
19967
20037
|
[1, -1].forEach(function(s) {
|
|
19968
20038
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
19969
20039
|
});
|
|
19970
20040
|
Z.fairing = grab(c, n0);
|
|
19971
|
-
lamp(c, { style: "rect", x: 0.
|
|
20041
|
+
lamp(c, { style: "rect", x: 0.575, y: 0.91, z: 0, w: 0.2, h: 0.11, d: 0.08, side: 1, label: trl("labels.headlight") });
|
|
19972
20042
|
n0 = c.vehicle.children.length;
|
|
19973
20043
|
handlebar(c, 0.36, 1.02, 0.36, { rise: 0.03, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
19974
20044
|
Z.handlebar = grab(c, n0);
|
|
@@ -20006,13 +20076,9 @@ function installMotorcyclesExtra(fx) {
|
|
|
20006
20076
|
}
|
|
20007
20077
|
|
|
20008
20078
|
// src/vehicles/planes-extra.ts
|
|
20009
|
-
function
|
|
20010
|
-
const kit = fx.kit;
|
|
20079
|
+
function createPlanesKit(kit) {
|
|
20011
20080
|
const THREE = kit.THREE;
|
|
20012
|
-
const
|
|
20013
|
-
const trl = fx.t;
|
|
20014
|
-
const lbl = fx.label;
|
|
20015
|
-
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _G = kit.geo, _DS = THREE.DoubleSide;
|
|
20081
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial;
|
|
20016
20082
|
function pose3(Af, ra, Tf, rt) {
|
|
20017
20083
|
let lo = 0, hi = 0.5, TH = 0;
|
|
20018
20084
|
function f(t) {
|
|
@@ -20098,9 +20164,19 @@ function installPlanesExtra(fx) {
|
|
|
20098
20164
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
20099
20165
|
});
|
|
20100
20166
|
}
|
|
20167
|
+
function stretchSt(st) {
|
|
20168
|
+
const out = st.map(function(q) {
|
|
20169
|
+
return q.slice();
|
|
20170
|
+
});
|
|
20171
|
+
const last = out.length - 1;
|
|
20172
|
+
const dir = out[last][0] >= out[0][0] ? 1 : -1;
|
|
20173
|
+
out[0][0] = out[0][0] + dir * 3e-3;
|
|
20174
|
+
out[last][0] = out[last][0] - dir * 3e-3;
|
|
20175
|
+
return out;
|
|
20176
|
+
}
|
|
20101
20177
|
function fSkin(c, EA, st, keep, mat, o) {
|
|
20102
20178
|
o = o || {};
|
|
20103
|
-
const m = c.add(EA.fuseGeo(scaleSt(st, o.k ||
|
|
20179
|
+
const m = c.add(EA.fuseGeo(stretchSt(scaleSt(st, o.k || EA.nextSkinScale(c))), { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
|
|
20104
20180
|
m.castShadow = false;
|
|
20105
20181
|
cutSub(m, [keep], o.sub || 0.06, o.pre);
|
|
20106
20182
|
c.deform.push(m);
|
|
@@ -20108,7 +20184,7 @@ function installPlanesExtra(fx) {
|
|
|
20108
20184
|
}
|
|
20109
20185
|
function fGlass(c, EA, st, keep, label, type, o) {
|
|
20110
20186
|
o = o || {};
|
|
20111
|
-
const m = new THREE.Mesh(EA.fuseGeo(scaleSt(st, o.k ||
|
|
20187
|
+
const m = new THREE.Mesh(EA.fuseGeo(scaleSt(st, o.k || EA.nextPaneScale(c)), { smooth: o.smooth || 48, seg: o.seg || 30 }), o.mat || MT.glass);
|
|
20112
20188
|
(o.parent || c.vehicle).add(m);
|
|
20113
20189
|
cutSub(m, [keep], o.sub || 0.07, o.pre);
|
|
20114
20190
|
return kit.asGlass(c, m, label, type || "tempered", o.pos ? { pos: o.pos } : {});
|
|
@@ -20161,7 +20237,7 @@ function installPlanesExtra(fx) {
|
|
|
20161
20237
|
m.rotation.y += -s * Math.atan2(a - b, w);
|
|
20162
20238
|
return m;
|
|
20163
20239
|
}
|
|
20164
|
-
|
|
20240
|
+
return {
|
|
20165
20241
|
pose3,
|
|
20166
20242
|
starDecal,
|
|
20167
20243
|
rrect,
|
|
@@ -20175,6 +20251,17 @@ function installPlanesExtra(fx) {
|
|
|
20175
20251
|
liner,
|
|
20176
20252
|
sideText
|
|
20177
20253
|
};
|
|
20254
|
+
}
|
|
20255
|
+
function installPlanesExtra(fx) {
|
|
20256
|
+
const kit = fx.kit;
|
|
20257
|
+
const THREE = kit.THREE;
|
|
20258
|
+
const shared = fx.shared;
|
|
20259
|
+
const trl = fx.t;
|
|
20260
|
+
const lbl = fx.label;
|
|
20261
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _G = kit.geo, _DS = THREE.DoubleSide;
|
|
20262
|
+
const GH = createPlanesKit(kit);
|
|
20263
|
+
shared.GH = GH;
|
|
20264
|
+
const { pose3, starDecal, rrect, polysSdf, pod, fSkin, fGlass, liner, sideText } = GH;
|
|
20178
20265
|
fx.register(
|
|
20179
20266
|
{
|
|
20180
20267
|
key: "tandem_trainer",
|
|
@@ -20259,7 +20346,7 @@ function installPlanesExtra(fx) {
|
|
|
20259
20346
|
return Math.min(boltW(x) - Math.abs(y - bolt(x)), x + 3.2, 2.93 - x, Math.abs(z) - 0.12);
|
|
20260
20347
|
}),
|
|
20261
20348
|
black,
|
|
20262
|
-
{ parent: grp, sub: 0.05, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
|
|
20349
|
+
{ parent: grp, sub: 0.05, k: 1.013, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
|
|
20263
20350
|
);
|
|
20264
20351
|
const doorR = EA.polySdf([
|
|
20265
20352
|
[1.38, -0.4],
|
|
@@ -20324,7 +20411,7 @@ function installPlanesExtra(fx) {
|
|
|
20324
20411
|
};
|
|
20325
20412
|
const g = EA.foilGeo(
|
|
20326
20413
|
[
|
|
20327
|
-
{ p: [1.46, dh(0),
|
|
20414
|
+
{ p: [1.46, dh(0), s * 2e-3], c: 1.6, t: 0.12, cam: 0.025, noCap: true },
|
|
20328
20415
|
{ p: [1.46, dh(2.6), s * 2.6], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20329
20416
|
{ p: [1.46, dh(4.9), s * 4.9], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20330
20417
|
{ p: [1.43, dh(5.18), s * 5.18], c: 1.5, t: 0.11, cam: 0.02 },
|
|
@@ -20381,7 +20468,7 @@ function installPlanesExtra(fx) {
|
|
|
20381
20468
|
const hs = c.add(
|
|
20382
20469
|
EA.foilGeo(
|
|
20383
20470
|
[
|
|
20384
|
-
{ p: [-2.78, 0.1,
|
|
20471
|
+
{ p: [-2.78, 0.1, s * 2e-3], c: 0.78, t: 0.07 },
|
|
20385
20472
|
{ p: [-2.85, 0.1, s * 1.1], c: 0.74, t: 0.07 },
|
|
20386
20473
|
{ p: [-2.95, 0.1, s * 1.36], c: 0.6, t: 0.06 },
|
|
20387
20474
|
{ p: [-3.1, 0.1, s * 1.46], c: 0.32, t: 0.05 }
|
|
@@ -20632,7 +20719,7 @@ function installPlanesExtra(fx) {
|
|
|
20632
20719
|
EA.sideKeepP(ckP, 0.5, s),
|
|
20633
20720
|
s > 0 ? lbl("right_flight_deck_window") : lbl("left_flight_deck_window"),
|
|
20634
20721
|
"tempered",
|
|
20635
|
-
{ pos: new V3(5.4, 2.25, s * 0.8) }
|
|
20722
|
+
{ pos: new V3(5.4, 2.25, s * 0.8), k: 1.0085 }
|
|
20636
20723
|
);
|
|
20637
20724
|
fGlass(
|
|
20638
20725
|
c,
|
|
@@ -20686,7 +20773,7 @@ function installPlanesExtra(fx) {
|
|
|
20686
20773
|
const w = c.add(
|
|
20687
20774
|
EA.foilGeo(
|
|
20688
20775
|
[
|
|
20689
|
-
{ p: [1.52, dh(0),
|
|
20776
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20690
20777
|
{ p: [1.52, dh(0.86), s * 0.86], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20691
20778
|
{ p: [1.42, dh(2.47), s * 2.47], c: 2.25, t: 0.145, cam: 0.02 },
|
|
20692
20779
|
{ p: [0.98, dh(7.42), s * 7.42], c: 1.4, t: 0.12, cam: 0.02 },
|
|
@@ -20821,7 +20908,7 @@ function installPlanesExtra(fx) {
|
|
|
20821
20908
|
const hs = c.add(
|
|
20822
20909
|
EA.foilGeo(
|
|
20823
20910
|
[
|
|
20824
|
-
{ p: [-5.95, 2.3,
|
|
20911
|
+
{ p: [-5.95, 2.3, s * 2e-3], c: 1.55, t: 0.1 },
|
|
20825
20912
|
{ p: [-6.62, 2.3 + 3.2 * 0.176, s * 3.2], c: 0.86, t: 0.09 }
|
|
20826
20913
|
],
|
|
20827
20914
|
{ up: "y", n: 10 }
|
|
@@ -21084,7 +21171,7 @@ function installPlanesExtra(fx) {
|
|
|
21084
21171
|
const w = c.add(
|
|
21085
21172
|
EA.foilGeo(
|
|
21086
21173
|
[
|
|
21087
|
-
{ p: [1.56, dh(0),
|
|
21174
|
+
{ p: [1.56, dh(0), s * 2e-3], c: 1.98, t: 0.15, cam: 0.025, noCap: true },
|
|
21088
21175
|
{ p: [1.56, dh(3.6), s * 3.6], c: 1.98, t: 0.15, cam: 0.025 },
|
|
21089
21176
|
{ p: [1.38, dh(7.7), s * 7.7], c: 1.3, t: 0.12, cam: 0.02 },
|
|
21090
21177
|
{ p: [1.32, dh(7.94), s * 7.94], c: 1.1, t: 0.06, cam: 0.01 }
|
|
@@ -21226,7 +21313,7 @@ function installPlanesExtra(fx) {
|
|
|
21226
21313
|
const hs = c.add(
|
|
21227
21314
|
EA.foilGeo(
|
|
21228
21315
|
[
|
|
21229
|
-
{ p: [-4.8, 3.08,
|
|
21316
|
+
{ p: [-4.8, 3.08, s * 2e-3], c: 1.55, t: 0.1 },
|
|
21230
21317
|
{ p: [-5.15, 3.08, s * 3.1], c: 1, t: 0.09 }
|
|
21231
21318
|
],
|
|
21232
21319
|
{ up: "y", n: 10 }
|
|
@@ -21429,7 +21516,7 @@ function installPlanesExtra(fx) {
|
|
|
21429
21516
|
EA.sideKeepP(ckP, 0.5, s),
|
|
21430
21517
|
s > 0 ? lbl("right_flight_deck_side_window") : lbl("left_flight_deck_side_window"),
|
|
21431
21518
|
"tempered",
|
|
21432
|
-
{ pos: new V3(3.6, 2, s * 0.78) }
|
|
21519
|
+
{ pos: new V3(3.6, 2, s * 0.78), k: 1.0085 }
|
|
21433
21520
|
);
|
|
21434
21521
|
fGlass(
|
|
21435
21522
|
c,
|
|
@@ -21457,7 +21544,7 @@ function installPlanesExtra(fx) {
|
|
|
21457
21544
|
return Math.min(8e-3 - Math.abs(EA.polySdf(rrect(2.62, 3.25, 0.72, 2.22, 0.12))(x, y)), -z - 0.5);
|
|
21458
21545
|
}),
|
|
21459
21546
|
MT.dark,
|
|
21460
|
-
{ k: 1.
|
|
21547
|
+
{ k: 1.0065 }
|
|
21461
21548
|
);
|
|
21462
21549
|
void dF;
|
|
21463
21550
|
EA.fuseSkin(
|
|
@@ -21467,7 +21554,7 @@ function installPlanesExtra(fx) {
|
|
|
21467
21554
|
return Math.min(0.035 - Math.abs(x - 3.88 - (y - 1.75) * 0.5), y - 1.7, 2.42 - y);
|
|
21468
21555
|
}),
|
|
21469
21556
|
blk,
|
|
21470
|
-
{ k: 1.
|
|
21557
|
+
{ k: 1.0065 }
|
|
21471
21558
|
);
|
|
21472
21559
|
c.rod(new V3(5, 1.74, 0), new V3(4.05, 2.4, 0), 0.02, blk);
|
|
21473
21560
|
const fl = 0.8, fab = CM("#c9bda6", { roughness: 0.75 });
|
|
@@ -21506,7 +21593,7 @@ function installPlanesExtra(fx) {
|
|
|
21506
21593
|
const w = c.add(
|
|
21507
21594
|
EA.foilGeo(
|
|
21508
21595
|
[
|
|
21509
|
-
{ p: [1, dh(0),
|
|
21596
|
+
{ p: [1, dh(0), s * 2e-3], c: 2.45, t: 0.14, cam: 0.02 },
|
|
21510
21597
|
{ p: [0.95, dh(0.85), s * 0.85], c: 2.42, t: 0.14, cam: 0.02 },
|
|
21511
21598
|
{ p: [0.55, dh(2.4), s * 2.4], c: 1.9, t: 0.13, cam: 0.02 },
|
|
21512
21599
|
{ p: [-0.32, dh(5.75), s * 5.75], c: 1.08, t: 0.11, cam: 0.02 },
|
|
@@ -21588,7 +21675,7 @@ function installPlanesExtra(fx) {
|
|
|
21588
21675
|
const finB = c.add(
|
|
21589
21676
|
EA.foilGeo(
|
|
21590
21677
|
[
|
|
21591
|
-
{ p: [-3.89, 2.
|
|
21678
|
+
{ p: [-3.89, 2.253, 0], c: 2.22, t: 0.115 },
|
|
21592
21679
|
{ p: [-5.34, 4.185, 0], c: 1.17, t: 0.105 }
|
|
21593
21680
|
],
|
|
21594
21681
|
{ up: "z", n: 10 }
|
|
@@ -21611,7 +21698,7 @@ function installPlanesExtra(fx) {
|
|
|
21611
21698
|
const hs = c.add(
|
|
21612
21699
|
EA.foilGeo(
|
|
21613
21700
|
[
|
|
21614
|
-
{ p: [-5.3, 4.2,
|
|
21701
|
+
{ p: [-5.3, 4.2, s * 2e-3], c: 1.18, t: 0.1 },
|
|
21615
21702
|
{ p: [-5.9, 4.24, s * 2.55], c: 0.62, t: 0.09 }
|
|
21616
21703
|
],
|
|
21617
21704
|
{ up: "y", n: 10 }
|
|
@@ -21873,7 +21960,7 @@ function installPlanesExtra(fx) {
|
|
|
21873
21960
|
[1, -1].forEach(function(s) {
|
|
21874
21961
|
const g = EA.foilGeo(
|
|
21875
21962
|
[
|
|
21876
|
-
{ p: [1.52, dh(0),
|
|
21963
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.35, t: 0.15, cam: 0.02 },
|
|
21877
21964
|
{ p: [1.5, dh(0.48), s * 0.48], c: 2.32, t: 0.15, cam: 0.02 },
|
|
21878
21965
|
{ p: [0.78, dh(5.4), s * 5.4], c: 1.2, t: 0.12, cam: 0.02 },
|
|
21879
21966
|
{ p: [0.74, dh(5.57), s * 5.57], c: 1.1, t: 0.07, cam: 0.01 }
|
|
@@ -21978,7 +22065,7 @@ function installPlanesExtra(fx) {
|
|
|
21978
22065
|
[1, -1].forEach(function(s) {
|
|
21979
22066
|
const g = EA.foilGeo(
|
|
21980
22067
|
[
|
|
21981
|
-
{ p: [-4.3, 1.72,
|
|
22068
|
+
{ p: [-4.3, 1.72, s * 2e-3], c: 1.3, t: 0.1 },
|
|
21982
22069
|
{ p: [-4.72, 1.76, s * 2.2], c: 0.75, t: 0.09 }
|
|
21983
22070
|
],
|
|
21984
22071
|
{ up: "y", n: 10 }
|
|
@@ -22166,7 +22253,8 @@ function installSuvPickupVan(fx) {
|
|
|
22166
22253
|
if (msh && msh.parent) warp(msh);
|
|
22167
22254
|
});
|
|
22168
22255
|
const bb = new THREE.Box3(), cen = new V3(), sz = new V3();
|
|
22169
|
-
c.vehicle.children.slice().forEach(function(
|
|
22256
|
+
c.vehicle.children.slice().forEach(function(o3) {
|
|
22257
|
+
const ob = o3;
|
|
22170
22258
|
if (skip.has(ob) || warpSet.has(ob)) return;
|
|
22171
22259
|
if (ob.isMesh) {
|
|
22172
22260
|
const g = ob.geometry;
|
|
@@ -22240,7 +22328,7 @@ function installSuvPickupVan(fx) {
|
|
|
22240
22328
|
const fl = c.roundBox(L, 0.035, 2 * hw, 0.01, LINER, cx, o.floor, 0);
|
|
22241
22329
|
for (let k = 0; k < 7; k++) c.roundBox(L - 0.04, 0.018, 0.04, 8e-3, LINER, cx, o.floor + 0.025, -hw * 0.8 + k * hw * 1.6 / 6);
|
|
22242
22330
|
[1, -1].forEach(function(s) {
|
|
22243
|
-
c.roundBox(L, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
|
|
22331
|
+
c.roundBox(L - 8e-3, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
|
|
22244
22332
|
});
|
|
22245
22333
|
c.roundBox(0.025, h, 2 * hw, 0.01, LINER, o.x0 + 0.012, o.floor + h / 2, 0);
|
|
22246
22334
|
c.roundBox(0.03, h + 0.05, 2 * hw + 0.02, 0.01, c.paint(c.meta.color), o.x1 - 0.015, o.floor + (h + 0.05) / 2, 0);
|
|
@@ -22274,7 +22362,7 @@ function installSuvPickupVan(fx) {
|
|
|
22274
22362
|
const x = kit.profX(s.lower, s.bottomY + 0.14, true) + 0.09;
|
|
22275
22363
|
[1, -1].forEach(function(sd) {
|
|
22276
22364
|
c.roundBox(0.04, r * 2.6, r * 3.2, 0.015, MT.housing, x, y, sd * z);
|
|
22277
|
-
kit.headlight(c, {
|
|
22365
|
+
const lamp = kit.headlight(c, {
|
|
22278
22366
|
style: "round",
|
|
22279
22367
|
x: x + 0.01,
|
|
22280
22368
|
y,
|
|
@@ -22286,6 +22374,7 @@ function installSuvPickupVan(fx) {
|
|
|
22286
22374
|
label: sd > 0 ? trl("labels.right_fog_light") : trl("labels.left_fog_light"),
|
|
22287
22375
|
reach: 0.5
|
|
22288
22376
|
});
|
|
22377
|
+
lamp.fog = true;
|
|
22289
22378
|
});
|
|
22290
22379
|
}
|
|
22291
22380
|
function roofBars(c, z, h, r) {
|
|
@@ -22380,7 +22469,8 @@ function installSuvPickupVan(fx) {
|
|
|
22380
22469
|
}
|
|
22381
22470
|
function plateOutside(c) {
|
|
22382
22471
|
const m = c.meta;
|
|
22383
|
-
c.vehicle.children.forEach(function(
|
|
22472
|
+
c.vehicle.children.forEach(function(o3) {
|
|
22473
|
+
const o = o3;
|
|
22384
22474
|
if (o.isMesh && o.geometry.type === "PlaneGeometry" && Math.abs(o.rotation.y + PI / 2) < 0.01 && o.position.x < m.rear + 0.2 && o.material.map && o.material.map.image && o.material.map.image.width === 400)
|
|
22385
22475
|
o.position.x = Math.min(o.position.x, m.rear - BV * 0.5) - BV * 0.62;
|
|
22386
22476
|
});
|
|
@@ -22550,7 +22640,8 @@ function installSuvPickupVan(fx) {
|
|
|
22550
22640
|
}
|
|
22551
22641
|
c.root.updateMatrixWorld(true);
|
|
22552
22642
|
const gInv = new THREE.Matrix4().copy(c.vehicle.matrixWorld).invert(), rel = new THREE.Matrix4(), inv = new THREE.Matrix4(), v = new V3(), done = /* @__PURE__ */ new Set();
|
|
22553
|
-
c.vehicle.traverse(function(
|
|
22643
|
+
c.vehicle.traverse(function(o3) {
|
|
22644
|
+
const ob = o3;
|
|
22554
22645
|
if (!ob.isMesh || done.has(ob.geometry)) return;
|
|
22555
22646
|
done.add(ob.geometry);
|
|
22556
22647
|
rel.multiplyMatrices(gInv, ob.matrixWorld);
|
|
@@ -22616,7 +22707,8 @@ function installSuvPickupVan(fx) {
|
|
|
22616
22707
|
c.lights.forEach(function(L) {
|
|
22617
22708
|
if (!L.group || L.group.userData.recessed) return;
|
|
22618
22709
|
L.group.userData.recessed = true;
|
|
22619
|
-
L.group.children.slice().forEach(function(
|
|
22710
|
+
L.group.children.slice().forEach(function(o3) {
|
|
22711
|
+
const h = o3;
|
|
22620
22712
|
if (!h.isMesh || h.material !== MT.housing || h.geometry.type !== "BoxGeometry" || Math.abs(h.position.x) > 1e-3) return;
|
|
22621
22713
|
h.geometry.computeBoundingBox();
|
|
22622
22714
|
const bb = h.geometry.boundingBox, d = bb.max.x - bb.min.x;
|
|
@@ -22647,7 +22739,8 @@ function installSuvPickupVan(fx) {
|
|
|
22647
22739
|
const cols = [m.color, m.roofCol].filter(Boolean).map(function(h) {
|
|
22648
22740
|
return new THREE.Color(h).getHex();
|
|
22649
22741
|
});
|
|
22650
|
-
c.vehicle.children.forEach(function(
|
|
22742
|
+
c.vehicle.children.forEach(function(o3) {
|
|
22743
|
+
const o = o3;
|
|
22651
22744
|
if (!o.isMesh || gl.has(o) || o.geometry.type !== "BoxGeometry" || o.material === MT.trim || o.material === MT.chrome || o.material.transparent)
|
|
22652
22745
|
return;
|
|
22653
22746
|
if (o.material.color && cols.indexOf(o.material.color.getHex()) >= 0) return;
|
|
@@ -23131,10 +23224,10 @@ function installSuvPickupVan(fx) {
|
|
|
23131
23224
|
pre: function(c2, _m) {
|
|
23132
23225
|
const gx = fX(s, 0.82) - 0.012, gy = 0.82, gh = 0.46, gw = 1.08, tz = 0.8;
|
|
23133
23226
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: tz } });
|
|
23134
|
-
c2.roundBox(0.
|
|
23227
|
+
c2.roundBox(0.058, gh - 0.1, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy, 0, { taper: { sz: tz - 0.02 } });
|
|
23135
23228
|
[0.13, 0.045, -0.04, -0.125].forEach(function(dy) {
|
|
23136
23229
|
const k = (dy + gh / 2 - 0.05) / (gh - 0.1);
|
|
23137
|
-
c2.roundBox(0.
|
|
23230
|
+
c2.roundBox(0.066, 0.022, (gw - 0.2) * (1 + (tz - 1) * k), 8e-3, MT.chrome, gx + 4e-3, gy + dy, 0);
|
|
23138
23231
|
});
|
|
23139
23232
|
c2.roundBox(0.04, 0.04, 1.32, 0.015, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23140
23233
|
kit.emblem(c2, fX(s, 0.9) + 0.03, 0.9, 0, 0.06);
|
|
@@ -23470,9 +23563,9 @@ function installSuvPickupVan(fx) {
|
|
|
23470
23563
|
pre: function(c2, _m) {
|
|
23471
23564
|
const gx = fX(s, 0.8) - 0.012, gy = 0.8, gw = 1.14, gh = 0.52;
|
|
23472
23565
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: 0.84 } });
|
|
23473
|
-
c2.roundBox(0.
|
|
23566
|
+
c2.roundBox(0.058, gh - 0.12, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy - 0.01, 0, { taper: { sz: 0.82 } });
|
|
23474
23567
|
[0.12, -0.02, -0.14].forEach(function(dy) {
|
|
23475
|
-
c2.roundBox(0.
|
|
23568
|
+
c2.roundBox(0.066, 0.03, (gw - 0.22) * (1 - (dy + 0.2) * 0.4), 0.01, MT.housing, gx + 4e-3, gy + dy, 0);
|
|
23476
23569
|
});
|
|
23477
23570
|
c2.roundBox(0.04, 0.05, 1.3, 0.02, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23478
23571
|
kit.emblem(c2, gx + 0.035, gy + 0.06, 0, 0.06);
|
|
@@ -23491,7 +23584,8 @@ function installSuvPickupVan(fx) {
|
|
|
23491
23584
|
},
|
|
23492
23585
|
post: function(c2, _m) {
|
|
23493
23586
|
const gfx = fX(s, 0.8) + 0.04;
|
|
23494
|
-
c2.vehicle.children.forEach(function(
|
|
23587
|
+
c2.vehicle.children.forEach(function(o3) {
|
|
23588
|
+
const o = o3;
|
|
23495
23589
|
if (o.isMesh && o.geometry.type === "PlaneGeometry" && Math.abs(o.rotation.y - PI / 2) < 0.01 && o.position.x > 1.5 && o.material.map && o.material.map.image && o.material.map.image.width === 400)
|
|
23496
23590
|
o.position.x = Math.max(o.position.x, gfx);
|
|
23497
23591
|
});
|
|
@@ -23637,7 +23731,7 @@ function installSuvPickupVan(fx) {
|
|
|
23637
23731
|
wg.add(bolt);
|
|
23638
23732
|
}
|
|
23639
23733
|
for (let sk = 0; sk < 6; sk++) {
|
|
23640
|
-
const sa = sk / 6 * PI * 2, hole = new THREE.Mesh(new THREE.CylinderGeometry(rr * 0.13, rr * 0.13, 0.
|
|
23734
|
+
const sa = sk / 6 * PI * 2, hole = new THREE.Mesh(new THREE.CylinderGeometry(rr * 0.13, rr * 0.13, 0.03, 14), MT.hole);
|
|
23641
23735
|
hole.rotation.x = PI / 2;
|
|
23642
23736
|
hole.position.set(Math.cos(sa) * rr * 0.58, Math.sin(sa) * rr * 0.58, fz + zs * 2e-3);
|
|
23643
23737
|
wg.add(hole);
|
|
@@ -23666,7 +23760,7 @@ function installSuvPickupVan(fx) {
|
|
|
23666
23760
|
c.rod(new V3(0.6, 2.8, sd * 0.78), new V3(-0.25, 2.8, sd * 0.78), 0.035, red);
|
|
23667
23761
|
});
|
|
23668
23762
|
c.rod(new V3(0.6, 2.8, -0.78), new V3(0.6, 2.8, 0.78), 0.035, red);
|
|
23669
|
-
c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.
|
|
23763
|
+
c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.032, red);
|
|
23670
23764
|
c.rod(new V3(-0.25, 2.3, -0.8), new V3(-0.25, 2.8, 0.78), 0.03, red);
|
|
23671
23765
|
const roofItems = [c.roundBox(0.16, 0.05, 1.3, 0.02, MT.trim, 0.42, m.top + 0.08, 0)];
|
|
23672
23766
|
[-0.48, -0.16, 0.16, 0.48].forEach(function(z) {
|
|
@@ -23826,7 +23920,7 @@ function installSuvPickupVan(fx) {
|
|
|
23826
23920
|
kit.sideWindows(c, [cab], W, T, function() {
|
|
23827
23921
|
return lbl("cab_window");
|
|
23828
23922
|
});
|
|
23829
|
-
winS.forEach(function(w
|
|
23923
|
+
winS.forEach(function(w) {
|
|
23830
23924
|
kit.sideWindows(
|
|
23831
23925
|
c,
|
|
23832
23926
|
[w.p],
|
|
@@ -24019,7 +24113,8 @@ function installSuvPickupVan(fx) {
|
|
|
24019
24113
|
fxKey: "lid",
|
|
24020
24114
|
dir: "front"
|
|
24021
24115
|
});
|
|
24022
|
-
c.vehicle.children.forEach(function(
|
|
24116
|
+
c.vehicle.children.forEach(function(o3) {
|
|
24117
|
+
const o = o3;
|
|
24023
24118
|
if (o.isMesh && o.geometry.type === "PlaneGeometry" && o.material.map && o.material.map.image && o.material.map.image.width === 400 && o.position.x < 0)
|
|
24024
24119
|
o.position.y = 0.84;
|
|
24025
24120
|
});
|
|
@@ -24070,7 +24165,7 @@ function installSuvPickupVan(fx) {
|
|
|
24070
24165
|
grille: { style: "truck", w: 0.84, h: 0.28, y: 0.86 },
|
|
24071
24166
|
seams: [1.62, 0.44],
|
|
24072
24167
|
handles: [0.6],
|
|
24073
|
-
extra: function(c2, m
|
|
24168
|
+
extra: function(c2, m) {
|
|
24074
24169
|
const fx2 = kit.profX(m.vanLow, 0.86, true);
|
|
24075
24170
|
kit.emblem(c2, fx2 + 0.1, 0.86, 0, 0.1);
|
|
24076
24171
|
const bfx = kit.profX(m.vanLow, 0.56, true);
|
|
@@ -24101,7 +24196,8 @@ function installSuvPickupVan(fx) {
|
|
|
24101
24196
|
[cx0 + 0.9, 0.82, -0.3, "#7a5c3a"],
|
|
24102
24197
|
[cx0 + 0.6, 1.18, -0.3, "#8a6a44"],
|
|
24103
24198
|
[cx0 + 1.6, 0.82, 0, "#6d5232"]
|
|
24104
|
-
].forEach(function(
|
|
24199
|
+
].forEach(function(q) {
|
|
24200
|
+
const b = q;
|
|
24105
24201
|
c2.roundBox(0.5, 0.4, 0.5, 0.02, CM(b[3], { roughness: 0.9 }), b[0], b[1], b[2]);
|
|
24106
24202
|
});
|
|
24107
24203
|
c2.part("cargo", trl("labels.cargo_box"), null, new V3(m.rear + 1.4, 1.2, 0), 1.3);
|
|
@@ -24245,8 +24341,8 @@ function installSuvPickupVan(fx) {
|
|
|
24245
24341
|
);
|
|
24246
24342
|
const zz = sd * (kit.halfAt(W, m.tumble, 1.75) + 0.012), zt = sd * (kit.halfAt(W, m.tumble, 2.22) + 0.012);
|
|
24247
24343
|
c2.text("RESGATE", 1.2, 0.3, sd > 0 ? -1.5 : -0.85, 2.22, zt, sd > 0 ? "+z" : "-z", { fg: red });
|
|
24248
|
-
[0, PI / 3, -PI / 3].forEach(function(a) {
|
|
24249
|
-
c2.roundBox(0.09, 0.36, 0.01, 0.01, blu, -2.25, 1.75, zz, { rot: [0, 0, a] });
|
|
24344
|
+
[0, PI / 3, -PI / 3].forEach(function(a, i) {
|
|
24345
|
+
c2.roundBox(0.09, 0.36, 0.01, 0.01, blu, -2.25, 1.75, zz + sd * i * 25e-4, { rot: [0, 0, a] });
|
|
24250
24346
|
});
|
|
24251
24347
|
});
|
|
24252
24348
|
if (c2.hood) {
|
|
@@ -24281,18 +24377,19 @@ function installSuvPickupVan(fx) {
|
|
|
24281
24377
|
c2.roundBox(0.03, 0.12, 1.9, 0.01, rd, m.rear - 8e-3, 1.1, 0);
|
|
24282
24378
|
const beaconBar = [c2.roundBox(0.3, 0.08, 1.5, 0.03, MT.trim, 0.6, m.top + 0.04, 0)];
|
|
24283
24379
|
[-0.5, -0.17, 0.17, 0.5].forEach(function(z, i) {
|
|
24284
|
-
|
|
24285
|
-
|
|
24286
|
-
|
|
24287
|
-
|
|
24288
|
-
|
|
24289
|
-
|
|
24290
|
-
|
|
24291
|
-
|
|
24292
|
-
|
|
24293
|
-
z
|
|
24294
|
-
)
|
|
24380
|
+
const lamp = c2.roundBox(
|
|
24381
|
+
0.24,
|
|
24382
|
+
0.1,
|
|
24383
|
+
0.3,
|
|
24384
|
+
0.04,
|
|
24385
|
+
i % 2 ? MT.tail : CM("#f2f2f2", { emissive: new THREE.Color("#ffffff"), emissiveIntensity: 0.6 }),
|
|
24386
|
+
0.6,
|
|
24387
|
+
m.top + 0.13,
|
|
24388
|
+
z
|
|
24295
24389
|
);
|
|
24390
|
+
lamp.userData.lamp = "beacon";
|
|
24391
|
+
lamp.userData.beaconSide = z < 0 ? 0 : 1;
|
|
24392
|
+
beaconBar.push(lamp);
|
|
24296
24393
|
});
|
|
24297
24394
|
beaconBar.push(
|
|
24298
24395
|
c2.roundBox(
|
|
@@ -24387,13 +24484,9 @@ function installSuvPickupVan(fx) {
|
|
|
24387
24484
|
}
|
|
24388
24485
|
|
|
24389
24486
|
// src/vehicles/water-air.ts
|
|
24390
|
-
function
|
|
24391
|
-
const kit = fx.kit;
|
|
24487
|
+
function createWaterAirKit(kit) {
|
|
24392
24488
|
const THREE = kit.THREE;
|
|
24393
|
-
const
|
|
24394
|
-
const trl = fx.t;
|
|
24395
|
-
const lbl = fx.label;
|
|
24396
|
-
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _paintCol = kit.paintColor, G = kit.geo, DS = THREE.DoubleSide, clamp = kit.clamp;
|
|
24489
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, G = kit.geo, clamp = kit.clamp;
|
|
24397
24490
|
function colorize(geo, fn) {
|
|
24398
24491
|
const p = geo.attributes.position, col = new Float32Array(p.count * 3);
|
|
24399
24492
|
for (let i = 0; i < p.count; i++) {
|
|
@@ -24601,9 +24694,31 @@ function installWaterAir(fx) {
|
|
|
24601
24694
|
if (o.col) colorize(g, o.col);
|
|
24602
24695
|
return g;
|
|
24603
24696
|
}
|
|
24697
|
+
function stretchEnds(st, by) {
|
|
24698
|
+
const out = st.map(function(q) {
|
|
24699
|
+
return q.slice();
|
|
24700
|
+
});
|
|
24701
|
+
const last = out.length - 1;
|
|
24702
|
+
const dir = out[last][0] >= out[0][0] ? 1 : -1;
|
|
24703
|
+
out[0][0] = out[0][0] - dir * by;
|
|
24704
|
+
out[last][0] = out[last][0] + dir * by;
|
|
24705
|
+
return out;
|
|
24706
|
+
}
|
|
24707
|
+
const paneCount = /* @__PURE__ */ new WeakMap();
|
|
24708
|
+
function nextPaneScale(c) {
|
|
24709
|
+
const n = paneCount.get(c) ?? 0;
|
|
24710
|
+
paneCount.set(c, n + 1);
|
|
24711
|
+
return 0.988 - 35e-4 * (n % 4);
|
|
24712
|
+
}
|
|
24713
|
+
const skinCount = /* @__PURE__ */ new WeakMap();
|
|
24714
|
+
function nextSkinScale(c) {
|
|
24715
|
+
const n = skinCount.get(c) ?? 0;
|
|
24716
|
+
skinCount.set(c, n + 1);
|
|
24717
|
+
return 1.004 + 25e-4 * (n % 3);
|
|
24718
|
+
}
|
|
24604
24719
|
function fuseGlass(c, st, keep, label, type, o) {
|
|
24605
24720
|
o = o || {};
|
|
24606
|
-
const k = o.k ||
|
|
24721
|
+
const k = o.k || nextPaneScale(c);
|
|
24607
24722
|
const st2 = st.map(function(s) {
|
|
24608
24723
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24609
24724
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
@@ -24616,12 +24731,12 @@ function installWaterAir(fx) {
|
|
|
24616
24731
|
}
|
|
24617
24732
|
function fuseSkin(c, st, keep, mat, o) {
|
|
24618
24733
|
o = o || {};
|
|
24619
|
-
const k = o.k ||
|
|
24734
|
+
const k = o.k || nextSkinScale(c);
|
|
24620
24735
|
const st2 = st.map(function(s) {
|
|
24621
24736
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24622
24737
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
24623
24738
|
});
|
|
24624
|
-
const m = c.add(fuseGeo(st2, { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
|
|
24739
|
+
const m = c.add(fuseGeo(stretchEnds(st2, -3e-3), { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
|
|
24625
24740
|
m.castShadow = false;
|
|
24626
24741
|
kit.cutMesh(m, [keep], 40);
|
|
24627
24742
|
c.deform.push(m);
|
|
@@ -24863,7 +24978,8 @@ function installWaterAir(fx) {
|
|
|
24863
24978
|
function bake(c, grp) {
|
|
24864
24979
|
grp.updateMatrix();
|
|
24865
24980
|
const M = grp.matrix;
|
|
24866
|
-
grp.children.slice().forEach(function(
|
|
24981
|
+
grp.children.slice().forEach(function(o3) {
|
|
24982
|
+
const o = o3;
|
|
24867
24983
|
o.updateMatrix();
|
|
24868
24984
|
const m = new THREE.Matrix4().multiplyMatrices(M, o.matrix);
|
|
24869
24985
|
grp.remove(o);
|
|
@@ -24891,7 +25007,7 @@ function installWaterAir(fx) {
|
|
|
24891
25007
|
}
|
|
24892
25008
|
;
|
|
24893
25009
|
(o.screens || []).forEach(function(s) {
|
|
24894
|
-
const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.
|
|
25010
|
+
const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.091, y + s[0], s[1]);
|
|
24895
25011
|
sc.castShadow = false;
|
|
24896
25012
|
});
|
|
24897
25013
|
}
|
|
@@ -24931,7 +25047,7 @@ function installWaterAir(fx) {
|
|
|
24931
25047
|
);
|
|
24932
25048
|
c.roundBox(0.42 * k, 0.07 * k, 0.33 * k, 0.03 * k, CM(o.band || "#2a2c30", { roughness: 0.5 }), -0.2 * k - 0.05, -0.02 * k, 0, P);
|
|
24933
25049
|
c.roundBox(0.17 * k, shaft, 0.11 * k, 0.04 * k, low, -0.16 * k, -shaft / 2 - 0.02, 0, P);
|
|
24934
|
-
c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft -
|
|
25050
|
+
c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft - 6e-3, 0, P);
|
|
24935
25051
|
c.cylinder(0.055 * k, 0.05 * k, 0.32 * k, low, -0.2 * k, -shaft - 0.09 * k, 0, "x", P);
|
|
24936
25052
|
c.roundBox(0.16 * k, 0.12 * k, 0.025, 0.01, low, -0.18 * k, -shaft - 0.17 * k, 0, P);
|
|
24937
25053
|
const pr = propeller(c, -0.38 * k, -shaft - 0.09 * k, 0, {
|
|
@@ -24963,7 +25079,11 @@ function installWaterAir(fx) {
|
|
|
24963
25079
|
function skinOf(c, mesh, keep, mat, o) {
|
|
24964
25080
|
o = o || {};
|
|
24965
25081
|
const g = mesh.geometry.clone(), p = g.attributes.position, sz = o.sz || 1.006, dy = o.dy || 0;
|
|
25082
|
+
let reach = 0;
|
|
25083
|
+
for (let i = 0; i < p.count; i++) reach = Math.max(reach, Math.abs(p.getX(i)));
|
|
25084
|
+
const sx = o.ends === false ? 1 : 1 - 3e-3 / (reach || 1);
|
|
24966
25085
|
for (let i = 0; i < p.count; i++) {
|
|
25086
|
+
p.setX(i, p.getX(i) * sx);
|
|
24967
25087
|
p.setZ(i, p.getZ(i) * sz);
|
|
24968
25088
|
p.setY(i, p.getY(i) + dy * Math.sign(p.getY(i)));
|
|
24969
25089
|
}
|
|
@@ -25065,7 +25185,7 @@ function installWaterAir(fx) {
|
|
|
25065
25185
|
t.rotation.y += s > 0 ? -Math.atan(m) : Math.atan(m);
|
|
25066
25186
|
return t;
|
|
25067
25187
|
}
|
|
25068
|
-
|
|
25188
|
+
return {
|
|
25069
25189
|
colorize,
|
|
25070
25190
|
tab,
|
|
25071
25191
|
tabL,
|
|
@@ -25077,6 +25197,8 @@ function installWaterAir(fx) {
|
|
|
25077
25197
|
foilGeo,
|
|
25078
25198
|
fuseGeo,
|
|
25079
25199
|
fuseGlass,
|
|
25200
|
+
nextPaneScale,
|
|
25201
|
+
nextSkinScale,
|
|
25080
25202
|
fuseSkin,
|
|
25081
25203
|
bandT,
|
|
25082
25204
|
cutT,
|
|
@@ -25103,6 +25225,15 @@ function installWaterAir(fx) {
|
|
|
25103
25225
|
pedals,
|
|
25104
25226
|
NAV
|
|
25105
25227
|
};
|
|
25228
|
+
}
|
|
25229
|
+
function installWaterAir(fx) {
|
|
25230
|
+
const kit = fx.kit;
|
|
25231
|
+
const THREE = kit.THREE;
|
|
25232
|
+
const shared = fx.shared;
|
|
25233
|
+
const trl = fx.t;
|
|
25234
|
+
const lbl = fx.label;
|
|
25235
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _paintCol = kit.paintColor, DS = THREE.DoubleSide;
|
|
25236
|
+
shared.EA = createWaterAirKit(kit);
|
|
25106
25237
|
fx.register(
|
|
25107
25238
|
{
|
|
25108
25239
|
key: "river_skiff",
|
|
@@ -25216,7 +25347,7 @@ function installWaterAir(fx) {
|
|
|
25216
25347
|
const tank = c.roundBox(0.48, 0.24, 0.3, 0.06, CM("#a3241c", { roughness: 0.5 }), -2.05, 0.06, -0.38);
|
|
25217
25348
|
c.rod(new V3(-2, 0.18, -0.38), new V3(-2.3, 0.4, -0.1), 0.01, CM("#1b1b1b"));
|
|
25218
25349
|
c.roundBox(1.8, 0.03, 0.1, 0.01, MT.wood, -0.6, 0, 0.5, { rot: [0.3, 0, 0] });
|
|
25219
|
-
c.roundBox(0.35, 0.03, 0.14, 0.02, MT.wood, 0.45,
|
|
25350
|
+
c.roundBox(0.35, 0.03, 0.14, 0.02, MT.wood, 0.45, 4e-3, 0.5, { rot: [0.3, 0, 0] });
|
|
25220
25351
|
c.rod(new V3(-2.35, 0.42, 0.6), new V3(-2.35, 1.1, 0.6), 0.012, MT.chrome);
|
|
25221
25352
|
EA.navLight(c, -2.35, 1.13, 0.6, "white", trl("labels.stern_light_mast"), { r: 0.035 });
|
|
25222
25353
|
EA.navLight(c, 2.3, 0.53, 0.06, "green", trl("labels.starboard_bow_light_green"), { r: 0.03 });
|
|
@@ -25393,7 +25524,7 @@ function installWaterAir(fx) {
|
|
|
25393
25524
|
c.roundBox(2.3, 0.22, 0.5, 0.07, vinyl, -2.3, 0.45, s * 0.75);
|
|
25394
25525
|
c.roundBox(2.3, 0.4, 0.12, 0.05, vinyl, -2.3, 0.72, s * (H.half(-2.3, 0.7) - 0.08));
|
|
25395
25526
|
});
|
|
25396
|
-
c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.
|
|
25527
|
+
c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.453, 0);
|
|
25397
25528
|
c.roundBox(0.12, 0.42, 2.1, 0.05, vinyl, -3.52, 0.74, 0);
|
|
25398
25529
|
c.seatTops.push(
|
|
25399
25530
|
{ x: -2.3, y: 0.57, z: 0.75, w: 0.5, l: 2.2 },
|
|
@@ -25401,8 +25532,8 @@ function installWaterAir(fx) {
|
|
|
25401
25532
|
{ x: 2, y: 0.57, z: 0, w: 1.2, l: 0.9 }
|
|
25402
25533
|
);
|
|
25403
25534
|
const cy = 0.22;
|
|
25404
|
-
c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.
|
|
25405
|
-
c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.
|
|
25535
|
+
c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.362, 0.72);
|
|
25536
|
+
c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.362, -0.74);
|
|
25406
25537
|
c.roundBox(0.42, 0.04, 0.7, 0.015, CM("#18191b", { roughness: 0.7 }), 0.95, cy + 0.74, 0.72, { rot: [0, 0, -0.35] });
|
|
25407
25538
|
[0.55, 0.72, 0.89].forEach(function(z, i) {
|
|
25408
25539
|
c.cylinder(0.045, 0.045, 0.012, MT.gauge, 0.93 + (i === 1 ? 0.05 : 0), cy + 0.79, z, null, { seg: 16 }).rotation.set(0, 0, 1.22);
|
|
@@ -25413,8 +25544,8 @@ function installWaterAir(fx) {
|
|
|
25413
25544
|
c.rod(new V3(0.62, cy + 0.72, 0.62), new V3(0.55, cy + 0.82, 0.62), 0.02, MT.chrome);
|
|
25414
25545
|
c.rod(new V3(0.55, cy + 0.7, 0.98), new V3(0.42, cy + 0.88, 1), 0.015, MT.chrome);
|
|
25415
25546
|
c.sphere(0.035, MT.plastic, 0.42, cy + 0.9, 1);
|
|
25416
|
-
kit.seat(c, -0.1, cy, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25417
|
-
kit.seat(c, -0.1, cy, -0.74, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25547
|
+
kit.seat(c, -0.1, cy + 2e-3, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25548
|
+
kit.seat(c, -0.1, cy + 2e-3, -0.74, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25418
25549
|
[1, -1].forEach(function(s) {
|
|
25419
25550
|
const pts = [];
|
|
25420
25551
|
for (let i = 0; i <= 8; i++) {
|
|
@@ -25636,7 +25767,7 @@ function installWaterAir(fx) {
|
|
|
25636
25767
|
[1.6, -0.55],
|
|
25637
25768
|
[1.95, -1]
|
|
25638
25769
|
].forEach(function(q) {
|
|
25639
|
-
c.roundBox(0.42, 0.24, 0.32, 0.03, CM("#3f6fa0", { roughness: 0.6 }), q[0], dk(q[0]) + 0.
|
|
25770
|
+
c.roundBox(0.42, 0.24, 0.32, 0.03, CM("#3f6fa0", { roughness: 0.6 }), q[0], dk(q[0]) + 0.128 + (q[0] > 1.9 ? 4e-3 : 0), q[1]);
|
|
25640
25771
|
});
|
|
25641
25772
|
const hx = -2.7, hy0 = dk(hx), hh = 1.9, hw2 = 1.1, cas = c.roundBox(2, hh, hw2 * 2, 0.08, wht, hx, hy0 + hh / 2, 0, { def: true });
|
|
25642
25773
|
const cutF = {
|
|
@@ -25725,11 +25856,11 @@ function installWaterAir(fx) {
|
|
|
25725
25856
|
c.rod(new V3(0, 0, 0), new V3(0, Math.cos(a8) * 0.36, Math.sin(a8) * 0.36), 0.014, MT.wood, { parent: whl });
|
|
25726
25857
|
}
|
|
25727
25858
|
c.cylinder(0.05, 0.05, 0.14, MT.wood, 0.06, 0, 0, "x", { parent: whl });
|
|
25728
|
-
kit.seat(c, hx - 0.05, hy0, 0, { w: 0.5, h: 0.55, back: 0.45, mat: inner, headrest: false });
|
|
25859
|
+
kit.seat(c, hx - 0.05, hy0 + 2e-3, 0, { w: 0.5, h: 0.55, back: 0.45, mat: inner, headrest: false });
|
|
25729
25860
|
c.roundBox(1.8, 0.12, 0.65, 0.04, CM("#7c5a3b"), hx - 0.2, hy0 + 0.5, -0.72);
|
|
25730
25861
|
c.roundBox(1.7, 0.08, 0.55, 0.04, CM("#6b7c8f", { roughness: 1 }), hx - 0.2, hy0 + 0.6, -0.72);
|
|
25731
25862
|
c.roundBox(1.9, 0.02, 2.1, 0.01, inner, hx, hy0 + hh - 0.06, 0).castShadow = false;
|
|
25732
|
-
c.cylinder(0.1, 0.1, 1.2, MT.trim, hx - 0.75, hy0 + hh + 0.
|
|
25863
|
+
c.cylinder(0.1, 0.1, 1.2, MT.trim, hx - 0.75, hy0 + hh + 0.596, 0.65);
|
|
25733
25864
|
c.cylinder(0.13, 0.1, 0.1, MT.trim, hx - 0.75, hy0 + hh + 1.22, 0.65);
|
|
25734
25865
|
c.rod(new V3(hx + 0.4, hy0 + hh + 0.1, 0), new V3(hx + 0.4, hy0 + hh + 1.6, 0), 0.04, wood);
|
|
25735
25866
|
EA.navLight(c, hx + 0.4, hy0 + hh + 1.65, 0, "white", trl("labels.masthead_light"), { r: 0.05 });
|
|
@@ -25830,7 +25961,7 @@ function installWaterAir(fx) {
|
|
|
25830
25961
|
const EA = shared.EA, white = "#ecebe6";
|
|
25831
25962
|
const paintW = c.paint(white);
|
|
25832
25963
|
const ST = [
|
|
25833
|
-
[2.
|
|
25964
|
+
[2.297, 0.98, 1.46, 0.7, 2.4],
|
|
25834
25965
|
[2.15, 0.88, 1.55, 0.92, 2.6],
|
|
25835
25966
|
[1.85, 0.8, 1.61, 1.02, 2.8],
|
|
25836
25967
|
[1.45, 0.72, 1.65, 1.08, 3],
|
|
@@ -25959,7 +26090,7 @@ function installWaterAir(fx) {
|
|
|
25959
26090
|
};
|
|
25960
26091
|
const g = EA.foilGeo(
|
|
25961
26092
|
[
|
|
25962
|
-
{ p: [0.66, dh(0),
|
|
26093
|
+
{ p: [0.66, dh(0), s * 2e-3], c: 1.63, t: 0.12, cam: 0.02 },
|
|
25963
26094
|
{ p: [0.66, dh(2.6), s * 2.6], c: 1.63, t: 0.12, cam: 0.02 },
|
|
25964
26095
|
{ p: [0.62, dh(5.2), s * 5.2], c: 1.14, t: 0.11, cam: 0.02 },
|
|
25965
26096
|
{ p: [0.58, dh(5.5) + 0.02, s * 5.5], c: 0.98, t: 0.06, cam: 0.01 }
|
|
@@ -25998,7 +26129,7 @@ function installWaterAir(fx) {
|
|
|
25998
26129
|
const hs = c.add(
|
|
25999
26130
|
EA.foilGeo(
|
|
26000
26131
|
[
|
|
26001
|
-
{ p: [-4.6, 1.42,
|
|
26132
|
+
{ p: [-4.6, 1.42, s * 2e-3], c: 1.2, t: 0.09 },
|
|
26002
26133
|
{ p: [-4.95, 1.42, s * 1.72], c: 0.86, t: 0.08 }
|
|
26003
26134
|
],
|
|
26004
26135
|
{ up: "y", n: 10 }
|
|
@@ -26249,7 +26380,7 @@ function installWaterAir(fx) {
|
|
|
26249
26380
|
const w = c.add(
|
|
26250
26381
|
EA.foilGeo(
|
|
26251
26382
|
[
|
|
26252
|
-
{ p: [1.18, dh(0),
|
|
26383
|
+
{ p: [1.18, dh(0), s * 2e-3], c: 1.71, t: 0.15, cam: 0.02 },
|
|
26253
26384
|
{ p: [1.18, dh(5.6), s * 5.6], c: 1.71, t: 0.14, cam: 0.02 },
|
|
26254
26385
|
{ p: [1.12, dh(5.84) + 0.02, s * 5.84], c: 1.55, t: 0.07, cam: 0.01 }
|
|
26255
26386
|
],
|
|
@@ -26283,7 +26414,7 @@ function installWaterAir(fx) {
|
|
|
26283
26414
|
const hs = c.add(
|
|
26284
26415
|
EA.foilGeo(
|
|
26285
26416
|
[
|
|
26286
|
-
{ p: [-2.95, 0.36,
|
|
26417
|
+
{ p: [-2.95, 0.36, s * 2e-3], c: 0.95, t: 0.09 },
|
|
26287
26418
|
{ p: [-3.05, 0.36, s * 1.8], c: 0.8, t: 0.08 }
|
|
26288
26419
|
],
|
|
26289
26420
|
{ up: "y", n: 10 }
|
|
@@ -26315,8 +26446,8 @@ function installWaterAir(fx) {
|
|
|
26315
26446
|
const finB = c.add(
|
|
26316
26447
|
EA.foilGeo(
|
|
26317
26448
|
[
|
|
26318
|
-
{ p: [-2.64, 0.
|
|
26319
|
-
{ p: [-3.24, 1.
|
|
26449
|
+
{ p: [-2.64, 0.424, 0], c: 1.27, t: 0.11 },
|
|
26450
|
+
{ p: [-3.24, 1.853, 0], c: 0.74, t: 0.1 }
|
|
26320
26451
|
],
|
|
26321
26452
|
{ up: "z", n: 10 }
|
|
26322
26453
|
),
|
|
@@ -26586,10 +26717,11 @@ function installWaterAir(fx) {
|
|
|
26586
26717
|
EA.sideKeepP(fdP, 0.35, s),
|
|
26587
26718
|
s > 0 ? lbl("front_right_door_window") : lbl("front_left_door_window"),
|
|
26588
26719
|
"tempered",
|
|
26589
|
-
{ pos: new V3(0.4, 1.5, s * 0.64) }
|
|
26720
|
+
{ pos: new V3(0.4, 1.5, s * 0.64), k: 0.988 }
|
|
26590
26721
|
);
|
|
26591
26722
|
EA.fuseGlass(c, ST, EA.sideKeepP(rdP, 0.35, s), s > 0 ? lbl("rear_right_door_window") : lbl("rear_left_door_window"), "tempered", {
|
|
26592
|
-
pos: new V3(-0.5, 1.5, s * 0.63)
|
|
26723
|
+
pos: new V3(-0.5, 1.5, s * 0.63),
|
|
26724
|
+
k: 0.988
|
|
26593
26725
|
});
|
|
26594
26726
|
const df = EA.polySdf([
|
|
26595
26727
|
[0.78, 0.72],
|
|
@@ -26685,7 +26817,7 @@ function installWaterAir(fx) {
|
|
|
26685
26817
|
const hs = c.add(
|
|
26686
26818
|
EA.foilGeo(
|
|
26687
26819
|
[
|
|
26688
|
-
{ p: [-5.25, 1.76,
|
|
26820
|
+
{ p: [-5.25, 1.76, s * 2e-3], c: 0.45, t: 0.1 },
|
|
26689
26821
|
{ p: [-5.32, 1.76, s * 0.62], c: 0.34, t: 0.09 }
|
|
26690
26822
|
],
|
|
26691
26823
|
{ up: "y", n: 8 }
|
|
@@ -27013,7 +27145,7 @@ function installWaterAir(fx) {
|
|
|
27013
27145
|
const hs = c.add(
|
|
27014
27146
|
EA.foilGeo(
|
|
27015
27147
|
[
|
|
27016
|
-
{ p: [-5.3, 1.98,
|
|
27148
|
+
{ p: [-5.3, 1.98, s * 2e-3], c: 0.6, t: 0.11 },
|
|
27017
27149
|
{ p: [-5.38, 1.98, s * 1], c: 0.52, t: 0.1 }
|
|
27018
27150
|
],
|
|
27019
27151
|
{ up: "y", n: 8 }
|
|
@@ -27211,9 +27343,13 @@ function createContext(kit, options) {
|
|
|
27211
27343
|
shared,
|
|
27212
27344
|
t,
|
|
27213
27345
|
label: (key) => ({ key, label: t("labels." + key) }),
|
|
27346
|
+
hasSunroof: (key) => !!options.sunroofs?.includes(key),
|
|
27214
27347
|
register(spec, build) {
|
|
27215
27348
|
if (!groups.has(spec.group) || only && !only.has(spec.key) || skip.has(spec.key)) return;
|
|
27216
|
-
kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] },
|
|
27349
|
+
kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] }, (context, vehicleKit) => {
|
|
27350
|
+
build(context, vehicleKit);
|
|
27351
|
+
separateSpokes(context);
|
|
27352
|
+
});
|
|
27217
27353
|
}
|
|
27218
27354
|
};
|
|
27219
27355
|
}
|
|
@@ -29466,7 +29602,31 @@ var stats = stats_default;
|
|
|
29466
29602
|
var cards = cards_pt_BR_default;
|
|
29467
29603
|
var fleetStats = (id) => stats[id];
|
|
29468
29604
|
var fleetCard = (id) => cards[id];
|
|
29605
|
+
|
|
29606
|
+
// src/proving.ts
|
|
29607
|
+
var FLEET_FOUR_WHEEL_DRIVE = ["light_4x4", "troop_truck", "apc_6x6", "armored_car_6x6", "battle_tank", "monster_truck", "midsize_pickup", "large_suv", "tractor", "quad_bike"];
|
|
29608
|
+
var fleetGroupOf = (id) => Object.entries(fleetGroups).find(([, ids]) => ids.includes(id))?.[0];
|
|
29609
|
+
function fleetProvingSubject(id, options = {}) {
|
|
29610
|
+
const stats2 = fleetStats(id);
|
|
29611
|
+
const dims = fleetDims(id);
|
|
29612
|
+
if (!stats2 || !dims) return null;
|
|
29613
|
+
const group = fleetGroupOf(id) ?? "cars";
|
|
29614
|
+
const density = { motorcycles: 90, cars: 88, suvs: 90, pickups: 95, vans: 80, heavy: 120, agricultural: 150, military: 260, water: 60, air: 40 };
|
|
29615
|
+
return {
|
|
29616
|
+
id,
|
|
29617
|
+
domain: group === "water" ? "water" : group === "air" ? "air" : "land",
|
|
29618
|
+
category: group,
|
|
29619
|
+
stats: { acceleration: stats2.acceleration, handling: stats2.handling, maxSpeedKmh: stats2.maxSpeedKmh },
|
|
29620
|
+
body: {
|
|
29621
|
+
mass: options.mass ?? Math.round((density[group] ?? 90) * dims.length * dims.width * dims.height),
|
|
29622
|
+
wheelbase: options.wheelbase ?? Math.round(dims.length * 0.6 * 100) / 100,
|
|
29623
|
+
track: options.track ?? Math.round(dims.width * 0.82 * 100) / 100,
|
|
29624
|
+
fourWheelDrive: options.fourWheelDrive ?? FLEET_FOUR_WHEEL_DRIVE.includes(id)
|
|
29625
|
+
}
|
|
29626
|
+
};
|
|
29627
|
+
}
|
|
29469
29628
|
export {
|
|
29629
|
+
FLEET_FOUR_WHEEL_DRIVE,
|
|
29470
29630
|
agricultural,
|
|
29471
29631
|
air,
|
|
29472
29632
|
allFleetDims,
|
|
@@ -29478,8 +29638,10 @@ export {
|
|
|
29478
29638
|
fleetCard,
|
|
29479
29639
|
fleetDims,
|
|
29480
29640
|
fleetGroupIds,
|
|
29641
|
+
fleetGroupOf,
|
|
29481
29642
|
fleetGroups,
|
|
29482
29643
|
fleetPack,
|
|
29644
|
+
fleetProvingSubject,
|
|
29483
29645
|
fleetStats,
|
|
29484
29646
|
fleetVehicleIds,
|
|
29485
29647
|
heavy,
|