@adatechnology/game-vehicles-fleet 6.0.1 → 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 +3 -0
- package/dist/index.global.js +171 -102
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +171 -102
- package/dist/index.js.map +1 -1
- package/package.json +8 -6
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);
|
|
@@ -7829,7 +7857,7 @@ function installCarsExtra(fx) {
|
|
|
7829
7857
|
[0.62, 0.48, -0.48, -0.62].forEach(function(z) {
|
|
7830
7858
|
const s = dg.at(dg.uz(z), 0.25);
|
|
7831
7859
|
c2.cylinder(0.045, 0.045, 0.1, EXH, s.p.x - 0.02, 0.25, z, "x");
|
|
7832
|
-
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");
|
|
7833
7861
|
});
|
|
7834
7862
|
const lip = K.grid(-1, 0, { z1: 0.7, y0: 0.88, y1: 0.97, du: 0.03, dv: 0.02 });
|
|
7835
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 });
|
|
@@ -8244,7 +8272,7 @@ function installHeavy(fx) {
|
|
|
8244
8272
|
side: s,
|
|
8245
8273
|
noPart: true
|
|
8246
8274
|
});
|
|
8247
|
-
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);
|
|
8248
8276
|
});
|
|
8249
8277
|
}
|
|
8250
8278
|
c.roundBox(0.06, 0.06, 0.12, 0.02, MT.steel, bx + 0.13, by - bh * 0.35, 0);
|
|
@@ -8347,7 +8375,7 @@ function installHeavy(fx) {
|
|
|
8347
8375
|
-(W - 0.2) / 2 + (k + 0.5) * (W - 0.2) / 8
|
|
8348
8376
|
);
|
|
8349
8377
|
[1, -1].forEach(function(s) {
|
|
8350
|
-
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);
|
|
8351
8379
|
});
|
|
8352
8380
|
m.rearBumper = bar;
|
|
8353
8381
|
c.part("bumper", trl("labels.rear_bumper"), bar, new V3(rear, 0.52, 0), 1);
|
|
@@ -9409,7 +9437,7 @@ function installHeavy(fx) {
|
|
|
9409
9437
|
});
|
|
9410
9438
|
const vg = c.roundBox(0.32, 0.2, 0.03, 0.03, MT.armorGlass, 1.3, 2.45, zs);
|
|
9411
9439
|
kit.asGlass(c, vg, s > 0 ? lbl("right_armored_viewport") : lbl("left_armored_viewport"), "laminated");
|
|
9412
|
-
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);
|
|
9413
9441
|
for (let x = rear + 0.2; x < bx0; x += 0.3) {
|
|
9414
9442
|
c.sphere(0.018, MT.steel, x, 1.2, zs);
|
|
9415
9443
|
c.sphere(0.018, MT.steel, x, 2.98, zs);
|
|
@@ -9518,7 +9546,7 @@ function installHeavy(fx) {
|
|
|
9518
9546
|
const hx0 = 0.02, hx1 = 1.84 + FX, hy = 1.48;
|
|
9519
9547
|
[1, -1].forEach(function(s) {
|
|
9520
9548
|
c.roundBox(hx1 - hx0, 0.38, 0.035, 0.02, paint, (hx0 + hx1) / 2, 1.22, s * 0.36, { def: true });
|
|
9521
|
-
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));
|
|
9522
9550
|
c.roundBox(1, 0.03, 0.02, 0.01, CM("#e9e6dd"), 0.55, 1.36, s * 0.38);
|
|
9523
9551
|
c.text("275", 0.3, 0.14, 0.32, 1.2, s * 0.384, s > 0 ? "+z" : "-z", { fg: "#f2efe6" });
|
|
9524
9552
|
});
|
|
@@ -9994,7 +10022,7 @@ function installHelicoptersExtra(fx) {
|
|
|
9994
10022
|
const hs = c.add(
|
|
9995
10023
|
EA.foilGeo(
|
|
9996
10024
|
[
|
|
9997
|
-
{ p: [-3.9, 1.44,
|
|
10025
|
+
{ p: [-3.9, 1.44, s * 2e-3], c: 0.3, t: 0.1 },
|
|
9998
10026
|
{ p: [-3.95, 1.44, s * 0.42], c: 0.22, t: 0.09 }
|
|
9999
10027
|
],
|
|
10000
10028
|
{ up: "y", n: 8 }
|
|
@@ -10233,7 +10261,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10233
10261
|
},
|
|
10234
10262
|
lbl("chin_windows"),
|
|
10235
10263
|
"tempered",
|
|
10236
|
-
{ pos: new V3(2.3, 0.88, 0) }
|
|
10264
|
+
{ pos: new V3(2.3, 0.88, 0), k: 0.988 }
|
|
10237
10265
|
);
|
|
10238
10266
|
[1, -1].forEach(function(s) {
|
|
10239
10267
|
EA.fuseGlass(
|
|
@@ -10333,7 +10361,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10333
10361
|
tipCol: "#e6e4dd",
|
|
10334
10362
|
phase: 0.25
|
|
10335
10363
|
});
|
|
10336
|
-
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);
|
|
10337
10365
|
const bm = boom(
|
|
10338
10366
|
c,
|
|
10339
10367
|
EA,
|
|
@@ -10367,7 +10395,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10367
10395
|
const hs = c.add(
|
|
10368
10396
|
EA.foilGeo(
|
|
10369
10397
|
[
|
|
10370
|
-
{ p: [-4.05, 1.68,
|
|
10398
|
+
{ p: [-4.05, 1.68, s * 2e-3], c: 0.42, t: 0.12, cam: -0.04 },
|
|
10371
10399
|
{ p: [-4.1, 1.68, s * 0.99], c: 0.38, t: 0.11, cam: -0.04 }
|
|
10372
10400
|
],
|
|
10373
10401
|
{ up: "y", n: 8 }
|
|
@@ -10616,7 +10644,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10616
10644
|
},
|
|
10617
10645
|
lbl("chin_windows"),
|
|
10618
10646
|
"tempered",
|
|
10619
|
-
{ pos: new V3(3.05, 0.95, 0) }
|
|
10647
|
+
{ pos: new V3(3.05, 0.95, 0), k: 0.988 }
|
|
10620
10648
|
);
|
|
10621
10649
|
[1, -1].forEach(function(s) {
|
|
10622
10650
|
EA.fuseGlass(c, ST, EA.sideKeepP(fdP, 0.6, s), s > 0 ? lbl("co_pilot_door_window") : lbl("pilot_door_window"), "tempered", {
|
|
@@ -10781,7 +10809,7 @@ function installHelicoptersExtra(fx) {
|
|
|
10781
10809
|
const hs = c.add(
|
|
10782
10810
|
EA.foilGeo(
|
|
10783
10811
|
[
|
|
10784
|
-
{ p: [-5.75, 2.1,
|
|
10812
|
+
{ p: [-5.75, 2.1, s * 2e-3], c: 0.62, t: 0.12, cam: -0.03 },
|
|
10785
10813
|
{ p: [-5.85, 2.1, s * 1.05], c: 0.52, t: 0.11, cam: -0.03 }
|
|
10786
10814
|
],
|
|
10787
10815
|
{ up: "y", n: 8 }
|
|
@@ -11194,7 +11222,7 @@ function installHelicoptersExtra(fx) {
|
|
|
11194
11222
|
EA.colorize(
|
|
11195
11223
|
EA.foilGeo(
|
|
11196
11224
|
[
|
|
11197
|
-
{ p: [-8.3, 2.75,
|
|
11225
|
+
{ p: [-8.3, 2.75, s * 2e-3], c: 1, t: 0.1 },
|
|
11198
11226
|
{ p: [-8.5, 2.75, s * 1.85], c: 0.7, t: 0.09 }
|
|
11199
11227
|
],
|
|
11200
11228
|
{ up: "y", n: 8 }
|
|
@@ -12266,7 +12294,7 @@ function installMilitary(fx) {
|
|
|
12266
12294
|
const floor = c.roundBox(L, 0.1, W, 0.02, wood, cx, y0, 0, { def: true });
|
|
12267
12295
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, 0.45);
|
|
12268
12296
|
c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, -0.45);
|
|
12269
|
-
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);
|
|
12270
12298
|
const sides = [];
|
|
12271
12299
|
[1, -1].forEach(function(s) {
|
|
12272
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 });
|
|
@@ -12277,7 +12305,7 @@ function installMilitary(fx) {
|
|
|
12277
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));
|
|
12278
12306
|
});
|
|
12279
12307
|
});
|
|
12280
|
-
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 });
|
|
12281
12309
|
const tg = c.roundBox(0.06, sideH * 0.7, W - 0.1, 0.02, wood, x1 - 0.02, y0 - sideH * 0.3, 0);
|
|
12282
12310
|
tg.rotation.z = 0.08;
|
|
12283
12311
|
const top = y0 + sideH + bowH, yb = y0 + sideH + 0.05, nseg = 20, pos = [], idx = [];
|
|
@@ -12671,7 +12699,7 @@ function installMilitary(fx) {
|
|
|
12671
12699
|
top: roofY + 0.03,
|
|
12672
12700
|
k: 0.28,
|
|
12673
12701
|
holes,
|
|
12674
|
-
archInner: W / 2 - ww - 0.
|
|
12702
|
+
archInner: W / 2 - ww - 0.098,
|
|
12675
12703
|
sub: 0.18,
|
|
12676
12704
|
bev: 0.025
|
|
12677
12705
|
});
|
|
@@ -13004,8 +13032,7 @@ function installMilitary(fx) {
|
|
|
13004
13032
|
[1.3, roofY, 0.1],
|
|
13005
13033
|
[F - 0.04, 1.02, 0.06],
|
|
13006
13034
|
[F, 0.9, 0.05],
|
|
13007
|
-
[2.05, 0.46, 0.06]
|
|
13008
|
-
[-1.4, 0.44, 0.04]
|
|
13035
|
+
[2.05, 0.46, 0.06]
|
|
13009
13036
|
];
|
|
13010
13037
|
const arches = axles.map(function(x) {
|
|
13011
13038
|
return [x, wr, wr + 0.09];
|
|
@@ -13083,8 +13110,8 @@ function installMilitary(fx) {
|
|
|
13083
13110
|
[1, -1].forEach(function(s) {
|
|
13084
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));
|
|
13085
13112
|
c.cylinder(0.12, 0.12, 0.2, OLIVE_STEEL, (axles[1] + axles[2]) / 2, wr, s * (W / 2 - ww - 0.1), "z");
|
|
13086
|
-
c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.
|
|
13087
|
-
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 });
|
|
13088
13115
|
c.roundBox(1.2, 0.26, 0.28, 0.03, paintMat(c, OLIVE2), -1.45, 1.28, s * (W / 2 - 0.17));
|
|
13089
13116
|
[-0.95, -1.95].forEach(function(x) {
|
|
13090
13117
|
c.roundBox(0.3, 0.2, 0.02, 0.01, MT.dark, x, 1.28, s * (W / 2 - 0.025));
|
|
@@ -13241,7 +13268,7 @@ function installMilitary(fx) {
|
|
|
13241
13268
|
m.kind = "car";
|
|
13242
13269
|
m.bullet = true;
|
|
13243
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 });
|
|
13244
|
-
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] });
|
|
13245
13272
|
const items = [
|
|
13246
13273
|
[R, 1.05, 0.04],
|
|
13247
13274
|
[R - 0.02, deckY - 0.04, 0.05],
|
|
@@ -13284,7 +13311,7 @@ function installMilitary(fx) {
|
|
|
13284
13311
|
(ex0 + ex1) / 2
|
|
13285
13312
|
);
|
|
13286
13313
|
scale(c, nB, bcen, 1.45);
|
|
13287
|
-
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);
|
|
13288
13315
|
[1, -1].forEach(function(sd) {
|
|
13289
13316
|
c.roundBox(ex1 - ex0 - 0.1, 0.55, 0.02, 0.01, BAY_LIGHT, bcen.x, 1.25, sd * 1.08);
|
|
13290
13317
|
});
|
|
@@ -13310,12 +13337,12 @@ function installMilitary(fx) {
|
|
|
13310
13337
|
c.roundBox(0.55, 0.42, 0.03, 0.01, MT.rubber, 2.95, 0.86, s * (W / 2 + 0.05));
|
|
13311
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);
|
|
13312
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] });
|
|
13313
|
-
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);
|
|
13314
13341
|
star(c, 0.6, 1.3, s * (H.half(1.3) + 0.01), 0.17, s > 0 ? "+z" : "-z", { ring: true });
|
|
13315
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 });
|
|
13316
13343
|
guardedHeadlight(c, 2.95, gl(2.95) + 0.16, s * 1.3, s, { style: "round" });
|
|
13317
13344
|
c.roundBox(0.1, 0.16, 0.08, 0.02, OLIVE_STEEL, 2.9, gl(2.9) + 0.04, s * 1.3);
|
|
13318
|
-
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);
|
|
13319
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 });
|
|
13320
13347
|
c.tube(
|
|
13321
13348
|
[
|
|
@@ -13357,7 +13384,7 @@ function installMilitary(fx) {
|
|
|
13357
13384
|
{ rot: [0, 0, -0.18] }
|
|
13358
13385
|
);
|
|
13359
13386
|
hatch(c, 2.05, roofY - 0.1, -0.78, 0.28, 0, OLIVE_STEEL, { yaw: 0 });
|
|
13360
|
-
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 }) });
|
|
13361
13388
|
[-0.95, -0.78, -0.61].forEach(function(z, i) {
|
|
13362
13389
|
periscope(c, 2.3, roofY - 0.08, z, 0.14, i === 1 ? lbl("driver_periscope") : null);
|
|
13363
13390
|
});
|
|
@@ -13479,14 +13506,14 @@ function installMilitary(fx) {
|
|
|
13479
13506
|
const g = new THREE.Group();
|
|
13480
13507
|
g.position.set(x, y, z);
|
|
13481
13508
|
c.vehicle.add(g);
|
|
13482
|
-
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);
|
|
13483
13510
|
wmsh.rotation.x = PI / 2;
|
|
13484
13511
|
wmsh.castShadow = true;
|
|
13485
13512
|
g.add(wmsh);
|
|
13486
13513
|
if (opt.tires)
|
|
13487
13514
|
[-1, 1].forEach(function(q) {
|
|
13488
13515
|
const t = new THREE.Mesh(new THREE.TorusGeometry(rad - 0.035, 0.035, 6, 24), MT.rubber);
|
|
13489
|
-
t.position.z = q * w * 0.22;
|
|
13516
|
+
t.position.z = q * w * (opt.tireAt ?? 0.22);
|
|
13490
13517
|
g.add(t);
|
|
13491
13518
|
});
|
|
13492
13519
|
const hb = new THREE.Mesh(new THREE.CylinderGeometry(rad * 0.32, rad * 0.32, w * 0.86, 10), MT.steel);
|
|
@@ -13503,21 +13530,21 @@ function installMilitary(fx) {
|
|
|
13503
13530
|
for (let k = 0; k < 6; k++) {
|
|
13504
13531
|
const b = new THREE.Mesh(G.roundedBox(rad * 1.5, 0.05, 0.04, 0.01), wm);
|
|
13505
13532
|
b.rotation.z = k / 6 * PI;
|
|
13506
|
-
b.position.z = (z > 0 ? 1 : -1) * w * 0.42;
|
|
13533
|
+
b.position.z = (z > 0 ? 1 : -1) * (w * 0.42 + k * 3e-3);
|
|
13507
13534
|
g.add(b);
|
|
13508
13535
|
}
|
|
13509
13536
|
c.spin.push({ o: g, axis: "z", v: 0, track: true });
|
|
13510
13537
|
return g;
|
|
13511
13538
|
}
|
|
13512
13539
|
for (let i = 0; i < n; i++) wheel(xs + i * sp, r + th, r, { tires: true });
|
|
13513
|
-
wheel(x0, yS, rS, { teeth: true });
|
|
13514
|
-
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 });
|
|
13515
13542
|
const topY = function(x) {
|
|
13516
13543
|
return yS + rS + th / 2 + (yI + rI - yS - rS) * (x - x0) / (x1 - x0);
|
|
13517
13544
|
};
|
|
13518
13545
|
for (let q = 0; q < 4; q++) {
|
|
13519
13546
|
const xr = x0 + (x1 - x0) * (0.2 + q * 0.2);
|
|
13520
|
-
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, {});
|
|
13547
|
+
wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, { width: 0.7 });
|
|
13521
13548
|
}
|
|
13522
13549
|
const path = [], segs = 12;
|
|
13523
13550
|
function arc(cx, cy, rad, a0, a1) {
|
|
@@ -13541,7 +13568,7 @@ function installMilitary(fx) {
|
|
|
13541
13568
|
const curve = new THREE.SplineCurve(pts.concat([pts[0]])), lenT = curve.getLength(), nl = Math.round(lenT / 0.15), links = [];
|
|
13542
13569
|
for (let l = 0; l < nl; l++) {
|
|
13543
13570
|
const t = l / nl, p = curve.getPointAt(t), tg = curve.getTangentAt(t), ang = Math.atan2(tg.y, tg.x);
|
|
13544
|
-
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);
|
|
13545
13572
|
lg.applyMatrix4(new THREE.Matrix4().makeRotationZ(ang).setPosition(p.x, p.y, 0));
|
|
13546
13573
|
links.push(lg);
|
|
13547
13574
|
const gh2 = G.roundedBox(0.05, 0.05, 0.05, 0.01);
|
|
@@ -17247,9 +17274,9 @@ function installMotorcyclesCars(fx) {
|
|
|
17247
17274
|
],
|
|
17248
17275
|
col
|
|
17249
17276
|
);
|
|
17250
|
-
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") });
|
|
17251
17278
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
17252
|
-
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] });
|
|
17253
17280
|
handlebar(c, 0.36, 1.03, 0.37, { rise: 0.04, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
17254
17281
|
[1, -1].forEach(function(s) {
|
|
17255
17282
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
@@ -17451,7 +17478,7 @@ function installMotorcyclesCars(fx) {
|
|
|
17451
17478
|
body(
|
|
17452
17479
|
c,
|
|
17453
17480
|
[
|
|
17454
|
-
[0.
|
|
17481
|
+
[0.435, 1.13, 0.85, 0.24, 2.6],
|
|
17455
17482
|
[0.55, 1.11, 0.87, 0.24, 2.6],
|
|
17456
17483
|
[0.6, 1.05, 0.91, 0.16, 2.4]
|
|
17457
17484
|
],
|
|
@@ -17618,7 +17645,7 @@ function installMotorcyclesCars(fx) {
|
|
|
17618
17645
|
body(
|
|
17619
17646
|
c,
|
|
17620
17647
|
[
|
|
17621
|
-
[0.
|
|
17648
|
+
[0.615, 1.32, 0.98, 0.3, 2.6],
|
|
17622
17649
|
[0.72, 1.28, 1, 0.3, 2.6],
|
|
17623
17650
|
[0.78, 1.2, 1.02, 0.22, 2.4]
|
|
17624
17651
|
],
|
|
@@ -18551,8 +18578,8 @@ function installMotorcyclesExtra(fx) {
|
|
|
18551
18578
|
return b;
|
|
18552
18579
|
}
|
|
18553
18580
|
function plateMoto(c, x, y, txt) {
|
|
18554
|
-
c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x +
|
|
18555
|
-
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", {
|
|
18556
18583
|
w: 300,
|
|
18557
18584
|
h: 220,
|
|
18558
18585
|
bg: "#f2f2ee",
|
|
@@ -18667,7 +18694,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
18667
18694
|
g.add(d);
|
|
18668
18695
|
for (let q = 0; q < 12; q++) {
|
|
18669
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 }));
|
|
18670
|
-
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));
|
|
18671
18698
|
sl.rotation.z = a2;
|
|
18672
18699
|
g.add(sl);
|
|
18673
18700
|
}
|
|
@@ -18765,7 +18792,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
18765
18792
|
body(
|
|
18766
18793
|
c,
|
|
18767
18794
|
[
|
|
18768
|
-
[0.
|
|
18795
|
+
[0.335, 0.36, 0.29, 0.28, 2.6],
|
|
18769
18796
|
[0.46, 0.38, 0.31, 0.46, 3],
|
|
18770
18797
|
[0.6, 0.41, 0.34, 0.5, 3],
|
|
18771
18798
|
[0.74, 0.43, 0.37, 0.46, 2.8],
|
|
@@ -19173,7 +19200,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19173
19200
|
body(
|
|
19174
19201
|
c,
|
|
19175
19202
|
[
|
|
19176
|
-
[0.
|
|
19203
|
+
[0.415, 1.05, 0.82, 0.26, 2.6],
|
|
19177
19204
|
[0.52, 1.03, 0.83, 0.28, 2.6],
|
|
19178
19205
|
[0.59, 0.99, 0.85, 0.22, 2.4],
|
|
19179
19206
|
[0.62, 0.95, 0.87, 0.1, 2.2]
|
|
@@ -19194,7 +19221,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19194
19221
|
});
|
|
19195
19222
|
c.roundBox(0.015, 0.1, 0.2, 0.02, SMOKEG, 0.55, 1.035, 0, { rot: [0, 0, 0.55] });
|
|
19196
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] });
|
|
19197
|
-
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] });
|
|
19198
19225
|
[1, -1].forEach(function(s) {
|
|
19199
19226
|
blinker(c, 0.5, 0.92, s * 0.16, true);
|
|
19200
19227
|
});
|
|
@@ -19611,7 +19638,7 @@ function installMotorcyclesExtra(fx) {
|
|
|
19611
19638
|
});
|
|
19612
19639
|
c.cylinder(0.12, 0.12, 0.07, CH, 0.2, 0.56, 0.17, "z");
|
|
19613
19640
|
c.cylinder(0.1, 0.1, 0.012, CM("#9ea3a7", { metalness: 0.55, roughness: 0.35 }), 0.2, 0.56, 0.21, "z");
|
|
19614
|
-
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 });
|
|
19615
19642
|
c.sphere(0.17, CH, -0.06, 0.32, -0.17, 1.35, 0.85, 0.28);
|
|
19616
19643
|
c.cylinder(0.07, 0.07, 0.02, CH, -0.02, 0.3, -0.215, "z");
|
|
19617
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] });
|
|
@@ -20006,12 +20033,12 @@ function installMotorcyclesExtra(fx) {
|
|
|
20006
20033
|
col
|
|
20007
20034
|
);
|
|
20008
20035
|
c.roundBox(0.1, 0.07, 0.18, 0.02, blk, 0.36, 1.04, 0, { rot: [0, 0, 0.4] });
|
|
20009
|
-
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] });
|
|
20010
20037
|
[1, -1].forEach(function(s) {
|
|
20011
20038
|
blinker(c, 0.48, 0.9, s * 0.17, true);
|
|
20012
20039
|
});
|
|
20013
20040
|
Z.fairing = grab(c, n0);
|
|
20014
|
-
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") });
|
|
20015
20042
|
n0 = c.vehicle.children.length;
|
|
20016
20043
|
handlebar(c, 0.36, 1.02, 0.36, { rise: 0.03, back: 0.06, mat: MT.chrome, stalk: 0.19 });
|
|
20017
20044
|
Z.handlebar = grab(c, n0);
|
|
@@ -20137,9 +20164,19 @@ function createPlanesKit(kit) {
|
|
|
20137
20164
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
20138
20165
|
});
|
|
20139
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
|
+
}
|
|
20140
20177
|
function fSkin(c, EA, st, keep, mat, o) {
|
|
20141
20178
|
o = o || {};
|
|
20142
|
-
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);
|
|
20143
20180
|
m.castShadow = false;
|
|
20144
20181
|
cutSub(m, [keep], o.sub || 0.06, o.pre);
|
|
20145
20182
|
c.deform.push(m);
|
|
@@ -20147,7 +20184,7 @@ function createPlanesKit(kit) {
|
|
|
20147
20184
|
}
|
|
20148
20185
|
function fGlass(c, EA, st, keep, label, type, o) {
|
|
20149
20186
|
o = o || {};
|
|
20150
|
-
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);
|
|
20151
20188
|
(o.parent || c.vehicle).add(m);
|
|
20152
20189
|
cutSub(m, [keep], o.sub || 0.07, o.pre);
|
|
20153
20190
|
return kit.asGlass(c, m, label, type || "tempered", o.pos ? { pos: o.pos } : {});
|
|
@@ -20309,7 +20346,7 @@ function installPlanesExtra(fx) {
|
|
|
20309
20346
|
return Math.min(boltW(x) - Math.abs(y - bolt(x)), x + 3.2, 2.93 - x, Math.abs(z) - 0.12);
|
|
20310
20347
|
}),
|
|
20311
20348
|
black,
|
|
20312
|
-
{ 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]) }
|
|
20313
20350
|
);
|
|
20314
20351
|
const doorR = EA.polySdf([
|
|
20315
20352
|
[1.38, -0.4],
|
|
@@ -20374,7 +20411,7 @@ function installPlanesExtra(fx) {
|
|
|
20374
20411
|
};
|
|
20375
20412
|
const g = EA.foilGeo(
|
|
20376
20413
|
[
|
|
20377
|
-
{ 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 },
|
|
20378
20415
|
{ p: [1.46, dh(2.6), s * 2.6], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20379
20416
|
{ p: [1.46, dh(4.9), s * 4.9], c: 1.6, t: 0.12, cam: 0.025 },
|
|
20380
20417
|
{ p: [1.43, dh(5.18), s * 5.18], c: 1.5, t: 0.11, cam: 0.02 },
|
|
@@ -20431,7 +20468,7 @@ function installPlanesExtra(fx) {
|
|
|
20431
20468
|
const hs = c.add(
|
|
20432
20469
|
EA.foilGeo(
|
|
20433
20470
|
[
|
|
20434
|
-
{ p: [-2.78, 0.1,
|
|
20471
|
+
{ p: [-2.78, 0.1, s * 2e-3], c: 0.78, t: 0.07 },
|
|
20435
20472
|
{ p: [-2.85, 0.1, s * 1.1], c: 0.74, t: 0.07 },
|
|
20436
20473
|
{ p: [-2.95, 0.1, s * 1.36], c: 0.6, t: 0.06 },
|
|
20437
20474
|
{ p: [-3.1, 0.1, s * 1.46], c: 0.32, t: 0.05 }
|
|
@@ -20682,7 +20719,7 @@ function installPlanesExtra(fx) {
|
|
|
20682
20719
|
EA.sideKeepP(ckP, 0.5, s),
|
|
20683
20720
|
s > 0 ? lbl("right_flight_deck_window") : lbl("left_flight_deck_window"),
|
|
20684
20721
|
"tempered",
|
|
20685
|
-
{ pos: new V3(5.4, 2.25, s * 0.8) }
|
|
20722
|
+
{ pos: new V3(5.4, 2.25, s * 0.8), k: 1.0085 }
|
|
20686
20723
|
);
|
|
20687
20724
|
fGlass(
|
|
20688
20725
|
c,
|
|
@@ -20736,7 +20773,7 @@ function installPlanesExtra(fx) {
|
|
|
20736
20773
|
const w = c.add(
|
|
20737
20774
|
EA.foilGeo(
|
|
20738
20775
|
[
|
|
20739
|
-
{ p: [1.52, dh(0),
|
|
20776
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20740
20777
|
{ p: [1.52, dh(0.86), s * 0.86], c: 2.38, t: 0.15, cam: 0.02 },
|
|
20741
20778
|
{ p: [1.42, dh(2.47), s * 2.47], c: 2.25, t: 0.145, cam: 0.02 },
|
|
20742
20779
|
{ p: [0.98, dh(7.42), s * 7.42], c: 1.4, t: 0.12, cam: 0.02 },
|
|
@@ -20871,7 +20908,7 @@ function installPlanesExtra(fx) {
|
|
|
20871
20908
|
const hs = c.add(
|
|
20872
20909
|
EA.foilGeo(
|
|
20873
20910
|
[
|
|
20874
|
-
{ p: [-5.95, 2.3,
|
|
20911
|
+
{ p: [-5.95, 2.3, s * 2e-3], c: 1.55, t: 0.1 },
|
|
20875
20912
|
{ p: [-6.62, 2.3 + 3.2 * 0.176, s * 3.2], c: 0.86, t: 0.09 }
|
|
20876
20913
|
],
|
|
20877
20914
|
{ up: "y", n: 10 }
|
|
@@ -21134,7 +21171,7 @@ function installPlanesExtra(fx) {
|
|
|
21134
21171
|
const w = c.add(
|
|
21135
21172
|
EA.foilGeo(
|
|
21136
21173
|
[
|
|
21137
|
-
{ 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 },
|
|
21138
21175
|
{ p: [1.56, dh(3.6), s * 3.6], c: 1.98, t: 0.15, cam: 0.025 },
|
|
21139
21176
|
{ p: [1.38, dh(7.7), s * 7.7], c: 1.3, t: 0.12, cam: 0.02 },
|
|
21140
21177
|
{ p: [1.32, dh(7.94), s * 7.94], c: 1.1, t: 0.06, cam: 0.01 }
|
|
@@ -21276,7 +21313,7 @@ function installPlanesExtra(fx) {
|
|
|
21276
21313
|
const hs = c.add(
|
|
21277
21314
|
EA.foilGeo(
|
|
21278
21315
|
[
|
|
21279
|
-
{ p: [-4.8, 3.08,
|
|
21316
|
+
{ p: [-4.8, 3.08, s * 2e-3], c: 1.55, t: 0.1 },
|
|
21280
21317
|
{ p: [-5.15, 3.08, s * 3.1], c: 1, t: 0.09 }
|
|
21281
21318
|
],
|
|
21282
21319
|
{ up: "y", n: 10 }
|
|
@@ -21479,7 +21516,7 @@ function installPlanesExtra(fx) {
|
|
|
21479
21516
|
EA.sideKeepP(ckP, 0.5, s),
|
|
21480
21517
|
s > 0 ? lbl("right_flight_deck_side_window") : lbl("left_flight_deck_side_window"),
|
|
21481
21518
|
"tempered",
|
|
21482
|
-
{ pos: new V3(3.6, 2, s * 0.78) }
|
|
21519
|
+
{ pos: new V3(3.6, 2, s * 0.78), k: 1.0085 }
|
|
21483
21520
|
);
|
|
21484
21521
|
fGlass(
|
|
21485
21522
|
c,
|
|
@@ -21507,7 +21544,7 @@ function installPlanesExtra(fx) {
|
|
|
21507
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);
|
|
21508
21545
|
}),
|
|
21509
21546
|
MT.dark,
|
|
21510
|
-
{ k: 1.
|
|
21547
|
+
{ k: 1.0065 }
|
|
21511
21548
|
);
|
|
21512
21549
|
void dF;
|
|
21513
21550
|
EA.fuseSkin(
|
|
@@ -21517,7 +21554,7 @@ function installPlanesExtra(fx) {
|
|
|
21517
21554
|
return Math.min(0.035 - Math.abs(x - 3.88 - (y - 1.75) * 0.5), y - 1.7, 2.42 - y);
|
|
21518
21555
|
}),
|
|
21519
21556
|
blk,
|
|
21520
|
-
{ k: 1.
|
|
21557
|
+
{ k: 1.0065 }
|
|
21521
21558
|
);
|
|
21522
21559
|
c.rod(new V3(5, 1.74, 0), new V3(4.05, 2.4, 0), 0.02, blk);
|
|
21523
21560
|
const fl = 0.8, fab = CM("#c9bda6", { roughness: 0.75 });
|
|
@@ -21556,7 +21593,7 @@ function installPlanesExtra(fx) {
|
|
|
21556
21593
|
const w = c.add(
|
|
21557
21594
|
EA.foilGeo(
|
|
21558
21595
|
[
|
|
21559
|
-
{ p: [1, dh(0),
|
|
21596
|
+
{ p: [1, dh(0), s * 2e-3], c: 2.45, t: 0.14, cam: 0.02 },
|
|
21560
21597
|
{ p: [0.95, dh(0.85), s * 0.85], c: 2.42, t: 0.14, cam: 0.02 },
|
|
21561
21598
|
{ p: [0.55, dh(2.4), s * 2.4], c: 1.9, t: 0.13, cam: 0.02 },
|
|
21562
21599
|
{ p: [-0.32, dh(5.75), s * 5.75], c: 1.08, t: 0.11, cam: 0.02 },
|
|
@@ -21638,7 +21675,7 @@ function installPlanesExtra(fx) {
|
|
|
21638
21675
|
const finB = c.add(
|
|
21639
21676
|
EA.foilGeo(
|
|
21640
21677
|
[
|
|
21641
|
-
{ p: [-3.89, 2.
|
|
21678
|
+
{ p: [-3.89, 2.253, 0], c: 2.22, t: 0.115 },
|
|
21642
21679
|
{ p: [-5.34, 4.185, 0], c: 1.17, t: 0.105 }
|
|
21643
21680
|
],
|
|
21644
21681
|
{ up: "z", n: 10 }
|
|
@@ -21661,7 +21698,7 @@ function installPlanesExtra(fx) {
|
|
|
21661
21698
|
const hs = c.add(
|
|
21662
21699
|
EA.foilGeo(
|
|
21663
21700
|
[
|
|
21664
|
-
{ p: [-5.3, 4.2,
|
|
21701
|
+
{ p: [-5.3, 4.2, s * 2e-3], c: 1.18, t: 0.1 },
|
|
21665
21702
|
{ p: [-5.9, 4.24, s * 2.55], c: 0.62, t: 0.09 }
|
|
21666
21703
|
],
|
|
21667
21704
|
{ up: "y", n: 10 }
|
|
@@ -21923,7 +21960,7 @@ function installPlanesExtra(fx) {
|
|
|
21923
21960
|
[1, -1].forEach(function(s) {
|
|
21924
21961
|
const g = EA.foilGeo(
|
|
21925
21962
|
[
|
|
21926
|
-
{ p: [1.52, dh(0),
|
|
21963
|
+
{ p: [1.52, dh(0), s * 2e-3], c: 2.35, t: 0.15, cam: 0.02 },
|
|
21927
21964
|
{ p: [1.5, dh(0.48), s * 0.48], c: 2.32, t: 0.15, cam: 0.02 },
|
|
21928
21965
|
{ p: [0.78, dh(5.4), s * 5.4], c: 1.2, t: 0.12, cam: 0.02 },
|
|
21929
21966
|
{ p: [0.74, dh(5.57), s * 5.57], c: 1.1, t: 0.07, cam: 0.01 }
|
|
@@ -22028,7 +22065,7 @@ function installPlanesExtra(fx) {
|
|
|
22028
22065
|
[1, -1].forEach(function(s) {
|
|
22029
22066
|
const g = EA.foilGeo(
|
|
22030
22067
|
[
|
|
22031
|
-
{ p: [-4.3, 1.72,
|
|
22068
|
+
{ p: [-4.3, 1.72, s * 2e-3], c: 1.3, t: 0.1 },
|
|
22032
22069
|
{ p: [-4.72, 1.76, s * 2.2], c: 0.75, t: 0.09 }
|
|
22033
22070
|
],
|
|
22034
22071
|
{ up: "y", n: 10 }
|
|
@@ -22291,7 +22328,7 @@ function installSuvPickupVan(fx) {
|
|
|
22291
22328
|
const fl = c.roundBox(L, 0.035, 2 * hw, 0.01, LINER, cx, o.floor, 0);
|
|
22292
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);
|
|
22293
22330
|
[1, -1].forEach(function(s) {
|
|
22294
|
-
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));
|
|
22295
22332
|
});
|
|
22296
22333
|
c.roundBox(0.025, h, 2 * hw, 0.01, LINER, o.x0 + 0.012, o.floor + h / 2, 0);
|
|
22297
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);
|
|
@@ -23187,10 +23224,10 @@ function installSuvPickupVan(fx) {
|
|
|
23187
23224
|
pre: function(c2, _m) {
|
|
23188
23225
|
const gx = fX(s, 0.82) - 0.012, gy = 0.82, gh = 0.46, gw = 1.08, tz = 0.8;
|
|
23189
23226
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: tz } });
|
|
23190
|
-
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 } });
|
|
23191
23228
|
[0.13, 0.045, -0.04, -0.125].forEach(function(dy) {
|
|
23192
23229
|
const k = (dy + gh / 2 - 0.05) / (gh - 0.1);
|
|
23193
|
-
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);
|
|
23194
23231
|
});
|
|
23195
23232
|
c2.roundBox(0.04, 0.04, 1.32, 0.015, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23196
23233
|
kit.emblem(c2, fX(s, 0.9) + 0.03, 0.9, 0, 0.06);
|
|
@@ -23526,9 +23563,9 @@ function installSuvPickupVan(fx) {
|
|
|
23526
23563
|
pre: function(c2, _m) {
|
|
23527
23564
|
const gx = fX(s, 0.8) - 0.012, gy = 0.8, gw = 1.14, gh = 0.52;
|
|
23528
23565
|
c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: 0.84 } });
|
|
23529
|
-
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 } });
|
|
23530
23567
|
[0.12, -0.02, -0.14].forEach(function(dy) {
|
|
23531
|
-
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);
|
|
23532
23569
|
});
|
|
23533
23570
|
c2.roundBox(0.04, 0.05, 1.3, 0.02, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
|
|
23534
23571
|
kit.emblem(c2, gx + 0.035, gy + 0.06, 0, 0.06);
|
|
@@ -23694,7 +23731,7 @@ function installSuvPickupVan(fx) {
|
|
|
23694
23731
|
wg.add(bolt);
|
|
23695
23732
|
}
|
|
23696
23733
|
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.
|
|
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);
|
|
23698
23735
|
hole.rotation.x = PI / 2;
|
|
23699
23736
|
hole.position.set(Math.cos(sa) * rr * 0.58, Math.sin(sa) * rr * 0.58, fz + zs * 2e-3);
|
|
23700
23737
|
wg.add(hole);
|
|
@@ -23723,7 +23760,7 @@ function installSuvPickupVan(fx) {
|
|
|
23723
23760
|
c.rod(new V3(0.6, 2.8, sd * 0.78), new V3(-0.25, 2.8, sd * 0.78), 0.035, red);
|
|
23724
23761
|
});
|
|
23725
23762
|
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.
|
|
23763
|
+
c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.032, red);
|
|
23727
23764
|
c.rod(new V3(-0.25, 2.3, -0.8), new V3(-0.25, 2.8, 0.78), 0.03, red);
|
|
23728
23765
|
const roofItems = [c.roundBox(0.16, 0.05, 1.3, 0.02, MT.trim, 0.42, m.top + 0.08, 0)];
|
|
23729
23766
|
[-0.48, -0.16, 0.16, 0.48].forEach(function(z) {
|
|
@@ -24304,8 +24341,8 @@ function installSuvPickupVan(fx) {
|
|
|
24304
24341
|
);
|
|
24305
24342
|
const zz = sd * (kit.halfAt(W, m.tumble, 1.75) + 0.012), zt = sd * (kit.halfAt(W, m.tumble, 2.22) + 0.012);
|
|
24306
24343
|
c2.text("RESGATE", 1.2, 0.3, sd > 0 ? -1.5 : -0.85, 2.22, zt, sd > 0 ? "+z" : "-z", { fg: red });
|
|
24307
|
-
[0, PI / 3, -PI / 3].forEach(function(a) {
|
|
24308
|
-
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] });
|
|
24309
24346
|
});
|
|
24310
24347
|
});
|
|
24311
24348
|
if (c2.hood) {
|
|
@@ -24657,9 +24694,31 @@ function createWaterAirKit(kit) {
|
|
|
24657
24694
|
if (o.col) colorize(g, o.col);
|
|
24658
24695
|
return g;
|
|
24659
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
|
+
}
|
|
24660
24719
|
function fuseGlass(c, st, keep, label, type, o) {
|
|
24661
24720
|
o = o || {};
|
|
24662
|
-
const k = o.k ||
|
|
24721
|
+
const k = o.k || nextPaneScale(c);
|
|
24663
24722
|
const st2 = st.map(function(s) {
|
|
24664
24723
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24665
24724
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
@@ -24672,12 +24731,12 @@ function createWaterAirKit(kit) {
|
|
|
24672
24731
|
}
|
|
24673
24732
|
function fuseSkin(c, st, keep, mat, o) {
|
|
24674
24733
|
o = o || {};
|
|
24675
|
-
const k = o.k ||
|
|
24734
|
+
const k = o.k || nextSkinScale(c);
|
|
24676
24735
|
const st2 = st.map(function(s) {
|
|
24677
24736
|
const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
|
|
24678
24737
|
return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
|
|
24679
24738
|
});
|
|
24680
|
-
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);
|
|
24681
24740
|
m.castShadow = false;
|
|
24682
24741
|
kit.cutMesh(m, [keep], 40);
|
|
24683
24742
|
c.deform.push(m);
|
|
@@ -24948,7 +25007,7 @@ function createWaterAirKit(kit) {
|
|
|
24948
25007
|
}
|
|
24949
25008
|
;
|
|
24950
25009
|
(o.screens || []).forEach(function(s) {
|
|
24951
|
-
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]);
|
|
24952
25011
|
sc.castShadow = false;
|
|
24953
25012
|
});
|
|
24954
25013
|
}
|
|
@@ -24988,7 +25047,7 @@ function createWaterAirKit(kit) {
|
|
|
24988
25047
|
);
|
|
24989
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);
|
|
24990
25049
|
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 -
|
|
25050
|
+
c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft - 6e-3, 0, P);
|
|
24992
25051
|
c.cylinder(0.055 * k, 0.05 * k, 0.32 * k, low, -0.2 * k, -shaft - 0.09 * k, 0, "x", P);
|
|
24993
25052
|
c.roundBox(0.16 * k, 0.12 * k, 0.025, 0.01, low, -0.18 * k, -shaft - 0.17 * k, 0, P);
|
|
24994
25053
|
const pr = propeller(c, -0.38 * k, -shaft - 0.09 * k, 0, {
|
|
@@ -25020,7 +25079,11 @@ function createWaterAirKit(kit) {
|
|
|
25020
25079
|
function skinOf(c, mesh, keep, mat, o) {
|
|
25021
25080
|
o = o || {};
|
|
25022
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);
|
|
25023
25085
|
for (let i = 0; i < p.count; i++) {
|
|
25086
|
+
p.setX(i, p.getX(i) * sx);
|
|
25024
25087
|
p.setZ(i, p.getZ(i) * sz);
|
|
25025
25088
|
p.setY(i, p.getY(i) + dy * Math.sign(p.getY(i)));
|
|
25026
25089
|
}
|
|
@@ -25134,6 +25197,8 @@ function createWaterAirKit(kit) {
|
|
|
25134
25197
|
foilGeo,
|
|
25135
25198
|
fuseGeo,
|
|
25136
25199
|
fuseGlass,
|
|
25200
|
+
nextPaneScale,
|
|
25201
|
+
nextSkinScale,
|
|
25137
25202
|
fuseSkin,
|
|
25138
25203
|
bandT,
|
|
25139
25204
|
cutT,
|
|
@@ -25282,7 +25347,7 @@ function installWaterAir(fx) {
|
|
|
25282
25347
|
const tank = c.roundBox(0.48, 0.24, 0.3, 0.06, CM("#a3241c", { roughness: 0.5 }), -2.05, 0.06, -0.38);
|
|
25283
25348
|
c.rod(new V3(-2, 0.18, -0.38), new V3(-2.3, 0.4, -0.1), 0.01, CM("#1b1b1b"));
|
|
25284
25349
|
c.roundBox(1.8, 0.03, 0.1, 0.01, MT.wood, -0.6, 0, 0.5, { rot: [0.3, 0, 0] });
|
|
25285
|
-
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] });
|
|
25286
25351
|
c.rod(new V3(-2.35, 0.42, 0.6), new V3(-2.35, 1.1, 0.6), 0.012, MT.chrome);
|
|
25287
25352
|
EA.navLight(c, -2.35, 1.13, 0.6, "white", trl("labels.stern_light_mast"), { r: 0.035 });
|
|
25288
25353
|
EA.navLight(c, 2.3, 0.53, 0.06, "green", trl("labels.starboard_bow_light_green"), { r: 0.03 });
|
|
@@ -25459,7 +25524,7 @@ function installWaterAir(fx) {
|
|
|
25459
25524
|
c.roundBox(2.3, 0.22, 0.5, 0.07, vinyl, -2.3, 0.45, s * 0.75);
|
|
25460
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));
|
|
25461
25526
|
});
|
|
25462
|
-
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);
|
|
25463
25528
|
c.roundBox(0.12, 0.42, 2.1, 0.05, vinyl, -3.52, 0.74, 0);
|
|
25464
25529
|
c.seatTops.push(
|
|
25465
25530
|
{ x: -2.3, y: 0.57, z: 0.75, w: 0.5, l: 2.2 },
|
|
@@ -25467,8 +25532,8 @@ function installWaterAir(fx) {
|
|
|
25467
25532
|
{ x: 2, y: 0.57, z: 0, w: 1.2, l: 0.9 }
|
|
25468
25533
|
);
|
|
25469
25534
|
const cy = 0.22;
|
|
25470
|
-
c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.
|
|
25471
|
-
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);
|
|
25472
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] });
|
|
25473
25538
|
[0.55, 0.72, 0.89].forEach(function(z, i) {
|
|
25474
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);
|
|
@@ -25479,8 +25544,8 @@ function installWaterAir(fx) {
|
|
|
25479
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);
|
|
25480
25545
|
c.rod(new V3(0.55, cy + 0.7, 0.98), new V3(0.42, cy + 0.88, 1), 0.015, MT.chrome);
|
|
25481
25546
|
c.sphere(0.035, MT.plastic, 0.42, cy + 0.9, 1);
|
|
25482
|
-
kit.seat(c, -0.1, cy, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
25483
|
-
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 });
|
|
25484
25549
|
[1, -1].forEach(function(s) {
|
|
25485
25550
|
const pts = [];
|
|
25486
25551
|
for (let i = 0; i <= 8; i++) {
|
|
@@ -25702,7 +25767,7 @@ function installWaterAir(fx) {
|
|
|
25702
25767
|
[1.6, -0.55],
|
|
25703
25768
|
[1.95, -1]
|
|
25704
25769
|
].forEach(function(q) {
|
|
25705
|
-
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]);
|
|
25706
25771
|
});
|
|
25707
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 });
|
|
25708
25773
|
const cutF = {
|
|
@@ -25791,11 +25856,11 @@ function installWaterAir(fx) {
|
|
|
25791
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 });
|
|
25792
25857
|
}
|
|
25793
25858
|
c.cylinder(0.05, 0.05, 0.14, MT.wood, 0.06, 0, 0, "x", { parent: whl });
|
|
25794
|
-
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 });
|
|
25795
25860
|
c.roundBox(1.8, 0.12, 0.65, 0.04, CM("#7c5a3b"), hx - 0.2, hy0 + 0.5, -0.72);
|
|
25796
25861
|
c.roundBox(1.7, 0.08, 0.55, 0.04, CM("#6b7c8f", { roughness: 1 }), hx - 0.2, hy0 + 0.6, -0.72);
|
|
25797
25862
|
c.roundBox(1.9, 0.02, 2.1, 0.01, inner, hx, hy0 + hh - 0.06, 0).castShadow = false;
|
|
25798
|
-
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);
|
|
25799
25864
|
c.cylinder(0.13, 0.1, 0.1, MT.trim, hx - 0.75, hy0 + hh + 1.22, 0.65);
|
|
25800
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);
|
|
25801
25866
|
EA.navLight(c, hx + 0.4, hy0 + hh + 1.65, 0, "white", trl("labels.masthead_light"), { r: 0.05 });
|
|
@@ -25896,7 +25961,7 @@ function installWaterAir(fx) {
|
|
|
25896
25961
|
const EA = shared.EA, white = "#ecebe6";
|
|
25897
25962
|
const paintW = c.paint(white);
|
|
25898
25963
|
const ST = [
|
|
25899
|
-
[2.
|
|
25964
|
+
[2.297, 0.98, 1.46, 0.7, 2.4],
|
|
25900
25965
|
[2.15, 0.88, 1.55, 0.92, 2.6],
|
|
25901
25966
|
[1.85, 0.8, 1.61, 1.02, 2.8],
|
|
25902
25967
|
[1.45, 0.72, 1.65, 1.08, 3],
|
|
@@ -26025,7 +26090,7 @@ function installWaterAir(fx) {
|
|
|
26025
26090
|
};
|
|
26026
26091
|
const g = EA.foilGeo(
|
|
26027
26092
|
[
|
|
26028
|
-
{ p: [0.66, dh(0),
|
|
26093
|
+
{ p: [0.66, dh(0), s * 2e-3], c: 1.63, t: 0.12, cam: 0.02 },
|
|
26029
26094
|
{ p: [0.66, dh(2.6), s * 2.6], c: 1.63, t: 0.12, cam: 0.02 },
|
|
26030
26095
|
{ p: [0.62, dh(5.2), s * 5.2], c: 1.14, t: 0.11, cam: 0.02 },
|
|
26031
26096
|
{ p: [0.58, dh(5.5) + 0.02, s * 5.5], c: 0.98, t: 0.06, cam: 0.01 }
|
|
@@ -26064,7 +26129,7 @@ function installWaterAir(fx) {
|
|
|
26064
26129
|
const hs = c.add(
|
|
26065
26130
|
EA.foilGeo(
|
|
26066
26131
|
[
|
|
26067
|
-
{ p: [-4.6, 1.42,
|
|
26132
|
+
{ p: [-4.6, 1.42, s * 2e-3], c: 1.2, t: 0.09 },
|
|
26068
26133
|
{ p: [-4.95, 1.42, s * 1.72], c: 0.86, t: 0.08 }
|
|
26069
26134
|
],
|
|
26070
26135
|
{ up: "y", n: 10 }
|
|
@@ -26315,7 +26380,7 @@ function installWaterAir(fx) {
|
|
|
26315
26380
|
const w = c.add(
|
|
26316
26381
|
EA.foilGeo(
|
|
26317
26382
|
[
|
|
26318
|
-
{ p: [1.18, dh(0),
|
|
26383
|
+
{ p: [1.18, dh(0), s * 2e-3], c: 1.71, t: 0.15, cam: 0.02 },
|
|
26319
26384
|
{ p: [1.18, dh(5.6), s * 5.6], c: 1.71, t: 0.14, cam: 0.02 },
|
|
26320
26385
|
{ p: [1.12, dh(5.84) + 0.02, s * 5.84], c: 1.55, t: 0.07, cam: 0.01 }
|
|
26321
26386
|
],
|
|
@@ -26349,7 +26414,7 @@ function installWaterAir(fx) {
|
|
|
26349
26414
|
const hs = c.add(
|
|
26350
26415
|
EA.foilGeo(
|
|
26351
26416
|
[
|
|
26352
|
-
{ p: [-2.95, 0.36,
|
|
26417
|
+
{ p: [-2.95, 0.36, s * 2e-3], c: 0.95, t: 0.09 },
|
|
26353
26418
|
{ p: [-3.05, 0.36, s * 1.8], c: 0.8, t: 0.08 }
|
|
26354
26419
|
],
|
|
26355
26420
|
{ up: "y", n: 10 }
|
|
@@ -26381,8 +26446,8 @@ function installWaterAir(fx) {
|
|
|
26381
26446
|
const finB = c.add(
|
|
26382
26447
|
EA.foilGeo(
|
|
26383
26448
|
[
|
|
26384
|
-
{ p: [-2.64, 0.
|
|
26385
|
-
{ 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 }
|
|
26386
26451
|
],
|
|
26387
26452
|
{ up: "z", n: 10 }
|
|
26388
26453
|
),
|
|
@@ -26652,10 +26717,11 @@ function installWaterAir(fx) {
|
|
|
26652
26717
|
EA.sideKeepP(fdP, 0.35, s),
|
|
26653
26718
|
s > 0 ? lbl("front_right_door_window") : lbl("front_left_door_window"),
|
|
26654
26719
|
"tempered",
|
|
26655
|
-
{ pos: new V3(0.4, 1.5, s * 0.64) }
|
|
26720
|
+
{ pos: new V3(0.4, 1.5, s * 0.64), k: 0.988 }
|
|
26656
26721
|
);
|
|
26657
26722
|
EA.fuseGlass(c, ST, EA.sideKeepP(rdP, 0.35, s), s > 0 ? lbl("rear_right_door_window") : lbl("rear_left_door_window"), "tempered", {
|
|
26658
|
-
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
|
|
26659
26725
|
});
|
|
26660
26726
|
const df = EA.polySdf([
|
|
26661
26727
|
[0.78, 0.72],
|
|
@@ -26751,7 +26817,7 @@ function installWaterAir(fx) {
|
|
|
26751
26817
|
const hs = c.add(
|
|
26752
26818
|
EA.foilGeo(
|
|
26753
26819
|
[
|
|
26754
|
-
{ p: [-5.25, 1.76,
|
|
26820
|
+
{ p: [-5.25, 1.76, s * 2e-3], c: 0.45, t: 0.1 },
|
|
26755
26821
|
{ p: [-5.32, 1.76, s * 0.62], c: 0.34, t: 0.09 }
|
|
26756
26822
|
],
|
|
26757
26823
|
{ up: "y", n: 8 }
|
|
@@ -27079,7 +27145,7 @@ function installWaterAir(fx) {
|
|
|
27079
27145
|
const hs = c.add(
|
|
27080
27146
|
EA.foilGeo(
|
|
27081
27147
|
[
|
|
27082
|
-
{ p: [-5.3, 1.98,
|
|
27148
|
+
{ p: [-5.3, 1.98, s * 2e-3], c: 0.6, t: 0.11 },
|
|
27083
27149
|
{ p: [-5.38, 1.98, s * 1], c: 0.52, t: 0.1 }
|
|
27084
27150
|
],
|
|
27085
27151
|
{ up: "y", n: 8 }
|
|
@@ -27280,7 +27346,10 @@ function createContext(kit, options) {
|
|
|
27280
27346
|
hasSunroof: (key) => !!options.sunroofs?.includes(key),
|
|
27281
27347
|
register(spec, build) {
|
|
27282
27348
|
if (!groups.has(spec.group) || only && !only.has(spec.key) || skip.has(spec.key)) return;
|
|
27283
|
-
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
|
+
});
|
|
27284
27353
|
}
|
|
27285
27354
|
};
|
|
27286
27355
|
}
|