@pinkaphant/kolmo 0.2.3 → 0.3.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.
Files changed (61) hide show
  1. package/bin/kolmo.mjs +1 -1
  2. package/dist/engine/kolmoActor.js +125 -83
  3. package/dist/engine/kolmoLongDrive.js +136 -91
  4. package/dist/engine/kolmoStore.d.ts +6 -5
  5. package/dist/engine/kolmoStore.js +115 -79
  6. package/dist/engine/kolmoVehicle.d.ts +1 -1
  7. package/dist/engine/kolmoVehicle.js +160 -147
  8. package/dist/engine/kolmoVehicleDriver.d.ts +12 -4
  9. package/dist/engine/kolmoVehicleDriver.js +40 -20
  10. package/dist/engine/kolmoWorld.js +55 -35
  11. package/dist/importer/CabinPreviewRig.d.ts +13 -0
  12. package/dist/importer/CabinPreviewRig.js +138 -0
  13. package/dist/importer/CabinStepSection.d.ts +17 -0
  14. package/dist/importer/CabinStepSection.js +222 -0
  15. package/dist/importer/ChopShopPanel.d.ts +31 -1
  16. package/dist/importer/ChopShopPanel.js +474 -380
  17. package/dist/importer/GateHudBar.d.ts +3 -0
  18. package/dist/importer/GateHudBar.js +8 -2
  19. package/dist/importer/GlbImportGate.js +183 -147
  20. package/dist/importer/ImporterPlinthUikitTags.d.ts +2 -1
  21. package/dist/importer/ImporterPlinthUikitTags.js +23 -16
  22. package/dist/importer/Step1CalibrationPlinth.d.ts +10 -0
  23. package/dist/importer/Step1CalibrationPlinth.js +203 -141
  24. package/dist/importer/Step2UniversalPad.d.ts +8 -1
  25. package/dist/importer/Step2UniversalPad.js +112 -90
  26. package/dist/importer/cabinMeshBuilders.d.ts +13 -0
  27. package/dist/importer/cabinMeshBuilders.js +104 -0
  28. package/dist/importer/cabinMixamoRig.d.ts +53 -0
  29. package/dist/importer/cabinMixamoRig.js +150 -0
  30. package/dist/importer/chopShopActions.d.ts +6 -0
  31. package/dist/importer/chopShopActions.js +86 -61
  32. package/dist/importer/chopShopUiComponents.d.ts +22 -0
  33. package/dist/importer/chopShopUiComponents.js +91 -0
  34. package/dist/importer/gateStore.d.ts +5 -2
  35. package/dist/importer/gateStore.js +13 -10
  36. package/dist/importer/glbNormalizer.d.ts +10 -1
  37. package/dist/importer/glbNormalizer.js +114 -49
  38. package/dist/importer/importerWebMcp.js +4 -1
  39. package/dist/importer/index.d.ts +4 -2
  40. package/dist/importer/index.js +24 -21
  41. package/dist/importer/khrCompiler.d.ts +20 -1
  42. package/dist/importer/khrCompiler.js +539 -290
  43. package/dist/importer/launcherBake.js +12 -8
  44. package/dist/importer/meshIslands.d.ts +4 -0
  45. package/dist/importer/meshIslands.js +104 -99
  46. package/dist/importer/surfaceCutter.d.ts +12 -3
  47. package/dist/importer/surfaceCutter.js +220 -127
  48. package/dist/importer/surfaceTopology.d.ts +13 -2
  49. package/dist/importer/surfaceTopology.js +57 -29
  50. package/dist/importer/universalGateBake.d.ts +7 -1
  51. package/dist/importer/universalGateBake.js +63 -60
  52. package/dist/importer/usdToGlb.js +19 -7
  53. package/dist/importer/useChopShopController.d.ts +27 -1
  54. package/dist/importer/useChopShopController.js +369 -255
  55. package/dist/importer/wheelAxlePairing.d.ts +3 -1
  56. package/dist/importer/wheelAxlePairing.js +82 -33
  57. package/dist/index.js +31 -28
  58. package/dist/junk/ShardPieces.js +3 -3
  59. package/dist/physics/index.d.ts +7 -0
  60. package/dist/physics/index.js +66 -40
  61. package/package.json +1 -1
@@ -1,67 +1,111 @@
1
- import { useGateStore as e } from "./gateStore.js";
2
- import { ImporterPlinthUikitTags as t, makeStarterDomainScene as n } from "./ImporterPlinthUikitTags.js";
1
+ import { computeChopPartHinge as e } from "./vehiclePanelAnim.js";
2
+ import { CabinPreviewRig as t } from "./CabinPreviewRig.js";
3
+ import { useGateStore as n } from "./gateStore.js";
3
4
  import { CHOP_ROLES as r } from "./surfaceTopology.js";
4
- import { computeChopPartHinge as i } from "./vehiclePanelAnim.js";
5
- import { buildSelectionOverlayGeometry as a, createFleet12GonWheelGroup as o, previewLoopPolyline as s } from "./surfaceCutter.js";
6
- import { measureSelection as c } from "./wheelAxlePairing.js";
7
- import { useEffect as l, useMemo as u, useRef as d } from "react";
8
- import * as f from "three";
9
- import { Bounds as p, Bvh as m, Line as h } from "@react-three/drei";
10
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
5
+ import { ImporterPlinthUikitTags as i, makeStarterDomainScene as a } from "./ImporterPlinthUikitTags.js";
6
+ import { planArticulatedPanels as o } from "./khrCompiler.js";
7
+ import { buildMultiSelectionOverlay as s, previewLoopPolyline as c } from "./surfaceCutter.js";
8
+ import { createFleet12GonWheelGroup as l, measureSelection as u } from "./wheelAxlePairing.js";
9
+ import { useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
10
+ import * as h from "three";
11
+ import { Bounds as g, Bvh as _, Line as v } from "@react-three/drei";
12
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
13
  // src/importer/Step1CalibrationPlinth.tsx
12
- function y(e, t) {
13
- let n = new f.BufferGeometry();
14
- return n.setAttribute("position", new f.BufferAttribute(e, 3)), n.setAttribute("normal", new f.BufferAttribute(t, 3)), n;
14
+ function S(e, t) {
15
+ let n = new h.BufferGeometry();
16
+ return n.setAttribute("position", new h.BufferAttribute(e, 3)), n.setAttribute("normal", new h.BufferAttribute(t, 3)), n;
15
17
  }
16
- var b = Object.fromEntries(r.filter((e) => e.role !== "wheel").map((e) => [e.role, e.color]));
17
- function x(n) {
18
- let r = e((e) => e.calibration), x = d(!1), S = u(() => n.assembly.panels.map((e) => y(e.localPositions, e.localNormals)), [n.assembly]), C = u(() => y(n.assembly.wheels[0].positions, n.assembly.wheels[0].normals), [n.assembly]);
19
- l(() => () => {
20
- for (let e of S) e.dispose();
21
- C.dispose();
22
- }, [S, C]), l(() => {
18
+ var C = Object.fromEntries(r.filter((e) => e.role !== "wheel" && e.role !== "propeller").map((e) => [e.role, e.color]));
19
+ function w(r) {
20
+ let a = n((e) => e.calibration), w = p(!1), T = p(!1), [E, D] = m(null), O = f(() => r.assembly.panels.map((e) => S(e.localPositions, e.localNormals)), [r.assembly]), k = f(() => S(r.assembly.wheels[0].positions, r.assembly.wheels[0].normals), [r.assembly]), A = f(() => {
21
+ let e = r.cabin?.layout === "rhd" ? 1 : -1, t = new h.Plane(new h.Vector3(e, 0, 0), .12);
22
+ return {
23
+ xray: new h.MeshStandardMaterial({
24
+ color: "#94a3b8",
25
+ roughness: .45,
26
+ metalness: .1,
27
+ transparent: !0,
28
+ opacity: .22,
29
+ depthWrite: !1,
30
+ side: h.DoubleSide
31
+ }),
32
+ cutaway: new h.MeshStandardMaterial({
33
+ color: "#cbd5e1",
34
+ roughness: .65,
35
+ metalness: .15,
36
+ side: h.DoubleSide,
37
+ clippingPlanes: [t]
38
+ }),
39
+ glass: new h.MeshStandardMaterial({
40
+ color: "#7dd3fc",
41
+ roughness: .12,
42
+ metalness: .1,
43
+ transparent: !0,
44
+ opacity: .34,
45
+ side: h.DoubleSide
46
+ })
47
+ };
48
+ }, [r.cabin?.layout]);
49
+ d(() => () => {
50
+ A.xray.dispose(), A.cutaway.dispose(), A.glass.dispose();
51
+ }, [A]), d(() => () => {
52
+ for (let e of O) e.dispose();
53
+ k.dispose();
54
+ }, [O, k]), d(() => {
23
55
  let e = () => {
24
- x.current = !1;
56
+ w.current && (w.current = !1, r.onBrushActiveChange?.(!1));
25
57
  };
26
58
  return window.addEventListener("pointerup", e), () => window.removeEventListener("pointerup", e);
27
- }, []);
28
- let w = u(() => n.faceSelection ? n.islands.find((e) => e.id === n.faceSelection.islandId) ?? null : null, [n.faceSelection, n.islands]), T = u(() => w && n.faceSelection && n.faceSelection.triangles.length > 0 ? a(w.geometry, n.faceSelection.triangles, .0045) : null, [w, n.faceSelection]), E = u(() => w && n.faceSelection && n.faceSelection.mirrored.length > 0 ? a(w.geometry, n.faceSelection.mirrored, .0045) : null, [w, n.faceSelection]);
29
- l(() => () => {
30
- T?.dispose();
31
- }, [T]), l(() => () => {
32
- E?.dispose();
33
- }, [E]);
34
- let D = u(() => {
35
- if (!n.loopDots || n.loopDots.points.length < 2) return null;
36
- let e = n.islands.find((e) => e.id === n.loopDots.islandId);
37
- return e ? s(e, n.loopDots.points) : null;
38
- }, [n.loopDots, n.islands]), O = u(() => {
39
- if (n.wheelSource !== "fleet12" || n.islands.length === 0) return [];
59
+ }, [r.onBrushActiveChange]);
60
+ let j = f(() => s(r.islands, r.faceSelection, "triangles", .0045), [r.islands, r.faceSelection]), M = f(() => s(r.islands, r.faceSelection, "mirrored", .0045), [r.islands, r.faceSelection]);
61
+ d(() => () => {
62
+ j?.dispose();
63
+ }, [j]), d(() => () => {
64
+ M?.dispose();
65
+ }, [M]);
66
+ let N = f(() => {
67
+ if (!r.loopDots || r.loopDots.points.length < 2) return null;
68
+ let e = r.islands.find((e) => e.id === r.loopDots.islandId);
69
+ return e ? c(e, r.loopDots.points) : null;
70
+ }, [r.loopDots, r.islands]), P = f(() => {
71
+ if (r.wheelSource !== "fleet12" || r.islands.length === 0) return [];
40
72
  let e = [];
41
- return n.axles.forEach((t, r) => {
73
+ return r.axles.forEach((t, n) => {
42
74
  for (let [i, a] of [["L", t.left], ["R", t.right]]) {
43
75
  if (a.length === 0) continue;
44
- let t = c(n.islands, a), s = Math.max(.14, t.radius), l = Math.max(.1, t.halfWidth * 2);
76
+ let t = u(r.islands, a);
45
77
  e.push({
46
- key: `f12_${r}_${i}`,
78
+ key: `f12_${n}_${i}`,
47
79
  pos: t.center,
48
- group: o(s, l)
80
+ group: l(Math.max(.1, t.radius), Math.max(.08, t.halfWidth * 2))
49
81
  });
50
82
  }
51
83
  }), e;
52
84
  }, [
53
- n.wheelSource,
54
- n.axles,
55
- n.islands
85
+ r.wheelSource,
86
+ r.axles,
87
+ r.islands
56
88
  ]);
57
- l(() => () => {
58
- for (let e of O) e.group.traverse((e) => {
89
+ d(() => () => {
90
+ for (let e of P) e.group.traverse((e) => {
59
91
  let t = e;
60
92
  if (t.geometry && t.geometry.dispose(), t.material) for (let e of Array.isArray(t.material) ? t.material : [t.material]) e.dispose();
61
93
  });
62
- }, [O]);
63
- let k = (e, t, r) => {
64
- e.faceIndex != null && (e.stopPropagation(), n.onPickFace({
94
+ }, [P]);
95
+ let F = f(() => {
96
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set([...r.wheelColors.keys(), ...r.propellerSet ?? []]);
97
+ for (let n of o(r.islands, r.partPicks, t)) for (let t of n.islandIds) e.set(t, n.hinge);
98
+ return e;
99
+ }, [
100
+ r.islands,
101
+ r.partPicks,
102
+ r.wheelColors,
103
+ r.propellerSet
104
+ ]), I = (e, t, n, i) => {
105
+ if (e.faceIndex == null) return;
106
+ e.stopPropagation();
107
+ let a = i ?? !!(e.altKey || e.button === 2 || "buttons" in e && e.buttons & 2);
108
+ r.onPickFace({
65
109
  islandId: t,
66
110
  faceIndex: e.faceIndex,
67
111
  point: [
@@ -69,183 +113,200 @@ function x(n) {
69
113
  e.point.y,
70
114
  e.point.z
71
115
  ],
72
- erase: !!(e.altKey || e.button === 2),
73
- isDrag: r
74
- }));
116
+ erase: a,
117
+ isDrag: n
118
+ });
75
119
  };
76
- return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(p, {
120
+ return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, {
77
121
  fit: !0,
78
122
  clip: !0,
79
123
  margin: 1.38,
80
- children: /* @__PURE__ */ v(m, {
124
+ children: /* @__PURE__ */ x(_, {
81
125
  firstHitOnly: !0,
82
- children: [/* @__PURE__ */ v("group", {
83
- ref: n.rootObjRef,
84
- children: [n.useProxy ? /* @__PURE__ */ v(g, { children: [
85
- n.previewScene && /* @__PURE__ */ _("primitive", { object: n.previewScene }),
86
- n.assembly.panels.map((e, t) => /* @__PURE__ */ _("mesh", {
126
+ children: [/* @__PURE__ */ x("group", {
127
+ ref: r.rootObjRef,
128
+ children: [r.useProxy ? /* @__PURE__ */ x(y, { children: [
129
+ r.previewScene && /* @__PURE__ */ b("primitive", { object: r.previewScene }),
130
+ r.assembly.panels.map((e, t) => /* @__PURE__ */ b("mesh", {
87
131
  position: e.anchorChassis,
88
- geometry: S[t],
89
- children: /* @__PURE__ */ _("meshStandardMaterial", {
132
+ geometry: O[t],
133
+ children: /* @__PURE__ */ b("meshStandardMaterial", {
90
134
  color: e.colorHex,
91
135
  roughness: e.isGlass ? .15 : .88,
92
- transparent: e.isGlass || !!n.previewScene,
93
- opacity: n.previewScene ? .28 : e.isGlass ? .32 : 1,
94
- wireframe: !!n.previewScene,
95
- flatShading: n.assembly.shadingMode === "psx-flat"
136
+ transparent: e.isGlass || !!r.previewScene,
137
+ opacity: r.previewScene ? .28 : e.isGlass ? .32 : 1,
138
+ wireframe: !!r.previewScene,
139
+ flatShading: r.assembly.shadingMode === "psx-flat"
96
140
  })
97
141
  }, e.partId)),
98
- n.assembly.wheels.map((e) => /* @__PURE__ */ _("group", {
142
+ r.assembly.wheels.map((e) => /* @__PURE__ */ b("group", {
99
143
  position: e.position,
100
- children: /* @__PURE__ */ _("mesh", {
101
- geometry: C,
102
- children: /* @__PURE__ */ _("meshStandardMaterial", {
144
+ children: /* @__PURE__ */ b("mesh", {
145
+ geometry: k,
146
+ children: /* @__PURE__ */ b("meshStandardMaterial", {
103
147
  color: 1843753,
104
148
  roughness: .9,
105
149
  flatShading: !0
106
150
  })
107
151
  })
108
152
  }, e.slotId))
109
- ] }) : n.islands.length > 0 ? /* @__PURE__ */ v(g, { children: [
110
- n.islands.map((e) => {
111
- let t = n.wheelColors.get(e.id), r = t ? void 0 : n.partPicks[e.id], a = t ?? (r ? b[r] : void 0);
112
- if (t && n.wheelSource === "fleet12") return null;
113
- let o = [
153
+ ] }) : r.islands.length > 0 ? /* @__PURE__ */ x(y, { children: [
154
+ r.islands.map((t) => {
155
+ let n = r.wheelColors.get(t.id), i = !!r.propellerSet?.has(t.id), a = n || i ? void 0 : r.partPicks[t.id], o = a === "glass", s = n ?? (i ? "#EC4899" : a && !o ? C[a] : void 0), c = E === t.id && r.surfaceMode === "island", l = o ? A.glass : !n && !i && r.shellViewMode === "xray" ? A.xray : !n && !i && r.shellViewMode === "cutaway" ? A.cutaway : t.material;
156
+ if (n && r.wheelSource === "fleet12") return null;
157
+ let u = [
114
158
  0,
115
159
  0,
116
160
  0
117
- ], s = [
161
+ ], d = [
118
162
  0,
119
163
  0,
120
164
  0
121
- ], c = new f.Quaternion();
122
- if (r && (n.hingeScrub > 0 || n.explodeAmount > 0)) {
123
- let t = i(e, r);
124
- s = t.anchor, n.hingeScrub > 0 && c.setFromAxisAngle(new f.Vector3(...t.axis).normalize(), t.openAngle * n.hingeScrub), n.explodeAmount > 0 && (o = [
125
- t.explodeDir[0] * n.explodeAmount,
126
- t.explodeDir[1] * n.explodeAmount,
127
- t.explodeDir[2] * n.explodeAmount
165
+ ], f = new h.Quaternion();
166
+ if (a && !o && (r.hingeScrub > 0 || r.explodeAmount > 0)) {
167
+ let n = F.get(t.id) ?? e(t, a);
168
+ d = n.anchor, r.hingeScrub > 0 && f.setFromAxisAngle(new h.Vector3(...n.axis).normalize(), n.openAngle * r.hingeScrub), r.explodeAmount > 0 && (u = [
169
+ n.explodeDir[0] * r.explodeAmount,
170
+ n.explodeDir[1] * r.explodeAmount,
171
+ n.explodeDir[2] * r.explodeAmount
128
172
  ]);
129
- } else t && n.explodeAmount > 0 && (o = [
130
- Math.sign(e.center[0] || 1) * n.explodeAmount * .65,
173
+ } else n && r.explodeAmount > 0 ? u = [
174
+ Math.sign(t.center[0] || 1) * r.explodeAmount * .65,
175
+ 0,
176
+ 0
177
+ ] : i && r.explodeAmount > 0 && (u = [
131
178
  0,
179
+ r.explodeAmount * .65,
132
180
  0
133
181
  ]);
134
- return /* @__PURE__ */ _("group", {
182
+ return /* @__PURE__ */ b("group", {
135
183
  position: [
136
- s[0] + o[0],
137
- s[1] + o[1],
138
- s[2] + o[2]
184
+ d[0] + u[0],
185
+ d[1] + u[1],
186
+ d[2] + u[2]
139
187
  ],
140
- quaternion: c,
141
- children: /* @__PURE__ */ v("group", {
188
+ quaternion: f,
189
+ children: /* @__PURE__ */ x("group", {
142
190
  position: [
143
- -s[0],
144
- -s[1],
145
- -s[2]
191
+ -d[0],
192
+ -d[1],
193
+ -d[2]
146
194
  ],
147
- children: [/* @__PURE__ */ _("mesh", {
148
- geometry: e.geometry,
149
- material: e.material,
150
- onClick: (t) => {
151
- t.delta > 5 || (n.surfaceMode === "island" ? (t.stopPropagation(), n.onClickIsland(e.id)) : n.surfaceMode !== "triangle" && k(t, e.id, !1));
195
+ children: [/* @__PURE__ */ b("mesh", {
196
+ geometry: t.geometry,
197
+ material: l,
198
+ onPointerOver: (e) => {
199
+ r.surfaceMode === "island" && (e.stopPropagation(), D(t.id));
200
+ },
201
+ onPointerOut: (e) => {
202
+ E === t.id && (e.stopPropagation(), D(null));
152
203
  },
153
- onContextMenu: (t) => {
154
- n.surfaceMode !== "island" && k(t, e.id, !1);
204
+ onClick: (e) => {
205
+ e.delta > 5 || (r.surfaceMode === "island" ? (e.stopPropagation(), r.onClickIsland(t.id)) : r.surfaceMode !== "triangle" && I(e, t.id, !1));
155
206
  },
156
- onPointerDown: (t) => {
157
- n.surfaceMode === "triangle" && (t.button === 0 || t.button === 2) && (x.current = !0, k(t, e.id, !1));
207
+ onContextMenu: (e) => {
208
+ r.surfaceMode !== "island" && (e.nativeEvent.preventDefault(), I(e, t.id, !1, !0));
158
209
  },
159
- onPointerMove: (t) => {
160
- n.surfaceMode === "triangle" && x.current && k(t, e.id, !0);
210
+ onPointerDown: (e) => {
211
+ r.surfaceMode === "triangle" && (e.button === 0 || e.button === 2) && (w.current = !0, T.current = !!(e.altKey || e.button === 2), r.onBrushActiveChange?.(!0), I(e, t.id, !1, T.current));
212
+ },
213
+ onPointerMove: (e) => {
214
+ r.surfaceMode === "triangle" && w.current && I(e, t.id, !0, T.current || !!e.altKey);
161
215
  }
162
- }), a && /* @__PURE__ */ _("mesh", {
163
- geometry: e.geometry,
216
+ }), (s || c) && /* @__PURE__ */ b("mesh", {
217
+ geometry: t.geometry,
164
218
  raycast: () => null,
165
- children: /* @__PURE__ */ _("meshBasicMaterial", {
166
- color: a,
219
+ children: /* @__PURE__ */ b("meshBasicMaterial", {
220
+ color: s ?? r.activeRoleColor,
167
221
  transparent: !0,
168
- opacity: .38,
222
+ opacity: s ? .36 : .22,
169
223
  depthWrite: !1
170
224
  })
171
225
  })]
172
226
  })
173
- }, e.id);
227
+ }, t.id);
174
228
  }),
175
- O.map((e) => /* @__PURE__ */ _("primitive", {
229
+ P.map((e) => /* @__PURE__ */ b("primitive", {
176
230
  object: e.group,
177
231
  position: [
178
- e.pos[0] + Math.sign(e.pos[0] || 1) * n.explodeAmount * .65,
232
+ e.pos[0] + Math.sign(e.pos[0] || 1) * r.explodeAmount * .65,
179
233
  e.pos[1],
180
234
  e.pos[2]
181
235
  ]
182
236
  }, e.key)),
183
- T && /* @__PURE__ */ _("mesh", {
184
- geometry: T,
237
+ j && /* @__PURE__ */ b("mesh", {
238
+ geometry: j,
185
239
  raycast: () => null,
186
- children: /* @__PURE__ */ _("meshBasicMaterial", {
187
- color: n.activeRoleColor,
240
+ children: /* @__PURE__ */ b("meshBasicMaterial", {
241
+ color: r.activeRoleColor,
188
242
  transparent: !0,
189
243
  opacity: .62,
190
- side: f.DoubleSide,
244
+ side: h.DoubleSide,
191
245
  depthWrite: !1
192
246
  })
193
247
  }),
194
- E && /* @__PURE__ */ _("mesh", {
195
- geometry: E,
248
+ M && /* @__PURE__ */ b("mesh", {
249
+ geometry: M,
196
250
  raycast: () => null,
197
- children: /* @__PURE__ */ _("meshBasicMaterial", {
251
+ children: /* @__PURE__ */ b("meshBasicMaterial", {
198
252
  color: "#00E5FF",
199
253
  transparent: !0,
200
254
  opacity: .48,
201
- side: f.DoubleSide,
255
+ side: h.DoubleSide,
202
256
  depthWrite: !1
203
257
  })
204
258
  }),
205
- n.loopDots?.points.map((e, t) => /* @__PURE__ */ v("mesh", {
259
+ r.loopDots?.points.map((e, t) => /* @__PURE__ */ x("mesh", {
206
260
  position: [
207
261
  e[0],
208
262
  e[1],
209
263
  e[2]
210
264
  ],
211
265
  raycast: () => null,
212
- children: [/* @__PURE__ */ _("sphereGeometry", { args: [
266
+ children: [/* @__PURE__ */ b("sphereGeometry", { args: [
213
267
  .032,
214
268
  10,
215
269
  10
216
- ] }), /* @__PURE__ */ _("meshBasicMaterial", {
270
+ ] }), /* @__PURE__ */ b("meshBasicMaterial", {
217
271
  color: t === 0 ? "#10B981" : "#FFB000",
218
272
  depthTest: !1
219
273
  })]
220
274
  }, `dot_${t}`)),
221
- D && D.length >= 2 && /* @__PURE__ */ _(h, {
222
- points: D,
275
+ N && N.length >= 2 && /* @__PURE__ */ b(v, {
276
+ points: N,
223
277
  color: "#FFB000",
224
278
  lineWidth: 2.5
279
+ }),
280
+ r.cabin && r.carBounds && /* @__PURE__ */ b(t, {
281
+ cabin: r.cabin,
282
+ carBounds: r.carBounds,
283
+ showTub: r.cabin.includeInteriorTub,
284
+ showDummy: r.cabin.enabled,
285
+ showSockets: !!(r.showCabinSockets || r.shellViewMode !== "solid")
225
286
  })
226
- ] }) : n.previewScene && /* @__PURE__ */ _("primitive", { object: n.previewScene }), /* @__PURE__ */ v("mesh", {
287
+ ] }) : r.previewScene && /* @__PURE__ */ b("primitive", { object: r.previewScene }), /* @__PURE__ */ x("mesh", {
227
288
  position: [
228
289
  0,
229
- r.aabbSize[1] * .5 + r.minY,
290
+ a.aabbSize[1] * .5 + a.minY,
230
291
  0
231
292
  ],
232
293
  raycast: () => null,
233
- children: [/* @__PURE__ */ _("boxGeometry", { args: [
234
- r.aabbSize[0],
235
- r.aabbSize[1],
236
- r.aabbSize[2]
237
- ] }), /* @__PURE__ */ _("meshBasicMaterial", {
294
+ children: [/* @__PURE__ */ b("boxGeometry", { args: [
295
+ a.aabbSize[0],
296
+ a.aabbSize[1],
297
+ a.aabbSize[2]
298
+ ] }), /* @__PURE__ */ b("meshBasicMaterial", {
238
299
  color: 58879,
239
300
  wireframe: !0,
240
301
  transparent: !0,
241
302
  opacity: .28
242
303
  })]
243
304
  })]
244
- }), /* @__PURE__ */ v("mesh", {
305
+ }), /* @__PURE__ */ x("mesh", {
245
306
  position: [
246
307
  0,
247
308
  .01,
248
- Math.max(2.6, r.aabbSize[2] * .6)
309
+ Math.max(2.6, a.aabbSize[2] * .6)
249
310
  ],
250
311
  rotation: [
251
312
  -Math.PI * .5,
@@ -253,23 +314,24 @@ function x(n) {
253
314
  0
254
315
  ],
255
316
  raycast: () => null,
256
- children: [/* @__PURE__ */ _("coneGeometry", { args: [
317
+ children: [/* @__PURE__ */ b("coneGeometry", { args: [
257
318
  .25,
258
319
  .6,
259
320
  3
260
- ] }), /* @__PURE__ */ _("meshBasicMaterial", {
321
+ ] }), /* @__PURE__ */ b("meshBasicMaterial", {
261
322
  color: 58879,
262
323
  wireframe: !0
263
324
  })]
264
325
  })]
265
326
  })
266
- }), /* @__PURE__ */ _(t, {
267
- cal: r,
268
- islands: n.islands,
269
- wheelColors: n.wheelColors,
270
- partPicks: n.partPicks,
271
- explodeAmount: n.explodeAmount,
272
- onClickIsland: n.onClickIsland
327
+ }), /* @__PURE__ */ b(i, {
328
+ cal: a,
329
+ islands: r.islands,
330
+ wheelColors: r.wheelColors,
331
+ propellerSet: r.propellerSet,
332
+ partPicks: r.partPicks,
333
+ explodeAmount: r.explodeAmount,
334
+ onClickIsland: r.onClickIsland
273
335
  })] });
274
336
  }
275
- export { x as Step1CalibrationPlinth, n as makeStarterDomainScene };
337
+ export { w as Step1CalibrationPlinth, a as makeStarterDomainScene };
@@ -4,6 +4,7 @@ import type { PaperShellAssembly } from "@khr3/vehicles/paper-shell";
4
4
  import React from "react";
5
5
  import * as THREE from "three";
6
6
  import { type KolmoAuthoredNodePatch } from "../schema/kolmoSchema.js";
7
+ import type { CarCabinConfig } from "./cabinMixamoRig.js";
7
8
  import { type VehiclePanelAnimator } from "./khrCompiler.js";
8
9
  export interface Step2UniversalPadProps {
9
10
  readonly assembly: PaperShellAssembly;
@@ -13,6 +14,12 @@ export interface Step2UniversalPadProps {
13
14
  readonly patches: readonly KolmoAuthoredNodePatch[];
14
15
  readonly stampActive: boolean;
15
16
  readonly panelAnimRef: React.MutableRefObject<VehiclePanelAnimator | null>;
17
+ readonly cabin?: CarCabinConfig;
18
+ readonly carBounds?: {
19
+ readonly min: readonly [number, number, number];
20
+ readonly max: readonly [number, number, number];
21
+ };
22
+ readonly showDriver?: boolean;
16
23
  readonly onStampSurface: (e: ThreeEvent<MouseEvent>) => void;
17
24
  }
18
- export declare function Step2UniversalPad({ assembly, importedRoot, rootObjRef, liveBundle, patches, stampActive, panelAnimRef, onStampSurface, }: Step2UniversalPadProps): React.JSX.Element;
25
+ export declare function Step2UniversalPad({ assembly, importedRoot, rootObjRef, liveBundle, patches, stampActive, panelAnimRef, cabin, carBounds, showDriver, onStampSurface, }: Step2UniversalPadProps): React.JSX.Element;