@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.global.js
CHANGED
|
@@ -21,6 +21,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
|
+
FLEET_FOUR_WHEEL_DRIVE: () => FLEET_FOUR_WHEEL_DRIVE,
|
|
24
25
|
agricultural: () => agricultural,
|
|
25
26
|
air: () => air,
|
|
26
27
|
allFleetDims: () => allFleetDims,
|
|
@@ -32,8 +33,10 @@ var GameVehiclesFleet = (() => {
|
|
|
32
33
|
fleetCard: () => fleetCard,
|
|
33
34
|
fleetDims: () => fleetDims,
|
|
34
35
|
fleetGroupIds: () => fleetGroupIds,
|
|
36
|
+
fleetGroupOf: () => fleetGroupOf,
|
|
35
37
|
fleetGroups: () => fleetGroups,
|
|
36
38
|
fleetPack: () => fleetPack,
|
|
39
|
+
fleetProvingSubject: () => fleetProvingSubject,
|
|
37
40
|
fleetStats: () => fleetStats,
|
|
38
41
|
fleetVehicleIds: () => fleetVehicleIds,
|
|
39
42
|
heavy: () => heavy,
|
|
@@ -3805,6 +3808,34 @@ var GameVehiclesFleet = (() => {
|
|
|
3805
3808
|
];
|
|
3806
3809
|
}
|
|
3807
3810
|
|
|
3811
|
+
// src/spokes.ts
|
|
3812
|
+
var THICKNESS_STEP = 0.0625;
|
|
3813
|
+
var THINNEST = 0.15;
|
|
3814
|
+
var CLEARANCE = 15e-4;
|
|
3815
|
+
var SPOKE_HALF_THICKNESS = 0.02;
|
|
3816
|
+
var DISH_HALF_THICKNESS = 0.025;
|
|
3817
|
+
function sharesPlaneWithDish(reach, scale) {
|
|
3818
|
+
const dishReach = reach * 0.9;
|
|
3819
|
+
const outer = Math.abs(reach + SPOKE_HALF_THICKNESS * scale - (dishReach + DISH_HALF_THICKNESS));
|
|
3820
|
+
const inner = Math.abs(reach - SPOKE_HALF_THICKNESS * scale - (dishReach - DISH_HALF_THICKNESS));
|
|
3821
|
+
return outer < CLEARANCE || inner < CLEARANCE;
|
|
3822
|
+
}
|
|
3823
|
+
function separateSpokes(context) {
|
|
3824
|
+
for (const wheel of context.wheels) {
|
|
3825
|
+
let previous = 1 + THICKNESS_STEP;
|
|
3826
|
+
for (const child of wheel.children) {
|
|
3827
|
+
const mesh = child;
|
|
3828
|
+
const type = mesh.geometry?.type;
|
|
3829
|
+
if (!mesh.isMesh || type !== "BufferGeometry" && type !== "BoxGeometry" || mesh.position.z === 0) continue;
|
|
3830
|
+
const reach = Math.abs(mesh.position.z);
|
|
3831
|
+
let scale = previous - THICKNESS_STEP;
|
|
3832
|
+
while (sharesPlaneWithDish(reach, scale) && scale > THINNEST) scale -= THICKNESS_STEP / 2;
|
|
3833
|
+
mesh.scale.z = Math.max(scale, THINNEST);
|
|
3834
|
+
previous = scale;
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3808
3839
|
// src/vehicles/boats-extra.ts
|
|
3809
3840
|
function installBoatsExtra(fx) {
|
|
3810
3841
|
const kit = fx.kit;
|
|
@@ -4239,12 +4270,12 @@ var GameVehiclesFleet = (() => {
|
|
|
4239
4270
|
cs.castShadow = false;
|
|
4240
4271
|
[1, -1].forEach(function(s) {
|
|
4241
4272
|
c.roundBox(2.6, 0.06, 0.42, 0.02, teak, -2.45, 0.86, s * 0.82);
|
|
4242
|
-
c.roundBox(2.6, 0.
|
|
4273
|
+
c.roundBox(2.6, 0.376, 0.06, 0.02, white, -2.45, 0.671, s * 0.6);
|
|
4243
4274
|
c.roundBox(2.8, 0.22, 0.05, 0.02, white, -2.4, 1.02, s * (H.sheerAt(-2.4).z - 0.32));
|
|
4244
4275
|
c.cylinder(0.06, 0.07, 0.11, MT.chrome, -1.6, 1.15, s * 1.06);
|
|
4245
4276
|
c.cylinder(0.035, 0.035, 0.02, MT.chrome, -1.6, 1.21, s * 1.06);
|
|
4246
4277
|
});
|
|
4247
|
-
c.roundBox(0.3, 0.
|
|
4278
|
+
c.roundBox(0.3, 0.376, 1.2, 0.03, white, -3.75, 0.671, 0);
|
|
4248
4279
|
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 });
|
|
4249
4280
|
const trST = [
|
|
4250
4281
|
[-1.1, 0.8, 1.56, 2, 6],
|
|
@@ -4653,9 +4684,9 @@ var GameVehiclesFleet = (() => {
|
|
|
4653
4684
|
});
|
|
4654
4685
|
c.roundBox(1.6, 0.03, 0.1, 0.01, MT.wood, 0.3, 0.05, 0.38, { rot: [0.2, 0, 0] });
|
|
4655
4686
|
c.roundBox(1.6, 0.03, 0.1, 0.01, MT.wood, 0.3, 0.06, 0.28, { rot: [0.2, 0, 0] });
|
|
4656
|
-
c.roundBox(0.36, 0.24, 0.26, 0.03, CM("#ffffff", { roughness: 0.5 }), 1.25, 0.
|
|
4687
|
+
c.roundBox(0.36, 0.24, 0.26, 0.03, CM("#ffffff", { roughness: 0.5 }), 1.25, 0.142, 0.15);
|
|
4657
4688
|
c.roundBox(0.1, 0.03, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.282);
|
|
4658
|
-
c.roundBox(0.03, 0.1, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.
|
|
4689
|
+
c.roundBox(0.03, 0.1, 0.02, 5e-3, CM("#d01c1c"), 1.25, 0.2, 0.284);
|
|
4659
4690
|
const buoy = c.add(new THREE.TorusGeometry(0.24, 0.06, 10, 24), CM("#f0f0ea", { roughness: 0.6 }), 1.1, 0.1, -0.2);
|
|
4660
4691
|
buoy.rotation.x = PI / 2;
|
|
4661
4692
|
const motor = EA.outboard(c, -1.99, 0.55, 0, { k: 1, tiller: true, label: "40", col: "#1d1f22" });
|
|
@@ -4791,7 +4822,7 @@ var GameVehiclesFleet = (() => {
|
|
|
4791
4822
|
return Math.min(0.06 - y, x - x0 - 0.04);
|
|
4792
4823
|
}),
|
|
4793
4824
|
CM("#1d2023", { roughness: 0.6 }),
|
|
4794
|
-
{ sz: 1.004, dy: 3e-3 }
|
|
4825
|
+
{ sz: 1.004, dy: 3e-3, ends: false }
|
|
4795
4826
|
);
|
|
4796
4827
|
EA.sheerTube(c, H, x0 + 0.02, 6.2, 0.07, blk, { dy: -0.1, dz: 0.02 });
|
|
4797
4828
|
const deck = c.add(EA.deckGeo(H, x0 + 0.02, 6.32, { n: 40, m: 10, crown: 0.05 }), deckC);
|
|
@@ -5056,6 +5087,20 @@ var GameVehiclesFleet = (() => {
|
|
|
5056
5087
|
);
|
|
5057
5088
|
}
|
|
5058
5089
|
|
|
5090
|
+
// src/vehicles/moving-parts.ts
|
|
5091
|
+
var WIPER_SWEEP = 1.5;
|
|
5092
|
+
function tagWiper(params) {
|
|
5093
|
+
var _a;
|
|
5094
|
+
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] };
|
|
5095
|
+
(_a = params.context).wipers ?? (_a.wipers = []);
|
|
5096
|
+
for (const part of params.parts) params.context.wipers.push({ part, tag });
|
|
5097
|
+
}
|
|
5098
|
+
function markSunroof(pane, slide) {
|
|
5099
|
+
pane.name = "sunroof";
|
|
5100
|
+
pane.userData.sunroof = { slide };
|
|
5101
|
+
return pane;
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5059
5104
|
// src/vehicles/cars-extra.ts
|
|
5060
5105
|
function installCarsExtra(fx) {
|
|
5061
5106
|
const kit = fx.kit;
|
|
@@ -5553,7 +5598,7 @@ var GameVehiclesFleet = (() => {
|
|
|
5553
5598
|
off: 3e-3,
|
|
5554
5599
|
nv: 4
|
|
5555
5600
|
});
|
|
5556
|
-
skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
5601
|
+
const reflector = skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
5557
5602
|
(o.proj || []).forEach(function(q) {
|
|
5558
5603
|
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);
|
|
5559
5604
|
const cup = onSurf(c.cylinder(rad * 1.35, rad * 1.2, 0.012, LH, 0, 0, 0), s, 8e-3);
|
|
@@ -5584,7 +5629,7 @@ var GameVehiclesFleet = (() => {
|
|
|
5584
5629
|
lens.push(ln);
|
|
5585
5630
|
if (!inner.length) inner.push(ln);
|
|
5586
5631
|
const cs = Gd.at(0.5, (rg[0] + rg[1]) / 2).p;
|
|
5587
|
-
regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs);
|
|
5632
|
+
Object.assign(regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs), { reflector: [reflector] });
|
|
5588
5633
|
return Gd;
|
|
5589
5634
|
};
|
|
5590
5635
|
K.tail = function(sd, o) {
|
|
@@ -5925,7 +5970,7 @@ var GameVehiclesFleet = (() => {
|
|
|
5925
5970
|
c.roundBox(0.02, 0.09, 0.16, 0.02, MT.chrome, mx - 0.065, my + 0.02, sd * (mz0 + 0.14));
|
|
5926
5971
|
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));
|
|
5927
5972
|
(s.seams || []).forEach(function(q) {
|
|
5928
|
-
const x =
|
|
5973
|
+
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;
|
|
5929
5974
|
c.roundBox(8e-3, y1 - y0, 6e-3, 3e-3, MT.dark, x, (y0 + y1) / 2, sd * (hw + 1e-3));
|
|
5930
5975
|
});
|
|
5931
5976
|
(s.handles || []).forEach(function(x) {
|
|
@@ -5970,12 +6015,18 @@ var GameVehiclesFleet = (() => {
|
|
|
5970
6015
|
(s.wiper === 1 ? [[0.12, 0.66, -0.5]] : [
|
|
5971
6016
|
[-0.3, 0.42, -0.36],
|
|
5972
6017
|
[0.2, 0.42, -0.36]
|
|
5973
|
-
]).forEach(function(q) {
|
|
6018
|
+
]).forEach(function(q, index) {
|
|
5974
6019
|
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);
|
|
5975
6020
|
p1.z += q[2];
|
|
5976
|
-
c.rod(p0, p1, 9e-3, MT.trim);
|
|
5977
|
-
c.cylinder(0.018, 0.018, 0.03, MT.trim, p0.x, p0.y, p0.z);
|
|
6021
|
+
const blade = c.rod(p0, p1, 9e-3, MT.trim);
|
|
6022
|
+
const cap = c.cylinder(0.018, 0.018, 0.03, MT.trim, p0.x, p0.y, p0.z);
|
|
6023
|
+
tagWiper({ context: c, parts: [blade, cap], spindle: p0, normal: wn, index });
|
|
5978
6024
|
});
|
|
6025
|
+
if (s.sunroof) {
|
|
6026
|
+
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);
|
|
6027
|
+
c.roundBox(sl, 8e-3, sw, 0.01, PLASTIC, sx, sy + 4e-3, 0, { rot: [0, 0, tilt] }).castShadow = false;
|
|
6028
|
+
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);
|
|
6029
|
+
}
|
|
5979
6030
|
if (s.fin !== false)
|
|
5980
6031
|
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, {
|
|
5981
6032
|
tl: PI / 2
|
|
@@ -6107,7 +6158,9 @@ var GameVehiclesFleet = (() => {
|
|
|
6107
6158
|
function fogLamp(c, s, r) {
|
|
6108
6159
|
onSurf(c.cylinder(r * 1.4, r * 1.4, 0.014, LH, 0, 0, 0), s, 6e-3).castShadow = false;
|
|
6109
6160
|
onSurf(c.cylinder(r, r, 0.012, REFL, 0, 0, 0), s, 0.012).castShadow = false;
|
|
6110
|
-
onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016)
|
|
6161
|
+
const bulb = onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016);
|
|
6162
|
+
bulb.castShadow = false;
|
|
6163
|
+
(c.fogBulbs ?? (c.fogBulbs = [])).push(bulb);
|
|
6111
6164
|
}
|
|
6112
6165
|
function crease(c, I, sd, pts, o) {
|
|
6113
6166
|
o = o || {};
|
|
@@ -6949,6 +7002,7 @@ var GameVehiclesFleet = (() => {
|
|
|
6949
7002
|
function(c) {
|
|
6950
7003
|
const hex = "#8c2b2b";
|
|
6951
7004
|
car(c, {
|
|
7005
|
+
sunroof: fx.hasSunroof("turbo_hatch"),
|
|
6952
7006
|
W: 1.751,
|
|
6953
7007
|
col: hex,
|
|
6954
7008
|
shelf: 0.42,
|
|
@@ -7226,6 +7280,7 @@ var GameVehiclesFleet = (() => {
|
|
|
7226
7280
|
function(c) {
|
|
7227
7281
|
const hex = "#5a5f66";
|
|
7228
7282
|
car(c, {
|
|
7283
|
+
sunroof: fx.hasSunroof("fastback_sedan"),
|
|
7229
7284
|
W: 1.799,
|
|
7230
7285
|
col: hex,
|
|
7231
7286
|
bottomY: 0.2,
|
|
@@ -7520,6 +7575,8 @@ var GameVehiclesFleet = (() => {
|
|
|
7520
7575
|
fx.register(
|
|
7521
7576
|
{
|
|
7522
7577
|
key: "classic_six_sedan",
|
|
7578
|
+
// glass headlight lenses, as on cars of its time: they shatter (a modern car's are polycarbonate)
|
|
7579
|
+
headlightLens: "glass",
|
|
7523
7580
|
group: "cars",
|
|
7524
7581
|
name: trl("vehicles.classic_six_sedan.name"),
|
|
7525
7582
|
inspired: trl("vehicles.classic_six_sedan.inspired"),
|
|
@@ -7860,7 +7917,7 @@ var GameVehiclesFleet = (() => {
|
|
|
7860
7917
|
[0.62, 0.48, -0.48, -0.62].forEach(function(z) {
|
|
7861
7918
|
const s = dg.at(dg.uz(z), 0.25);
|
|
7862
7919
|
c2.cylinder(0.045, 0.045, 0.1, EXH, s.p.x - 0.02, 0.25, z, "x");
|
|
7863
|
-
c2.cylinder(0.036, 0.036, 0.
|
|
7920
|
+
c2.cylinder(0.036, 0.036, 0.106, MT.dark, s.p.x - 0.02, 0.25, z, "x");
|
|
7864
7921
|
});
|
|
7865
7922
|
const lip = K.grid(-1, 0, { z1: 0.7, y0: 0.88, y1: 0.97, du: 0.03, dv: 0.02 });
|
|
7866
7923
|
K.skin(lip, GLOSS, { u0: 0.05, u1: 0.95, yb: 0.925, yt: 0.955, off: 0.016, thick: 0.02, nv: 2 });
|
|
@@ -8275,7 +8332,7 @@ var GameVehiclesFleet = (() => {
|
|
|
8275
8332
|
side: s,
|
|
8276
8333
|
noPart: true
|
|
8277
8334
|
});
|
|
8278
|
-
c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.
|
|
8335
|
+
c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.119, by - bh * 0.3, s * 0.35);
|
|
8279
8336
|
});
|
|
8280
8337
|
}
|
|
8281
8338
|
c.roundBox(0.06, 0.06, 0.12, 0.02, MT.steel, bx + 0.13, by - bh * 0.35, 0);
|
|
@@ -8378,7 +8435,7 @@ var GameVehiclesFleet = (() => {
|
|
|
8378
8435
|
-(W - 0.2) / 2 + (k + 0.5) * (W - 0.2) / 8
|
|
8379
8436
|
);
|
|
8380
8437
|
[1, -1].forEach(function(s) {
|
|
8381
|
-
c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.
|
|
8438
|
+
c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.118, ry - 0.2, s * 0.43);
|
|
8382
8439
|
});
|
|
8383
8440
|
m.rearBumper = bar;
|
|
8384
8441
|
c.part("bumper", trl("labels.rear_bumper"), bar, new V3(rear, 0.52, 0), 1);
|
|
@@ -9386,6 +9443,7 @@ var GameVehiclesFleet = (() => {
|
|
|
9386
9443
|
hood: true
|
|
9387
9444
|
},
|
|
9388
9445
|
function(c) {
|
|
9446
|
+
c.meta.armor = "III";
|
|
9389
9447
|
const f = 3.75, W = 2.32, len = 1.85, ax = 2.5, wr = 0.506, ww = 0.28, col = "#56616b";
|
|
9390
9448
|
c.meta.bullet = true;
|
|
9391
9449
|
c.meta.cabLength = len + 0.15;
|
|
@@ -9439,7 +9497,7 @@ var GameVehiclesFleet = (() => {
|
|
|
9439
9497
|
});
|
|
9440
9498
|
const vg = c.roundBox(0.32, 0.2, 0.03, 0.03, MT.armorGlass, 1.3, 2.45, zs);
|
|
9441
9499
|
kit.asGlass(c, vg, s > 0 ? lbl("right_armored_viewport") : lbl("left_armored_viewport"), "laminated");
|
|
9442
|
-
c.roundBox(0.4, 0.28, 0.02, 0.03, plate, 1.3, 2.45, zs - s *
|
|
9500
|
+
c.roundBox(0.4, 0.28, 0.02, 0.03, plate, 1.3, 2.45, zs - s * 8e-3);
|
|
9443
9501
|
for (let x = rear + 0.2; x < bx0; x += 0.3) {
|
|
9444
9502
|
c.sphere(0.018, MT.steel, x, 1.2, zs);
|
|
9445
9503
|
c.sphere(0.018, MT.steel, x, 2.98, zs);
|
|
@@ -9458,8 +9516,10 @@ var GameVehiclesFleet = (() => {
|
|
|
9458
9516
|
c.cylinder(0.36, 0.38, 0.1, plate, -1.3, 3.13, 0);
|
|
9459
9517
|
c.cylinder(0.3, 0.3, 0.05, MT.steel, -1.3, 3.2, 0);
|
|
9460
9518
|
c.roundBox(0.2, 0.08, 1.3, 0.03, MT.trim, bx0 - 0.25, 3.13, 0);
|
|
9461
|
-
[-0.45, 0, 0.45].forEach(function(z) {
|
|
9462
|
-
c.roundBox(0.14, 0.08, 0.3, 0.03, MT.amber, bx0 - 0.25, 3.2, z);
|
|
9519
|
+
[-0.45, 0, 0.45].forEach(function(z, i) {
|
|
9520
|
+
const lamp = c.roundBox(0.14, 0.08, 0.3, 0.03, MT.amber, bx0 - 0.25, 3.2, z);
|
|
9521
|
+
lamp.userData.lamp = "beacon";
|
|
9522
|
+
lamp.userData.beaconSide = i % 2;
|
|
9463
9523
|
});
|
|
9464
9524
|
c.rod(new V3(-2.5, 3.08, 0.6), new V3(-2.5, 3.6, 0.6), 8e-3, MT.trim);
|
|
9465
9525
|
c.rod(new V3(-2.8, 3.08, -0.6), new V3(-2.8, 3.4, -0.6), 0.01, MT.trim);
|
|
@@ -9546,7 +9606,7 @@ var GameVehiclesFleet = (() => {
|
|
|
9546
9606
|
const hx0 = 0.02, hx1 = 1.84 + FX, hy = 1.48;
|
|
9547
9607
|
[1, -1].forEach(function(s) {
|
|
9548
9608
|
c.roundBox(hx1 - hx0, 0.38, 0.035, 0.02, paint, (hx0 + hx1) / 2, 1.22, s * 0.36, { def: true });
|
|
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);
|
|
9609
|
+
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));
|
|
9550
9610
|
c.roundBox(1, 0.03, 0.02, 0.01, CM("#e9e6dd"), 0.55, 1.36, s * 0.38);
|
|
9551
9611
|
c.text("275", 0.3, 0.14, 0.32, 1.2, s * 0.384, s > 0 ? "+z" : "-z", { fg: "#f2efe6" });
|
|
9552
9612
|
});
|
|
@@ -10022,7 +10082,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10022
10082
|
const hs = c.add(
|
|
10023
10083
|
EA.foilGeo(
|
|
10024
10084
|
[
|
|
10025
|
-
{ p: [-3.9, 1.44,
|
|
10085
|
+
{ p: [-3.9, 1.44, s * 2e-3], c: 0.3, t: 0.1 },
|
|
10026
10086
|
{ p: [-3.95, 1.44, s * 0.42], c: 0.22, t: 0.09 }
|
|
10027
10087
|
],
|
|
10028
10088
|
{ up: "y", n: 8 }
|
|
@@ -10261,7 +10321,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10261
10321
|
},
|
|
10262
10322
|
lbl("chin_windows"),
|
|
10263
10323
|
"tempered",
|
|
10264
|
-
{ pos: new V3(2.3, 0.88, 0) }
|
|
10324
|
+
{ pos: new V3(2.3, 0.88, 0), k: 0.988 }
|
|
10265
10325
|
);
|
|
10266
10326
|
[1, -1].forEach(function(s) {
|
|
10267
10327
|
EA.fuseGlass(
|
|
@@ -10361,7 +10421,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10361
10421
|
tipCol: "#e6e4dd",
|
|
10362
10422
|
phase: 0.25
|
|
10363
10423
|
});
|
|
10364
|
-
c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.
|
|
10424
|
+
c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.797, 0);
|
|
10365
10425
|
const bm = boom(
|
|
10366
10426
|
c,
|
|
10367
10427
|
EA,
|
|
@@ -10395,7 +10455,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10395
10455
|
const hs = c.add(
|
|
10396
10456
|
EA.foilGeo(
|
|
10397
10457
|
[
|
|
10398
|
-
{ p: [-4.05, 1.68,
|
|
10458
|
+
{ p: [-4.05, 1.68, s * 2e-3], c: 0.42, t: 0.12, cam: -0.04 },
|
|
10399
10459
|
{ p: [-4.1, 1.68, s * 0.99], c: 0.38, t: 0.11, cam: -0.04 }
|
|
10400
10460
|
],
|
|
10401
10461
|
{ up: "y", n: 8 }
|
|
@@ -10644,7 +10704,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10644
10704
|
},
|
|
10645
10705
|
lbl("chin_windows"),
|
|
10646
10706
|
"tempered",
|
|
10647
|
-
{ pos: new V3(3.05, 0.95, 0) }
|
|
10707
|
+
{ pos: new V3(3.05, 0.95, 0), k: 0.988 }
|
|
10648
10708
|
);
|
|
10649
10709
|
[1, -1].forEach(function(s) {
|
|
10650
10710
|
EA.fuseGlass(c, ST, EA.sideKeepP(fdP, 0.6, s), s > 0 ? lbl("co_pilot_door_window") : lbl("pilot_door_window"), "tempered", {
|
|
@@ -10809,7 +10869,7 @@ var GameVehiclesFleet = (() => {
|
|
|
10809
10869
|
const hs = c.add(
|
|
10810
10870
|
EA.foilGeo(
|
|
10811
10871
|
[
|
|
10812
|
-
{ p: [-5.75, 2.1,
|
|
10872
|
+
{ p: [-5.75, 2.1, s * 2e-3], c: 0.62, t: 0.12, cam: -0.03 },
|
|
10813
10873
|
{ p: [-5.85, 2.1, s * 1.05], c: 0.52, t: 0.11, cam: -0.03 }
|
|
10814
10874
|
],
|
|
10815
10875
|
{ up: "y", n: 8 }
|
|
@@ -11222,7 +11282,7 @@ var GameVehiclesFleet = (() => {
|
|
|
11222
11282
|
EA.colorize(
|
|
11223
11283
|
EA.foilGeo(
|
|
11224
11284
|
[
|
|
11225
|
-
{ p: [-8.3, 2.75,
|
|
11285
|
+
{ p: [-8.3, 2.75, s * 2e-3], c: 1, t: 0.1 },
|
|
11226
11286
|
{ p: [-8.5, 2.75, s * 1.85], c: 0.7, t: 0.09 }
|
|
11227
11287
|
],
|
|
11228
11288
|
{ up: "y", n: 8 }
|
|
@@ -12294,7 +12354,7 @@ var GameVehiclesFleet = (() => {
|
|
|
12294
12354
|
const floor = c.roundBox(L, 0.1, W, 0.02, wood, cx, y0, 0, { def: true });
|
|
12295
12355
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, 0.45);
|
|
12296
12356
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, -0.45);
|
|
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.
|
|
12357
|
+
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);
|
|
12298
12358
|
const sides = [];
|
|
12299
12359
|
[1, -1].forEach(function(s) {
|
|
12300
12360
|
const sd = c.roundBox(L, sideH, 0.06, 0.02, wood, cx, y0 + sideH / 2 + 0.05, s * (W / 2 - 0.03), { def: true });
|
|
@@ -12305,7 +12365,7 @@ var GameVehiclesFleet = (() => {
|
|
|
12305
12365
|
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));
|
|
12306
12366
|
});
|
|
12307
12367
|
});
|
|
12308
|
-
c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.
|
|
12368
|
+
c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.028, y0 + sideH / 2 + 0.05, 0, { def: true });
|
|
12309
12369
|
const tg = c.roundBox(0.06, sideH * 0.7, W - 0.1, 0.02, wood, x1 - 0.02, y0 - sideH * 0.3, 0);
|
|
12310
12370
|
tg.rotation.z = 0.08;
|
|
12311
12371
|
const top = y0 + sideH + bowH, yb = y0 + sideH + 0.05, nseg = 20, pos = [], idx = [];
|
|
@@ -12699,7 +12759,7 @@ var GameVehiclesFleet = (() => {
|
|
|
12699
12759
|
top: roofY + 0.03,
|
|
12700
12760
|
k: 0.28,
|
|
12701
12761
|
holes,
|
|
12702
|
-
archInner: W / 2 - ww - 0.
|
|
12762
|
+
archInner: W / 2 - ww - 0.098,
|
|
12703
12763
|
sub: 0.18,
|
|
12704
12764
|
bev: 0.025
|
|
12705
12765
|
});
|
|
@@ -13032,8 +13092,7 @@ var GameVehiclesFleet = (() => {
|
|
|
13032
13092
|
[1.3, roofY, 0.1],
|
|
13033
13093
|
[F - 0.04, 1.02, 0.06],
|
|
13034
13094
|
[F, 0.9, 0.05],
|
|
13035
|
-
[2.05, 0.46, 0.06]
|
|
13036
|
-
[-1.4, 0.44, 0.04]
|
|
13095
|
+
[2.05, 0.46, 0.06]
|
|
13037
13096
|
];
|
|
13038
13097
|
const arches = axles.map(function(x) {
|
|
13039
13098
|
return [x, wr, wr + 0.09];
|
|
@@ -13111,8 +13170,8 @@ var GameVehiclesFleet = (() => {
|
|
|
13111
13170
|
[1, -1].forEach(function(s) {
|
|
13112
13171
|
c.roundBox(1.6, 0.16, 0.12, 0.04, OLIVE_STEEL, (axles[1] + axles[2]) / 2, wr, s * (W / 2 - ww - 0.1));
|
|
13113
13172
|
c.cylinder(0.12, 0.12, 0.2, OLIVE_STEEL, (axles[1] + axles[2]) / 2, wr, s * (W / 2 - ww - 0.1), "z");
|
|
13114
|
-
c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.
|
|
13115
|
-
c.roundBox(2.35, 0.05, 0.32, 0.02, paintMat(c, col), (axles[1] + axles[2]) / 2, 1.12, s * (W / 2 - 0.
|
|
13173
|
+
c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.158), { def: true });
|
|
13174
|
+
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 });
|
|
13116
13175
|
c.roundBox(1.2, 0.26, 0.28, 0.03, paintMat(c, OLIVE2), -1.45, 1.28, s * (W / 2 - 0.17));
|
|
13117
13176
|
[-0.95, -1.95].forEach(function(x) {
|
|
13118
13177
|
c.roundBox(0.3, 0.2, 0.02, 0.01, MT.dark, x, 1.28, s * (W / 2 - 0.025));
|
|
@@ -13269,7 +13328,7 @@ var GameVehiclesFleet = (() => {
|
|
|
13269
13328
|
m.kind = "car";
|
|
13270
13329
|
m.bullet = true;
|
|
13271
13330
|
const low = c.roundBox(6.6, 0.62, 2, 0.08, paintMat(c, col), -0.1, 0.78, 0, { def: true, sub: 0.3 });
|
|
13272
|
-
c.roundBox(0.55, 0.62, 2, 0.06, paintMat(c, col), 3.1, 0.8, 0, { def: true, rot: [0, 0, -0.95] });
|
|
13331
|
+
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] });
|
|
13273
13332
|
const items = [
|
|
13274
13333
|
[R, 1.05, 0.04],
|
|
13275
13334
|
[R - 0.02, deckY - 0.04, 0.05],
|
|
@@ -13312,7 +13371,7 @@ var GameVehiclesFleet = (() => {
|
|
|
13312
13371
|
(ex0 + ex1) / 2
|
|
13313
13372
|
);
|
|
13314
13373
|
scale(c, nB, bcen, 1.45);
|
|
13315
|
-
c.roundBox(ex1 - ex0 - 0.1, 0.
|
|
13374
|
+
c.roundBox(ex1 - ex0 - 0.1, 0.012, 2.1, 0.01, BAY_LIGHT, bcen.x, 0.957, 0);
|
|
13316
13375
|
[1, -1].forEach(function(sd) {
|
|
13317
13376
|
c.roundBox(ex1 - ex0 - 0.1, 0.55, 0.02, 0.01, BAY_LIGHT, bcen.x, 1.25, sd * 1.08);
|
|
13318
13377
|
});
|
|
@@ -13338,12 +13397,12 @@ var GameVehiclesFleet = (() => {
|
|
|
13338
13397
|
c.roundBox(0.55, 0.42, 0.03, 0.01, MT.rubber, 2.95, 0.86, s * (W / 2 + 0.05));
|
|
13339
13398
|
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);
|
|
13340
13399
|
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] });
|
|
13341
|
-
c.roundBox(0.03, 0.5, 0.55, 0.01, MT.rubber, R + 0.
|
|
13400
|
+
c.roundBox(0.03, 0.5, 0.55, 0.01, MT.rubber, R + 0.015, 0.85, s * tz);
|
|
13342
13401
|
star(c, 0.6, 1.3, s * (H.half(1.3) + 0.01), 0.17, s > 0 ? "+z" : "-z", { ring: true });
|
|
13343
13402
|
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 });
|
|
13344
13403
|
guardedHeadlight(c, 2.95, gl(2.95) + 0.16, s * 1.3, s, { style: "round" });
|
|
13345
13404
|
c.roundBox(0.1, 0.16, 0.08, 0.02, OLIVE_STEEL, 2.9, gl(2.9) + 0.04, s * 1.3);
|
|
13346
|
-
c.roundBox(0.1, 0.18, 0.3, 0.03, OLIVE_STEEL, R - 0.
|
|
13405
|
+
c.roundBox(0.1, 0.18, 0.3, 0.03, OLIVE_STEEL, R - 0.037, 1.35, s * 1.25);
|
|
13347
13406
|
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 });
|
|
13348
13407
|
c.tube(
|
|
13349
13408
|
[
|
|
@@ -13385,7 +13444,7 @@ var GameVehiclesFleet = (() => {
|
|
|
13385
13444
|
{ rot: [0, 0, -0.18] }
|
|
13386
13445
|
);
|
|
13387
13446
|
hatch(c, 2.05, roofY - 0.1, -0.78, 0.28, 0, OLIVE_STEEL, { yaw: 0 });
|
|
13388
|
-
kit.seat(c, 1.95, 0.62, -0.
|
|
13447
|
+
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 }) });
|
|
13389
13448
|
[-0.95, -0.78, -0.61].forEach(function(z, i) {
|
|
13390
13449
|
periscope(c, 2.3, roofY - 0.08, z, 0.14, i === 1 ? lbl("driver_periscope") : null);
|
|
13391
13450
|
});
|
|
@@ -13507,14 +13566,14 @@ var GameVehiclesFleet = (() => {
|
|
|
13507
13566
|
const g = new THREE.Group();
|
|
13508
13567
|
g.position.set(x, y, z);
|
|
13509
13568
|
c.vehicle.add(g);
|
|
13510
|
-
const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * 0.8, 24), wm);
|
|
13569
|
+
const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * (opt.width ?? 0.8), 24), wm);
|
|
13511
13570
|
wmsh.rotation.x = PI / 2;
|
|
13512
13571
|
wmsh.castShadow = true;
|
|
13513
13572
|
g.add(wmsh);
|
|
13514
13573
|
if (opt.tires)
|
|
13515
13574
|
[-1, 1].forEach(function(q) {
|
|
13516
13575
|
const t = new THREE.Mesh(new THREE.TorusGeometry(rad - 0.035, 0.035, 6, 24), MT.rubber);
|
|
13517
|
-
t.position.z = q * w * 0.22;
|
|
13576
|
+
t.position.z = q * w * (opt.tireAt ?? 0.22);
|
|
13518
13577
|
g.add(t);
|
|
13519
13578
|
});
|
|
13520
13579
|
const hb = new THREE.Mesh(new THREE.CylinderGeometry(rad * 0.32, rad * 0.32, w * 0.86, 10), MT.steel);
|
|
@@ -13531,21 +13590,21 @@ var GameVehiclesFleet = (() => {
|
|
|
13531
13590
|
for (let k = 0; k < 6; k++) {
|
|
13532
13591
|
const b = new THREE.Mesh(G.roundedBox(rad * 1.5, 0.05, 0.04, 0.01), wm);
|
|
13533
13592
|
b.rotation.z = k / 6 * PI;
|
|
13534
|
-
b.position.z = (z > 0 ? 1 : -1) * w * 0.42;
|
|
13593
|
+
b.position.z = (z > 0 ? 1 : -1) * (w * 0.42 + k * 3e-3);
|
|
13535
13594
|
g.add(b);
|
|
13536
13595
|
}
|
|
13537
13596
|
c.spin.push({ o: g, axis: "z", v: 0, track: true });
|
|
13538
13597
|
return g;
|
|
13539
13598
|
}
|
|
13540
13599
|
for (let i = 0; i < n; i++) wheel(xs + i * sp, r + th, r, { tires: true });
|
|
13541
|
-
wheel(x0, yS, rS, { teeth: true });
|
|
13542
|
-
wheel(x1, yI, rI, { spokes: true, tires: true });
|
|
13600
|
+
wheel(x0, yS, rS, { teeth: true, width: 0.76 });
|
|
13601
|
+
wheel(x1, yI, rI, { spokes: true, tires: true, width: 0.76, tireAt: 0.2 });
|
|
13543
13602
|
const topY = function(x) {
|
|
13544
13603
|
return yS + rS + th / 2 + (yI + rI - yS - rS) * (x - x0) / (x1 - x0);
|
|
13545
13604
|
};
|
|
13546
13605
|
for (let q = 0; q < 4; q++) {
|
|
13547
13606
|
const xr = x0 + (x1 - x0) * (0.2 + q * 0.2);
|
|
13548
|
-
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, {});
|
|
13607
|
+
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, { width: 0.7 });
|
|
13549
13608
|
}
|
|
13550
13609
|
const path = [], segs = 12;
|
|
13551
13610
|
function arc(cx, cy, rad, a0, a1) {
|
|
@@ -13569,7 +13628,7 @@ var GameVehiclesFleet = (() => {
|
|
|
13569
13628
|
const curve = new THREE.SplineCurve(pts.concat([pts[0]])), lenT = curve.getLength(), nl = Math.round(lenT / 0.15), links = [];
|
|
13570
13629
|
for (let l = 0; l < nl; l++) {
|
|
13571
13630
|
const t = l / nl, p = curve.getPointAt(t), tg = curve.getTangentAt(t), ang = Math.atan2(tg.y, tg.x);
|
|
13572
|
-
const lg = G.roundedBox(0.13, th, w, 0.015);
|
|
13631
|
+
const lg = G.roundedBox(0.13, th, w - l % 2 * 4e-3, 0.015);
|
|
13573
13632
|
lg.applyMatrix4(new THREE.Matrix4().makeRotationZ(ang).setPosition(p.x, p.y, 0));
|
|
13574
13633
|
links.push(lg);
|
|
13575
13634
|
const gh2 = G.roundedBox(0.05, 0.05, 0.05, 0.01);
|
|
@@ -14591,7 +14650,7 @@ var GameVehiclesFleet = (() => {
|
|
|
14591
14650
|
off: 3e-3,
|
|
14592
14651
|
nv: 4
|
|
14593
14652
|
});
|
|
14594
|
-
skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
14653
|
+
const reflector = skin(c, Gd, o.refl || REFL, { u0: pu, u1: 1 - pu, yb, yt, off: 6e-3, nv: 4 });
|
|
14595
14654
|
(o.proj || []).forEach(function(q) {
|
|
14596
14655
|
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);
|
|
14597
14656
|
const cup = onSurf(c.cylinder(rad * 1.35, rad * 1.2, 0.012, LH, 0, 0, 0), s, 8e-3);
|
|
@@ -14622,7 +14681,7 @@ var GameVehiclesFleet = (() => {
|
|
|
14622
14681
|
lens.push(ln);
|
|
14623
14682
|
if (!inner.length) inner.push(ln);
|
|
14624
14683
|
const cs = Gd.at(0.5, (rg[0] + rg[1]) / 2).p;
|
|
14625
|
-
regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs);
|
|
14684
|
+
Object.assign(regLight(c, "headlight", o.label || (sd > 0 ? trl("labels.right_headlight") : trl("labels.left_headlight")), inner, lens, cs), { reflector: [reflector] });
|
|
14626
14685
|
return Gd;
|
|
14627
14686
|
};
|
|
14628
14687
|
K.tail = function(sd, o) {
|
|
@@ -14982,8 +15041,11 @@ var GameVehiclesFleet = (() => {
|
|
|
14982
15041
|
);
|
|
14983
15042
|
});
|
|
14984
15043
|
const wy = gh.belt + 0.06, wx = gh.fb - 0.03;
|
|
14985
|
-
[-0.3, 0.2].forEach(function(z) {
|
|
14986
|
-
|
|
15044
|
+
[-0.3, 0.2].forEach(function(z, index) {
|
|
15045
|
+
const spindle = new V3(wx + 0.02, wy, z + 0.02);
|
|
15046
|
+
const blade = c.rod(spindle, new V3(wx - 0.13, wy + 0.13, z - 0.36), 9e-3, MT.trim);
|
|
15047
|
+
const along = new V3(gh.ft - gh.fb, gh.roof - gh.belt, 0).normalize();
|
|
15048
|
+
tagWiper({ context: c, parts: [blade], spindle, normal: new V3(along.y, -along.x, 0), index });
|
|
14987
15049
|
});
|
|
14988
15050
|
if (s.fin !== false)
|
|
14989
15051
|
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, {
|
|
@@ -15116,7 +15178,9 @@ var GameVehiclesFleet = (() => {
|
|
|
15116
15178
|
function fogLamp(c, s, r) {
|
|
15117
15179
|
onSurf(c.cylinder(r * 1.4, r * 1.4, 0.014, LH, 0, 0, 0), s, 6e-3).castShadow = false;
|
|
15118
15180
|
onSurf(c.cylinder(r, r, 0.012, REFL, 0, 0, 0), s, 0.012).castShadow = false;
|
|
15119
|
-
onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016)
|
|
15181
|
+
const bulb = onSurf(c.sphere(r * 0.45, MT.head, 0, 0, 0, 1, 0.5, 1), s, 0.016);
|
|
15182
|
+
bulb.castShadow = false;
|
|
15183
|
+
(c.fogBulbs ?? (c.fogBulbs = [])).push(bulb);
|
|
15120
15184
|
}
|
|
15121
15185
|
function crease(c, I, sd, pts, o) {
|
|
15122
15186
|
o = o || {};
|
|
@@ -16464,7 +16528,7 @@ var GameVehiclesFleet = (() => {
|
|
|
16464
16528
|
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 });
|
|
16465
16529
|
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 });
|
|
16466
16530
|
}
|
|
16467
|
-
const f = sd > 0 ? "+z" : "-z", pt = Gd.at(
|
|
16531
|
+
const f = sd > 0 ? "+z" : "-z", pt = Gd.at(0.5, 0.62).p;
|
|
16468
16532
|
if (highwayPolice)
|
|
16469
16533
|
c2.text(trl("texts.federal_highway_police"), 1.9, 0.13, -0.32, 0.6, sd * (Math.abs(pt.z) + 0.012), f, {
|
|
16470
16534
|
fg: blueP,
|
|
@@ -16502,6 +16566,10 @@ var GameVehiclesFleet = (() => {
|
|
|
16502
16566
|
}
|
|
16503
16567
|
}
|
|
16504
16568
|
});
|
|
16569
|
+
beacon[1].userData.lamp = "beacon";
|
|
16570
|
+
beacon[1].userData.beaconSide = 0;
|
|
16571
|
+
beacon[2].userData.lamp = "beacon";
|
|
16572
|
+
beacon[2].userData.beaconSide = 1;
|
|
16505
16573
|
c2.meta.top = top + 0.15;
|
|
16506
16574
|
c2.meta.roof.y = Math.max(c2.meta.roof.y, top + 0.15);
|
|
16507
16575
|
const fx2 = I.fxB + 0.12, push = [];
|
|
@@ -17266,9 +17334,9 @@ var GameVehiclesFleet = (() => {
|
|
|
17266
17334
|
],
|
|
17267
17335
|
col
|
|
17268
17336
|
);
|
|
17269
|
-
lamp(c, { style: "rect", x: 0.
|
|
17337
|
+
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") });
|
|
17270
17338
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
17271
|
-
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.
|
|
17339
|
+
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
|
|
17272
17340
|
handlebar(c, 0.36, 1.03, 0.37, { rise: 0.04, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
17273
17341
|
[1, -1].forEach(function(s) {
|
|
17274
17342
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
@@ -17470,7 +17538,7 @@ var GameVehiclesFleet = (() => {
|
|
|
17470
17538
|
body(
|
|
17471
17539
|
c,
|
|
17472
17540
|
[
|
|
17473
|
-
[0.
|
|
17541
|
+
[0.435, 1.13, 0.85, 0.24, 2.6],
|
|
17474
17542
|
[0.55, 1.11, 0.87, 0.24, 2.6],
|
|
17475
17543
|
[0.6, 1.05, 0.91, 0.16, 2.4]
|
|
17476
17544
|
],
|
|
@@ -17542,7 +17610,8 @@ var GameVehiclesFleet = (() => {
|
|
|
17542
17610
|
const fw = kit.spokedWheel(c, 0.78, 0.325, 0.06, { spokes: 40, knobby: true, disc: true, label: trl("labels.front_tire") });
|
|
17543
17611
|
const rw = kit.spokedWheel(c, -0.72, 0.318, 0.08, { spokes: 40, knobby: true, label: trl("labels.rear_tire") });
|
|
17544
17612
|
[fw, rw].forEach(function(g) {
|
|
17545
|
-
g.children.forEach(function(
|
|
17613
|
+
g.children.forEach(function(o) {
|
|
17614
|
+
const ch = o;
|
|
17546
17615
|
if (ch.geometry && ch.geometry.type === "TorusGeometry" && ch.material === MT.chrome) ch.material = rimGold;
|
|
17547
17616
|
});
|
|
17548
17617
|
});
|
|
@@ -17636,7 +17705,7 @@ var GameVehiclesFleet = (() => {
|
|
|
17636
17705
|
body(
|
|
17637
17706
|
c,
|
|
17638
17707
|
[
|
|
17639
|
-
[0.
|
|
17708
|
+
[0.615, 1.32, 0.98, 0.3, 2.6],
|
|
17640
17709
|
[0.72, 1.28, 1, 0.3, 2.6],
|
|
17641
17710
|
[0.78, 1.2, 1.02, 0.22, 2.4]
|
|
17642
17711
|
],
|
|
@@ -17804,7 +17873,9 @@ var GameVehiclesFleet = (() => {
|
|
|
17804
17873
|
c.roundBox(0.5, 0.018, 6e-3, 2e-3, c.paint("#f2c21a"), -0.7, 0.825, z);
|
|
17805
17874
|
c.text("PRF", 0.2, 0.08, -0.7, 0.73, z + s * 2e-3, f, { fg: "#1f3f8f", size: 0.85 });
|
|
17806
17875
|
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 });
|
|
17807
|
-
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 });
|
|
17876
|
+
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 });
|
|
17877
|
+
flasher.userData.lamp = "beacon";
|
|
17878
|
+
flasher.userData.beaconSide = s > 0 ? 1 : 0;
|
|
17808
17879
|
});
|
|
17809
17880
|
c.cylinder(0.04, 0.045, 0.06, MT.trim, 0.66, 0.66, 0.36, "x");
|
|
17810
17881
|
}
|
|
@@ -18057,6 +18128,8 @@ var GameVehiclesFleet = (() => {
|
|
|
18057
18128
|
fx.register(
|
|
18058
18129
|
{
|
|
18059
18130
|
key: "beetle",
|
|
18131
|
+
// glass headlight lenses, as on cars of its time: they shatter (a modern car's are polycarbonate)
|
|
18132
|
+
headlightLens: "glass",
|
|
18060
18133
|
group: "cars",
|
|
18061
18134
|
name: trl("vehicles.beetle.name"),
|
|
18062
18135
|
inspired: trl("vehicles.beetle.inspired"),
|
|
@@ -18565,8 +18638,8 @@ var GameVehiclesFleet = (() => {
|
|
|
18565
18638
|
return b;
|
|
18566
18639
|
}
|
|
18567
18640
|
function plateMoto(c, x, y, txt) {
|
|
18568
|
-
c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x +
|
|
18569
|
-
c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x, y, 0, "-x", {
|
|
18641
|
+
c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x + 9e-3, y, 0);
|
|
18642
|
+
c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x - 3e-3, y, 0, "-x", {
|
|
18570
18643
|
w: 300,
|
|
18571
18644
|
h: 220,
|
|
18572
18645
|
bg: "#f2f2ee",
|
|
@@ -18681,7 +18754,7 @@ var GameVehiclesFleet = (() => {
|
|
|
18681
18754
|
g.add(d);
|
|
18682
18755
|
for (let q = 0; q < 12; q++) {
|
|
18683
18756
|
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 }));
|
|
18684
|
-
sl.position.set(Math.cos(a2) * rimR * 0.62, Math.sin(a2) * rimR * 0.62, s * (hw * 0.72 +
|
|
18757
|
+
sl.position.set(Math.cos(a2) * rimR * 0.62, Math.sin(a2) * rimR * 0.62, s * (hw * 0.72 + 0.0105));
|
|
18685
18758
|
sl.rotation.z = a2;
|
|
18686
18759
|
g.add(sl);
|
|
18687
18760
|
}
|
|
@@ -18779,7 +18852,7 @@ var GameVehiclesFleet = (() => {
|
|
|
18779
18852
|
body(
|
|
18780
18853
|
c,
|
|
18781
18854
|
[
|
|
18782
|
-
[0.
|
|
18855
|
+
[0.335, 0.36, 0.29, 0.28, 2.6],
|
|
18783
18856
|
[0.46, 0.38, 0.31, 0.46, 3],
|
|
18784
18857
|
[0.6, 0.41, 0.34, 0.5, 3],
|
|
18785
18858
|
[0.74, 0.43, 0.37, 0.46, 2.8],
|
|
@@ -19187,7 +19260,7 @@ var GameVehiclesFleet = (() => {
|
|
|
19187
19260
|
body(
|
|
19188
19261
|
c,
|
|
19189
19262
|
[
|
|
19190
|
-
[0.
|
|
19263
|
+
[0.415, 1.05, 0.82, 0.26, 2.6],
|
|
19191
19264
|
[0.52, 1.03, 0.83, 0.28, 2.6],
|
|
19192
19265
|
[0.59, 0.99, 0.85, 0.22, 2.4],
|
|
19193
19266
|
[0.62, 0.95, 0.87, 0.1, 2.2]
|
|
@@ -19208,7 +19281,7 @@ var GameVehiclesFleet = (() => {
|
|
|
19208
19281
|
});
|
|
19209
19282
|
c.roundBox(0.015, 0.1, 0.2, 0.02, SMOKEG, 0.55, 1.035, 0, { rot: [0, 0, 0.55] });
|
|
19210
19283
|
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] });
|
|
19211
|
-
c.roundBox(0.04, 0.032, 0.1, 6e-3, MT.gauge, 0.45, 1.
|
|
19284
|
+
c.roundBox(0.04, 0.032, 0.1, 6e-3, MT.gauge, 0.45, 1.078, 0, { rot: [0, 0, 0.5] });
|
|
19212
19285
|
[1, -1].forEach(function(s) {
|
|
19213
19286
|
blinker(c, 0.5, 0.92, s * 0.16, true);
|
|
19214
19287
|
});
|
|
@@ -19625,7 +19698,7 @@ var GameVehiclesFleet = (() => {
|
|
|
19625
19698
|
});
|
|
19626
19699
|
c.cylinder(0.12, 0.12, 0.07, CH, 0.2, 0.56, 0.17, "z");
|
|
19627
19700
|
c.cylinder(0.1, 0.1, 0.012, CM("#9ea3a7", { metalness: 0.55, roughness: 0.35 }), 0.2, 0.56, 0.21, "z");
|
|
19628
|
-
c.text("114", 0.1, 0.04, 0.2, 0.56, 0.
|
|
19701
|
+
c.text("114", 0.1, 0.04, 0.2, 0.56, 0.219, "+z", { fg: "#1b1c1f", size: 0.85 });
|
|
19629
19702
|
c.sphere(0.17, CH, -0.06, 0.32, -0.17, 1.35, 0.85, 0.28);
|
|
19630
19703
|
c.cylinder(0.07, 0.07, 0.02, CH, -0.02, 0.3, -0.215, "z");
|
|
19631
19704
|
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] });
|
|
@@ -20020,12 +20093,12 @@ var GameVehiclesFleet = (() => {
|
|
|
20020
20093
|
col
|
|
20021
20094
|
);
|
|
20022
20095
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
20023
|
-
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.
|
|
20096
|
+
c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
|
|
20024
20097
|
[1, -1].forEach(function(s) {
|
|
20025
20098
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
20026
20099
|
});
|
|
20027
20100
|
Z.fairing = grab(c, n0);
|
|
20028
|
-
lamp(c, { style: "rect", x: 0.
|
|
20101
|
+
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") });
|
|
20029
20102
|
n0 = c.vehicle.children.length;
|
|
20030
20103
|
handlebar(c, 0.36, 1.02, 0.36, { rise: 0.03, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
20031
20104
|
Z.handlebar = grab(c, n0);
|
|
@@ -20063,13 +20136,9 @@ var GameVehiclesFleet = (() => {
|
|
|
20063
20136
|
}
|
|
20064
20137
|
|
|
20065
20138
|
// src/vehicles/planes-extra.ts
|
|
20066
|
-
function
|
|
20067
|
-
const kit = fx.kit;
|
|
20139
|
+
function createPlanesKit(kit) {
|
|
20068
20140
|
const THREE = kit.THREE;
|
|
20069
|
-
const
|
|
20070
|
-
const trl = fx.t;
|
|
20071
|
-
const lbl = fx.label;
|
|
20072
|
-
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _G = kit.geo, _DS = THREE.DoubleSide;
|
|
20141
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial;
|
|
20073
20142
|
function pose3(Af, ra, Tf, rt) {
|
|
20074
20143
|
let lo = 0, hi = 0.5, TH = 0;
|
|
20075
20144
|
function f(t) {
|
|
@@ -20155,9 +20224,19 @@ var GameVehiclesFleet = (() => {
|
|
|
20155
20224
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
20156
20225
|
});
|
|
20157
20226
|
}
|
|
20227
|
+
function stretchSt(st) {
|
|
20228
|
+
const out = st.map(function(q) {
|
|
20229
|
+
return q.slice();
|
|
20230
|
+
});
|
|
20231
|
+
const last = out.length - 1;
|
|
20232
|
+
const dir = out[last][0] >= out[0][0] ? 1 : -1;
|
|
20233
|
+
out[0][0] = out[0][0] + dir * 3e-3;
|
|
20234
|
+
out[last][0] = out[last][0] - dir * 3e-3;
|
|
20235
|
+
return out;
|
|
20236
|
+
}
|
|
20158
20237
|
function fSkin(c, EA, st, keep, mat, o) {
|
|
20159
20238
|
o = o || {};
|
|
20160
|
-
const m = c.add(EA.fuseGeo(scaleSt(st, o.k ||
|
|
20239
|
+
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);
|
|
20161
20240
|
m.castShadow = false;
|
|
20162
20241
|
cutSub(m, [keep], o.sub || 0.06, o.pre);
|
|
20163
20242
|
c.deform.push(m);
|
|
@@ -20165,7 +20244,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20165
20244
|
}
|
|
20166
20245
|
function fGlass(c, EA, st, keep, label, type, o) {
|
|
20167
20246
|
o = o || {};
|
|
20168
|
-
const m = new THREE.Mesh(EA.fuseGeo(scaleSt(st, o.k ||
|
|
20247
|
+
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);
|
|
20169
20248
|
(o.parent || c.vehicle).add(m);
|
|
20170
20249
|
cutSub(m, [keep], o.sub || 0.07, o.pre);
|
|
20171
20250
|
return kit.asGlass(c, m, label, type || "tempered", o.pos ? { pos: o.pos } : {});
|
|
@@ -20218,7 +20297,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20218
20297
|
m.rotation.y += -s * Math.atan2(a - b, w);
|
|
20219
20298
|
return m;
|
|
20220
20299
|
}
|
|
20221
|
-
|
|
20300
|
+
return {
|
|
20222
20301
|
pose3,
|
|
20223
20302
|
starDecal,
|
|
20224
20303
|
rrect,
|
|
@@ -20232,6 +20311,17 @@ var GameVehiclesFleet = (() => {
|
|
|
20232
20311
|
liner,
|
|
20233
20312
|
sideText
|
|
20234
20313
|
};
|
|
20314
|
+
}
|
|
20315
|
+
function installPlanesExtra(fx) {
|
|
20316
|
+
const kit = fx.kit;
|
|
20317
|
+
const THREE = kit.THREE;
|
|
20318
|
+
const shared = fx.shared;
|
|
20319
|
+
const trl = fx.t;
|
|
20320
|
+
const lbl = fx.label;
|
|
20321
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _G = kit.geo, _DS = THREE.DoubleSide;
|
|
20322
|
+
const GH = createPlanesKit(kit);
|
|
20323
|
+
shared.GH = GH;
|
|
20324
|
+
const { pose3, starDecal, rrect, polysSdf, pod, fSkin, fGlass, liner, sideText } = GH;
|
|
20235
20325
|
fx.register(
|
|
20236
20326
|
{
|
|
20237
20327
|
key: "tandem_trainer",
|
|
@@ -20316,7 +20406,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20316
20406
|
return Math.min(boltW(x) - Math.abs(y - bolt(x)), x + 3.2, 2.93 - x, Math.abs(z) - 0.12);
|
|
20317
20407
|
}),
|
|
20318
20408
|
black,
|
|
20319
|
-
{ parent: grp, sub: 0.05, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
|
|
20409
|
+
{ parent: grp, sub: 0.05, k: 1.013, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
|
|
20320
20410
|
);
|
|
20321
20411
|
const doorR = EA.polySdf([
|
|
20322
20412
|
[1.38, -0.4],
|
|
@@ -20381,7 +20471,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20381
20471
|
};
|
|
20382
20472
|
const g = EA.foilGeo(
|
|
20383
20473
|
[
|
|
20384
|
-
{ p: [1.46, dh(0),
|
|
20474
|
+
{ p: [1.46, dh(0), s * 2e-3], c: 1.6, t: 0.12, cam: 0.025, noCap: true },
|
|
20385
20475
|
{ p: [1.46, dh(2.6), s * 2.6], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20386
20476
|
{ p: [1.46, dh(4.9), s * 4.9], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20387
20477
|
{ p: [1.43, dh(5.18), s * 5.18], c: 1.5, t: 0.11, cam: 0.02 },
|
|
@@ -20438,7 +20528,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20438
20528
|
const hs = c.add(
|
|
20439
20529
|
EA.foilGeo(
|
|
20440
20530
|
[
|
|
20441
|
-
{ p: [-2.78, 0.1,
|
|
20531
|
+
{ p: [-2.78, 0.1, s * 2e-3], c: 0.78, t: 0.07 },
|
|
20442
20532
|
{ p: [-2.85, 0.1, s * 1.1], c: 0.74, t: 0.07 },
|
|
20443
20533
|
{ p: [-2.95, 0.1, s * 1.36], c: 0.6, t: 0.06 },
|
|
20444
20534
|
{ p: [-3.1, 0.1, s * 1.46], c: 0.32, t: 0.05 }
|
|
@@ -20689,7 +20779,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20689
20779
|
EA.sideKeepP(ckP, 0.5, s),
|
|
20690
20780
|
s > 0 ? lbl("right_flight_deck_window") : lbl("left_flight_deck_window"),
|
|
20691
20781
|
"tempered",
|
|
20692
|
-
{ pos: new V3(5.4, 2.25, s * 0.8) }
|
|
20782
|
+
{ pos: new V3(5.4, 2.25, s * 0.8), k: 1.0085 }
|
|
20693
20783
|
);
|
|
20694
20784
|
fGlass(
|
|
20695
20785
|
c,
|
|
@@ -20743,7 +20833,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20743
20833
|
const w = c.add(
|
|
20744
20834
|
EA.foilGeo(
|
|
20745
20835
|
[
|
|
20746
|
-
{ p: [1.52, dh(0),
|
|
20836
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20747
20837
|
{ p: [1.52, dh(0.86), s * 0.86], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20748
20838
|
{ p: [1.42, dh(2.47), s * 2.47], c: 2.25, t: 0.145, cam: 0.02 },
|
|
20749
20839
|
{ p: [0.98, dh(7.42), s * 7.42], c: 1.4, t: 0.12, cam: 0.02 },
|
|
@@ -20878,7 +20968,7 @@ var GameVehiclesFleet = (() => {
|
|
|
20878
20968
|
const hs = c.add(
|
|
20879
20969
|
EA.foilGeo(
|
|
20880
20970
|
[
|
|
20881
|
-
{ p: [-5.95, 2.3,
|
|
20971
|
+
{ p: [-5.95, 2.3, s * 2e-3], c: 1.55, t: 0.1 },
|
|
20882
20972
|
{ p: [-6.62, 2.3 + 3.2 * 0.176, s * 3.2], c: 0.86, t: 0.09 }
|
|
20883
20973
|
],
|
|
20884
20974
|
{ up: "y", n: 10 }
|
|
@@ -21141,7 +21231,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21141
21231
|
const w = c.add(
|
|
21142
21232
|
EA.foilGeo(
|
|
21143
21233
|
[
|
|
21144
|
-
{ p: [1.56, dh(0),
|
|
21234
|
+
{ p: [1.56, dh(0), s * 2e-3], c: 1.98, t: 0.15, cam: 0.025, noCap: true },
|
|
21145
21235
|
{ p: [1.56, dh(3.6), s * 3.6], c: 1.98, t: 0.15, cam: 0.025 },
|
|
21146
21236
|
{ p: [1.38, dh(7.7), s * 7.7], c: 1.3, t: 0.12, cam: 0.02 },
|
|
21147
21237
|
{ p: [1.32, dh(7.94), s * 7.94], c: 1.1, t: 0.06, cam: 0.01 }
|
|
@@ -21283,7 +21373,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21283
21373
|
const hs = c.add(
|
|
21284
21374
|
EA.foilGeo(
|
|
21285
21375
|
[
|
|
21286
|
-
{ p: [-4.8, 3.08,
|
|
21376
|
+
{ p: [-4.8, 3.08, s * 2e-3], c: 1.55, t: 0.1 },
|
|
21287
21377
|
{ p: [-5.15, 3.08, s * 3.1], c: 1, t: 0.09 }
|
|
21288
21378
|
],
|
|
21289
21379
|
{ up: "y", n: 10 }
|
|
@@ -21486,7 +21576,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21486
21576
|
EA.sideKeepP(ckP, 0.5, s),
|
|
21487
21577
|
s > 0 ? lbl("right_flight_deck_side_window") : lbl("left_flight_deck_side_window"),
|
|
21488
21578
|
"tempered",
|
|
21489
|
-
{ pos: new V3(3.6, 2, s * 0.78) }
|
|
21579
|
+
{ pos: new V3(3.6, 2, s * 0.78), k: 1.0085 }
|
|
21490
21580
|
);
|
|
21491
21581
|
fGlass(
|
|
21492
21582
|
c,
|
|
@@ -21514,7 +21604,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21514
21604
|
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);
|
|
21515
21605
|
}),
|
|
21516
21606
|
MT.dark,
|
|
21517
|
-
{ k: 1.
|
|
21607
|
+
{ k: 1.0065 }
|
|
21518
21608
|
);
|
|
21519
21609
|
void dF;
|
|
21520
21610
|
EA.fuseSkin(
|
|
@@ -21524,7 +21614,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21524
21614
|
return Math.min(0.035 - Math.abs(x - 3.88 - (y - 1.75) * 0.5), y - 1.7, 2.42 - y);
|
|
21525
21615
|
}),
|
|
21526
21616
|
blk,
|
|
21527
|
-
{ k: 1.
|
|
21617
|
+
{ k: 1.0065 }
|
|
21528
21618
|
);
|
|
21529
21619
|
c.rod(new V3(5, 1.74, 0), new V3(4.05, 2.4, 0), 0.02, blk);
|
|
21530
21620
|
const fl = 0.8, fab = CM("#c9bda6", { roughness: 0.75 });
|
|
@@ -21563,7 +21653,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21563
21653
|
const w = c.add(
|
|
21564
21654
|
EA.foilGeo(
|
|
21565
21655
|
[
|
|
21566
|
-
{ p: [1, dh(0),
|
|
21656
|
+
{ p: [1, dh(0), s * 2e-3], c: 2.45, t: 0.14, cam: 0.02 },
|
|
21567
21657
|
{ p: [0.95, dh(0.85), s * 0.85], c: 2.42, t: 0.14, cam: 0.02 },
|
|
21568
21658
|
{ p: [0.55, dh(2.4), s * 2.4], c: 1.9, t: 0.13, cam: 0.02 },
|
|
21569
21659
|
{ p: [-0.32, dh(5.75), s * 5.75], c: 1.08, t: 0.11, cam: 0.02 },
|
|
@@ -21645,7 +21735,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21645
21735
|
const finB = c.add(
|
|
21646
21736
|
EA.foilGeo(
|
|
21647
21737
|
[
|
|
21648
|
-
{ p: [-3.89, 2.
|
|
21738
|
+
{ p: [-3.89, 2.253, 0], c: 2.22, t: 0.115 },
|
|
21649
21739
|
{ p: [-5.34, 4.185, 0], c: 1.17, t: 0.105 }
|
|
21650
21740
|
],
|
|
21651
21741
|
{ up: "z", n: 10 }
|
|
@@ -21668,7 +21758,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21668
21758
|
const hs = c.add(
|
|
21669
21759
|
EA.foilGeo(
|
|
21670
21760
|
[
|
|
21671
|
-
{ p: [-5.3, 4.2,
|
|
21761
|
+
{ p: [-5.3, 4.2, s * 2e-3], c: 1.18, t: 0.1 },
|
|
21672
21762
|
{ p: [-5.9, 4.24, s * 2.55], c: 0.62, t: 0.09 }
|
|
21673
21763
|
],
|
|
21674
21764
|
{ up: "y", n: 10 }
|
|
@@ -21930,7 +22020,7 @@ var GameVehiclesFleet = (() => {
|
|
|
21930
22020
|
[1, -1].forEach(function(s) {
|
|
21931
22021
|
const g = EA.foilGeo(
|
|
21932
22022
|
[
|
|
21933
|
-
{ p: [1.52, dh(0),
|
|
22023
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.35, t: 0.15, cam: 0.02 },
|
|
21934
22024
|
{ p: [1.5, dh(0.48), s * 0.48], c: 2.32, t: 0.15, cam: 0.02 },
|
|
21935
22025
|
{ p: [0.78, dh(5.4), s * 5.4], c: 1.2, t: 0.12, cam: 0.02 },
|
|
21936
22026
|
{ p: [0.74, dh(5.57), s * 5.57], c: 1.1, t: 0.07, cam: 0.01 }
|
|
@@ -22035,7 +22125,7 @@ var GameVehiclesFleet = (() => {
|
|
|
22035
22125
|
[1, -1].forEach(function(s) {
|
|
22036
22126
|
const g = EA.foilGeo(
|
|
22037
22127
|
[
|
|
22038
|
-
{ p: [-4.3, 1.72,
|
|
22128
|
+
{ p: [-4.3, 1.72, s * 2e-3], c: 1.3, t: 0.1 },
|
|
22039
22129
|
{ p: [-4.72, 1.76, s * 2.2], c: 0.75, t: 0.09 }
|
|
22040
22130
|
],
|
|
22041
22131
|
{ up: "y", n: 10 }
|
|
@@ -22223,7 +22313,8 @@ var GameVehiclesFleet = (() => {
|
|
|
22223
22313
|
if (msh && msh.parent) warp(msh);
|
|
22224
22314
|
});
|
|
22225
22315
|
const bb = new THREE.Box3(), cen = new V3(), sz = new V3();
|
|
22226
|
-
c.vehicle.children.slice().forEach(function(
|
|
22316
|
+
c.vehicle.children.slice().forEach(function(o3) {
|
|
22317
|
+
const ob = o3;
|
|
22227
22318
|
if (skip.has(ob) || warpSet.has(ob)) return;
|
|
22228
22319
|
if (ob.isMesh) {
|
|
22229
22320
|
const g = ob.geometry;
|
|
@@ -22297,7 +22388,7 @@ var GameVehiclesFleet = (() => {
|
|
|
22297
22388
|
const fl = c.roundBox(L, 0.035, 2 * hw, 0.01, LINER, cx, o.floor, 0);
|
|
22298
22389
|
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);
|
|
22299
22390
|
[1, -1].forEach(function(s) {
|
|
22300
|
-
c.roundBox(L, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
|
|
22391
|
+
c.roundBox(L - 8e-3, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
|
|
22301
22392
|
});
|
|
22302
22393
|
c.roundBox(0.025, h, 2 * hw, 0.01, LINER, o.x0 + 0.012, o.floor + h / 2, 0);
|
|
22303
22394
|
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);
|
|
@@ -22331,7 +22422,7 @@ var GameVehiclesFleet = (() => {
|
|
|
22331
22422
|
const x = kit.profX(s.lower, s.bottomY + 0.14, true) + 0.09;
|
|
22332
22423
|
[1, -1].forEach(function(sd) {
|
|
22333
22424
|
c.roundBox(0.04, r * 2.6, r * 3.2, 0.015, MT.housing, x, y, sd * z);
|
|
22334
|
-
kit.headlight(c, {
|
|
22425
|
+
const lamp = kit.headlight(c, {
|
|
22335
22426
|
style: "round",
|
|
22336
22427
|
x: x + 0.01,
|
|
22337
22428
|
y,
|
|
@@ -22343,6 +22434,7 @@ var GameVehiclesFleet = (() => {
|
|
|
22343
22434
|
label: sd > 0 ? trl("labels.right_fog_light") : trl("labels.left_fog_light"),
|
|
22344
22435
|
reach: 0.5
|
|
22345
22436
|
});
|
|
22437
|
+
lamp.fog = true;
|
|
22346
22438
|
});
|
|
22347
22439
|
}
|
|
22348
22440
|
function roofBars(c, z, h, r) {
|
|
@@ -22437,7 +22529,8 @@ var GameVehiclesFleet = (() => {
|
|
|
22437
22529
|
}
|
|
22438
22530
|
function plateOutside(c) {
|
|
22439
22531
|
const m = c.meta;
|
|
22440
|
-
c.vehicle.children.forEach(function(
|
|
22532
|
+
c.vehicle.children.forEach(function(o3) {
|
|
22533
|
+
const o = o3;
|
|
22441
22534
|
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)
|
|
22442
22535
|
o.position.x = Math.min(o.position.x, m.rear - BV * 0.5) - BV * 0.62;
|
|
22443
22536
|
});
|
|
@@ -22607,7 +22700,8 @@ var GameVehiclesFleet = (() => {
|
|
|
22607
22700
|
}
|
|
22608
22701
|
c.root.updateMatrixWorld(true);
|
|
22609
22702
|
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();
|
|
22610
|
-
c.vehicle.traverse(function(
|
|
22703
|
+
c.vehicle.traverse(function(o3) {
|
|
22704
|
+
const ob = o3;
|
|
22611
22705
|
if (!ob.isMesh || done.has(ob.geometry)) return;
|
|
22612
22706
|
done.add(ob.geometry);
|
|
22613
22707
|
rel.multiplyMatrices(gInv, ob.matrixWorld);
|
|
@@ -22673,7 +22767,8 @@ var GameVehiclesFleet = (() => {
|
|
|
22673
22767
|
c.lights.forEach(function(L) {
|
|
22674
22768
|
if (!L.group || L.group.userData.recessed) return;
|
|
22675
22769
|
L.group.userData.recessed = true;
|
|
22676
|
-
L.group.children.slice().forEach(function(
|
|
22770
|
+
L.group.children.slice().forEach(function(o3) {
|
|
22771
|
+
const h = o3;
|
|
22677
22772
|
if (!h.isMesh || h.material !== MT.housing || h.geometry.type !== "BoxGeometry" || Math.abs(h.position.x) > 1e-3) return;
|
|
22678
22773
|
h.geometry.computeBoundingBox();
|
|
22679
22774
|
const bb = h.geometry.boundingBox, d = bb.max.x - bb.min.x;
|
|
@@ -22704,7 +22799,8 @@ var GameVehiclesFleet = (() => {
|
|
|
22704
22799
|
const cols = [m.color, m.roofCol].filter(Boolean).map(function(h) {
|
|
22705
22800
|
return new THREE.Color(h).getHex();
|
|
22706
22801
|
});
|
|
22707
|
-
c.vehicle.children.forEach(function(
|
|
22802
|
+
c.vehicle.children.forEach(function(o3) {
|
|
22803
|
+
const o = o3;
|
|
22708
22804
|
if (!o.isMesh || gl.has(o) || o.geometry.type !== "BoxGeometry" || o.material === MT.trim || o.material === MT.chrome || o.material.transparent)
|
|
22709
22805
|
return;
|
|
22710
22806
|
if (o.material.color && cols.indexOf(o.material.color.getHex()) >= 0) return;
|
|
@@ -23188,10 +23284,10 @@ var GameVehiclesFleet = (() => {
|
|
|
23188
23284
|
pre: function(c2, _m) {
|
|
23189
23285
|
const gx = fX(s, 0.82) - 0.012, gy = 0.82, gh = 0.46, gw = 1.08, tz = 0.8;
|
|
23190
23286
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: tz } });
|
|
23191
|
-
c2.roundBox(0.
|
|
23287
|
+
c2.roundBox(0.058, gh - 0.1, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy, 0, { taper: { sz: tz - 0.02 } });
|
|
23192
23288
|
[0.13, 0.045, -0.04, -0.125].forEach(function(dy) {
|
|
23193
23289
|
const k = (dy + gh / 2 - 0.05) / (gh - 0.1);
|
|
23194
|
-
c2.roundBox(0.
|
|
23290
|
+
c2.roundBox(0.066, 0.022, (gw - 0.2) * (1 + (tz - 1) * k), 8e-3, MT.chrome, gx + 4e-3, gy + dy, 0);
|
|
23195
23291
|
});
|
|
23196
23292
|
c2.roundBox(0.04, 0.04, 1.32, 0.015, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23197
23293
|
kit.emblem(c2, fX(s, 0.9) + 0.03, 0.9, 0, 0.06);
|
|
@@ -23527,9 +23623,9 @@ var GameVehiclesFleet = (() => {
|
|
|
23527
23623
|
pre: function(c2, _m) {
|
|
23528
23624
|
const gx = fX(s, 0.8) - 0.012, gy = 0.8, gw = 1.14, gh = 0.52;
|
|
23529
23625
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: 0.84 } });
|
|
23530
|
-
c2.roundBox(0.
|
|
23626
|
+
c2.roundBox(0.058, gh - 0.12, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy - 0.01, 0, { taper: { sz: 0.82 } });
|
|
23531
23627
|
[0.12, -0.02, -0.14].forEach(function(dy) {
|
|
23532
|
-
c2.roundBox(0.
|
|
23628
|
+
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);
|
|
23533
23629
|
});
|
|
23534
23630
|
c2.roundBox(0.04, 0.05, 1.3, 0.02, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23535
23631
|
kit.emblem(c2, gx + 0.035, gy + 0.06, 0, 0.06);
|
|
@@ -23548,7 +23644,8 @@ var GameVehiclesFleet = (() => {
|
|
|
23548
23644
|
},
|
|
23549
23645
|
post: function(c2, _m) {
|
|
23550
23646
|
const gfx = fX(s, 0.8) + 0.04;
|
|
23551
|
-
c2.vehicle.children.forEach(function(
|
|
23647
|
+
c2.vehicle.children.forEach(function(o3) {
|
|
23648
|
+
const o = o3;
|
|
23552
23649
|
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)
|
|
23553
23650
|
o.position.x = Math.max(o.position.x, gfx);
|
|
23554
23651
|
});
|
|
@@ -23694,7 +23791,7 @@ var GameVehiclesFleet = (() => {
|
|
|
23694
23791
|
wg.add(bolt);
|
|
23695
23792
|
}
|
|
23696
23793
|
for (let sk = 0; sk < 6; sk++) {
|
|
23697
|
-
const sa = sk / 6 * PI * 2, hole = new THREE.Mesh(new THREE.CylinderGeometry(rr * 0.13, rr * 0.13, 0.
|
|
23794
|
+
const sa = sk / 6 * PI * 2, hole = new THREE.Mesh(new THREE.CylinderGeometry(rr * 0.13, rr * 0.13, 0.03, 14), MT.hole);
|
|
23698
23795
|
hole.rotation.x = PI / 2;
|
|
23699
23796
|
hole.position.set(Math.cos(sa) * rr * 0.58, Math.sin(sa) * rr * 0.58, fz + zs * 2e-3);
|
|
23700
23797
|
wg.add(hole);
|
|
@@ -23723,7 +23820,7 @@ var GameVehiclesFleet = (() => {
|
|
|
23723
23820
|
c.rod(new V3(0.6, 2.8, sd * 0.78), new V3(-0.25, 2.8, sd * 0.78), 0.035, red);
|
|
23724
23821
|
});
|
|
23725
23822
|
c.rod(new V3(0.6, 2.8, -0.78), new V3(0.6, 2.8, 0.78), 0.035, red);
|
|
23726
|
-
c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.
|
|
23823
|
+
c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.032, red);
|
|
23727
23824
|
c.rod(new V3(-0.25, 2.3, -0.8), new V3(-0.25, 2.8, 0.78), 0.03, red);
|
|
23728
23825
|
const roofItems = [c.roundBox(0.16, 0.05, 1.3, 0.02, MT.trim, 0.42, m.top + 0.08, 0)];
|
|
23729
23826
|
[-0.48, -0.16, 0.16, 0.48].forEach(function(z) {
|
|
@@ -23883,7 +23980,7 @@ var GameVehiclesFleet = (() => {
|
|
|
23883
23980
|
kit.sideWindows(c, [cab], W, T, function() {
|
|
23884
23981
|
return lbl("cab_window");
|
|
23885
23982
|
});
|
|
23886
|
-
winS.forEach(function(w
|
|
23983
|
+
winS.forEach(function(w) {
|
|
23887
23984
|
kit.sideWindows(
|
|
23888
23985
|
c,
|
|
23889
23986
|
[w.p],
|
|
@@ -24076,7 +24173,8 @@ var GameVehiclesFleet = (() => {
|
|
|
24076
24173
|
fxKey: "lid",
|
|
24077
24174
|
dir: "front"
|
|
24078
24175
|
});
|
|
24079
|
-
c.vehicle.children.forEach(function(
|
|
24176
|
+
c.vehicle.children.forEach(function(o3) {
|
|
24177
|
+
const o = o3;
|
|
24080
24178
|
if (o.isMesh && o.geometry.type === "PlaneGeometry" && o.material.map && o.material.map.image && o.material.map.image.width === 400 && o.position.x < 0)
|
|
24081
24179
|
o.position.y = 0.84;
|
|
24082
24180
|
});
|
|
@@ -24127,7 +24225,7 @@ var GameVehiclesFleet = (() => {
|
|
|
24127
24225
|
grille: { style: "truck", w: 0.84, h: 0.28, y: 0.86 },
|
|
24128
24226
|
seams: [1.62, 0.44],
|
|
24129
24227
|
handles: [0.6],
|
|
24130
|
-
extra: function(c2, m
|
|
24228
|
+
extra: function(c2, m) {
|
|
24131
24229
|
const fx2 = kit.profX(m.vanLow, 0.86, true);
|
|
24132
24230
|
kit.emblem(c2, fx2 + 0.1, 0.86, 0, 0.1);
|
|
24133
24231
|
const bfx = kit.profX(m.vanLow, 0.56, true);
|
|
@@ -24158,7 +24256,8 @@ var GameVehiclesFleet = (() => {
|
|
|
24158
24256
|
[cx0 + 0.9, 0.82, -0.3, "#7a5c3a"],
|
|
24159
24257
|
[cx0 + 0.6, 1.18, -0.3, "#8a6a44"],
|
|
24160
24258
|
[cx0 + 1.6, 0.82, 0, "#6d5232"]
|
|
24161
|
-
].forEach(function(
|
|
24259
|
+
].forEach(function(q) {
|
|
24260
|
+
const b = q;
|
|
24162
24261
|
c2.roundBox(0.5, 0.4, 0.5, 0.02, CM(b[3], { roughness: 0.9 }), b[0], b[1], b[2]);
|
|
24163
24262
|
});
|
|
24164
24263
|
c2.part("cargo", trl("labels.cargo_box"), null, new V3(m.rear + 1.4, 1.2, 0), 1.3);
|
|
@@ -24302,8 +24401,8 @@ var GameVehiclesFleet = (() => {
|
|
|
24302
24401
|
);
|
|
24303
24402
|
const zz = sd * (kit.halfAt(W, m.tumble, 1.75) + 0.012), zt = sd * (kit.halfAt(W, m.tumble, 2.22) + 0.012);
|
|
24304
24403
|
c2.text("RESGATE", 1.2, 0.3, sd > 0 ? -1.5 : -0.85, 2.22, zt, sd > 0 ? "+z" : "-z", { fg: red });
|
|
24305
|
-
[0, PI / 3, -PI / 3].forEach(function(a) {
|
|
24306
|
-
c2.roundBox(0.09, 0.36, 0.01, 0.01, blu, -2.25, 1.75, zz, { rot: [0, 0, a] });
|
|
24404
|
+
[0, PI / 3, -PI / 3].forEach(function(a, i) {
|
|
24405
|
+
c2.roundBox(0.09, 0.36, 0.01, 0.01, blu, -2.25, 1.75, zz + sd * i * 25e-4, { rot: [0, 0, a] });
|
|
24307
24406
|
});
|
|
24308
24407
|
});
|
|
24309
24408
|
if (c2.hood) {
|
|
@@ -24338,18 +24437,19 @@ var GameVehiclesFleet = (() => {
|
|
|
24338
24437
|
c2.roundBox(0.03, 0.12, 1.9, 0.01, rd, m.rear - 8e-3, 1.1, 0);
|
|
24339
24438
|
const beaconBar = [c2.roundBox(0.3, 0.08, 1.5, 0.03, MT.trim, 0.6, m.top + 0.04, 0)];
|
|
24340
24439
|
[-0.5, -0.17, 0.17, 0.5].forEach(function(z, i) {
|
|
24341
|
-
|
|
24342
|
-
|
|
24343
|
-
|
|
24344
|
-
|
|
24345
|
-
|
|
24346
|
-
|
|
24347
|
-
|
|
24348
|
-
|
|
24349
|
-
|
|
24350
|
-
z
|
|
24351
|
-
)
|
|
24440
|
+
const lamp = c2.roundBox(
|
|
24441
|
+
0.24,
|
|
24442
|
+
0.1,
|
|
24443
|
+
0.3,
|
|
24444
|
+
0.04,
|
|
24445
|
+
i % 2 ? MT.tail : CM("#f2f2f2", { emissive: new THREE.Color("#ffffff"), emissiveIntensity: 0.6 }),
|
|
24446
|
+
0.6,
|
|
24447
|
+
m.top + 0.13,
|
|
24448
|
+
z
|
|
24352
24449
|
);
|
|
24450
|
+
lamp.userData.lamp = "beacon";
|
|
24451
|
+
lamp.userData.beaconSide = z < 0 ? 0 : 1;
|
|
24452
|
+
beaconBar.push(lamp);
|
|
24353
24453
|
});
|
|
24354
24454
|
beaconBar.push(
|
|
24355
24455
|
c2.roundBox(
|
|
@@ -24444,13 +24544,9 @@ var GameVehiclesFleet = (() => {
|
|
|
24444
24544
|
}
|
|
24445
24545
|
|
|
24446
24546
|
// src/vehicles/water-air.ts
|
|
24447
|
-
function
|
|
24448
|
-
const kit = fx.kit;
|
|
24547
|
+
function createWaterAirKit(kit) {
|
|
24449
24548
|
const THREE = kit.THREE;
|
|
24450
|
-
const
|
|
24451
|
-
const trl = fx.t;
|
|
24452
|
-
const lbl = fx.label;
|
|
24453
|
-
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;
|
|
24549
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, G = kit.geo, clamp = kit.clamp;
|
|
24454
24550
|
function colorize(geo, fn) {
|
|
24455
24551
|
const p = geo.attributes.position, col = new Float32Array(p.count * 3);
|
|
24456
24552
|
for (let i = 0; i < p.count; i++) {
|
|
@@ -24658,9 +24754,31 @@ var GameVehiclesFleet = (() => {
|
|
|
24658
24754
|
if (o.col) colorize(g, o.col);
|
|
24659
24755
|
return g;
|
|
24660
24756
|
}
|
|
24757
|
+
function stretchEnds(st, by) {
|
|
24758
|
+
const out = st.map(function(q) {
|
|
24759
|
+
return q.slice();
|
|
24760
|
+
});
|
|
24761
|
+
const last = out.length - 1;
|
|
24762
|
+
const dir = out[last][0] >= out[0][0] ? 1 : -1;
|
|
24763
|
+
out[0][0] = out[0][0] - dir * by;
|
|
24764
|
+
out[last][0] = out[last][0] + dir * by;
|
|
24765
|
+
return out;
|
|
24766
|
+
}
|
|
24767
|
+
const paneCount = /* @__PURE__ */ new WeakMap();
|
|
24768
|
+
function nextPaneScale(c) {
|
|
24769
|
+
const n = paneCount.get(c) ?? 0;
|
|
24770
|
+
paneCount.set(c, n + 1);
|
|
24771
|
+
return 0.988 - 35e-4 * (n % 4);
|
|
24772
|
+
}
|
|
24773
|
+
const skinCount = /* @__PURE__ */ new WeakMap();
|
|
24774
|
+
function nextSkinScale(c) {
|
|
24775
|
+
const n = skinCount.get(c) ?? 0;
|
|
24776
|
+
skinCount.set(c, n + 1);
|
|
24777
|
+
return 1.004 + 25e-4 * (n % 3);
|
|
24778
|
+
}
|
|
24661
24779
|
function fuseGlass(c, st, keep, label, type, o) {
|
|
24662
24780
|
o = o || {};
|
|
24663
|
-
const k = o.k ||
|
|
24781
|
+
const k = o.k || nextPaneScale(c);
|
|
24664
24782
|
const st2 = st.map(function(s) {
|
|
24665
24783
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24666
24784
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
@@ -24673,12 +24791,12 @@ var GameVehiclesFleet = (() => {
|
|
|
24673
24791
|
}
|
|
24674
24792
|
function fuseSkin(c, st, keep, mat, o) {
|
|
24675
24793
|
o = o || {};
|
|
24676
|
-
const k = o.k ||
|
|
24794
|
+
const k = o.k || nextSkinScale(c);
|
|
24677
24795
|
const st2 = st.map(function(s) {
|
|
24678
24796
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24679
24797
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
24680
24798
|
});
|
|
24681
|
-
const m = c.add(fuseGeo(st2, { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
|
|
24799
|
+
const m = c.add(fuseGeo(stretchEnds(st2, -3e-3), { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
|
|
24682
24800
|
m.castShadow = false;
|
|
24683
24801
|
kit.cutMesh(m, [keep], 40);
|
|
24684
24802
|
c.deform.push(m);
|
|
@@ -24920,7 +25038,8 @@ var GameVehiclesFleet = (() => {
|
|
|
24920
25038
|
function bake(c, grp) {
|
|
24921
25039
|
grp.updateMatrix();
|
|
24922
25040
|
const M = grp.matrix;
|
|
24923
|
-
grp.children.slice().forEach(function(
|
|
25041
|
+
grp.children.slice().forEach(function(o3) {
|
|
25042
|
+
const o = o3;
|
|
24924
25043
|
o.updateMatrix();
|
|
24925
25044
|
const m = new THREE.Matrix4().multiplyMatrices(M, o.matrix);
|
|
24926
25045
|
grp.remove(o);
|
|
@@ -24948,7 +25067,7 @@ var GameVehiclesFleet = (() => {
|
|
|
24948
25067
|
}
|
|
24949
25068
|
;
|
|
24950
25069
|
(o.screens || []).forEach(function(s) {
|
|
24951
|
-
const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.
|
|
25070
|
+
const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.091, y + s[0], s[1]);
|
|
24952
25071
|
sc.castShadow = false;
|
|
24953
25072
|
});
|
|
24954
25073
|
}
|
|
@@ -24988,7 +25107,7 @@ var GameVehiclesFleet = (() => {
|
|
|
24988
25107
|
);
|
|
24989
25108
|
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);
|
|
24990
25109
|
c.roundBox(0.17 * k, shaft, 0.11 * k, 0.04 * k, low, -0.16 * k, -shaft / 2 - 0.02, 0, P);
|
|
24991
|
-
c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft -
|
|
25110
|
+
c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft - 6e-3, 0, P);
|
|
24992
25111
|
c.cylinder(0.055 * k, 0.05 * k, 0.32 * k, low, -0.2 * k, -shaft - 0.09 * k, 0, "x", P);
|
|
24993
25112
|
c.roundBox(0.16 * k, 0.12 * k, 0.025, 0.01, low, -0.18 * k, -shaft - 0.17 * k, 0, P);
|
|
24994
25113
|
const pr = propeller(c, -0.38 * k, -shaft - 0.09 * k, 0, {
|
|
@@ -25020,7 +25139,11 @@ var GameVehiclesFleet = (() => {
|
|
|
25020
25139
|
function skinOf(c, mesh, keep, mat, o) {
|
|
25021
25140
|
o = o || {};
|
|
25022
25141
|
const g = mesh.geometry.clone(), p = g.attributes.position, sz = o.sz || 1.006, dy = o.dy || 0;
|
|
25142
|
+
let reach = 0;
|
|
25143
|
+
for (let i = 0; i < p.count; i++) reach = Math.max(reach, Math.abs(p.getX(i)));
|
|
25144
|
+
const sx = o.ends === false ? 1 : 1 - 3e-3 / (reach || 1);
|
|
25023
25145
|
for (let i = 0; i < p.count; i++) {
|
|
25146
|
+
p.setX(i, p.getX(i) * sx);
|
|
25024
25147
|
p.setZ(i, p.getZ(i) * sz);
|
|
25025
25148
|
p.setY(i, p.getY(i) + dy * Math.sign(p.getY(i)));
|
|
25026
25149
|
}
|
|
@@ -25122,7 +25245,7 @@ var GameVehiclesFleet = (() => {
|
|
|
25122
25245
|
t.rotation.y += s > 0 ? -Math.atan(m) : Math.atan(m);
|
|
25123
25246
|
return t;
|
|
25124
25247
|
}
|
|
25125
|
-
|
|
25248
|
+
return {
|
|
25126
25249
|
colorize,
|
|
25127
25250
|
tab,
|
|
25128
25251
|
tabL,
|
|
@@ -25134,6 +25257,8 @@ var GameVehiclesFleet = (() => {
|
|
|
25134
25257
|
foilGeo,
|
|
25135
25258
|
fuseGeo,
|
|
25136
25259
|
fuseGlass,
|
|
25260
|
+
nextPaneScale,
|
|
25261
|
+
nextSkinScale,
|
|
25137
25262
|
fuseSkin,
|
|
25138
25263
|
bandT,
|
|
25139
25264
|
cutT,
|
|
@@ -25160,6 +25285,15 @@ var GameVehiclesFleet = (() => {
|
|
|
25160
25285
|
pedals,
|
|
25161
25286
|
NAV
|
|
25162
25287
|
};
|
|
25288
|
+
}
|
|
25289
|
+
function installWaterAir(fx) {
|
|
25290
|
+
const kit = fx.kit;
|
|
25291
|
+
const THREE = kit.THREE;
|
|
25292
|
+
const shared = fx.shared;
|
|
25293
|
+
const trl = fx.t;
|
|
25294
|
+
const lbl = fx.label;
|
|
25295
|
+
const V3 = kit.V3, PI = Math.PI, MT = kit.materials, CM = kit.makeMaterial, _paintCol = kit.paintColor, DS = THREE.DoubleSide;
|
|
25296
|
+
shared.EA = createWaterAirKit(kit);
|
|
25163
25297
|
fx.register(
|
|
25164
25298
|
{
|
|
25165
25299
|
key: "river_skiff",
|
|
@@ -25273,7 +25407,7 @@ var GameVehiclesFleet = (() => {
|
|
|
25273
25407
|
const tank = c.roundBox(0.48, 0.24, 0.3, 0.06, CM("#a3241c", { roughness: 0.5 }), -2.05, 0.06, -0.38);
|
|
25274
25408
|
c.rod(new V3(-2, 0.18, -0.38), new V3(-2.3, 0.4, -0.1), 0.01, CM("#1b1b1b"));
|
|
25275
25409
|
c.roundBox(1.8, 0.03, 0.1, 0.01, MT.wood, -0.6, 0, 0.5, { rot: [0.3, 0, 0] });
|
|
25276
|
-
c.roundBox(0.35, 0.03, 0.14, 0.02, MT.wood, 0.45,
|
|
25410
|
+
c.roundBox(0.35, 0.03, 0.14, 0.02, MT.wood, 0.45, 4e-3, 0.5, { rot: [0.3, 0, 0] });
|
|
25277
25411
|
c.rod(new V3(-2.35, 0.42, 0.6), new V3(-2.35, 1.1, 0.6), 0.012, MT.chrome);
|
|
25278
25412
|
EA.navLight(c, -2.35, 1.13, 0.6, "white", trl("labels.stern_light_mast"), { r: 0.035 });
|
|
25279
25413
|
EA.navLight(c, 2.3, 0.53, 0.06, "green", trl("labels.starboard_bow_light_green"), { r: 0.03 });
|
|
@@ -25450,7 +25584,7 @@ var GameVehiclesFleet = (() => {
|
|
|
25450
25584
|
c.roundBox(2.3, 0.22, 0.5, 0.07, vinyl, -2.3, 0.45, s * 0.75);
|
|
25451
25585
|
c.roundBox(2.3, 0.4, 0.12, 0.05, vinyl, -2.3, 0.72, s * (H.half(-2.3, 0.7) - 0.08));
|
|
25452
25586
|
});
|
|
25453
|
-
c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.
|
|
25587
|
+
c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.453, 0);
|
|
25454
25588
|
c.roundBox(0.12, 0.42, 2.1, 0.05, vinyl, -3.52, 0.74, 0);
|
|
25455
25589
|
c.seatTops.push(
|
|
25456
25590
|
{ x: -2.3, y: 0.57, z: 0.75, w: 0.5, l: 2.2 },
|
|
@@ -25458,8 +25592,8 @@ var GameVehiclesFleet = (() => {
|
|
|
25458
25592
|
{ x: 2, y: 0.57, z: 0, w: 1.2, l: 0.9 }
|
|
25459
25593
|
);
|
|
25460
25594
|
const cy = 0.22;
|
|
25461
|
-
c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.
|
|
25462
|
-
c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.
|
|
25595
|
+
c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.362, 0.72);
|
|
25596
|
+
c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.362, -0.74);
|
|
25463
25597
|
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] });
|
|
25464
25598
|
[0.55, 0.72, 0.89].forEach(function(z, i) {
|
|
25465
25599
|
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);
|
|
@@ -25470,8 +25604,8 @@ var GameVehiclesFleet = (() => {
|
|
|
25470
25604
|
c.rod(new V3(0.62, cy + 0.72, 0.62), new V3(0.55, cy + 0.82, 0.62), 0.02, MT.chrome);
|
|
25471
25605
|
c.rod(new V3(0.55, cy + 0.7, 0.98), new V3(0.42, cy + 0.88, 1), 0.015, MT.chrome);
|
|
25472
25606
|
c.sphere(0.035, MT.plastic, 0.42, cy + 0.9, 1);
|
|
25473
|
-
kit.seat(c, -0.1, cy, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25474
|
-
kit.seat(c, -0.1, cy, -0.74, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25607
|
+
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 });
|
|
25608
|
+
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 });
|
|
25475
25609
|
[1, -1].forEach(function(s) {
|
|
25476
25610
|
const pts = [];
|
|
25477
25611
|
for (let i = 0; i <= 8; i++) {
|
|
@@ -25693,7 +25827,7 @@ var GameVehiclesFleet = (() => {
|
|
|
25693
25827
|
[1.6, -0.55],
|
|
25694
25828
|
[1.95, -1]
|
|
25695
25829
|
].forEach(function(q) {
|
|
25696
|
-
c.roundBox(0.42, 0.24, 0.32, 0.03, CM("#3f6fa0", { roughness: 0.6 }), q[0], dk(q[0]) + 0.
|
|
25830
|
+
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]);
|
|
25697
25831
|
});
|
|
25698
25832
|
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 });
|
|
25699
25833
|
const cutF = {
|
|
@@ -25782,11 +25916,11 @@ var GameVehiclesFleet = (() => {
|
|
|
25782
25916
|
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 });
|
|
25783
25917
|
}
|
|
25784
25918
|
c.cylinder(0.05, 0.05, 0.14, MT.wood, 0.06, 0, 0, "x", { parent: whl });
|
|
25785
|
-
kit.seat(c, hx - 0.05, hy0, 0, { w: 0.5, h: 0.55, back: 0.45, mat: inner, headrest: false });
|
|
25919
|
+
kit.seat(c, hx - 0.05, hy0 + 2e-3, 0, { w: 0.5, h: 0.55, back: 0.45, mat: inner, headrest: false });
|
|
25786
25920
|
c.roundBox(1.8, 0.12, 0.65, 0.04, CM("#7c5a3b"), hx - 0.2, hy0 + 0.5, -0.72);
|
|
25787
25921
|
c.roundBox(1.7, 0.08, 0.55, 0.04, CM("#6b7c8f", { roughness: 1 }), hx - 0.2, hy0 + 0.6, -0.72);
|
|
25788
25922
|
c.roundBox(1.9, 0.02, 2.1, 0.01, inner, hx, hy0 + hh - 0.06, 0).castShadow = false;
|
|
25789
|
-
c.cylinder(0.1, 0.1, 1.2, MT.trim, hx - 0.75, hy0 + hh + 0.
|
|
25923
|
+
c.cylinder(0.1, 0.1, 1.2, MT.trim, hx - 0.75, hy0 + hh + 0.596, 0.65);
|
|
25790
25924
|
c.cylinder(0.13, 0.1, 0.1, MT.trim, hx - 0.75, hy0 + hh + 1.22, 0.65);
|
|
25791
25925
|
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);
|
|
25792
25926
|
EA.navLight(c, hx + 0.4, hy0 + hh + 1.65, 0, "white", trl("labels.masthead_light"), { r: 0.05 });
|
|
@@ -25887,7 +26021,7 @@ var GameVehiclesFleet = (() => {
|
|
|
25887
26021
|
const EA = shared.EA, white = "#ecebe6";
|
|
25888
26022
|
const paintW = c.paint(white);
|
|
25889
26023
|
const ST = [
|
|
25890
|
-
[2.
|
|
26024
|
+
[2.297, 0.98, 1.46, 0.7, 2.4],
|
|
25891
26025
|
[2.15, 0.88, 1.55, 0.92, 2.6],
|
|
25892
26026
|
[1.85, 0.8, 1.61, 1.02, 2.8],
|
|
25893
26027
|
[1.45, 0.72, 1.65, 1.08, 3],
|
|
@@ -26016,7 +26150,7 @@ var GameVehiclesFleet = (() => {
|
|
|
26016
26150
|
};
|
|
26017
26151
|
const g = EA.foilGeo(
|
|
26018
26152
|
[
|
|
26019
|
-
{ p: [0.66, dh(0),
|
|
26153
|
+
{ p: [0.66, dh(0), s * 2e-3], c: 1.63, t: 0.12, cam: 0.02 },
|
|
26020
26154
|
{ p: [0.66, dh(2.6), s * 2.6], c: 1.63, t: 0.12, cam: 0.02 },
|
|
26021
26155
|
{ p: [0.62, dh(5.2), s * 5.2], c: 1.14, t: 0.11, cam: 0.02 },
|
|
26022
26156
|
{ p: [0.58, dh(5.5) + 0.02, s * 5.5], c: 0.98, t: 0.06, cam: 0.01 }
|
|
@@ -26055,7 +26189,7 @@ var GameVehiclesFleet = (() => {
|
|
|
26055
26189
|
const hs = c.add(
|
|
26056
26190
|
EA.foilGeo(
|
|
26057
26191
|
[
|
|
26058
|
-
{ p: [-4.6, 1.42,
|
|
26192
|
+
{ p: [-4.6, 1.42, s * 2e-3], c: 1.2, t: 0.09 },
|
|
26059
26193
|
{ p: [-4.95, 1.42, s * 1.72], c: 0.86, t: 0.08 }
|
|
26060
26194
|
],
|
|
26061
26195
|
{ up: "y", n: 10 }
|
|
@@ -26306,7 +26440,7 @@ var GameVehiclesFleet = (() => {
|
|
|
26306
26440
|
const w = c.add(
|
|
26307
26441
|
EA.foilGeo(
|
|
26308
26442
|
[
|
|
26309
|
-
{ p: [1.18, dh(0),
|
|
26443
|
+
{ p: [1.18, dh(0), s * 2e-3], c: 1.71, t: 0.15, cam: 0.02 },
|
|
26310
26444
|
{ p: [1.18, dh(5.6), s * 5.6], c: 1.71, t: 0.14, cam: 0.02 },
|
|
26311
26445
|
{ p: [1.12, dh(5.84) + 0.02, s * 5.84], c: 1.55, t: 0.07, cam: 0.01 }
|
|
26312
26446
|
],
|
|
@@ -26340,7 +26474,7 @@ var GameVehiclesFleet = (() => {
|
|
|
26340
26474
|
const hs = c.add(
|
|
26341
26475
|
EA.foilGeo(
|
|
26342
26476
|
[
|
|
26343
|
-
{ p: [-2.95, 0.36,
|
|
26477
|
+
{ p: [-2.95, 0.36, s * 2e-3], c: 0.95, t: 0.09 },
|
|
26344
26478
|
{ p: [-3.05, 0.36, s * 1.8], c: 0.8, t: 0.08 }
|
|
26345
26479
|
],
|
|
26346
26480
|
{ up: "y", n: 10 }
|
|
@@ -26372,8 +26506,8 @@ var GameVehiclesFleet = (() => {
|
|
|
26372
26506
|
const finB = c.add(
|
|
26373
26507
|
EA.foilGeo(
|
|
26374
26508
|
[
|
|
26375
|
-
{ p: [-2.64, 0.
|
|
26376
|
-
{ p: [-3.24, 1.
|
|
26509
|
+
{ p: [-2.64, 0.424, 0], c: 1.27, t: 0.11 },
|
|
26510
|
+
{ p: [-3.24, 1.853, 0], c: 0.74, t: 0.1 }
|
|
26377
26511
|
],
|
|
26378
26512
|
{ up: "z", n: 10 }
|
|
26379
26513
|
),
|
|
@@ -26643,10 +26777,11 @@ var GameVehiclesFleet = (() => {
|
|
|
26643
26777
|
EA.sideKeepP(fdP, 0.35, s),
|
|
26644
26778
|
s > 0 ? lbl("front_right_door_window") : lbl("front_left_door_window"),
|
|
26645
26779
|
"tempered",
|
|
26646
|
-
{ pos: new V3(0.4, 1.5, s * 0.64) }
|
|
26780
|
+
{ pos: new V3(0.4, 1.5, s * 0.64), k: 0.988 }
|
|
26647
26781
|
);
|
|
26648
26782
|
EA.fuseGlass(c, ST, EA.sideKeepP(rdP, 0.35, s), s > 0 ? lbl("rear_right_door_window") : lbl("rear_left_door_window"), "tempered", {
|
|
26649
|
-
pos: new V3(-0.5, 1.5, s * 0.63)
|
|
26783
|
+
pos: new V3(-0.5, 1.5, s * 0.63),
|
|
26784
|
+
k: 0.988
|
|
26650
26785
|
});
|
|
26651
26786
|
const df = EA.polySdf([
|
|
26652
26787
|
[0.78, 0.72],
|
|
@@ -26742,7 +26877,7 @@ var GameVehiclesFleet = (() => {
|
|
|
26742
26877
|
const hs = c.add(
|
|
26743
26878
|
EA.foilGeo(
|
|
26744
26879
|
[
|
|
26745
|
-
{ p: [-5.25, 1.76,
|
|
26880
|
+
{ p: [-5.25, 1.76, s * 2e-3], c: 0.45, t: 0.1 },
|
|
26746
26881
|
{ p: [-5.32, 1.76, s * 0.62], c: 0.34, t: 0.09 }
|
|
26747
26882
|
],
|
|
26748
26883
|
{ up: "y", n: 8 }
|
|
@@ -27070,7 +27205,7 @@ var GameVehiclesFleet = (() => {
|
|
|
27070
27205
|
const hs = c.add(
|
|
27071
27206
|
EA.foilGeo(
|
|
27072
27207
|
[
|
|
27073
|
-
{ p: [-5.3, 1.98,
|
|
27208
|
+
{ p: [-5.3, 1.98, s * 2e-3], c: 0.6, t: 0.11 },
|
|
27074
27209
|
{ p: [-5.38, 1.98, s * 1], c: 0.52, t: 0.1 }
|
|
27075
27210
|
],
|
|
27076
27211
|
{ up: "y", n: 8 }
|
|
@@ -27268,9 +27403,13 @@ var GameVehiclesFleet = (() => {
|
|
|
27268
27403
|
shared,
|
|
27269
27404
|
t,
|
|
27270
27405
|
label: (key) => ({ key, label: t("labels." + key) }),
|
|
27406
|
+
hasSunroof: (key) => !!options.sunroofs?.includes(key),
|
|
27271
27407
|
register(spec, build) {
|
|
27272
27408
|
if (!groups.has(spec.group) || only && !only.has(spec.key) || skip.has(spec.key)) return;
|
|
27273
|
-
kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] },
|
|
27409
|
+
kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] }, (context, vehicleKit) => {
|
|
27410
|
+
build(context, vehicleKit);
|
|
27411
|
+
separateSpokes(context);
|
|
27412
|
+
});
|
|
27274
27413
|
}
|
|
27275
27414
|
};
|
|
27276
27415
|
}
|
|
@@ -29523,6 +29662,29 @@ var GameVehiclesFleet = (() => {
|
|
|
29523
29662
|
var cards = cards_pt_BR_default;
|
|
29524
29663
|
var fleetStats = (id) => stats[id];
|
|
29525
29664
|
var fleetCard = (id) => cards[id];
|
|
29665
|
+
|
|
29666
|
+
// src/proving.ts
|
|
29667
|
+
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"];
|
|
29668
|
+
var fleetGroupOf = (id) => Object.entries(fleetGroups).find(([, ids]) => ids.includes(id))?.[0];
|
|
29669
|
+
function fleetProvingSubject(id, options = {}) {
|
|
29670
|
+
const stats2 = fleetStats(id);
|
|
29671
|
+
const dims = fleetDims(id);
|
|
29672
|
+
if (!stats2 || !dims) return null;
|
|
29673
|
+
const group = fleetGroupOf(id) ?? "cars";
|
|
29674
|
+
const density = { motorcycles: 90, cars: 88, suvs: 90, pickups: 95, vans: 80, heavy: 120, agricultural: 150, military: 260, water: 60, air: 40 };
|
|
29675
|
+
return {
|
|
29676
|
+
id,
|
|
29677
|
+
domain: group === "water" ? "water" : group === "air" ? "air" : "land",
|
|
29678
|
+
category: group,
|
|
29679
|
+
stats: { acceleration: stats2.acceleration, handling: stats2.handling, maxSpeedKmh: stats2.maxSpeedKmh },
|
|
29680
|
+
body: {
|
|
29681
|
+
mass: options.mass ?? Math.round((density[group] ?? 90) * dims.length * dims.width * dims.height),
|
|
29682
|
+
wheelbase: options.wheelbase ?? Math.round(dims.length * 0.6 * 100) / 100,
|
|
29683
|
+
track: options.track ?? Math.round(dims.width * 0.82 * 100) / 100,
|
|
29684
|
+
fourWheelDrive: options.fourWheelDrive ?? FLEET_FOUR_WHEEL_DRIVE.includes(id)
|
|
29685
|
+
}
|
|
29686
|
+
};
|
|
29687
|
+
}
|
|
29526
29688
|
return __toCommonJS(index_exports);
|
|
29527
29689
|
})();
|
|
29528
29690
|
//# sourceMappingURL=index.global.js.map
|