@adatechnology/game-vehicles-fleet 6.0.1 → 8.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.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.38, 0.06, 0.02, white, -2.45, 0.67, s * 0.6);
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.38, 1.2, 0.03, white, -3.75, 0.67, 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.14, 0.15);
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.282);
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);
@@ -4824,8 +4852,9 @@ function installBoatsExtra(fx) {
4824
4852
  c.rod(new V3(hx + 0.88, ih + 0.97, z - 0.05), new V3(hx + 0.78, ih + 1.12, z - 0.05), 0.012, MT.chrome);
4825
4853
  c.sphere(0.025, MT.plastic, hx + 0.78, ih + 1.12, z - 0.05);
4826
4854
  });
4827
- kit.seat(c, hx + 0.05, ih, 0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }) });
4828
- kit.seat(c, hx + 0.05, ih, -0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }) });
4855
+ kit.seat(c, hx + 0.05, ih, 0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }), role: "front_passenger" });
4856
+ kit.seat(c, hx + 0.05, ih, -0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }), id: "driver", role: "driver" });
4857
+ c.addDoor({ id: "cabin_door", widthMetres: 0.72, heightMetres: 1.65 });
4829
4858
  c.roundBox(0.45, 0.42, 1.9, 0.04, CM("#25282b", { roughness: 0.8 }), hx - 1.35, ih + 0.21, 0.1);
4830
4859
  c.seatTops.push({ x: hx - 1.35, y: ih + 0.44, z: 0.1, w: 1.8, l: 0.4 });
4831
4860
  c.roundBox(3, 0.02, 2, 0.01, CM("#3a3f44", { roughness: 0.9 }), hx, hy0 + hh - 0.06, 0).castShadow = false;
@@ -5770,8 +5799,9 @@ function installCarsExtra(fx) {
5770
5799
  m.tumble = T;
5771
5800
  m.frontQuad = qf;
5772
5801
  if (intr && s.shelf) {
5773
- const sx0 = gh.rb + 0.03, sx1 = gh.rb + s.shelf;
5774
- c.roundBox(sx1 - sx0, 0.014, gh.Wg - 0.24, 6e-3, CM("#1b1c1e", { roughness: 0.92 }), (sx0 + sx1) / 2, gh.belt - 0.02, 0).castShadow = false;
5802
+ const sx0 = gh.rb + 0.03, sx1 = Math.min(gh.rb + s.shelf, gh.rb + 0.26);
5803
+ if (sx1 > sx0 + 0.04)
5804
+ c.roundBox(sx1 - sx0, 0.014, gh.Wg - 0.24, 6e-3, CM("#1b1c1e", { roughness: 0.92 }), (sx0 + sx1) / 2, gh.belt - 0.02, 0).castShadow = false;
5775
5805
  }
5776
5806
  if (intr)
5777
5807
  kit.interior(
@@ -5782,11 +5812,17 @@ function installCarsExtra(fx) {
5782
5812
  ft: gh.ft,
5783
5813
  rb: gh.rb,
5784
5814
  rt: gh.rt,
5785
- roof: Math.min(gh.roof, roofR),
5815
+ roof: gh.roof + 0.02,
5786
5816
  belt: gh.belt,
5787
- floor: s.bottomY + 0.1,
5817
+ floor: s.bottomY + 0.02,
5818
+ seatH: 0.12,
5819
+ dashD: 0.32,
5820
+ dashH: 0.24,
5821
+ visorUp: true,
5788
5822
  zIn: gh.Wg / 2 - 0.09,
5789
5823
  zRoof: halfAt(gh.Wg, T, gh.roof) - 0.12,
5824
+ xFront: s.shelf ? gh.fb - 0.86 : void 0,
5825
+ rowPitch: s.shelf ? 0.72 : void 0,
5790
5826
  xRear: gh.rb + 0.06
5791
5827
  },
5792
5828
  intr
@@ -6334,7 +6370,7 @@ function installCarsExtra(fx) {
6334
6370
  ]);
6335
6371
  c2.roundBox(0.03, 0.05, 0.16, 0.012, MT.trim, I.S.endX(-1, 0.84) - 0.01, 0.84, 0);
6336
6372
  },
6337
- interior: { rows: 2, col: "#4a4c52", trim: "#26272a" },
6373
+ interior: { rows: 2, col: "#4a4c52", trim: "#26272a", rowPitch: 0.72 },
6338
6374
  hood: { motor: "gasoline" },
6339
6375
  wheels: [
6340
6376
  [1.17, 0.2875, 0.175, wheelOpts("hubcap")],
@@ -7829,12 +7865,12 @@ function installCarsExtra(fx) {
7829
7865
  [0.62, 0.48, -0.48, -0.62].forEach(function(z) {
7830
7866
  const s = dg.at(dg.uz(z), 0.25);
7831
7867
  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.102, MT.dark, s.p.x - 0.02, 0.25, z, "x");
7868
+ c2.cylinder(0.036, 0.036, 0.106, MT.dark, s.p.x - 0.02, 0.25, z, "x");
7833
7869
  });
7834
7870
  const lip = K.grid(-1, 0, { z1: 0.7, y0: 0.88, y1: 0.97, du: 0.03, dv: 0.02 });
7835
7871
  K.skin(lip, GLOSS, { u0: 0.05, u1: 0.95, yb: 0.925, yt: 0.955, off: 0.016, thick: 0.02, nv: 2 });
7836
7872
  },
7837
- interior: { rows: 2, col: "#1c1d20", trim: "#121316" },
7873
+ interior: { rows: 2, col: "#1c1d20", trim: "#121316", xFront: -0.46, rowPitch: 0.62 },
7838
7874
  hood: { motor: "v8_na" },
7839
7875
  wheels: [
7840
7876
  [1.35, 0.3435, 0.255, { rim: ALLOYD, spokeMat: ALLOY, spokes: 10, rimR: 0.72 }],
@@ -8097,16 +8133,20 @@ function installHeavy(fx) {
8097
8133
  x: xd - 0.07,
8098
8134
  y: belt + 0.02,
8099
8135
  w: zi * 2,
8100
- d: 0.48,
8101
- h: Math.min(0.55, belt - fl - 0.08),
8136
+ d: 0.34,
8137
+ h: Math.min(0.28, belt - fl - 0.16),
8102
8138
  drv: -zi * 0.52,
8103
8139
  mat: trim,
8104
8140
  top: fab
8105
8141
  });
8106
8142
  kit.steeringWheel(c, xd - 0.66, belt + 0.06, -zi * 0.52, { r: 0.22, tilt: 1.12, col: 0.5, mat: trim });
8107
8143
  const sx = Math.max(f - len + 0.62, xd - 1.08);
8108
- kit.seat(c, sx, fl, -zi * 0.52, { w: 0.5, mat: fab, h: 0.44, back: 0.64, lean: 0.18 });
8109
- kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.44, back: 0.6, lean: 0.18 });
8144
+ kit.seat(c, sx, fl, -zi * 0.52, { w: 0.52, mat: fab, h: 0.24, back: 0.64, lean: 0.18, id: "driver", role: "driver" });
8145
+ kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.24, back: 0.6, lean: 0.18, role: "front_passenger" });
8146
+ const doorW = Math.max(0.75, f - 0.1 - (xr - 0.06));
8147
+ const doorH = Math.max(1.05, ry - fl - 0.1);
8148
+ c.addDoor({ id: "door_front_left", widthMetres: Math.round(doorW * 1e3) / 1e3, heightMetres: Math.round(doorH * 1e3) / 1e3 });
8149
+ c.addDoor({ id: "door_front_right", widthMetres: Math.round(doorW * 1e3) / 1e3, heightMetres: Math.round(doorH * 1e3) / 1e3 });
8110
8150
  c.rod(new V3(sx + 0.55, fl, -0.05), new V3(sx + 0.5, fl + 0.48, -0.08), 0.014, MT.chrome);
8111
8151
  c.sphere(0.035, MT.plastic, sx + 0.5, fl + 0.5, -0.08);
8112
8152
  c.roundBox(0.03, ry - fl - 0.12, zi * 2, 0.01, trim, f - len + 0.07, (ry + fl) / 2, 0);
@@ -8244,7 +8284,7 @@ function installHeavy(fx) {
8244
8284
  side: s,
8245
8285
  noPart: true
8246
8286
  });
8247
- c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.125, by - bh * 0.3, s * 0.35);
8287
+ c.roundBox(0.03, 0.12, 0.42, 0.02, MT.dark, bx + 0.119, by - bh * 0.3, s * 0.35);
8248
8288
  });
8249
8289
  }
8250
8290
  c.roundBox(0.06, 0.06, 0.12, 0.02, MT.steel, bx + 0.13, by - bh * 0.35, 0);
@@ -8347,7 +8387,7 @@ function installHeavy(fx) {
8347
8387
  -(W - 0.2) / 2 + (k + 0.5) * (W - 0.2) / 8
8348
8388
  );
8349
8389
  [1, -1].forEach(function(s) {
8350
- c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.12, ry - 0.2, s * 0.43);
8390
+ c.roundBox(0.06, 0.32, 0.06, 0.01, MT.trim, rear + 0.118, ry - 0.2, s * 0.43);
8351
8391
  });
8352
8392
  m.rearBumper = bar;
8353
8393
  c.part("bumper", trl("labels.rear_bumper"), bar, new V3(rear, 0.52, 0), 1);
@@ -8883,7 +8923,8 @@ function installHeavy(fx) {
8883
8923
  kit.busRows(c, { x0: dx0 - 0.15, x1: -4.15, pitch: 0.64, floor: fl, zIn: zi, aisle: 0.46, col: "#355a7a", ceil: 2.95, seatH: 0.4 });
8884
8924
  kit.dashboard(c, { x: f - 0.05, y: 1.42, w: zi * 2, d: 0.42, h: 0.4, drv: -0.7, mat: CM("#202124"), top: CM("#2a2b2e") });
8885
8925
  kit.steeringWheel(c, f - 0.6, 1.48, -0.7, { r: 0.25, tilt: 1.1, col: 0.45 });
8886
- kit.seat(c, f - 1.05, fl, -0.7, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.45 });
8926
+ kit.seat(c, f - 1.05, fl, -0.7, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.45, id: "driver", role: "driver" });
8927
+ c.addDoor({ id: "door_front_right", widthMetres: 0.85, heightMetres: 1.95 });
8887
8928
  c.roundBox(0.9, 0.38, 0.5, 0.08, CM("#2a2b2d"), f - 0.6, fl + 0.19, -0.05);
8888
8929
  c.rod(new V3(dx0 - 0.05, fl, zi - 0.35), new V3(dx0 - 0.05, 2.95, zi - 0.35), 0.02, MT.chrome);
8889
8930
  c.roundBox(L - 0.5, 0.02, zi * 2, 0.01, MT.headliner, 0, 2.98, 0).castShadow = false;
@@ -9217,9 +9258,11 @@ function installHeavy(fx) {
9217
9258
  [1, 1.5, -2.2].forEach(function(x) {
9218
9259
  c.rod(new V3(x, fl, 0), new V3(x, 2.95, 0), 0.018, pole);
9219
9260
  });
9220
- kit.dashboard(c, { x: fx2(1.3) - 0.08, y: 1.3, w: 1.2, d: 0.5, h: 0.5, drv: -0.68, mat: CM("#1d1e20"), top: CM("#2a2b2e") });
9261
+ kit.dashboard(c, { x: fx2(1.3) - 0.08, y: 1.3, w: 1.2, d: 0.34, h: 0.28, drv: -0.68, mat: CM("#1d1e20"), top: CM("#2a2b2e") });
9221
9262
  kit.steeringWheel(c, f - 0.62, 1.38, -0.68, { r: 0.25, tilt: 1.15, col: 0.4 });
9222
- kit.seat(c, f - 1.15, 0.6, -0.68, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.46 });
9263
+ kit.seat(c, f - 1.15, 0.6, -0.68, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.46, id: "driver", role: "driver" });
9264
+ c.addDoor({ id: "door_front_right", widthMetres: 1, heightMetres: 2.05 });
9265
+ c.addDoor({ id: "door_rear_right", widthMetres: 1, heightMetres: 2.05 });
9223
9266
  c.roundBox(0.4, 0.95, 0.32, 0.05, CM("#9aa0a4", { metalness: 0.5 }), 3.95, fl + 0.48, -0.55);
9224
9267
  [0, 2.09, 4.19].forEach(function(a) {
9225
9268
  c.rod(
@@ -9409,7 +9452,7 @@ function installHeavy(fx) {
9409
9452
  });
9410
9453
  const vg = c.roundBox(0.32, 0.2, 0.03, 0.03, MT.armorGlass, 1.3, 2.45, zs);
9411
9454
  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 * 4e-3);
9455
+ c.roundBox(0.4, 0.28, 0.02, 0.03, plate, 1.3, 2.45, zs - s * 8e-3);
9413
9456
  for (let x = rear + 0.2; x < bx0; x += 0.3) {
9414
9457
  c.sphere(0.018, MT.steel, x, 1.2, zs);
9415
9458
  c.sphere(0.018, MT.steel, x, 2.98, zs);
@@ -9518,7 +9561,7 @@ function installHeavy(fx) {
9518
9561
  const hx0 = 0.02, hx1 = 1.84 + FX, hy = 1.48;
9519
9562
  [1, -1].forEach(function(s) {
9520
9563
  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);
9564
+ 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
9565
  c.roundBox(1, 0.03, 0.02, 0.01, CM("#e9e6dd"), 0.55, 1.36, s * 0.38);
9523
9566
  c.text("275", 0.3, 0.14, 0.32, 1.2, s * 0.384, s > 0 ? "+z" : "-z", { fg: "#f2efe6" });
9524
9567
  });
@@ -9557,7 +9600,9 @@ function installHeavy(fx) {
9557
9600
  c.cylinder(0.05, 0.05, 0.012, MT.gauge, -0.165, 1.6, 0.1, "x");
9558
9601
  kit.steeringWheel(c, -0.38, 1.66, 0, { r: 0.2, tilt: 1, col: 0.42, mat: MT.trim });
9559
9602
  c.roundBox(1, 0.05, 0.94, 0.02, CM("#5c5f62", { metalness: 0.5 }), -0.7, 1.12, 0);
9560
- kit.seat(c, -1, 1.35, 0, { w: 0.5, h: 0.16, back: 0.44, lean: 0.12, mat: MT.seat, headrest: false });
9603
+ kit.seat(c, -1.08, 1.35, 0, { w: 0.54, h: 0.16, back: 0.44, lean: 0.12, mat: MT.seat, headrest: false, id: "driver", role: "driver" });
9604
+ c.addDoor({ id: "cab_entry_left", widthMetres: 0.85, heightMetres: 1.15 });
9605
+ c.addDoor({ id: "cab_entry_right", widthMetres: 0.85, heightMetres: 1.15 });
9561
9606
  c.roundBox(0.3, 0.2, 0.3, 0.04, dgray, -1, 1.28, 0);
9562
9607
  [
9563
9608
  [0.25, 1],
@@ -9909,7 +9954,11 @@ function installHelicoptersExtra(fx) {
9909
9954
  const fl = 0.6, fab = CM("#2f3136", { roughness: 0.9 });
9910
9955
  GH.liner(c, ST, -0.3, 1, fl, MT.carpet, { h: 0.03, maxW: 0.98 });
9911
9956
  [0.26, -0.26].forEach(function(z) {
9912
- kit.seat(c, 0.05, fl, z, { w: 0.44, h: 0.34, back: 0.6, lean: 0.12, mat: fab });
9957
+ kit.seat(c, 0.05, fl, z, { w: 0.48, h: 0.12, back: 0.6, lean: 0.12, mat: fab, role: "pilot" });
9958
+ if (z < 0) {
9959
+ c.addDoor({ id: "door_front_left", widthMetres: 0.68, heightMetres: 0.95 });
9960
+ c.addDoor({ id: "door_front_right", widthMetres: 0.68, heightMetres: 0.95 });
9961
+ }
9913
9962
  EA.pedals(c, 1.15, fl, z);
9914
9963
  });
9915
9964
  c.roundBox(0.35, 0.5, 0.24, 0.05, CM("#232427"), 0.95, fl + 0.28, 0, { rot: [0, 0, 0.35] });
@@ -9994,7 +10043,7 @@ function installHelicoptersExtra(fx) {
9994
10043
  const hs = c.add(
9995
10044
  EA.foilGeo(
9996
10045
  [
9997
- { p: [-3.9, 1.44, 0], c: 0.3, t: 0.1 },
10046
+ { p: [-3.9, 1.44, s * 2e-3], c: 0.3, t: 0.1 },
9998
10047
  { p: [-3.95, 1.44, s * 0.42], c: 0.22, t: 0.09 }
9999
10048
  ],
10000
10049
  { up: "y", n: 8 }
@@ -10233,7 +10282,7 @@ function installHelicoptersExtra(fx) {
10233
10282
  },
10234
10283
  lbl("chin_windows"),
10235
10284
  "tempered",
10236
- { pos: new V3(2.3, 0.88, 0) }
10285
+ { pos: new V3(2.3, 0.88, 0), k: 0.988 }
10237
10286
  );
10238
10287
  [1, -1].forEach(function(s) {
10239
10288
  EA.fuseGlass(
@@ -10277,7 +10326,11 @@ function installHelicoptersExtra(fx) {
10277
10326
  const fl = 0.68, fab = CM("#4b4339", { roughness: 0.9 });
10278
10327
  GH.liner(c, ST, -0.6, 1.8, fl, MT.carpet, { h: 0.03, maxW: 1.15 });
10279
10328
  [0.3, -0.3].forEach(function(z) {
10280
- kit.seat(c, 1.05, fl, z, { w: 0.48, h: 0.36, back: 0.64, lean: 0.12, mat: fab });
10329
+ kit.seat(c, 1.05, fl, z, { w: 0.48, h: 0.28, back: 0.64, lean: 0.12, mat: fab, role: "pilot" });
10330
+ if (z < 0) {
10331
+ c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 1.05 });
10332
+ c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 1.05 });
10333
+ }
10281
10334
  EA.cyclic(c, 1.4, fl, z);
10282
10335
  EA.pedals(c, 2.1, fl, z);
10283
10336
  });
@@ -10333,7 +10386,7 @@ function installHelicoptersExtra(fx) {
10333
10386
  tipCol: "#e6e4dd",
10334
10387
  phase: 0.25
10335
10388
  });
10336
- c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.8, 0);
10389
+ c.roundBox(0.5, 0.12, 0.16, 0.05, MT.steel, 0, 2.797, 0);
10337
10390
  const bm = boom(
10338
10391
  c,
10339
10392
  EA,
@@ -10367,7 +10420,7 @@ function installHelicoptersExtra(fx) {
10367
10420
  const hs = c.add(
10368
10421
  EA.foilGeo(
10369
10422
  [
10370
- { p: [-4.05, 1.68, 0], c: 0.42, t: 0.12, cam: -0.04 },
10423
+ { p: [-4.05, 1.68, s * 2e-3], c: 0.42, t: 0.12, cam: -0.04 },
10371
10424
  { p: [-4.1, 1.68, s * 0.99], c: 0.38, t: 0.11, cam: -0.04 }
10372
10425
  ],
10373
10426
  { up: "y", n: 8 }
@@ -10616,7 +10669,7 @@ function installHelicoptersExtra(fx) {
10616
10669
  },
10617
10670
  lbl("chin_windows"),
10618
10671
  "tempered",
10619
- { pos: new V3(3.05, 0.95, 0) }
10672
+ { pos: new V3(3.05, 0.95, 0), k: 0.988 }
10620
10673
  );
10621
10674
  [1, -1].forEach(function(s) {
10622
10675
  EA.fuseGlass(c, ST, EA.sideKeepP(fdP, 0.6, s), s > 0 ? lbl("co_pilot_door_window") : lbl("pilot_door_window"), "tempered", {
@@ -10681,7 +10734,11 @@ function installHelicoptersExtra(fx) {
10681
10734
  const fl = 0.7, fab = CM("#2c3540", { roughness: 0.9 });
10682
10735
  GH.liner(c, ST, -2.9, 2.5, fl, MT.carpet, { h: 0.03, maxW: 1.5 });
10683
10736
  [0.42, -0.42].forEach(function(z) {
10684
- kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.4, back: 0.7, lean: 0.12, mat: fab });
10737
+ kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.4, back: 0.7, lean: 0.12, mat: fab, role: "pilot" });
10738
+ if (z < 0) {
10739
+ c.addDoor({ id: "door_front_left", widthMetres: 0.78, heightMetres: 1.15 });
10740
+ c.addDoor({ id: "door_front_right", widthMetres: 0.78, heightMetres: 1.15 });
10741
+ }
10685
10742
  EA.cyclic(c, 1.95, fl, z);
10686
10743
  EA.pedals(c, 2.75, fl, z);
10687
10744
  });
@@ -10781,7 +10838,7 @@ function installHelicoptersExtra(fx) {
10781
10838
  const hs = c.add(
10782
10839
  EA.foilGeo(
10783
10840
  [
10784
- { p: [-5.75, 2.1, 0], c: 0.62, t: 0.12, cam: -0.03 },
10841
+ { p: [-5.75, 2.1, s * 2e-3], c: 0.62, t: 0.12, cam: -0.03 },
10785
10842
  { p: [-5.85, 2.1, s * 1.05], c: 0.52, t: 0.11, cam: -0.03 }
10786
10843
  ],
10787
10844
  { up: "y", n: 8 }
@@ -11114,10 +11171,12 @@ function installHelicoptersExtra(fx) {
11114
11171
  kit.cutMesh(fus, [EA.sideCutP(tdP, 0.5)], 40, { sub: 0.12 });
11115
11172
  EA.colorize(fus.geometry, col);
11116
11173
  const fab = CM("#2e3328", { roughness: 0.85 });
11117
- kit.seat(c, 4.75, 1.55, 0, { w: 0.5, h: 0.32, back: 0.7, lean: 0.15, mat: fab });
11174
+ kit.seat(c, 4.75, 1.55, 0, { w: 0.5, h: 0.1, back: 0.7, lean: 0.15, mat: fab, role: "pilot" });
11118
11175
  c.roundBox(0.2, 0.3, 0.6, 0.04, CM("#232427"), 5.35, 1.98, 0, { rot: [0, 0, 0.3] });
11119
11176
  c.roundBox(0.2, 0.2, 0.15, 0.03, MT.plastic, 5.25, 2.15, 0);
11120
- kit.seat(c, 3.2, 2.12, 0, { w: 0.5, h: 0.32, back: 0.72, lean: 0.15, mat: fab });
11177
+ kit.seat(c, 3.2, 2.12, 0, { w: 0.5, h: 0.1, back: 0.72, lean: 0.15, mat: fab, role: "pilot" });
11178
+ c.addDoor({ id: "canopy_left", widthMetres: 0.72, heightMetres: 0.95 });
11179
+ c.addDoor({ id: "door_cargo_left", widthMetres: 0.9, heightMetres: 1.15 });
11121
11180
  EA.instPanel(c, 3.85, 2.62, 0.8, { gauges: 6, z0: -0.25, tilt: 0.3, screens: [[0.05, 0.2, 0.14, 0.18]] });
11122
11181
  EA.cyclic(c, 3.55, 2.12, 0);
11123
11182
  EA.collective(c, 3.3, 2.12, -0.38);
@@ -11194,7 +11253,7 @@ function installHelicoptersExtra(fx) {
11194
11253
  EA.colorize(
11195
11254
  EA.foilGeo(
11196
11255
  [
11197
- { p: [-8.3, 2.75, 0], c: 1, t: 0.1 },
11256
+ { p: [-8.3, 2.75, s * 2e-3], c: 1, t: 0.1 },
11198
11257
  { p: [-8.5, 2.75, s * 1.85], c: 0.7, t: 0.09 }
11199
11258
  ],
11200
11259
  { up: "y", n: 8 }
@@ -11929,6 +11988,10 @@ function installMilitary(fx) {
11929
11988
  mirrorCol: "#22231d",
11930
11989
  wheels: []
11931
11990
  };
11991
+ s.interior = Object.assign(
11992
+ { floor: s.bottomY + 0.02, roof: s.gh.roof + 0.02, seatH: 0.14, dashD: 0.32, dashH: 0.24, visorUp: true },
11993
+ s.interior || {}
11994
+ );
11932
11995
  kit.car(c, s);
11933
11996
  [xf, xr].forEach(function(x) {
11934
11997
  ;
@@ -12193,8 +12256,8 @@ function installMilitary(fx) {
12193
12256
  x: xd - 0.07,
12194
12257
  y: belt + 0.02,
12195
12258
  w: zi * 2,
12196
- d: 0.48,
12197
- h: Math.min(0.55, belt - fl - 0.08),
12259
+ d: 0.34,
12260
+ h: Math.min(0.28, belt - fl - 0.16),
12198
12261
  drv: -zi * 0.52,
12199
12262
  mat: trim,
12200
12263
  top: fab,
@@ -12202,8 +12265,12 @@ function installMilitary(fx) {
12202
12265
  });
12203
12266
  kit.steeringWheel(c, xd - 0.66, belt + 0.06, -zi * 0.52, { r: 0.23, tilt: 1.12, col: 0.5, mat: trim });
12204
12267
  const sx = Math.max(f - len + 0.62, xd - 1.08);
12205
- kit.seat(c, sx, fl, -zi * 0.52, { w: 0.5, mat: fab, h: 0.44, back: 0.64, lean: 0.18 });
12206
- kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.44, back: 0.6, lean: 0.18 });
12268
+ kit.seat(c, sx, fl, -zi * 0.52, { w: 0.52, mat: fab, h: 0.24, back: 0.64, lean: 0.18, id: "driver", role: "driver" });
12269
+ kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.24, back: 0.6, lean: 0.18, role: "front_passenger" });
12270
+ const mDoorW = Math.max(0.75, f - 0.1 - (xr - 0.06));
12271
+ const mDoorH = Math.max(1.05, ry - fl - 0.1);
12272
+ c.addDoor({ id: "door_front_left", widthMetres: Math.round(mDoorW * 1e3) / 1e3, heightMetres: Math.round(mDoorH * 1e3) / 1e3 });
12273
+ c.addDoor({ id: "door_front_right", widthMetres: Math.round(mDoorW * 1e3) / 1e3, heightMetres: Math.round(mDoorH * 1e3) / 1e3 });
12207
12274
  c.rod(new V3(sx + 0.55, fl, -0.05), new V3(sx + 0.5, fl + 0.48, -0.08), 0.014, OLIVE_STEEL);
12208
12275
  c.sphere(0.035, BLACK, sx + 0.5, fl + 0.5, -0.08);
12209
12276
  c.roundBox(0.25, 0.16, 0.34, 0.02, CM("#3b402d", { roughness: 0.7 }), xd - 0.35, belt + 0.12, 0.1);
@@ -12266,7 +12333,7 @@ function installMilitary(fx) {
12266
12333
  const floor = c.roundBox(L, 0.1, W, 0.02, wood, cx, y0, 0, { def: true });
12267
12334
  c.roundBox(L - 0.1, 0.14, 0.2, 0.02, MT.trim, cx, y0 - 0.12, 0.45);
12268
12335
  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.1, 0);
12336
+ 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
12337
  const sides = [];
12271
12338
  [1, -1].forEach(function(s) {
12272
12339
  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 +12344,7 @@ function installMilitary(fx) {
12277
12344
  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
12345
  });
12279
12346
  });
12280
- c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.03, y0 + sideH / 2 + 0.05, 0, { def: true });
12347
+ c.roundBox(0.06, sideH, W, 0.02, wood, x0 - 0.028, y0 + sideH / 2 + 0.05, 0, { def: true });
12281
12348
  const tg = c.roundBox(0.06, sideH * 0.7, W - 0.1, 0.02, wood, x1 - 0.02, y0 - sideH * 0.3, 0);
12282
12349
  tg.rotation.z = 0.08;
12283
12350
  const top = y0 + sideH + bowH, yb = y0 + sideH + 0.05, nseg = 20, pos = [], idx = [];
@@ -12671,7 +12738,7 @@ function installMilitary(fx) {
12671
12738
  top: roofY + 0.03,
12672
12739
  k: 0.28,
12673
12740
  holes,
12674
- archInner: W / 2 - ww - 0.1,
12741
+ archInner: W / 2 - ww - 0.098,
12675
12742
  sub: 0.18,
12676
12743
  bev: 0.025
12677
12744
  });
@@ -12745,7 +12812,9 @@ function installMilitary(fx) {
12745
12812
  [-0.9, -2.2].forEach(function(x) {
12746
12813
  c.roundBox(0.3, 0.04, 0.1, 0.02, RED_LIGHT, x, roofY - 0.1, 0).castShadow = false;
12747
12814
  });
12748
- kit.seat(c, 0.95, fl + 0.1, -0.62, { w: 0.5, h: 0.42, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }) });
12815
+ kit.seat(c, 0.95, fl + 0.1, -0.62, { w: 0.5, h: 0.42, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }), id: "driver", role: "driver" });
12816
+ c.addDoor({ id: "hatch_driver", widthMetres: 0.58, heightMetres: 0.6 });
12817
+ c.addDoor({ id: "ramp_rear", widthMetres: 1.4, heightMetres: 1.35 });
12749
12818
  kit.steeringWheel(c, 1.5, 1.42, -0.62, { r: 0.2, tilt: 0.9, col: 0.35 });
12750
12819
  c.roundBox(0.35, 0.3, 0.7, 0.04, CM("#25261f"), 1.85, 1.45, -0.6);
12751
12820
  kit.seat(c, 0.15, fl, 0, { w: 0.5, h: 0.45, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }) });
@@ -13004,8 +13073,7 @@ function installMilitary(fx) {
13004
13073
  [1.3, roofY, 0.1],
13005
13074
  [F - 0.04, 1.02, 0.06],
13006
13075
  [F, 0.9, 0.05],
13007
- [2.05, 0.46, 0.06],
13008
- [-1.4, 0.44, 0.04]
13076
+ [2.05, 0.46, 0.06]
13009
13077
  ];
13010
13078
  const arches = axles.map(function(x) {
13011
13079
  return [x, wr, wr + 0.09];
@@ -13083,8 +13151,8 @@ function installMilitary(fx) {
13083
13151
  [1, -1].forEach(function(s) {
13084
13152
  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
13153
  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.16), { def: true });
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.16), { def: true });
13154
+ c.roundBox(1, 0.05, 0.32, 0.02, paintMat(c, col), axles[0], 1.12, s * (W / 2 - 0.158), { def: true });
13155
+ 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
13156
  c.roundBox(1.2, 0.26, 0.28, 0.03, paintMat(c, OLIVE2), -1.45, 1.28, s * (W / 2 - 0.17));
13089
13157
  [-0.95, -1.95].forEach(function(x) {
13090
13158
  c.roundBox(0.3, 0.2, 0.02, 0.01, MT.dark, x, 1.28, s * (W / 2 - 0.025));
@@ -13115,7 +13183,9 @@ function installMilitary(fx) {
13115
13183
  });
13116
13184
  const fl = 0.72, fab = CM("#2f3226", { roughness: 0.9 });
13117
13185
  c.roundBox(3, 0.04, 1.6, 0.01, MT.carpet, 0.2, fl, 0);
13118
- kit.seat(c, 1, fl + 0.3, -0.55, { w: 0.46, h: 0.4, back: 0.5, lean: 0.25, mat: fab });
13186
+ kit.seat(c, 1, fl, -0.55, { w: 0.46, h: 0.14, back: 0.5, lean: 0.25, mat: fab, id: "driver", role: "driver" });
13187
+ c.addDoor({ id: "hatch_driver", widthMetres: 0.54, heightMetres: 0.58 });
13188
+ c.addDoor({ id: "hatch_commander", widthMetres: 0.6, heightMetres: 0.6 });
13119
13189
  kit.steeringWheel(c, 1.5, 1.38, -0.55, { r: 0.18, tilt: 0.9, col: 0.3 });
13120
13190
  c.roundBox(0.3, 0.26, 0.6, 0.04, CM("#25261f"), 1.75, 1.35, -0.5);
13121
13191
  const nT = c.vehicle.children.length;
@@ -13163,8 +13233,8 @@ function installMilitary(fx) {
13163
13233
  for (let k = 0; k < 4; k++)
13164
13234
  c.rod(new V3(tx - 1.55, ty + 0.14, -0.6 + k * 0.4), new V3(tx - 1.55, ty + 0.4, -0.6 + k * 0.4), 0.015, OLIVE_STEEL);
13165
13235
  c.rod(new V3(tx - 1.55, ty + 0.4, -0.65), new V3(tx - 1.55, ty + 0.4, 0.65), 0.015, OLIVE_STEEL);
13166
- kit.seat(c, tx - 0.4, fl + 0.45, 0.42, { w: 0.42, h: 0.38, back: 0.45, lean: 0.1, mat: fab });
13167
- kit.seat(c, tx - 0.4, fl + 0.45, -0.42, { w: 0.42, h: 0.38, back: 0.45, lean: 0.1, mat: fab });
13236
+ kit.seat(c, tx - 0.4, fl + 0.12, 0.42, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
13237
+ kit.seat(c, tx - 0.4, fl + 0.12, -0.42, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
13168
13238
  c.roundBox(0.8, 0.3, 0.3, 0.05, BARREL, tx + 0.1, ty + 0.1, 0);
13169
13239
  c.roundBox(1.6, 0.02, 1.2, 0.01, MT.headliner, tx - 0.2, ty + 0.66, 0).castShadow = false;
13170
13240
  rigid(c, c.vehicle.children.slice(nT));
@@ -13241,7 +13311,7 @@ function installMilitary(fx) {
13241
13311
  m.kind = "car";
13242
13312
  m.bullet = true;
13243
13313
  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] });
13314
+ 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
13315
  const items = [
13246
13316
  [R, 1.05, 0.04],
13247
13317
  [R - 0.02, deckY - 0.04, 0.05],
@@ -13284,7 +13354,7 @@ function installMilitary(fx) {
13284
13354
  (ex0 + ex1) / 2
13285
13355
  );
13286
13356
  scale(c, nB, bcen, 1.45);
13287
- c.roundBox(ex1 - ex0 - 0.1, 0.02, 2.1, 0.01, BAY_LIGHT, bcen.x, 0.95, 0);
13357
+ c.roundBox(ex1 - ex0 - 0.1, 0.012, 2.1, 0.01, BAY_LIGHT, bcen.x, 0.957, 0);
13288
13358
  [1, -1].forEach(function(sd) {
13289
13359
  c.roundBox(ex1 - ex0 - 0.1, 0.55, 0.02, 0.01, BAY_LIGHT, bcen.x, 1.25, sd * 1.08);
13290
13360
  });
@@ -13310,12 +13380,12 @@ function installMilitary(fx) {
13310
13380
  c.roundBox(0.55, 0.42, 0.03, 0.01, MT.rubber, 2.95, 0.86, s * (W / 2 + 0.05));
13311
13381
  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
13382
  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.02, 0.85, s * tz);
13383
+ c.roundBox(0.03, 0.5, 0.55, 0.01, MT.rubber, R + 0.015, 0.85, s * tz);
13314
13384
  star(c, 0.6, 1.3, s * (H.half(1.3) + 0.01), 0.17, s > 0 ? "+z" : "-z", { ring: true });
13315
13385
  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
13386
  guardedHeadlight(c, 2.95, gl(2.95) + 0.16, s * 1.3, s, { style: "round" });
13317
13387
  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.04, 1.35, s * 1.25);
13388
+ c.roundBox(0.1, 0.18, 0.3, 0.03, OLIVE_STEEL, R - 0.037, 1.35, s * 1.25);
13319
13389
  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
13390
  c.tube(
13321
13391
  [
@@ -13357,7 +13427,18 @@ function installMilitary(fx) {
13357
13427
  { rot: [0, 0, -0.18] }
13358
13428
  );
13359
13429
  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.78, { w: 0.44, h: 0.34, back: 0.5, lean: 0.5, mat: CM("#2f3226", { roughness: 0.9 }) });
13430
+ kit.seat(c, 1.65, 0.3, -0.76, {
13431
+ w: 0.46,
13432
+ h: 0.14,
13433
+ back: 0.5,
13434
+ lean: 0.5,
13435
+ mat: CM("#2f3226", { roughness: 0.9 }),
13436
+ id: "driver",
13437
+ role: "driver",
13438
+ headroomMetres: 0.9
13439
+ });
13440
+ c.addDoor({ id: "hatch_driver", widthMetres: 0.56, heightMetres: 0.58 });
13441
+ c.addDoor({ id: "hatch_commander", widthMetres: 0.68, heightMetres: 0.68 });
13361
13442
  [-0.95, -0.78, -0.61].forEach(function(z, i) {
13362
13443
  periscope(c, 2.3, roofY - 0.08, z, 0.14, i === 1 ? lbl("driver_periscope") : null);
13363
13444
  });
@@ -13434,9 +13515,9 @@ function installMilitary(fx) {
13434
13515
  });
13435
13516
  c.roundBox(0.25, 0.3, 1.6, 0.06, CANVAS2, bx + 0.12, ty + 0.4, 0);
13436
13517
  c.part("cargo", trl("labels.luggage_basket"), null, new V3(bx + 0.1, ty + 0.5, 0), 1);
13437
- kit.seat(c, tx - 0.55, ty - 0.45, 0.6, { w: 0.42, h: 0.38, back: 0.45, lean: 0.1, mat: fab });
13438
- kit.seat(c, tx + 0.2, ty - 0.55, 0.62, { w: 0.4, h: 0.36, back: 0.42, lean: 0.1, mat: fab });
13439
- kit.seat(c, tx - 0.3, ty - 0.55, -0.62, { w: 0.4, h: 0.36, back: 0.42, lean: 0.1, mat: fab });
13518
+ kit.seat(c, tx - 0.55, ty - 0.45, 0.6, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
13519
+ kit.seat(c, tx + 0.2, ty - 0.55, 0.62, { w: 0.46, h: 0.16, back: 0.42, lean: 0.1, mat: fab, role: "crew" });
13520
+ kit.seat(c, tx - 0.3, ty - 0.55, -0.62, { w: 0.46, h: 0.16, back: 0.42, lean: 0.1, mat: fab, role: "crew" });
13440
13521
  c.roundBox(1.1, 0.35, 0.4, 0.05, BARREL, tx + 0.6, ty + 0.35, 0.05);
13441
13522
  c.roundBox(2.2, 0.02, 1.6, 0.01, MT.headliner, tx - 0.3, tTop - 0.08, 0).castShadow = false;
13442
13523
  c.cylinder(0.05, 0.05, 0.03, RED_LIGHT, tx - 0.4, tTop - 0.1, 0.2);
@@ -13479,14 +13560,14 @@ function installMilitary(fx) {
13479
13560
  const g = new THREE.Group();
13480
13561
  g.position.set(x, y, z);
13481
13562
  c.vehicle.add(g);
13482
- const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * 0.8, 24), wm);
13563
+ const wmsh = new THREE.Mesh(new THREE.CylinderGeometry(rad, rad, w * (opt.width ?? 0.8), 24), wm);
13483
13564
  wmsh.rotation.x = PI / 2;
13484
13565
  wmsh.castShadow = true;
13485
13566
  g.add(wmsh);
13486
13567
  if (opt.tires)
13487
13568
  [-1, 1].forEach(function(q) {
13488
13569
  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;
13570
+ t.position.z = q * w * (opt.tireAt ?? 0.22);
13490
13571
  g.add(t);
13491
13572
  });
13492
13573
  const hb = new THREE.Mesh(new THREE.CylinderGeometry(rad * 0.32, rad * 0.32, w * 0.86, 10), MT.steel);
@@ -13503,21 +13584,21 @@ function installMilitary(fx) {
13503
13584
  for (let k = 0; k < 6; k++) {
13504
13585
  const b = new THREE.Mesh(G.roundedBox(rad * 1.5, 0.05, 0.04, 0.01), wm);
13505
13586
  b.rotation.z = k / 6 * PI;
13506
- b.position.z = (z > 0 ? 1 : -1) * w * 0.42;
13587
+ b.position.z = (z > 0 ? 1 : -1) * (w * 0.42 + k * 3e-3);
13507
13588
  g.add(b);
13508
13589
  }
13509
13590
  c.spin.push({ o: g, axis: "z", v: 0, track: true });
13510
13591
  return g;
13511
13592
  }
13512
13593
  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 });
13594
+ wheel(x0, yS, rS, { teeth: true, width: 0.76 });
13595
+ wheel(x1, yI, rI, { spokes: true, tires: true, width: 0.76, tireAt: 0.2 });
13515
13596
  const topY = function(x) {
13516
13597
  return yS + rS + th / 2 + (yI + rI - yS - rS) * (x - x0) / (x1 - x0);
13517
13598
  };
13518
13599
  for (let q = 0; q < 4; q++) {
13519
13600
  const xr = x0 + (x1 - x0) * (0.2 + q * 0.2);
13520
- wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, {});
13601
+ wheel(xr, topY(xr) - rr - th / 2 - 0.01, rr, { width: 0.7 });
13521
13602
  }
13522
13603
  const path = [], segs = 12;
13523
13604
  function arc(cx, cy, rad, a0, a1) {
@@ -13541,7 +13622,7 @@ function installMilitary(fx) {
13541
13622
  const curve = new THREE.SplineCurve(pts.concat([pts[0]])), lenT = curve.getLength(), nl = Math.round(lenT / 0.15), links = [];
13542
13623
  for (let l = 0; l < nl; l++) {
13543
13624
  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);
13625
+ const lg = G.roundedBox(0.13, th, w - l % 2 * 4e-3, 0.015);
13545
13626
  lg.applyMatrix4(new THREE.Matrix4().makeRotationZ(ang).setPosition(p.x, p.y, 0));
13546
13627
  links.push(lg);
13547
13628
  const gh2 = G.roundedBox(0.05, 0.05, 0.05, 0.01);
@@ -13677,10 +13758,12 @@ function installMilitary(fx) {
13677
13758
  const fl = 0.86, fab = CM("#2f3226", { roughness: 0.9 });
13678
13759
  c.roundBox(5.6, 0.04, 2.05, 0.01, MT.carpet, -0.4, fl, 0).castShadow = false;
13679
13760
  [0.5, -0.5].forEach(function(z) {
13680
- kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.42, back: 0.72, lean: 0.12, mat: fab });
13681
- c.rod(new V3(2, fl, z), new V3(1.95, fl + 0.55, z), 0.016, BLACK);
13682
- c.sphere(0.035, BLACK, 1.95, fl + 0.57, z);
13761
+ kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.42, back: 0.72, lean: 0.12, mat: fab, role: "pilot" });
13762
+ c.rod(new V3(2, fl, z), new V3(1.95, fl + 0.55, z), 0.016, BLACK).userData.noCabinRay = true;
13763
+ c.sphere(0.035, BLACK, 1.95, fl + 0.57, z).userData.noCabinRay = true;
13683
13764
  });
13765
+ c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 1.15 });
13766
+ c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 1.15 });
13684
13767
  c.roundBox(0.25, 0.45, 1.9, 0.05, CM("#232427"), 2.45, fl + 0.55, 0);
13685
13768
  c.roundBox(0.4, 0.05, 1.95, 0.02, CM("#1a1b1d"), 2.4, fl + 0.8, 0, { rot: [0, 0, 0.25] });
13686
13769
  [-0.75, -0.45, -0.15, 0.15, 0.45, 0.75].forEach(function(z) {
@@ -14817,9 +14900,13 @@ function installMotorcyclesCars(fx) {
14817
14900
  ft: gh.ft,
14818
14901
  rb: gh.rb,
14819
14902
  rt: gh.rt,
14820
- roof: Math.min(gh.roof, roofR),
14903
+ roof: gh.roof + 0.02,
14821
14904
  belt: gh.belt,
14822
- floor: s.bottomY + 0.1,
14905
+ floor: s.bottomY + 0.02,
14906
+ seatH: 0.12,
14907
+ dashD: 0.32,
14908
+ dashH: 0.24,
14909
+ visorUp: true,
14823
14910
  zIn: gh.Wg / 2 - 0.09,
14824
14911
  zRoof: halfAt(gh.Wg, T, gh.roof) - 0.12,
14825
14912
  xRear: gh.rb + 0.06
@@ -17247,9 +17334,9 @@ function installMotorcyclesCars(fx) {
17247
17334
  ],
17248
17335
  col
17249
17336
  );
17250
- lamp(c, { style: "rect", x: 0.57, y: 0.91, z: 0, w: 0.2, h: 0.11, d: 0.08, side: 1, label: trl("labels.headlight") });
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") });
17251
17338
  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.06, 0, { rot: [0, 0, 0.4] });
17339
+ c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
17253
17340
  handlebar(c, 0.36, 1.03, 0.37, { rise: 0.04, back: 0.06, mat: MT.chrome, stalk: 0.19 });
17254
17341
  [1, -1].forEach(function(s) {
17255
17342
  blinker(c, 0.48, 0.9, s * 0.17, true);
@@ -17451,7 +17538,7 @@ function installMotorcyclesCars(fx) {
17451
17538
  body(
17452
17539
  c,
17453
17540
  [
17454
- [0.44, 1.13, 0.85, 0.24, 2.6],
17541
+ [0.435, 1.13, 0.85, 0.24, 2.6],
17455
17542
  [0.55, 1.11, 0.87, 0.24, 2.6],
17456
17543
  [0.6, 1.05, 0.91, 0.16, 2.4]
17457
17544
  ],
@@ -17618,7 +17705,7 @@ function installMotorcyclesCars(fx) {
17618
17705
  body(
17619
17706
  c,
17620
17707
  [
17621
- [0.62, 1.32, 0.98, 0.3, 2.6],
17708
+ [0.615, 1.32, 0.98, 0.3, 2.6],
17622
17709
  [0.72, 1.28, 1, 0.3, 2.6],
17623
17710
  [0.78, 1.2, 1.02, 0.22, 2.4]
17624
17711
  ],
@@ -18292,7 +18379,7 @@ function installMotorcyclesCars(fx) {
18292
18379
  c.cylinder(0.025, 0.025, 0.2, EXH, -1.98, 0.3, z, "x");
18293
18380
  });
18294
18381
  c.part("engine", trl("labels.air_cooled_engine_rear"), null, new V3(-1.6, 0.55, 0), 1);
18295
- const fab = CM("#4b3a2e", { roughness: 0.85 }), fl = 0.36;
18382
+ const fab = CM("#4b3a2e", { roughness: 0.85 }), fl = 0.31;
18296
18383
  c.roundBox(1.7, 0.03, 0.62, 0.01, MT.carpet, -0.15, fl, 0).castShadow = false;
18297
18384
  c.roundBox(0.2, 0.24, 1.14, 0.04, col, 0.66, 0.92, 0);
18298
18385
  c.roundBox(0.16, 0.05, 1.12, 0.02, CM("#1b1c1e"), 0.6, 1.03, 0);
@@ -18303,9 +18390,18 @@ function installMotorcyclesCars(fx) {
18303
18390
  c.rod(new V3(0.12, fl, 0), new V3(0.02, fl + 0.42, 0), 0.01, MT.chrome);
18304
18391
  c.sphere(0.025, MT.plastic, 0.02, fl + 0.44, 0);
18305
18392
  [-1, 1].forEach(function(sd) {
18306
- kit.seat(c, -0.02, fl, sd * 0.27, { w: 0.44, mat: fab, back: 0.58, lean: 0.2, h: 0.28, headrest: false });
18393
+ kit.seat(c, -0.08, fl, sd * 0.27, {
18394
+ w: 0.44,
18395
+ mat: fab,
18396
+ back: 0.58,
18397
+ lean: 0.2,
18398
+ h: 0.14,
18399
+ headrest: false,
18400
+ id: sd < 0 ? "driver" : "front_right",
18401
+ role: sd < 0 ? "driver" : "front_passenger"
18402
+ });
18307
18403
  });
18308
- kit.seat(c, -0.66, fl, 0, { w: 0.94, n: 3, mat: fab, back: 0.44, lean: 0.14, h: 0.26, len: 0.42, headrest: false });
18404
+ kit.seat(c, -0.58, fl, 0, { w: 0.94, n: 3, mat: fab, back: 0.44, lean: 0.14, h: 0.11, len: 0.42, headrest: false, role: "rear" });
18309
18405
  [1, -1].forEach(function(sd) {
18310
18406
  for (let yk = 0.56; yk < 0.95; yk += 0.075) {
18311
18407
  const zf = Math.min(loftHalf(stS, -0.3, yk - 0.04), loftHalf(stS, 0.5, yk - 0.04)) - 0.045;
@@ -18551,8 +18647,8 @@ function installMotorcyclesExtra(fx) {
18551
18647
  return b;
18552
18648
  }
18553
18649
  function plateMoto(c, x, y, txt) {
18554
- c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x + 0.012, y, 0);
18555
- c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x, y, 0, "-x", {
18650
+ c.roundBox(0.02, 0.15, 0.2, 8e-3, MT.trim, x + 9e-3, y, 0);
18651
+ c.text(txt || kit.config.plate.slice(0, 5), 0.2, 0.135, x - 3e-3, y, 0, "-x", {
18556
18652
  w: 300,
18557
18653
  h: 220,
18558
18654
  bg: "#f2f2ee",
@@ -18667,7 +18763,7 @@ function installMotorcyclesExtra(fx) {
18667
18763
  g.add(d);
18668
18764
  for (let q = 0; q < 12; q++) {
18669
18765
  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 + 6e-3));
18766
+ sl.position.set(Math.cos(a2) * rimR * 0.62, Math.sin(a2) * rimR * 0.62, s * (hw * 0.72 + 0.0105));
18671
18767
  sl.rotation.z = a2;
18672
18768
  g.add(sl);
18673
18769
  }
@@ -18765,7 +18861,7 @@ function installMotorcyclesExtra(fx) {
18765
18861
  body(
18766
18862
  c,
18767
18863
  [
18768
- [0.34, 0.36, 0.29, 0.28, 2.6],
18864
+ [0.335, 0.36, 0.29, 0.28, 2.6],
18769
18865
  [0.46, 0.38, 0.31, 0.46, 3],
18770
18866
  [0.6, 0.41, 0.34, 0.5, 3],
18771
18867
  [0.74, 0.43, 0.37, 0.46, 2.8],
@@ -19173,7 +19269,7 @@ function installMotorcyclesExtra(fx) {
19173
19269
  body(
19174
19270
  c,
19175
19271
  [
19176
- [0.42, 1.05, 0.82, 0.26, 2.6],
19272
+ [0.415, 1.05, 0.82, 0.26, 2.6],
19177
19273
  [0.52, 1.03, 0.83, 0.28, 2.6],
19178
19274
  [0.59, 0.99, 0.85, 0.22, 2.4],
19179
19275
  [0.62, 0.95, 0.87, 0.1, 2.2]
@@ -19194,7 +19290,7 @@ function installMotorcyclesExtra(fx) {
19194
19290
  });
19195
19291
  c.roundBox(0.015, 0.1, 0.2, 0.02, SMOKEG, 0.55, 1.035, 0, { rot: [0, 0, 0.55] });
19196
19292
  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.075, 0, { rot: [0, 0, 0.5] });
19293
+ c.roundBox(0.04, 0.032, 0.1, 6e-3, MT.gauge, 0.45, 1.078, 0, { rot: [0, 0, 0.5] });
19198
19294
  [1, -1].forEach(function(s) {
19199
19295
  blinker(c, 0.5, 0.92, s * 0.16, true);
19200
19296
  });
@@ -19611,7 +19707,7 @@ function installMotorcyclesExtra(fx) {
19611
19707
  });
19612
19708
  c.cylinder(0.12, 0.12, 0.07, CH, 0.2, 0.56, 0.17, "z");
19613
19709
  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.217, "+z", { fg: "#1b1c1f", size: 0.85 });
19710
+ c.text("114", 0.1, 0.04, 0.2, 0.56, 0.219, "+z", { fg: "#1b1c1f", size: 0.85 });
19615
19711
  c.sphere(0.17, CH, -0.06, 0.32, -0.17, 1.35, 0.85, 0.28);
19616
19712
  c.cylinder(0.07, 0.07, 0.02, CH, -0.02, 0.3, -0.215, "z");
19617
19713
  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 +20102,12 @@ function installMotorcyclesExtra(fx) {
20006
20102
  col
20007
20103
  );
20008
20104
  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.06, 0, { rot: [0, 0, 0.4] });
20105
+ c.roundBox(0.02, 0.05, 0.15, 0.01, MT.gauge, 0.39, 1.064, 0, { rot: [0, 0, 0.4] });
20010
20106
  [1, -1].forEach(function(s) {
20011
20107
  blinker(c, 0.48, 0.9, s * 0.17, true);
20012
20108
  });
20013
20109
  Z.fairing = grab(c, n0);
20014
- lamp(c, { style: "rect", x: 0.57, y: 0.91, z: 0, w: 0.2, h: 0.11, d: 0.08, side: 1, label: trl("labels.headlight") });
20110
+ 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
20111
  n0 = c.vehicle.children.length;
20016
20112
  handlebar(c, 0.36, 1.02, 0.36, { rise: 0.03, back: 0.06, mat: MT.chrome, stalk: 0.19 });
20017
20113
  Z.handlebar = grab(c, n0);
@@ -20137,9 +20233,19 @@ function createPlanesKit(kit) {
20137
20233
  return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
20138
20234
  });
20139
20235
  }
20236
+ function stretchSt(st) {
20237
+ const out = st.map(function(q) {
20238
+ return q.slice();
20239
+ });
20240
+ const last = out.length - 1;
20241
+ const dir = out[last][0] >= out[0][0] ? 1 : -1;
20242
+ out[0][0] = out[0][0] + dir * 3e-3;
20243
+ out[last][0] = out[last][0] - dir * 3e-3;
20244
+ return out;
20245
+ }
20140
20246
  function fSkin(c, EA, st, keep, mat, o) {
20141
20247
  o = o || {};
20142
- const m = c.add(EA.fuseGeo(scaleSt(st, o.k || 1.004), { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
20248
+ 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
20249
  m.castShadow = false;
20144
20250
  cutSub(m, [keep], o.sub || 0.06, o.pre);
20145
20251
  c.deform.push(m);
@@ -20147,7 +20253,7 @@ function createPlanesKit(kit) {
20147
20253
  }
20148
20254
  function fGlass(c, EA, st, keep, label, type, o) {
20149
20255
  o = o || {};
20150
- const m = new THREE.Mesh(EA.fuseGeo(scaleSt(st, o.k || 0.988), { smooth: o.smooth || 48, seg: o.seg || 30 }), o.mat || MT.glass);
20256
+ 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
20257
  (o.parent || c.vehicle).add(m);
20152
20258
  cutSub(m, [keep], o.sub || 0.07, o.pre);
20153
20259
  return kit.asGlass(c, m, label, type || "tempered", o.pos ? { pos: o.pos } : {});
@@ -20309,7 +20415,7 @@ function installPlanesExtra(fx) {
20309
20415
  return Math.min(boltW(x) - Math.abs(y - bolt(x)), x + 3.2, 2.93 - x, Math.abs(z) - 0.12);
20310
20416
  }),
20311
20417
  black,
20312
- { parent: grp, sub: 0.05, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
20418
+ { parent: grp, sub: 0.05, k: 1.013, pre: EA.keepT([-3.3, 3, -0.35, 0.2, 0.1]) }
20313
20419
  );
20314
20420
  const doorR = EA.polySdf([
20315
20421
  [1.38, -0.4],
@@ -20356,11 +20462,12 @@ function installPlanesExtra(fx) {
20356
20462
  c.roundBox(0.012, 0.012, 0.06, 4e-3, MT.steel, 2.06, 0.62, 0, PG);
20357
20463
  const fl = -0.4, fab = CM("#3c3a35", { roughness: 0.9 });
20358
20464
  c.roundBox(2, 0.025, 0.6, 0.01, MT.carpet, 0.55, fl, 0, PG).castShadow = false;
20359
- kit.seat(c, 0.62, fl, 0, { w: 0.48, h: 0.3, back: 0.55, lean: 0.2, mat: fab, parent: grp, headrest: false });
20360
- kit.seat(c, -0.22, fl + 0.04, 0, { w: 0.5, h: 0.3, back: 0.58, lean: 0.2, mat: fab, parent: grp, headrest: false });
20465
+ kit.seat(c, 0.62, fl, 0, { w: 0.48, h: 0.16, back: 0.55, lean: 0.2, mat: fab, parent: grp, headrest: false, role: "pilot" });
20466
+ kit.seat(c, -0.22, fl + 0.04, 0, { w: 0.5, h: 0.16, back: 0.58, lean: 0.2, mat: fab, parent: grp, headrest: false, role: "crew" });
20467
+ c.addDoor({ id: "canopy_door", widthMetres: 0.7, heightMetres: 0.85 });
20361
20468
  [1.12, 0.3].forEach(function(x) {
20362
- c.rod(new V3(x, fl, 0), new V3(x - 0.05, fl + 0.5, 0), 0.012, MT.plastic, PG);
20363
- c.sphere(0.025, MT.plastic, x - 0.055, fl + 0.52, 0, 1, 1.4, 1, PG);
20469
+ c.rod(new V3(x, fl, 0), new V3(x - 0.05, fl + 0.5, 0), 0.012, MT.plastic, PG).userData.noCabinRay = true;
20470
+ c.sphere(0.025, MT.plastic, x - 0.055, fl + 0.52, 0, 1, 1.4, 1, PG).userData.noCabinRay = true;
20364
20471
  });
20365
20472
  c.roundBox(0.05, 0.22, 0.6, 0.02, CM("#2a2b2d", { roughness: 0.8 }), 1.75, 0.3, 0, PG);
20366
20473
  [-0.2, -0.08, 0.04, 0.16, -0.14].forEach(function(z, i) {
@@ -20374,7 +20481,7 @@ function installPlanesExtra(fx) {
20374
20481
  };
20375
20482
  const g = EA.foilGeo(
20376
20483
  [
20377
- { p: [1.46, dh(0), 0], c: 1.6, t: 0.12, cam: 0.025, noCap: true },
20484
+ { p: [1.46, dh(0), s * 2e-3], c: 1.6, t: 0.12, cam: 0.025, noCap: true },
20378
20485
  { p: [1.46, dh(2.6), s * 2.6], c: 1.6, t: 0.12, cam: 0.025 },
20379
20486
  { p: [1.46, dh(4.9), s * 4.9], c: 1.6, t: 0.12, cam: 0.025 },
20380
20487
  { p: [1.43, dh(5.18), s * 5.18], c: 1.5, t: 0.11, cam: 0.02 },
@@ -20431,7 +20538,7 @@ function installPlanesExtra(fx) {
20431
20538
  const hs = c.add(
20432
20539
  EA.foilGeo(
20433
20540
  [
20434
- { p: [-2.78, 0.1, 0], c: 0.78, t: 0.07 },
20541
+ { p: [-2.78, 0.1, s * 2e-3], c: 0.78, t: 0.07 },
20435
20542
  { p: [-2.85, 0.1, s * 1.1], c: 0.74, t: 0.07 },
20436
20543
  { p: [-2.95, 0.1, s * 1.36], c: 0.6, t: 0.06 },
20437
20544
  { p: [-3.1, 0.1, s * 1.46], c: 0.32, t: 0.05 }
@@ -20682,7 +20789,7 @@ function installPlanesExtra(fx) {
20682
20789
  EA.sideKeepP(ckP, 0.5, s),
20683
20790
  s > 0 ? lbl("right_flight_deck_window") : lbl("left_flight_deck_window"),
20684
20791
  "tempered",
20685
- { pos: new V3(5.4, 2.25, s * 0.8) }
20792
+ { pos: new V3(5.4, 2.25, s * 0.8), k: 1.0085 }
20686
20793
  );
20687
20794
  fGlass(
20688
20795
  c,
@@ -20714,7 +20821,8 @@ function installPlanesExtra(fx) {
20714
20821
  const fl = 0.98, fab = CM("#3d4552", { roughness: 0.9 });
20715
20822
  liner(c, ST, -4.6, 5.9, fl, MT.carpet, { h: 0.03 });
20716
20823
  [0.38, -0.38].forEach(function(z) {
20717
- kit.seat(c, 4.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: CM("#2a2c30", { roughness: 0.8 }) });
20824
+ kit.seat(c, 4.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: CM("#2a2c30", { roughness: 0.8 }), role: "pilot" });
20825
+ if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.78, heightMetres: 1.55 });
20718
20826
  kit.yoke(c, 5.5, 1.75, z);
20719
20827
  EA.pedals(c, 5.95, fl, z);
20720
20828
  });
@@ -20736,7 +20844,7 @@ function installPlanesExtra(fx) {
20736
20844
  const w = c.add(
20737
20845
  EA.foilGeo(
20738
20846
  [
20739
- { p: [1.52, dh(0), 0], c: 2.38, t: 0.15, cam: 0.02 },
20847
+ { p: [1.52, dh(0), s * 2e-3], c: 2.38, t: 0.15, cam: 0.02 },
20740
20848
  { p: [1.52, dh(0.86), s * 0.86], c: 2.38, t: 0.15, cam: 0.02 },
20741
20849
  { p: [1.42, dh(2.47), s * 2.47], c: 2.25, t: 0.145, cam: 0.02 },
20742
20850
  { p: [0.98, dh(7.42), s * 7.42], c: 1.4, t: 0.12, cam: 0.02 },
@@ -20871,7 +20979,7 @@ function installPlanesExtra(fx) {
20871
20979
  const hs = c.add(
20872
20980
  EA.foilGeo(
20873
20981
  [
20874
- { p: [-5.95, 2.3, 0], c: 1.55, t: 0.1 },
20982
+ { p: [-5.95, 2.3, s * 2e-3], c: 1.55, t: 0.1 },
20875
20983
  { p: [-6.62, 2.3 + 3.2 * 0.176, s * 3.2], c: 0.86, t: 0.09 }
20876
20984
  ],
20877
20985
  { up: "y", n: 10 }
@@ -21108,7 +21216,8 @@ function installPlanesExtra(fx) {
21108
21216
  const fl = 2.06, fab = CM("#4a4640", { roughness: 0.9 });
21109
21217
  liner(c, ST, -3.2, 2, fl, MT.carpet, { h: 0.03 });
21110
21218
  [0.38, -0.38].forEach(function(z) {
21111
- kit.seat(c, 0.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: fab });
21219
+ kit.seat(c, 0.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: fab, role: "pilot" });
21220
+ if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.78, heightMetres: 1.4 });
21112
21221
  kit.yoke(c, 1.5, 2.85, z);
21113
21222
  EA.pedals(c, 1.95, fl, z);
21114
21223
  });
@@ -21134,7 +21243,7 @@ function installPlanesExtra(fx) {
21134
21243
  const w = c.add(
21135
21244
  EA.foilGeo(
21136
21245
  [
21137
- { p: [1.56, dh(0), 0], c: 1.98, t: 0.15, cam: 0.025, noCap: true },
21246
+ { p: [1.56, dh(0), s * 2e-3], c: 1.98, t: 0.15, cam: 0.025, noCap: true },
21138
21247
  { p: [1.56, dh(3.6), s * 3.6], c: 1.98, t: 0.15, cam: 0.025 },
21139
21248
  { p: [1.38, dh(7.7), s * 7.7], c: 1.3, t: 0.12, cam: 0.02 },
21140
21249
  { p: [1.32, dh(7.94), s * 7.94], c: 1.1, t: 0.06, cam: 0.01 }
@@ -21276,7 +21385,7 @@ function installPlanesExtra(fx) {
21276
21385
  const hs = c.add(
21277
21386
  EA.foilGeo(
21278
21387
  [
21279
- { p: [-4.8, 3.08, 0], c: 1.55, t: 0.1 },
21388
+ { p: [-4.8, 3.08, s * 2e-3], c: 1.55, t: 0.1 },
21280
21389
  { p: [-5.15, 3.08, s * 3.1], c: 1, t: 0.09 }
21281
21390
  ],
21282
21391
  { up: "y", n: 10 }
@@ -21479,7 +21588,7 @@ function installPlanesExtra(fx) {
21479
21588
  EA.sideKeepP(ckP, 0.5, s),
21480
21589
  s > 0 ? lbl("right_flight_deck_side_window") : lbl("left_flight_deck_side_window"),
21481
21590
  "tempered",
21482
- { pos: new V3(3.6, 2, s * 0.78) }
21591
+ { pos: new V3(3.6, 2, s * 0.78), k: 1.0085 }
21483
21592
  );
21484
21593
  fGlass(
21485
21594
  c,
@@ -21507,7 +21616,7 @@ function installPlanesExtra(fx) {
21507
21616
  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
21617
  }),
21509
21618
  MT.dark,
21510
- { k: 1.003 }
21619
+ { k: 1.0065 }
21511
21620
  );
21512
21621
  void dF;
21513
21622
  EA.fuseSkin(
@@ -21517,13 +21626,14 @@ function installPlanesExtra(fx) {
21517
21626
  return Math.min(0.035 - Math.abs(x - 3.88 - (y - 1.75) * 0.5), y - 1.7, 2.42 - y);
21518
21627
  }),
21519
21628
  blk,
21520
- { k: 1.004 }
21629
+ { k: 1.0065 }
21521
21630
  );
21522
21631
  c.rod(new V3(5, 1.74, 0), new V3(4.05, 2.4, 0), 0.02, blk);
21523
21632
  const fl = 0.8, fab = CM("#c9bda6", { roughness: 0.75 });
21524
21633
  liner(c, ST, -2, 4, fl, MT.carpet, { h: 0.03 });
21525
21634
  [0.36, -0.36].forEach(function(z) {
21526
- kit.seat(c, 3.55, fl, z, { w: 0.48, h: 0.36, back: 0.66, lean: 0.14, mat: CM("#2a2c30") });
21635
+ kit.seat(c, 3.55, fl, z, { w: 0.48, h: 0.36, back: 0.66, lean: 0.14, mat: CM("#2a2c30"), role: "pilot" });
21636
+ if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.72, heightMetres: 1.35 });
21527
21637
  kit.yoke(c, 4.05, 1.55, z);
21528
21638
  });
21529
21639
  EA.instPanel(c, 4.3, 1.68, 1.35, {
@@ -21556,7 +21666,7 @@ function installPlanesExtra(fx) {
21556
21666
  const w = c.add(
21557
21667
  EA.foilGeo(
21558
21668
  [
21559
- { p: [1, dh(0), 0], c: 2.45, t: 0.14, cam: 0.02 },
21669
+ { p: [1, dh(0), s * 2e-3], c: 2.45, t: 0.14, cam: 0.02 },
21560
21670
  { p: [0.95, dh(0.85), s * 0.85], c: 2.42, t: 0.14, cam: 0.02 },
21561
21671
  { p: [0.55, dh(2.4), s * 2.4], c: 1.9, t: 0.13, cam: 0.02 },
21562
21672
  { p: [-0.32, dh(5.75), s * 5.75], c: 1.08, t: 0.11, cam: 0.02 },
@@ -21638,7 +21748,7 @@ function installPlanesExtra(fx) {
21638
21748
  const finB = c.add(
21639
21749
  EA.foilGeo(
21640
21750
  [
21641
- { p: [-3.89, 2.25, 0], c: 2.22, t: 0.115 },
21751
+ { p: [-3.89, 2.253, 0], c: 2.22, t: 0.115 },
21642
21752
  { p: [-5.34, 4.185, 0], c: 1.17, t: 0.105 }
21643
21753
  ],
21644
21754
  { up: "z", n: 10 }
@@ -21661,7 +21771,7 @@ function installPlanesExtra(fx) {
21661
21771
  const hs = c.add(
21662
21772
  EA.foilGeo(
21663
21773
  [
21664
- { p: [-5.3, 4.2, 0], c: 1.18, t: 0.1 },
21774
+ { p: [-5.3, 4.2, s * 2e-3], c: 1.18, t: 0.1 },
21665
21775
  { p: [-5.9, 4.24, s * 2.55], c: 0.62, t: 0.09 }
21666
21776
  ],
21667
21777
  { up: "y", n: 10 }
@@ -21891,11 +22001,12 @@ function installPlanesExtra(fx) {
21891
22001
  [1.55, 1.24],
21892
22002
  [0.2, 1.46]
21893
22003
  ].forEach(function(q, i) {
21894
- kit.seat(c, q[0], q[1], 0, { w: 0.5, h: 0.32, back: 0.85, lean: 0.24, mat: fab, headrest: false });
22004
+ kit.seat(c, q[0], q[1], 0, { w: 0.5, h: 0.32, back: 0.85, lean: 0.24, mat: fab, headrest: false, role: i === 0 ? "pilot" : "crew" });
21895
22005
  c.roundBox(0.14, 0.3, 0.44, 0.04, CM("#202224"), q[0] - 0.42, q[1] + 1.05, 0, { rot: [0, 0, 0.24] });
21896
22006
  c.rod(new V3(q[0] - 0.38, q[1] + 1.25, -0.06), new V3(q[0] - 0.3, q[1] + 1.4, 0.06), 0.012, MT.yellow);
21897
- c.rod(new V3(q[0] + 0.35, q[1], 0), new V3(q[0] + 0.32, q[1] + 0.45, 0), 0.016, blk);
21898
- c.sphere(0.03, blk, q[0] + 0.31, q[1] + 0.48, 0, 1, 1.5, 1);
22007
+ c.rod(new V3(q[0] + 0.35, q[1], 0), new V3(q[0] + 0.32, q[1] + 0.45, 0), 0.016, blk).userData.noCabinRay = true;
22008
+ c.sphere(0.03, blk, q[0] + 0.31, q[1] + 0.48, 0, 1, 1.5, 1).userData.noCabinRay = true;
22009
+ if (i === 0) c.addDoor({ id: "canopy_door", widthMetres: 0.68, heightMetres: 0.85 });
21899
22010
  const px = q[0] + 0.75;
21900
22011
  c.roundBox(0.16, 0.3, 0.6, 0.04, CM("#232427"), px, q[1] + 0.65, 0, { rot: [0, 0, 0.2] });
21901
22012
  [-0.15, 0.15].forEach(function(z) {
@@ -21923,7 +22034,7 @@ function installPlanesExtra(fx) {
21923
22034
  [1, -1].forEach(function(s) {
21924
22035
  const g = EA.foilGeo(
21925
22036
  [
21926
- { p: [1.52, dh(0), 0], c: 2.35, t: 0.15, cam: 0.02 },
22037
+ { p: [1.52, dh(0), s * 2e-3], c: 2.35, t: 0.15, cam: 0.02 },
21927
22038
  { p: [1.5, dh(0.48), s * 0.48], c: 2.32, t: 0.15, cam: 0.02 },
21928
22039
  { p: [0.78, dh(5.4), s * 5.4], c: 1.2, t: 0.12, cam: 0.02 },
21929
22040
  { p: [0.74, dh(5.57), s * 5.57], c: 1.1, t: 0.07, cam: 0.01 }
@@ -22028,7 +22139,7 @@ function installPlanesExtra(fx) {
22028
22139
  [1, -1].forEach(function(s) {
22029
22140
  const g = EA.foilGeo(
22030
22141
  [
22031
- { p: [-4.3, 1.72, 0], c: 1.3, t: 0.1 },
22142
+ { p: [-4.3, 1.72, s * 2e-3], c: 1.3, t: 0.1 },
22032
22143
  { p: [-4.72, 1.76, s * 2.2], c: 0.75, t: 0.09 }
22033
22144
  ],
22034
22145
  { up: "y", n: 10 }
@@ -22291,7 +22402,7 @@ function installSuvPickupVan(fx) {
22291
22402
  const fl = c.roundBox(L, 0.035, 2 * hw, 0.01, LINER, cx, o.floor, 0);
22292
22403
  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
22404
  [1, -1].forEach(function(s) {
22294
- c.roundBox(L, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
22405
+ c.roundBox(L - 8e-3, h, 0.025, 0.01, LINER, cx, o.floor + h / 2, s * (hw + 0.012));
22295
22406
  });
22296
22407
  c.roundBox(0.025, h, 2 * hw, 0.01, LINER, o.x0 + 0.012, o.floor + h / 2, 0);
22297
22408
  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);
@@ -22731,10 +22842,26 @@ function installSuvPickupVan(fx) {
22731
22842
  roofLining(c, extra);
22732
22843
  if (!c.meta.damage) c.meta.damage = crashDamage;
22733
22844
  }
22845
+ function withCabinPackaging(s) {
22846
+ if (s.interior === false) return s;
22847
+ return Object.assign({}, s, {
22848
+ interior: Object.assign(
22849
+ {
22850
+ floor: s.bottomY + 0.02,
22851
+ roof: s.gh.roof + 0.02,
22852
+ seatH: 0.12,
22853
+ dashD: 0.32,
22854
+ dashH: 0.24,
22855
+ visorUp: true
22856
+ },
22857
+ s.interior || {}
22858
+ )
22859
+ });
22860
+ }
22734
22861
  function suvBuild(c, s, o) {
22735
22862
  o = o || {};
22736
22863
  const n0 = c.deform.length;
22737
- kit.car(c, s);
22864
+ kit.car(c, withCabinPackaging(s));
22738
22865
  const low = c.deform[n0], m = c.meta;
22739
22866
  let extra = [];
22740
22867
  if (o.flares !== false) extra = extra.concat(fenderFlares(c, s.arches, s.W, s.bottomY, o.flare));
@@ -23187,10 +23314,10 @@ function installSuvPickupVan(fx) {
23187
23314
  pre: function(c2, _m) {
23188
23315
  const gx = fX(s, 0.82) - 0.012, gy = 0.82, gh = 0.46, gw = 1.08, tz = 0.8;
23189
23316
  c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: tz } });
23190
- c2.roundBox(0.056, gh - 0.1, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy, 0, { taper: { sz: tz - 0.02 } });
23317
+ c2.roundBox(0.058, gh - 0.1, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy, 0, { taper: { sz: tz - 0.02 } });
23191
23318
  [0.13, 0.045, -0.04, -0.125].forEach(function(dy) {
23192
23319
  const k = (dy + gh / 2 - 0.05) / (gh - 0.1);
23193
- c2.roundBox(0.06, 0.022, (gw - 0.2) * (1 + (tz - 1) * k), 8e-3, MT.chrome, gx + 4e-3, gy + dy, 0);
23320
+ c2.roundBox(0.066, 0.022, (gw - 0.2) * (1 + (tz - 1) * k), 8e-3, MT.chrome, gx + 4e-3, gy + dy, 0);
23194
23321
  });
23195
23322
  c2.roundBox(0.04, 0.04, 1.32, 0.015, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
23196
23323
  kit.emblem(c2, fX(s, 0.9) + 0.03, 0.9, 0, 0.06);
@@ -23221,7 +23348,7 @@ function installSuvPickupVan(fx) {
23221
23348
  );
23222
23349
  function pickupBuild(c, s, o) {
23223
23350
  const n0 = c.deform.length;
23224
- kit.car(c, s);
23351
+ kit.car(c, withCabinPackaging(s));
23225
23352
  const low = c.deform[n0], m = c.meta;
23226
23353
  let extra = [];
23227
23354
  cargoBed(c, { low, x0: m.rear + 0.06, x1: o.bedFront, floor: o.floor, top: s.gh.belt, W: s.W, arches: s.arches });
@@ -23526,9 +23653,9 @@ function installSuvPickupVan(fx) {
23526
23653
  pre: function(c2, _m) {
23527
23654
  const gx = fX(s, 0.8) - 0.012, gy = 0.8, gw = 1.14, gh = 0.52;
23528
23655
  c2.roundBox(0.05, gh, gw, 0.04, MT.chrome, gx, gy, 0, { taper: { sz: 0.84 } });
23529
- c2.roundBox(0.056, gh - 0.12, gw - 0.16, 0.02, GLOSS, gx + 2e-3, gy - 0.01, 0, { taper: { sz: 0.82 } });
23656
+ 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
23657
  [0.12, -0.02, -0.14].forEach(function(dy) {
23531
- c2.roundBox(0.06, 0.03, (gw - 0.22) * (1 - (dy + 0.2) * 0.4), 0.01, MT.housing, gx + 4e-3, gy + dy, 0);
23658
+ 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
23659
  });
23533
23660
  c2.roundBox(0.04, 0.05, 1.3, 0.02, MT.chrome, fX(s, 1.04) - 0.03, 1.04, 0);
23534
23661
  kit.emblem(c2, gx + 0.035, gy + 0.06, 0, 0.06);
@@ -23617,7 +23744,7 @@ function installSuvPickupVan(fx) {
23617
23744
  wheels: []
23618
23745
  };
23619
23746
  const n0 = c.deform.length;
23620
- kit.car(c, s);
23747
+ kit.car(c, withCabinPackaging(s));
23621
23748
  const low = c.deform[n0], m = c.meta;
23622
23749
  cargoBed(c, { low, x0: m.rear + 0.06, x1: -0.42, floor: 1.78, top: 2.25, W, arches: [] });
23623
23750
  c.roundBox(0.08, 0.08, W + 0.1, 0.03, MT.chrome, m.front + 0.06, 1.72, 0);
@@ -23694,7 +23821,7 @@ function installSuvPickupVan(fx) {
23694
23821
  wg.add(bolt);
23695
23822
  }
23696
23823
  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.034, 14), MT.hole);
23824
+ 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
23825
  hole.rotation.x = PI / 2;
23699
23826
  hole.position.set(Math.cos(sa) * rr * 0.58, Math.sin(sa) * rr * 0.58, fz + zs * 2e-3);
23700
23827
  wg.add(hole);
@@ -23723,7 +23850,7 @@ function installSuvPickupVan(fx) {
23723
23850
  c.rod(new V3(0.6, 2.8, sd * 0.78), new V3(-0.25, 2.8, sd * 0.78), 0.035, red);
23724
23851
  });
23725
23852
  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.035, red);
23853
+ c.rod(new V3(-0.25, 2.8, -0.78), new V3(-0.25, 2.8, 0.78), 0.032, red);
23727
23854
  c.rod(new V3(-0.25, 2.3, -0.8), new V3(-0.25, 2.8, 0.78), 0.03, red);
23728
23855
  const roofItems = [c.roundBox(0.16, 0.05, 1.3, 0.02, MT.trim, 0.42, m.top + 0.08, 0)];
23729
23856
  [-0.48, -0.16, 0.16, 0.48].forEach(function(z) {
@@ -23937,7 +24064,10 @@ function installSuvPickupVan(fx) {
23937
24064
  xRear: P.cabBack - 0.12,
23938
24065
  xFront: P.cabBack + 0.42,
23939
24066
  seatH: 0.42,
23940
- front: "bench"
24067
+ front: "bench",
24068
+ dashD: 0.32,
24069
+ dashH: 0.24,
24070
+ visorUp: true
23941
24071
  });
23942
24072
  c.roundBox(
23943
24073
  0.04,
@@ -24304,8 +24434,8 @@ function installSuvPickupVan(fx) {
24304
24434
  );
24305
24435
  const zz = sd * (kit.halfAt(W, m.tumble, 1.75) + 0.012), zt = sd * (kit.halfAt(W, m.tumble, 2.22) + 0.012);
24306
24436
  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] });
24437
+ [0, PI / 3, -PI / 3].forEach(function(a, i) {
24438
+ 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
24439
  });
24310
24440
  });
24311
24441
  if (c2.hood) {
@@ -24657,9 +24787,31 @@ function createWaterAirKit(kit) {
24657
24787
  if (o.col) colorize(g, o.col);
24658
24788
  return g;
24659
24789
  }
24790
+ function stretchEnds(st, by) {
24791
+ const out = st.map(function(q) {
24792
+ return q.slice();
24793
+ });
24794
+ const last = out.length - 1;
24795
+ const dir = out[last][0] >= out[0][0] ? 1 : -1;
24796
+ out[0][0] = out[0][0] - dir * by;
24797
+ out[last][0] = out[last][0] + dir * by;
24798
+ return out;
24799
+ }
24800
+ const paneCount = /* @__PURE__ */ new WeakMap();
24801
+ function nextPaneScale(c) {
24802
+ const n = paneCount.get(c) ?? 0;
24803
+ paneCount.set(c, n + 1);
24804
+ return 0.988 - 35e-4 * (n % 4);
24805
+ }
24806
+ const skinCount = /* @__PURE__ */ new WeakMap();
24807
+ function nextSkinScale(c) {
24808
+ const n = skinCount.get(c) ?? 0;
24809
+ skinCount.set(c, n + 1);
24810
+ return 1.004 + 25e-4 * (n % 3);
24811
+ }
24660
24812
  function fuseGlass(c, st, keep, label, type, o) {
24661
24813
  o = o || {};
24662
- const k = o.k || 0.988;
24814
+ const k = o.k || nextPaneScale(c);
24663
24815
  const st2 = st.map(function(s) {
24664
24816
  const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
24665
24817
  return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
@@ -24672,12 +24824,12 @@ function createWaterAirKit(kit) {
24672
24824
  }
24673
24825
  function fuseSkin(c, st, keep, mat, o) {
24674
24826
  o = o || {};
24675
- const k = o.k || 1.004;
24827
+ const k = o.k || nextSkinScale(c);
24676
24828
  const st2 = st.map(function(s) {
24677
24829
  const cy = (s[1] + s[2]) / 2, hh = (s[2] - s[1]) / 2 * k;
24678
24830
  return [s[0], cy - hh, cy + hh, s[3] * k, s[4], s[5]];
24679
24831
  });
24680
- const m = c.add(fuseGeo(st2, { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
24832
+ const m = c.add(fuseGeo(stretchEnds(st2, -3e-3), { smooth: o.smooth || 48, seg: o.seg || 30 }), mat, 0, 0, 0, o.parent);
24681
24833
  m.castShadow = false;
24682
24834
  kit.cutMesh(m, [keep], 40);
24683
24835
  c.deform.push(m);
@@ -24948,13 +25100,13 @@ function createWaterAirKit(kit) {
24948
25100
  }
24949
25101
  ;
24950
25102
  (o.screens || []).forEach(function(s) {
24951
- const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.085, y + s[0], s[1]);
25103
+ const sc = c.roundBox(0.012, s[2], s[3], 8e-3, MT.screen, x - 0.091, y + s[0], s[1]);
24952
25104
  sc.castShadow = false;
24953
25105
  });
24954
25106
  }
24955
25107
  function cyclic(c, x, fl, z) {
24956
- c.rod(new V3(x, fl, z), new V3(x - 0.04, fl + 0.55, z), 0.014, MT.plastic);
24957
- c.roundBox(0.04, 0.12, 0.04, 0.015, MT.plastic, x - 0.05, fl + 0.6, z);
25108
+ c.rod(new V3(x, fl, z), new V3(x - 0.04, fl + 0.55, z), 0.014, MT.plastic).userData.noCabinRay = true;
25109
+ c.roundBox(0.04, 0.12, 0.04, 0.015, MT.plastic, x - 0.05, fl + 0.6, z).userData.noCabinRay = true;
24958
25110
  }
24959
25111
  function collective(c, x, fl, z) {
24960
25112
  c.rod(new V3(x - 0.35, fl + 0.18, z), new V3(x + 0.05, fl + 0.32, z), 0.016, MT.plastic);
@@ -24988,7 +25140,7 @@ function createWaterAirKit(kit) {
24988
25140
  );
24989
25141
  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
25142
  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 - 0.01, 0, P);
25143
+ c.roundBox(0.36 * k, 0.018, 0.2 * k, 8e-3, low, -0.17 * k, -shaft - 6e-3, 0, P);
24992
25144
  c.cylinder(0.055 * k, 0.05 * k, 0.32 * k, low, -0.2 * k, -shaft - 0.09 * k, 0, "x", P);
24993
25145
  c.roundBox(0.16 * k, 0.12 * k, 0.025, 0.01, low, -0.18 * k, -shaft - 0.17 * k, 0, P);
24994
25146
  const pr = propeller(c, -0.38 * k, -shaft - 0.09 * k, 0, {
@@ -25020,7 +25172,11 @@ function createWaterAirKit(kit) {
25020
25172
  function skinOf(c, mesh, keep, mat, o) {
25021
25173
  o = o || {};
25022
25174
  const g = mesh.geometry.clone(), p = g.attributes.position, sz = o.sz || 1.006, dy = o.dy || 0;
25175
+ let reach = 0;
25176
+ for (let i = 0; i < p.count; i++) reach = Math.max(reach, Math.abs(p.getX(i)));
25177
+ const sx = o.ends === false ? 1 : 1 - 3e-3 / (reach || 1);
25023
25178
  for (let i = 0; i < p.count; i++) {
25179
+ p.setX(i, p.getX(i) * sx);
25024
25180
  p.setZ(i, p.getZ(i) * sz);
25025
25181
  p.setY(i, p.getY(i) + dy * Math.sign(p.getY(i)));
25026
25182
  }
@@ -25134,6 +25290,8 @@ function createWaterAirKit(kit) {
25134
25290
  foilGeo,
25135
25291
  fuseGeo,
25136
25292
  fuseGlass,
25293
+ nextPaneScale,
25294
+ nextSkinScale,
25137
25295
  fuseSkin,
25138
25296
  bandT,
25139
25297
  cutT,
@@ -25282,7 +25440,7 @@ function installWaterAir(fx) {
25282
25440
  const tank = c.roundBox(0.48, 0.24, 0.3, 0.06, CM("#a3241c", { roughness: 0.5 }), -2.05, 0.06, -0.38);
25283
25441
  c.rod(new V3(-2, 0.18, -0.38), new V3(-2.3, 0.4, -0.1), 0.01, CM("#1b1b1b"));
25284
25442
  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, 0, 0.5, { rot: [0.3, 0, 0] });
25443
+ c.roundBox(0.35, 0.03, 0.14, 0.02, MT.wood, 0.45, 4e-3, 0.5, { rot: [0.3, 0, 0] });
25286
25444
  c.rod(new V3(-2.35, 0.42, 0.6), new V3(-2.35, 1.1, 0.6), 0.012, MT.chrome);
25287
25445
  EA.navLight(c, -2.35, 1.13, 0.6, "white", trl("labels.stern_light_mast"), { r: 0.035 });
25288
25446
  EA.navLight(c, 2.3, 0.53, 0.06, "green", trl("labels.starboard_bow_light_green"), { r: 0.03 });
@@ -25459,7 +25617,7 @@ function installWaterAir(fx) {
25459
25617
  c.roundBox(2.3, 0.22, 0.5, 0.07, vinyl, -2.3, 0.45, s * 0.75);
25460
25618
  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
25619
  });
25462
- c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.45, 0);
25620
+ c.roundBox(0.5, 0.22, 1.5, 0.07, vinyl, -3.35, 0.453, 0);
25463
25621
  c.roundBox(0.12, 0.42, 2.1, 0.05, vinyl, -3.52, 0.74, 0);
25464
25622
  c.seatTops.push(
25465
25623
  { x: -2.3, y: 0.57, z: 0.75, w: 0.5, l: 2.2 },
@@ -25467,8 +25625,8 @@ function installWaterAir(fx) {
25467
25625
  { x: 2, y: 0.57, z: 0, w: 1.2, l: 0.9 }
25468
25626
  );
25469
25627
  const cy = 0.22;
25470
- c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.36, 0.72);
25471
- c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.36, -0.74);
25628
+ c.roundBox(0.85, 0.72, 0.78, 0.12, white, 0.75, cy + 0.362, 0.72);
25629
+ c.roundBox(0.85, 0.72, 0.72, 0.12, white, 0.75, cy + 0.362, -0.74);
25472
25630
  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
25631
  [0.55, 0.72, 0.89].forEach(function(z, i) {
25474
25632
  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 +25637,8 @@ function installWaterAir(fx) {
25479
25637
  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
25638
  c.rod(new V3(0.55, cy + 0.7, 0.98), new V3(0.42, cy + 0.88, 1), 0.015, MT.chrome);
25481
25639
  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 });
25640
+ 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, open: true, role: "front_passenger" });
25641
+ 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, open: true, id: "driver", role: "driver" });
25484
25642
  [1, -1].forEach(function(s) {
25485
25643
  const pts = [];
25486
25644
  for (let i = 0; i <= 8; i++) {
@@ -25702,7 +25860,7 @@ function installWaterAir(fx) {
25702
25860
  [1.6, -0.55],
25703
25861
  [1.95, -1]
25704
25862
  ].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.12, q[1]);
25863
+ 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
25864
  });
25707
25865
  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
25866
  const cutF = {
@@ -25791,11 +25949,12 @@ function installWaterAir(fx) {
25791
25949
  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
25950
  }
25793
25951
  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 });
25952
+ kit.seat(c, hx - 0.12, hy0 + 2e-3, 0, { w: 0.54, h: 0.55, back: 0.45, mat: inner, headrest: false, id: "driver", role: "driver" });
25953
+ c.addDoor({ id: "cabin_door", widthMetres: 0.68, heightMetres: 1.55 });
25795
25954
  c.roundBox(1.8, 0.12, 0.65, 0.04, CM("#7c5a3b"), hx - 0.2, hy0 + 0.5, -0.72);
25796
25955
  c.roundBox(1.7, 0.08, 0.55, 0.04, CM("#6b7c8f", { roughness: 1 }), hx - 0.2, hy0 + 0.6, -0.72);
25797
25956
  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.6, 0.65);
25957
+ c.cylinder(0.1, 0.1, 1.2, MT.trim, hx - 0.75, hy0 + hh + 0.596, 0.65);
25799
25958
  c.cylinder(0.13, 0.1, 0.1, MT.trim, hx - 0.75, hy0 + hh + 1.22, 0.65);
25800
25959
  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
25960
  EA.navLight(c, hx + 0.4, hy0 + hh + 1.65, 0, "white", trl("labels.masthead_light"), { r: 0.05 });
@@ -25896,7 +26055,7 @@ function installWaterAir(fx) {
25896
26055
  const EA = shared.EA, white = "#ecebe6";
25897
26056
  const paintW = c.paint(white);
25898
26057
  const ST = [
25899
- [2.3, 0.98, 1.46, 0.7, 2.4],
26058
+ [2.297, 0.98, 1.46, 0.7, 2.4],
25900
26059
  [2.15, 0.88, 1.55, 0.92, 2.6],
25901
26060
  [1.85, 0.8, 1.61, 1.02, 2.8],
25902
26061
  [1.45, 0.72, 1.65, 1.08, 3],
@@ -26007,11 +26166,13 @@ function installWaterAir(fx) {
26007
26166
  const fl = 0.74, fab = CM("#4a463f", { roughness: 0.9 });
26008
26167
  c.roundBox(2.2, 0.03, 0.98, 0.01, MT.carpet, 0.2, fl, 0).castShadow = false;
26009
26168
  [0.26, -0.26].forEach(function(z) {
26010
- kit.seat(c, 0.38, fl, z, { w: 0.44, h: 0.34, back: 0.62, lean: 0.18, mat: fab });
26169
+ kit.seat(c, 0.38, fl, z, { w: 0.48, h: 0.24, back: 0.62, lean: 0.18, mat: fab, role: "pilot" });
26011
26170
  EA.pedals(c, 1.18, fl, z);
26012
26171
  kit.yoke(c, 0.98, 1.47, z);
26013
26172
  });
26014
- kit.seat(c, -0.52, fl, 0, { w: 0.96, n: 2, h: 0.34, back: 0.58, lean: 0.2, mat: fab });
26173
+ kit.seat(c, -0.52, fl, 0, { w: 0.96, n: 2, h: 0.24, back: 0.58, lean: 0.2, mat: fab });
26174
+ c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 0.95 });
26175
+ c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 0.95 });
26015
26176
  EA.instPanel(c, 1.1, 1.52, 1, { gauges: 6, z0: -0.38, screens: [[0, 0.12, 0.14, 0.22]] });
26016
26177
  c.roundBox(0.1, 0.1, 0.1, 0.02, MT.plastic, 1, 1.32, 0);
26017
26178
  c.cylinder(0.018, 0.018, 0.1, MT.chrome, 0.93, 1.34, 0.02, "x");
@@ -26025,7 +26186,7 @@ function installWaterAir(fx) {
26025
26186
  };
26026
26187
  const g = EA.foilGeo(
26027
26188
  [
26028
- { p: [0.66, dh(0), 0], c: 1.63, t: 0.12, cam: 0.02 },
26189
+ { p: [0.66, dh(0), s * 2e-3], c: 1.63, t: 0.12, cam: 0.02 },
26029
26190
  { p: [0.66, dh(2.6), s * 2.6], c: 1.63, t: 0.12, cam: 0.02 },
26030
26191
  { p: [0.62, dh(5.2), s * 5.2], c: 1.14, t: 0.11, cam: 0.02 },
26031
26192
  { p: [0.58, dh(5.5) + 0.02, s * 5.5], c: 0.98, t: 0.06, cam: 0.01 }
@@ -26064,7 +26225,7 @@ function installWaterAir(fx) {
26064
26225
  const hs = c.add(
26065
26226
  EA.foilGeo(
26066
26227
  [
26067
- { p: [-4.6, 1.42, 0], c: 1.2, t: 0.09 },
26228
+ { p: [-4.6, 1.42, s * 2e-3], c: 1.2, t: 0.09 },
26068
26229
  { p: [-4.95, 1.42, s * 1.72], c: 0.86, t: 0.08 }
26069
26230
  ],
26070
26231
  { up: "y", n: 10 }
@@ -26286,9 +26447,10 @@ function installWaterAir(fx) {
26286
26447
  );
26287
26448
  const fl = -0.36;
26288
26449
  c.roundBox(1.3, 0.03, 0.8, 0.01, MT.carpet, -0.4, fl, 0, { parent: grp }).castShadow = false;
26289
- kit.seat(c, -0.55, fl, 0, { w: 0.5, h: 0.32, back: 0.66, lean: 0.12, mat: CM("#3a3530", { roughness: 0.9 }), parent: grp });
26290
- c.rod(new V3(0, fl, 0), new V3(-0.06, fl + 0.55, 0), 0.016, MT.plastic, { parent: grp });
26291
- c.roundBox(0.04, 0.13, 0.05, 0.015, MT.plastic, -0.07, fl + 0.6, 0, { parent: grp });
26450
+ kit.seat(c, -0.55, fl, 0, { w: 0.5, h: 0.18, back: 0.66, lean: 0.12, mat: CM("#3a3530", { roughness: 0.9 }), parent: grp, role: "pilot" });
26451
+ c.addDoor({ id: "canopy_door", widthMetres: 0.7, heightMetres: 0.85 });
26452
+ c.rod(new V3(0, fl, 0), new V3(-0.06, fl + 0.55, 0), 0.016, MT.plastic, { parent: grp }).userData.noCabinRay = true;
26453
+ c.roundBox(0.04, 0.13, 0.05, 0.015, MT.plastic, -0.07, fl + 0.6, 0, { parent: grp }).userData.noCabinRay = true;
26292
26454
  c.roundBox(0.16, 0.3, 0.8, 0.04, CM("#232427"), 0.36, 0.5, 0, { parent: grp, rot: [0, 0, 0.2] });
26293
26455
  [-0.24, -0.12, 0, 0.12, 0.24].forEach(function(z, i) {
26294
26456
  c.cylinder(0.036, 0.036, 0.012, MT.gauge, 0.27, 0.55 - i % 2 * 0.09, z, "x", { seg: 16, parent: grp }).castShadow = false;
@@ -26315,7 +26477,7 @@ function installWaterAir(fx) {
26315
26477
  const w = c.add(
26316
26478
  EA.foilGeo(
26317
26479
  [
26318
- { p: [1.18, dh(0), 0], c: 1.71, t: 0.15, cam: 0.02 },
26480
+ { p: [1.18, dh(0), s * 2e-3], c: 1.71, t: 0.15, cam: 0.02 },
26319
26481
  { p: [1.18, dh(5.6), s * 5.6], c: 1.71, t: 0.14, cam: 0.02 },
26320
26482
  { p: [1.12, dh(5.84) + 0.02, s * 5.84], c: 1.55, t: 0.07, cam: 0.01 }
26321
26483
  ],
@@ -26349,7 +26511,7 @@ function installWaterAir(fx) {
26349
26511
  const hs = c.add(
26350
26512
  EA.foilGeo(
26351
26513
  [
26352
- { p: [-2.95, 0.36, 0], c: 0.95, t: 0.09 },
26514
+ { p: [-2.95, 0.36, s * 2e-3], c: 0.95, t: 0.09 },
26353
26515
  { p: [-3.05, 0.36, s * 1.8], c: 0.8, t: 0.08 }
26354
26516
  ],
26355
26517
  { up: "y", n: 10 }
@@ -26381,8 +26543,8 @@ function installWaterAir(fx) {
26381
26543
  const finB = c.add(
26382
26544
  EA.foilGeo(
26383
26545
  [
26384
- { p: [-2.64, 0.42, 0], c: 1.27, t: 0.11 },
26385
- { p: [-3.24, 1.85, 0], c: 0.74, t: 0.1 }
26546
+ { p: [-2.64, 0.424, 0], c: 1.27, t: 0.11 },
26547
+ { p: [-3.24, 1.853, 0], c: 0.74, t: 0.1 }
26386
26548
  ],
26387
26549
  { up: "z", n: 10 }
26388
26550
  ),
@@ -26652,10 +26814,11 @@ function installWaterAir(fx) {
26652
26814
  EA.sideKeepP(fdP, 0.35, s),
26653
26815
  s > 0 ? lbl("front_right_door_window") : lbl("front_left_door_window"),
26654
26816
  "tempered",
26655
- { pos: new V3(0.4, 1.5, s * 0.64) }
26817
+ { pos: new V3(0.4, 1.5, s * 0.64), k: 0.988 }
26656
26818
  );
26657
26819
  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)
26820
+ pos: new V3(-0.5, 1.5, s * 0.63),
26821
+ k: 0.988
26659
26822
  });
26660
26823
  const df = EA.polySdf([
26661
26824
  [0.78, 0.72],
@@ -26697,10 +26860,12 @@ function installWaterAir(fx) {
26697
26860
  const fl = 0.72, fab = CM("#3b3a38", { roughness: 0.9 });
26698
26861
  c.roundBox(1.9, 0.03, 1.16, 0.01, MT.carpet, 0.2, fl, 0).castShadow = false;
26699
26862
  [0.3, -0.3].forEach(function(z) {
26700
- kit.seat(c, 0.35, fl, z, { w: 0.48, h: 0.36, back: 0.62, lean: 0.14, mat: fab });
26863
+ kit.seat(c, 0.35, fl, z, { w: 0.48, h: 0.2, back: 0.62, lean: 0.14, mat: fab, role: "pilot" });
26701
26864
  EA.pedals(c, 1.35, fl, z);
26702
26865
  });
26703
- kit.seat(c, -0.55, fl + 0.06, 0, { w: 1.06, n: 2, h: 0.36, back: 0.6, lean: 0.12, mat: fab });
26866
+ kit.seat(c, -0.55, fl + 0.06, 0, { w: 1.06, n: 2, h: 0.2, back: 0.6, lean: 0.12, mat: fab });
26867
+ c.addDoor({ id: "door_front_left", widthMetres: 0.72, heightMetres: 1.05 });
26868
+ c.addDoor({ id: "door_front_right", widthMetres: 0.72, heightMetres: 1.05 });
26704
26869
  c.roundBox(0.42, 0.62, 0.3, 0.06, CM("#232427"), 1.15, fl + 0.32, 0, { rot: [0, 0, 0.35] });
26705
26870
  c.roundBox(0.06, 0.3, 0.3, 0.02, CM("#1a1b1d"), 1.25, fl + 0.65, 0, { rot: [0, 0, 0.6] });
26706
26871
  [-0.07, 0.07].forEach(function(z) {
@@ -26751,7 +26916,7 @@ function installWaterAir(fx) {
26751
26916
  const hs = c.add(
26752
26917
  EA.foilGeo(
26753
26918
  [
26754
- { p: [-5.25, 1.76, 0], c: 0.45, t: 0.1 },
26919
+ { p: [-5.25, 1.76, s * 2e-3], c: 0.45, t: 0.1 },
26755
26920
  { p: [-5.32, 1.76, s * 0.62], c: 0.34, t: 0.09 }
26756
26921
  ],
26757
26922
  { up: "y", n: 8 }
@@ -27031,6 +27196,8 @@ function installWaterAir(fx) {
27031
27196
  EA.collective(c, 1.3, fl, -0.72);
27032
27197
  EA.collective(c, 1.3, fl, 0.12);
27033
27198
  kit.seat(c, -0.35, fl + 0.04, 0, { w: 1.56, n: 4, h: 0.38, back: 0.62, lean: 0.1, mat: fab });
27199
+ c.addDoor({ id: "door_front_left", widthMetres: 0.78, heightMetres: 1.15 });
27200
+ c.addDoor({ id: "door_front_right", widthMetres: 0.78, heightMetres: 1.15 });
27034
27201
  EA.instPanel(c, 2.25, 1.55, 1.2, { gauges: 8, z0: -0.45, tilt: 0.3, screens: [[0.05, 0.25, 0.14, 0.2]] });
27035
27202
  c.roundBox(0.5, 0.45, 0.32, 0.06, CM("#232427"), 2.05, fl + 0.24, 0);
27036
27203
  c.roundBox(2.3, 0.02, 1.4, 0.01, MT.headliner, 0.45, 2.24, 0).castShadow = false;
@@ -27079,7 +27246,7 @@ function installWaterAir(fx) {
27079
27246
  const hs = c.add(
27080
27247
  EA.foilGeo(
27081
27248
  [
27082
- { p: [-5.3, 1.98, 0], c: 0.6, t: 0.11 },
27249
+ { p: [-5.3, 1.98, s * 2e-3], c: 0.6, t: 0.11 },
27083
27250
  { p: [-5.38, 1.98, s * 1], c: 0.52, t: 0.1 }
27084
27251
  ],
27085
27252
  { up: "y", n: 8 }
@@ -27280,7 +27447,10 @@ function createContext(kit, options) {
27280
27447
  hasSunroof: (key) => !!options.sunroofs?.includes(key),
27281
27448
  register(spec, build) {
27282
27449
  if (!groups.has(spec.group) || only && !only.has(spec.key) || skip.has(spec.key)) return;
27283
- kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] }, build);
27450
+ kit.register({ ...spec, seedKey: legacyVehicleSeeds[spec.key] }, (context, vehicleKit) => {
27451
+ build(context, vehicleKit);
27452
+ separateSpokes(context);
27453
+ });
27284
27454
  }
27285
27455
  };
27286
27456
  }
@@ -29556,6 +29726,49 @@ function fleetProvingSubject(id, options = {}) {
29556
29726
  }
29557
29727
  };
29558
29728
  }
29729
+
29730
+ // src/cabin-categories.ts
29731
+ var CABIN_OVERRIDES = {
29732
+ school_bus: "bus",
29733
+ city_bus: "bus",
29734
+ light_4x4: "military_light",
29735
+ troop_truck: "truck",
29736
+ apc_6x6: "military_armored",
29737
+ armored_car_6x6: "military_armored",
29738
+ battle_tank: "military_armored",
29739
+ transport_helicopter: "aircraft_enclosed",
29740
+ light_attack_turboprop: "aircraft_enclosed",
29741
+ attack_helicopter: "aircraft_enclosed",
29742
+ fishing_boat: "boat_cabin",
29743
+ patrol_boat: "boat_cabin"
29744
+ };
29745
+ function fleetCabinCategoryOf(id) {
29746
+ const override = CABIN_OVERRIDES[id];
29747
+ if (override !== void 0) return override;
29748
+ const group = fleetGroupOf(id);
29749
+ switch (group) {
29750
+ case "cars":
29751
+ return "passenger_car";
29752
+ case "suvs":
29753
+ case "pickups":
29754
+ return "suv_pickup";
29755
+ case "vans":
29756
+ return "van";
29757
+ case "heavy":
29758
+ return "truck";
29759
+ case "agricultural":
29760
+ return "agricultural";
29761
+ case "air":
29762
+ return "aircraft_enclosed";
29763
+ case "motorcycles":
29764
+ case "water":
29765
+ return "open_vehicle";
29766
+ case "military":
29767
+ return "military_armored";
29768
+ default:
29769
+ return "passenger_car";
29770
+ }
29771
+ }
29559
29772
  export {
29560
29773
  FLEET_FOUR_WHEEL_DRIVE,
29561
29774
  agricultural,
@@ -29566,6 +29779,7 @@ export {
29566
29779
  createFleetPack,
29567
29780
  createScenarios,
29568
29781
  en_default as enLocale,
29782
+ fleetCabinCategoryOf,
29569
29783
  fleetCard,
29570
29784
  fleetDims,
29571
29785
  fleetGroupIds,