@pinkaphant/kolmo 0.2.2 → 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,8 +1,62 @@
1
1
  import { useGateStore as e } from "./gateStore.js";
2
- import * as t from "three";
3
- import { buildPaperShellAssembly as n } from "@khr3/vehicles/paper-shell";
2
+ import { measureSelection as t } from "./wheelAxlePairing.js";
3
+ import * as n from "three";
4
+ import { buildPaperShellAssembly as r } from "@khr3/vehicles/paper-shell";
4
5
  // src/importer/glbNormalizer.ts
5
- var r = 1 / 12, i = Object.freeze([
6
+ var i = (e) => Number(e.toFixed(4)), a = new n.Matrix4(), o = new n.Matrix4(), s = new n.Vector3(), c = new n.Vector3(), l = new n.Vector3(), u = new n.Vector3(), d = new n.Vector3(), f = new n.Vector3();
7
+ function p(e, t, r, p) {
8
+ let m = Math.max(.1, t);
9
+ e.updateMatrixWorld(!0), a.copy(e.matrixWorld).invert();
10
+ let h = 0, g = 0, _ = 0, v = 0, y = !1, b = 0, x = 0, S = 0, C = 0, w = 0, T = 0;
11
+ if (e.traverse((e) => {
12
+ if (!(e instanceof n.Mesh) || !e.geometry) return;
13
+ let t = e.geometry.getAttribute("position");
14
+ if (!t || t.count < 3) return;
15
+ let r = e.geometry.getIndex(), i = Math.floor((r ? r.count : t.count) / 3);
16
+ o.multiplyMatrices(a, e.matrixWorld);
17
+ for (let e = 0; e < i; e++) {
18
+ let n = r ? r.getX(e * 3) : e * 3, i = r ? r.getX(e * 3 + 1) : e * 3 + 1, a = r ? r.getX(e * 3 + 2) : e * 3 + 2;
19
+ s.fromBufferAttribute(t, n).applyMatrix4(o), c.fromBufferAttribute(t, i).applyMatrix4(o), l.fromBufferAttribute(t, a).applyMatrix4(o), u.subVectors(c, s), d.subVectors(l, s);
20
+ let p = f.crossVectors(u, d).length() * .5;
21
+ if (!(p > 1e-10)) continue;
22
+ y ||= (g = s.x, _ = s.y, v = s.z, !0);
23
+ let m = s.x - g, E = s.y - _, D = s.z - v, O = c.x - g, k = c.y - _, A = c.z - v, j = l.x - g, M = l.y - _, N = l.z - v;
24
+ h += p, b += p * (m + O + j) / 3, x += p * (E + k + M) / 3, S += p * (D + A + N) / 3, C += p / 6 * (m * m + O * O + j * j + m * O + O * j + j * m), w += p / 6 * (E * E + k * k + M * M + E * k + k * M + M * E), T += p / 6 * (D * D + A * A + N * N + D * A + A * N + N * D);
25
+ }
26
+ }), h > 1e-8) {
27
+ let e = b / h, t = x / h, n = S / h, r = Math.max(0, C - h * e * e), a = Math.max(0, w - h * t * t), o = Math.max(0, T - h * n * n), s = m / h, c = Math.max(.001, m * .002);
28
+ return {
29
+ centerOfMass: [
30
+ i(g + e),
31
+ i(_ + t),
32
+ i(v + n)
33
+ ],
34
+ inertiaDiagonal: [
35
+ i(Math.max(c, s * (a + o))),
36
+ i(Math.max(c, s * (r + o))),
37
+ i(Math.max(c, s * (r + a)))
38
+ ],
39
+ area: h,
40
+ hasMesh: !0
41
+ };
42
+ }
43
+ let [E, D, O] = p;
44
+ return {
45
+ centerOfMass: [
46
+ i(r[0]),
47
+ i(r[1]),
48
+ i(r[2])
49
+ ],
50
+ inertiaDiagonal: [
51
+ i(m / 12 * (D * D + O * O)),
52
+ i(m / 12 * (E * E + O * O)),
53
+ i(m / 12 * (E * E + D * D))
54
+ ],
55
+ area: 0,
56
+ hasMesh: !1
57
+ };
58
+ }
59
+ var m = 1 / 12, h = Object.freeze([
6
60
  "IK_Palm_Primary",
7
61
  "IK_Index_Trigger",
8
62
  "IK_Thumb_Safety",
@@ -15,18 +69,18 @@ var r = 1 / 12, i = Object.freeze([
15
69
  "Socket_Holster",
16
70
  "Socket_Seat",
17
71
  "Socket_Optic"
18
- ]), a = new t.Box3(), o = new t.Vector3();
19
- function s(e) {
72
+ ]), g = new n.Box3(), _ = new n.Vector3();
73
+ function v(e) {
20
74
  return [
21
75
  e[0] * .5,
22
76
  e[1] * .5,
23
77
  e[2] * .5
24
78
  ];
25
79
  }
26
- function c(e) {
80
+ function y(e) {
27
81
  return Number((Math.max(1, Math.round(e * 12)) / 12).toFixed(6));
28
82
  }
29
- function l(e) {
83
+ function b(e) {
30
84
  let t = [
31
85
  Math.round(e[0] * 12),
32
86
  Math.round(e[1] * 12),
@@ -37,14 +91,14 @@ function l(e) {
37
91
  c12Aligned: t.every((e) => e >= 1) && Math.abs(e[0] * 12 - t[0]) <= .06 && Math.abs(e[1] * 12 - t[1]) <= .06 && Math.abs(e[2] * 12 - t[2]) <= .06
38
92
  };
39
93
  }
40
- function u(e) {
94
+ function x(e) {
41
95
  if (!e) return [];
42
96
  let t = /* @__PURE__ */ new Set();
43
97
  return e.traverse((e) => {
44
- e.name && (i.includes(e.name) || e.name.startsWith("IK_") || e.name.startsWith("Socket_") || e.name.startsWith("Kolmo_")) && t.add(e.name);
98
+ e.name && (h.includes(e.name) || e.name.startsWith("IK_") || e.name.startsWith("Socket_") || e.name.startsWith("Kolmo_")) && t.add(e.name);
45
99
  }), [...t];
46
100
  }
47
- function d(e, t) {
101
+ function S(e, t) {
48
102
  return e === "c12" ? {
49
103
  len: 3,
50
104
  massKg: 0,
@@ -75,59 +129,70 @@ function d(e, t) {
75
129
  power: 260
76
130
  };
77
131
  }
78
- function f(t, n = 1, r = 0, i = !1, a = null) {
79
- let o = t.lattice.preset, s = o.wheelbase * n, c = o.trackWidth * n, d = Number((o.wheelRadius * n).toFixed(3)), f = (t.lattice.rings[t.lattice.rings.length - 1].z - t.lattice.rings[0].z) * n, p = [
132
+ function C(t, n = 1, r = 0, i = !1, a = null) {
133
+ let o = t.lattice.preset, s = o.wheelbase * n, c = o.trackWidth * n, l = Number((o.wheelRadius * n).toFixed(3)), u = (t.lattice.rings[t.lattice.rings.length - 1].z - t.lattice.rings[0].z) * n, d = [
80
134
  Number((o.halfWidth * 2 * n).toFixed(3)),
81
135
  Number((o.roofY * n).toFixed(3)),
82
- Number(f.toFixed(3))
83
- ], { c12Ticks: m, c12Aligned: h } = l(p), g = {
136
+ Number(u.toFixed(3))
137
+ ], { c12Ticks: f, c12Aligned: p } = b(d), m = {
84
138
  wheelbase: Number(s.toFixed(3)),
85
139
  trackWidth: Number(c.toFixed(3)),
86
140
  wheelRadii: [
87
- d,
88
- d,
89
- d,
90
- d
141
+ l,
142
+ l,
143
+ l,
144
+ l
91
145
  ],
92
146
  minY: Number(r.toFixed(4)),
93
- aabbSize: p,
94
- c12Ticks: m,
95
- c12Aligned: h,
96
- detectedAnchors: u(a),
147
+ aabbSize: d,
148
+ c12Ticks: f,
149
+ c12Aligned: p,
150
+ detectedAnchors: x(a),
97
151
  isSingleMeshProxy: i
98
152
  };
99
- return e.getState().setCalibration(g), g;
153
+ return e.getState().setCalibration(m), m;
100
154
  }
101
- function p(t, n = 0) {
102
- t.updateMatrixWorld(!0), a.setFromObject(t), a.isEmpty() ? o.set(1, 1, 1) : a.getSize(o);
103
- let r = [
104
- Number(o.x.toFixed(3)),
105
- Number(o.y.toFixed(3)),
106
- Number(o.z.toFixed(3))
107
- ], i = Number(Math.max(1.25, o.z * .62).toFixed(3)), s = Number(Math.max(.4, o.x * .82).toFixed(3)), c = Number(Math.max(.2, Math.min(.45, o.y * .24)).toFixed(3)), { c12Ticks: d, c12Aligned: f } = l(r), p = {
108
- wheelbase: i,
109
- trackWidth: s,
110
- wheelRadii: [
111
- c,
112
- c,
113
- c,
114
- c
115
- ],
116
- minY: Number(((a.isEmpty() ? 0 : a.min.y) + n).toFixed(4)),
117
- aabbSize: r,
155
+ function w(n, r = 0, i, a) {
156
+ n.updateMatrixWorld(!0), g.setFromObject(n), g.isEmpty() ? _.set(1, 1, 1) : g.getSize(_);
157
+ let o = [
158
+ Number(_.x.toFixed(3)),
159
+ Number(_.y.toFixed(3)),
160
+ Number(_.z.toFixed(3))
161
+ ], s = [], c = [];
162
+ if (i && a && a.length > 0) {
163
+ for (let e of i) for (let n of [e.left, e.right]) if (n.length !== 0) try {
164
+ let e = t(a, n);
165
+ s.push(e.center), c.push(Number(Math.max(.06, e.radius).toFixed(3)));
166
+ } catch {}
167
+ }
168
+ let l, u;
169
+ if (s.length > 0) {
170
+ let e = s.map((e) => e[0]), t = s.map((e) => e[2]);
171
+ l = Number((Math.max(...t) - Math.min(...t)).toFixed(3)), u = Number((Math.max(...e) - Math.min(...e)).toFixed(3));
172
+ } else {
173
+ l = Number(Math.max(.8, _.z * .62).toFixed(3)), u = Number(Math.max(.2, _.x * .82).toFixed(3));
174
+ let e = Number(Math.max(.12, Math.min(.85, _.y * .24)).toFixed(3));
175
+ c.push(e);
176
+ }
177
+ let { c12Ticks: d, c12Aligned: f } = b(o), p = {
178
+ wheelbase: l,
179
+ trackWidth: u,
180
+ wheelRadii: c,
181
+ minY: Number(((g.isEmpty() ? 0 : g.min.y) + r).toFixed(4)),
182
+ aabbSize: o,
118
183
  c12Ticks: d,
119
184
  c12Aligned: f,
120
- detectedAnchors: u(t),
185
+ detectedAnchors: x(n),
121
186
  isSingleMeshProxy: !1
122
187
  };
123
188
  return e.getState().setCalibration(p), p;
124
189
  }
125
- function m(e, t = "coupe_86", r = "psx-flat") {
126
- let i = n(t, r);
127
- if (!e) return f(i, 1, 0, !0, null), i;
128
- if (a.setFromObject(e), a.isEmpty()) return f(i, 1, 0, !0, e), i;
129
- a.getSize(o);
130
- let s = i.lattice.rings[i.lattice.rings.length - 1].z - i.lattice.rings[0].z;
131
- return f(i, o.z > .2 ? Math.max(.5, Math.min(2, o.z / s)) : 1, 0, !0, e), i;
190
+ function T(e, t = "coupe_86", n = "psx-flat") {
191
+ let i = r(t, n);
192
+ if (!e) return C(i, 1, 0, !0, null), i;
193
+ if (g.setFromObject(e), g.isEmpty()) return C(i, 1, 0, !0, e), i;
194
+ g.getSize(_);
195
+ let a = i.lattice.rings[i.lattice.rings.length - 1].z - i.lattice.rings[0].z;
196
+ return C(i, _.z > .2 ? Math.max(.5, Math.min(2, _.z / a)) : 1, 0, !0, e), i;
132
197
  }
133
- export { r as C12_TICK_M, i as UNIFIED_ANCHOR_NAMES, l as computeC12Metrics, d as defaultTargetMeters, u as detectSceneAnchors, s as khrBoxToRapierHalfExtents, f as measureAssemblyCalibration, p as measureNormalizedSceneCalibration, c as snapMetersToC12, m as wrapSingleMeshWithPaperShellProxy };
198
+ export { m as C12_TICK_M, h as UNIFIED_ANCHOR_NAMES, b as computeC12Metrics, p as computeMeshMassProps, S as defaultTargetMeters, x as detectSceneAnchors, v as khrBoxToRapierHalfExtents, C as measureAssemblyCalibration, w as measureNormalizedSceneCalibration, y as snapMetersToC12, T as wrapSingleMeshWithPaperShellProxy };
@@ -17,9 +17,11 @@ var c = /* @__PURE__ */ new Set([
17
17
  "door",
18
18
  "hood",
19
19
  "trunk",
20
+ "glass",
20
21
  "fender",
21
22
  "bumper",
22
- "wheel"
23
+ "wheel",
24
+ "propeller"
23
25
  ]);
24
26
  function l(n) {
25
27
  let r = a();
@@ -223,6 +225,7 @@ function l(n) {
223
225
  "door",
224
226
  "hood",
225
227
  "trunk",
228
+ "glass",
226
229
  "fender",
227
230
  "bumper",
228
231
  "wheel"
@@ -5,11 +5,13 @@ export { ImperativeVehicleRig, type ImperativeVehicleRigProps } from "./Imperati
5
5
  export { Step2UniversalPad, type Step2UniversalPadProps } from "./Step2UniversalPad.js";
6
6
  export { VfxEmitterPool, type VfxEmitterPoolProps } from "./VfxEmitterPool.js";
7
7
  export { DAMP_ZETA, FREQ_HZ, gateTelemetry, isGateStep1Unlocked, useGateStore, type CalibrationMetrics, type DampBucket, type DetachedDebrisItem, type EraMode, type FreqBucket, type GateDomain, type GateState, type GateStep, type VehicleSubArchetype, type WrenchMode, } from "./gateStore.js";
8
- export { C12_TICK_M, UNIFIED_ANCHOR_NAMES, computeC12Metrics, defaultTargetMeters, detectSceneAnchors, khrBoxToRapierHalfExtents, measureAssemblyCalibration, measureNormalizedSceneCalibration, snapMetersToC12, wrapSingleMeshWithPaperShellProxy, } from "./glbNormalizer.js";
8
+ export { C12_TICK_M, UNIFIED_ANCHOR_NAMES, computeC12Metrics, computeMeshMassProps, defaultTargetMeters, detectSceneAnchors, khrBoxToRapierHalfExtents, measureAssemblyCalibration, measureNormalizedSceneCalibration, snapMetersToC12, wrapSingleMeshWithPaperShellProxy, type MeshMassProps, } from "./glbNormalizer.js";
9
9
  export { bakeUniversalGateGlb, type GateWorldPayload, type UniversalBakeInput, type WorldAssetKind, } from "./universalGateBake.js";
10
10
  export { bakeArticulatedLauncherGlb, buildLauncherSceneFromPlan, } from "./launcherBake.js";
11
11
  export { convertUsdToGlb, isUsdFileName } from "./usdToGlb.js";
12
- export { ChopShopPanel, type ChopShopPanelProps } from "./ChopShopPanel.js";
12
+ export { ChopShopPanel, type ChopShopPanelProps, type ChopWizardTab } from "./ChopShopPanel.js";
13
+ export { MIXAMO_SEATED, autoFitCabinConfig, buildCabinTubGroup, buildMixamoSeatedDummyGroup, computeMixamoCabinPoints, computeMixamoCabinSockets, disposeObjectTree, evaluateCabinFit, seatXForLayout, type CabinFitReport, type CarCabinConfig, type DriverSeatLayout, type ShellViewMode, } from "./cabinMixamoRig.js";
14
+ export { CabinPreviewRig, type CabinPreviewRigProps } from "./CabinPreviewRig.js";
13
15
  export { DomainWorkshopPanel, enforceRetroPersonMaterials, type DomainWorkshopPanelProps } from "./DomainWorkshopPanel.js";
14
16
  export { buildImporterWebMcpTools, getNavigatorModelContext, useImporterWebMcp, type ImporterWebMcpHost, type ModelContext, type WebMcpTool, } from "./importerWebMcp.js";
15
17
  export * from "./surfaceCutter.js";
@@ -1,22 +1,25 @@
1
1
  import { buildPatchPreviewEmitters as e, computeChopPartHinge as t, createVehiclePanelAnimator as n, normalToMinusZQuaternion as r } from "./vehiclePanelAnim.js";
2
- import { measureSelection as i, suggestCarAxles as a, toggleIslandSelection as o } from "./wheelAxlePairing.js";
3
- import { GlbImportGate as s } from "./GlbImportGate.js";
4
- import { CHOP_ROLES as c, buildSurfaceTopology as l, floodFillByCrease as u, getIslandTopology as d, mirrorTriangles as f } from "./surfaceTopology.js";
5
- import { GateHudBar as p } from "./GateHudBar.js";
6
- import { Step1CalibrationPlinth as m } from "./Step1CalibrationPlinth.js";
7
- import { ImperativeVehicleRig as h } from "./ImperativeVehicleRig.js";
8
- import { Step2UniversalPad as g } from "./Step2UniversalPad.js";
9
- import { VfxEmitterPool as _ } from "./VfxEmitterPool.js";
10
- import { DAMP_ZETA as v, FREQ_HZ as y, gateTelemetry as b, isGateStep1Unlocked as x, useGateStore as S } from "./gateStore.js";
11
- import { C12_TICK_M as C, UNIFIED_ANCHOR_NAMES as w, computeC12Metrics as T, defaultTargetMeters as E, detectSceneAnchors as D, khrBoxToRapierHalfExtents as O, measureAssemblyCalibration as k, measureNormalizedSceneCalibration as ee, snapMetersToC12 as A, wrapSingleMeshWithPaperShellProxy as j } from "./glbNormalizer.js";
12
- import { makeStarterDomainScene as M } from "./ImporterPlinthUikitTags.js";
13
- import { bakeUniversalGateGlb as N } from "./universalGateBake.js";
14
- import { bakeArticulatedLauncherGlb as P, buildLauncherSceneFromPlan as F } from "./launcherBake.js";
15
- import { convertUsdToGlb as I, isUsdFileName as L } from "./usdToGlb.js";
16
- import { ChopShopPanel as R } from "./ChopShopPanel.js";
17
- import { DomainWorkshopPanel as z, enforceRetroPersonMaterials as B } from "./DomainWorkshopPanel.js";
18
- import { buildImporterWebMcpTools as V, getNavigatorModelContext as H, useImporterWebMcp as U } from "./importerWebMcp.js";
19
- import { buildSelectionOverlayGeometry as W, createFleet12GonWheelGroup as G, findMirrorIslandId as K, peelIslandSelection as q, previewLoopPolyline as J, refineMeshAlongLoop as Y, remapIslandIds as X, selectFacesByClick as Z, selectFacesByLoop as Q } from "./surfaceCutter.js";
20
- import { extractMeshIslands as $, normalizeSceneToSi as te, separateVehicleMeshes as ne, sliceMeshTriangles as re } from "./meshIslands.js";
21
- import { compileKhrAssetGlb as ie } from "./khrCompiler.js";
22
- export { C as C12_TICK_M, c as CHOP_ROLES, R as ChopShopPanel, v as DAMP_ZETA, z as DomainWorkshopPanel, y as FREQ_HZ, p as GateHudBar, s as GlbImportGate, h as ImperativeVehicleRig, s as ImporterWorkbench, m as Step1CalibrationPlinth, g as Step2UniversalPad, w as UNIFIED_ANCHOR_NAMES, _ as VfxEmitterPool, P as bakeArticulatedLauncherGlb, N as bakeUniversalGateGlb, V as buildImporterWebMcpTools, F as buildLauncherSceneFromPlan, e as buildPatchPreviewEmitters, W as buildSelectionOverlayGeometry, l as buildSurfaceTopology, ie as compileKhrAssetGlb, T as computeC12Metrics, t as computeChopPartHinge, I as convertUsdToGlb, G as createFleet12GonWheelGroup, n as createVehiclePanelAnimator, E as defaultTargetMeters, D as detectSceneAnchors, B as enforceRetroPersonMaterials, $ as extractMeshIslands, K as findMirrorIslandId, u as floodFillByCrease, b as gateTelemetry, d as getIslandTopology, H as getNavigatorModelContext, x as isGateStep1Unlocked, L as isUsdFileName, O as khrBoxToRapierHalfExtents, M as makeStarterDomainScene, k as measureAssemblyCalibration, ee as measureNormalizedSceneCalibration, i as measureSelection, f as mirrorTriangles, r as normalToMinusZQuaternion, te as normalizeSceneToSi, q as peelIslandSelection, J as previewLoopPolyline, Y as refineMeshAlongLoop, X as remapIslandIds, Z as selectFacesByClick, Q as selectFacesByLoop, ne as separateVehicleMeshes, re as sliceMeshTriangles, A as snapMetersToC12, a as suggestCarAxles, o as toggleIslandSelection, S as useGateStore, U as useImporterWebMcp, j as wrapSingleMeshWithPaperShellProxy };
2
+ import { GlbImportGate as i } from "./GlbImportGate.js";
3
+ import { createFleet12GonWheelGroup as a, measureSelection as o, suggestCarAxles as s, toggleIslandSelection as c } from "./wheelAxlePairing.js";
4
+ import { GateHudBar as l } from "./GateHudBar.js";
5
+ import { Step1CalibrationPlinth as u } from "./Step1CalibrationPlinth.js";
6
+ import { buildCabinTubGroup as d, buildMixamoSeatedDummyGroup as f, disposeObjectTree as p } from "./cabinMeshBuilders.js";
7
+ import { ImperativeVehicleRig as m } from "./ImperativeVehicleRig.js";
8
+ import { CHOP_ROLES as h, buildSurfaceTopology as g, countSelectionFaces as _, floodFillByCrease as v, getIslandTopology as y, mirrorTriangles as b, selectionEntries as x } from "./surfaceTopology.js";
9
+ import { Step2UniversalPad as S } from "./Step2UniversalPad.js";
10
+ import { VfxEmitterPool as C } from "./VfxEmitterPool.js";
11
+ import { DAMP_ZETA as w, FREQ_HZ as T, gateTelemetry as E, isGateStep1Unlocked as D, useGateStore as O } from "./gateStore.js";
12
+ import { C12_TICK_M as k, UNIFIED_ANCHOR_NAMES as A, computeC12Metrics as j, computeMeshMassProps as M, defaultTargetMeters as N, detectSceneAnchors as P, khrBoxToRapierHalfExtents as F, measureAssemblyCalibration as I, measureNormalizedSceneCalibration as L, snapMetersToC12 as R, wrapSingleMeshWithPaperShellProxy as z } from "./glbNormalizer.js";
13
+ import { bakeUniversalGateGlb as B } from "./universalGateBake.js";
14
+ import { bakeArticulatedLauncherGlb as V, buildLauncherSceneFromPlan as ee } from "./launcherBake.js";
15
+ import { convertUsdToGlb as H, isUsdFileName as U } from "./usdToGlb.js";
16
+ import { ChopShopPanel as W } from "./ChopShopPanel.js";
17
+ import { makeStarterDomainScene as G } from "./ImporterPlinthUikitTags.js";
18
+ import { MIXAMO_SEATED as K, autoFitCabinConfig as q, computeMixamoCabinPoints as J, computeMixamoCabinSockets as Y, evaluateCabinFit as X, seatXForLayout as Z } from "./cabinMixamoRig.js";
19
+ import { CabinPreviewRig as Q } from "./CabinPreviewRig.js";
20
+ import { DomainWorkshopPanel as $, enforceRetroPersonMaterials as te } from "./DomainWorkshopPanel.js";
21
+ import { buildImporterWebMcpTools as ne, getNavigatorModelContext as re, useImporterWebMcp as ie } from "./importerWebMcp.js";
22
+ import { buildMultiSelectionOverlay as ae, buildSelectionOverlayGeometry as oe, findMirrorIslandId as se, peelFaceSelection as ce, peelIslandSelection as le, previewLoopPolyline as ue, refineMeshAlongLoop as de, remapIslandIds as fe, selectFacesByClick as pe, selectFacesByLoop as me } from "./surfaceCutter.js";
23
+ import { extractMeshIslands as he, normalizeSceneToSi as ge, separateVehicleMeshes as _e, sliceMeshTriangles as ve } from "./meshIslands.js";
24
+ import { STEER_CURVE_IDS as ye, TIRE_PRESET_IDS as be, TORQUE_CURVE_IDS as xe, compileKhrAssetGlb as Se, planArticulatedPanels as Ce } from "./khrCompiler.js";
25
+ export { k as C12_TICK_M, h as CHOP_ROLES, Q as CabinPreviewRig, W as ChopShopPanel, w as DAMP_ZETA, $ as DomainWorkshopPanel, T as FREQ_HZ, l as GateHudBar, i as GlbImportGate, m as ImperativeVehicleRig, i as ImporterWorkbench, K as MIXAMO_SEATED, ye as STEER_CURVE_IDS, u as Step1CalibrationPlinth, S as Step2UniversalPad, be as TIRE_PRESET_IDS, xe as TORQUE_CURVE_IDS, A as UNIFIED_ANCHOR_NAMES, C as VfxEmitterPool, q as autoFitCabinConfig, V as bakeArticulatedLauncherGlb, B as bakeUniversalGateGlb, d as buildCabinTubGroup, ne as buildImporterWebMcpTools, ee as buildLauncherSceneFromPlan, f as buildMixamoSeatedDummyGroup, ae as buildMultiSelectionOverlay, e as buildPatchPreviewEmitters, oe as buildSelectionOverlayGeometry, g as buildSurfaceTopology, Se as compileKhrAssetGlb, j as computeC12Metrics, t as computeChopPartHinge, M as computeMeshMassProps, J as computeMixamoCabinPoints, Y as computeMixamoCabinSockets, H as convertUsdToGlb, _ as countSelectionFaces, a as createFleet12GonWheelGroup, n as createVehiclePanelAnimator, N as defaultTargetMeters, P as detectSceneAnchors, p as disposeObjectTree, te as enforceRetroPersonMaterials, X as evaluateCabinFit, he as extractMeshIslands, se as findMirrorIslandId, v as floodFillByCrease, E as gateTelemetry, y as getIslandTopology, re as getNavigatorModelContext, D as isGateStep1Unlocked, U as isUsdFileName, F as khrBoxToRapierHalfExtents, G as makeStarterDomainScene, I as measureAssemblyCalibration, L as measureNormalizedSceneCalibration, o as measureSelection, b as mirrorTriangles, r as normalToMinusZQuaternion, ge as normalizeSceneToSi, ce as peelFaceSelection, le as peelIslandSelection, Ce as planArticulatedPanels, ue as previewLoopPolyline, de as refineMeshAlongLoop, fe as remapIslandIds, Z as seatXForLayout, pe as selectFacesByClick, me as selectFacesByLoop, x as selectionEntries, _e as separateVehicleMeshes, ve as sliceMeshTriangles, R as snapMetersToC12, s as suggestCarAxles, c as toggleIslandSelection, O as useGateStore, ie as useImporterWebMcp, z as wrapSingleMeshWithPaperShellProxy };
@@ -1,23 +1,42 @@
1
1
  import * as THREE from "three";
2
+ import { ENGINE_TORQUE_CURVES, STEER_SPEED_CURVES, TIRE_ARCHETYPES } from "@khr3/core/curves";
2
3
  import { type KolmoAuthoredNodePatch } from "../schema/kolmoSchema.js";
4
+ import { type CarCabinConfig } from "./cabinMixamoRig.js";
3
5
  import { type ChopPartRole } from "./surfaceCutter.js";
4
6
  import { type MeshIsland, type WheelAxle } from "./meshIslands.js";
5
7
  import { buildPatchPreviewEmitters, computeChopPartHinge, createVehiclePanelAnimator, normalToMinusZQuaternion, type ChopHingeSpec, type VehiclePanelAnimator } from "./vehiclePanelAnim.js";
6
- export { buildPatchPreviewEmitters, computeChopPartHinge, createVehiclePanelAnimator, normalToMinusZQuaternion, type ChopHingeSpec, type VehiclePanelAnimator, };
8
+ export { buildPatchPreviewEmitters, computeChopPartHinge, createVehiclePanelAnimator, normalToMinusZQuaternion, type ChopHingeSpec, type VehiclePanelAnimator };
7
9
  export type KolmoAssetArchetype = "car" | "starcraft" | "prop";
8
10
  export type CarDriveMode = "RWD" | "FWD" | "AWD";
9
11
  export type WheelVisualSource = "imported" | "fleet12";
12
+ export type TireArchetypeId = keyof typeof TIRE_ARCHETYPES;
13
+ export type EngineTorqueCurveId = keyof typeof ENGINE_TORQUE_CURVES;
14
+ export type SteerSpeedCurveId = keyof typeof STEER_SPEED_CURVES;
15
+ export declare const TIRE_PRESET_IDS: readonly TireArchetypeId[];
16
+ export declare const TORQUE_CURVE_IDS: readonly EngineTorqueCurveId[], STEER_CURVE_IDS: readonly SteerSpeedCurveId[];
10
17
  export interface KolmoCompileOptions {
11
18
  archetype: KolmoAssetArchetype;
12
19
  massKg: number;
13
20
  powerOrThrust: number;
14
21
  driveType?: CarDriveMode;
15
22
  wheelSource?: WheelVisualSource;
23
+ tirePreset?: TireArchetypeId;
24
+ torqueCurve?: EngineTorqueCurveId;
25
+ steerCurve?: SteerSpeedCurveId;
16
26
  staticProp?: boolean;
17
27
  axles?: readonly WheelAxle[];
28
+ propellerIslandIds?: readonly number[];
18
29
  islands?: readonly MeshIsland[];
19
30
  partPicks?: Readonly<Record<number, ChopPartRole>>;
31
+ cabin?: CarCabinConfig;
20
32
  patches?: readonly KolmoAuthoredNodePatch[];
21
33
  name?: string;
22
34
  }
35
+ export declare function planArticulatedPanels(islands: readonly MeshIsland[], partPicks: Readonly<Record<number, ChopPartRole>> | undefined, excludedIds: ReadonlySet<number>): Array<{
36
+ nodeName: string;
37
+ role: string;
38
+ islandIds: number[];
39
+ massKg: number;
40
+ hinge: ChopHingeSpec;
41
+ }>;
23
42
  export declare function compileKhrAssetGlb(normalizedScene: THREE.Group, opts: KolmoCompileOptions): Promise<Uint8Array>;