@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
@@ -7,9 +7,12 @@ export interface GateHudBarProps {
7
7
  readonly usdInfo: string | null;
8
8
  readonly busy: boolean;
9
9
  readonly wheelCount: number;
10
+ readonly propellerCount?: number;
10
11
  readonly choppedCount: number;
11
12
  readonly stampTool: StampToolId;
12
13
  readonly patchCount: number;
14
+ readonly showDriver?: boolean;
15
+ readonly onToggleDriver?: () => void;
13
16
  readonly onChooseFile: () => void;
14
17
  readonly onLoadStarterCar: (url: string, label: string) => void;
15
18
  readonly onSelectDomain: (d: GateDomain) => void;
@@ -180,8 +180,8 @@ function _(c) {
180
180
  active: !m.usePaperShellProxy && m.vehicleArchetype === e,
181
181
  onClick: () => c.onSelectVehicleSub(e)
182
182
  }, e)),
183
- !m.usePaperShellProxy && m.vehicleArchetype !== "starcraft" && /* @__PURE__ */ o(h, {
184
- label: `[ AUTO-POP TIRES (${c.wheelCount}W) ]`,
183
+ !m.usePaperShellProxy && /* @__PURE__ */ o(h, {
184
+ label: c.propellerCount ? `[ AUTO-POP TIRES (${c.wheelCount}W · ${c.propellerCount}P) ]` : `[ AUTO-POP TIRES (${c.wheelCount}W) ]`,
185
185
  onClick: c.onAutoPopWheels
186
186
  }),
187
187
  /* @__PURE__ */ o(h, {
@@ -253,6 +253,12 @@ function _(c) {
253
253
  onClick: () => m.resetAllPanels()
254
254
  })
255
255
  ] }) : /* @__PURE__ */ s(a, { children: [
256
+ m.domain === "vehicle" && c.onToggleDriver && /* @__PURE__ */ o(h, {
257
+ label: c.showDriver ? "[ MIXAMO DRIVER: ON ]" : "[ MIXAMO DRIVER: OFF ]",
258
+ active: !!c.showDriver,
259
+ accent: p,
260
+ onClick: c.onToggleDriver
261
+ }),
256
262
  m.domain === "vehicle" && c.choppedCount > 0 && /* @__PURE__ */ s(a, { children: [
257
263
  /* @__PURE__ */ o(h, {
258
264
  label: "[ SWING DOORS ]",
@@ -7,41 +7,41 @@ import { Step1CalibrationPlinth as o } from "./Step1CalibrationPlinth.js";
7
7
  import { Step2UniversalPad as s } from "./Step2UniversalPad.js";
8
8
  import { VfxEmitterPool as c } from "./VfxEmitterPool.js";
9
9
  import { useChopShopController as l } from "./useChopShopController.js";
10
- import { useMemo as u, useRef as d } from "react";
11
- import { Canvas as f } from "@react-three/fiber";
12
- import { Grid as p, OrbitControls as m } from "@react-three/drei";
13
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
10
+ import { useMemo as u, useRef as d, useState as f } from "react";
11
+ import { Canvas as p } from "@react-three/fiber";
12
+ import { Grid as m, OrbitControls as h } from "@react-three/drei";
13
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
14
14
  // src/importer/GlbImportGate.tsx
15
- function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
16
- let y = l(_), { st: b } = y, x = d(null), S = b.step === 1 && b.domain === "vehicle" && !b.usePaperShellProxy && b.vehicleArchetype !== "starcraft", C = !(b.step === 2 && b.domain === "vehicle" && !b.usePaperShellProxy && b.chaseCam && y.stampTool === "none"), w = (t, n, r) => {
15
+ function v({ onSpawnInWorld: v, enableWebMcp: y = !0 }) {
16
+ let b = l(v), { st: x } = b, S = d(null), [C, w] = f(!1), T = x.step === 1 && x.domain === "vehicle" && !x.usePaperShellProxy, E = !C && !(x.step === 2 && x.domain === "vehicle" && !x.usePaperShellProxy && x.chaseCam && b.stampTool === "none"), D = (t, n, r) => {
17
17
  let i = e(t, r);
18
- y.setPatches((e) => [...e, {
18
+ b.setPatches((e) => [...e, {
19
19
  nodeName: t,
20
20
  translation: n,
21
21
  extension: { socket: i }
22
22
  }]);
23
- }, T = u(() => ({
24
- assetName: y.assetName,
25
- wheelCount: y.wheelCount,
26
- choppedCount: y.choppedCount,
27
- unlocked: y.unlocked,
28
- targetMeters: y.targetMeters,
29
- setTargetMeters: y.setTargetMeters,
30
- bumpTurn: y.bumpTurn,
31
- autoPopWheels: y.autoPopWheels,
32
- applyDomainDefaults: y.applyDomainDefaults,
33
- loadStarterCar: y.loadStarterCar,
34
- addAnchorPoint: w,
35
- cutPart: y.cutPart,
36
- sealAndExport: y.sealAndExport,
37
- captureDataUrl: () => x.current?.() ?? null
38
- }), [y]);
39
- return a(T, v), /* @__PURE__ */ g("div", {
23
+ }, O = u(() => ({
24
+ assetName: b.assetName,
25
+ wheelCount: b.wheelCount,
26
+ choppedCount: b.choppedCount,
27
+ unlocked: b.unlocked,
28
+ targetMeters: b.targetMeters,
29
+ setTargetMeters: b.setTargetMeters,
30
+ bumpTurn: b.bumpTurn,
31
+ autoPopWheels: b.autoPopWheels,
32
+ applyDomainDefaults: b.applyDomainDefaults,
33
+ loadStarterCar: b.loadStarterCar,
34
+ addAnchorPoint: D,
35
+ cutPart: b.cutPart,
36
+ sealAndExport: b.sealAndExport,
37
+ captureDataUrl: () => S.current?.() ?? null
38
+ }), [b]);
39
+ return a(O, y), /* @__PURE__ */ _("div", {
40
40
  onDragOver: (e) => e.preventDefault(),
41
41
  onDrop: (e) => {
42
42
  e.preventDefault();
43
43
  let t = e.dataTransfer.files?.[0];
44
- t && y.ingestFile(t);
44
+ t && b.ingestFile(t);
45
45
  },
46
46
  style: {
47
47
  position: "relative",
@@ -51,112 +51,139 @@ function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
51
51
  height: "100%",
52
52
  overflow: "hidden",
53
53
  background: "#0A0C0E",
54
- imageRendering: b.eraMode === "psx-1-3" ? "pixelated" : "auto"
54
+ imageRendering: x.eraMode === "psx-1-3" ? "pixelated" : "auto"
55
55
  },
56
56
  children: [
57
- /* @__PURE__ */ h("input", {
58
- ref: y.fileRef,
57
+ /* @__PURE__ */ g("input", {
58
+ ref: b.fileRef,
59
59
  type: "file",
60
60
  accept: ".glb,.usd,.usda,.usdc,.usdz",
61
61
  hidden: !0,
62
62
  onChange: (e) => {
63
63
  let t = e.target.files?.[0];
64
- t && y.ingestFile(t);
64
+ t && b.ingestFile(t);
65
65
  }
66
66
  }),
67
- /* @__PURE__ */ h(i, {
68
- hasCustomFile: y.hasCustomFile,
69
- assetName: y.assetName,
70
- usdInfo: y.usdInfo,
71
- busy: y.busy,
72
- wheelCount: y.wheelCount,
73
- choppedCount: y.choppedCount,
74
- stampTool: y.stampTool,
75
- patchCount: y.patches.length,
76
- onChooseFile: () => y.fileRef.current?.click(),
67
+ /* @__PURE__ */ g(i, {
68
+ hasCustomFile: b.hasCustomFile,
69
+ assetName: b.assetName,
70
+ usdInfo: b.usdInfo,
71
+ busy: b.busy,
72
+ wheelCount: b.wheelCount,
73
+ propellerCount: b.propellerCount,
74
+ choppedCount: b.choppedCount,
75
+ stampTool: b.stampTool,
76
+ patchCount: b.patches.length,
77
+ showDriver: b.showDriverInStep2,
78
+ onToggleDriver: () => b.setShowDriverInStep2((e) => !e),
79
+ onChooseFile: () => b.fileRef.current?.click(),
77
80
  onLoadStarterCar: (e, t) => {
78
- y.loadStarterCar(e, t).catch(() => {});
81
+ b.loadStarterCar(e, t).catch(() => {});
79
82
  },
80
- onSelectDomain: (e) => y.applyDomainDefaults(e, b.vehicleArchetype, !1),
81
- onSelectVehicleSub: (e) => y.applyDomainDefaults("vehicle", e, !1),
82
- onBumpTurn: y.bumpTurn,
83
- onAutoScaleSi: y.autoScaleSi,
84
- onSnapYZero: () => y.setYOffset(0),
85
- onSnapC12: y.snapC12,
86
- onWrapProxy: y.wrapProxy,
87
- onAutoPopWheels: y.autoPopWheels,
88
- onSelectStampTool: y.setStampTool,
89
- onUndoPatch: () => y.setPatches((e) => e.slice(0, -1)),
90
- onSwingPanelRole: (e) => y.panelAnimRef.current?.toggleRolePrefix(e),
91
- onDownloadGlb: () => void y.sealAndExport(!1),
92
- onSpawnWorld: _ ? () => void y.sealAndExport(!0) : void 0
83
+ onSelectDomain: (e) => b.applyDomainDefaults(e, x.vehicleArchetype, !1),
84
+ onSelectVehicleSub: (e) => b.applyDomainDefaults("vehicle", e, !1),
85
+ onBumpTurn: b.bumpTurn,
86
+ onAutoScaleSi: b.autoScaleSi,
87
+ onSnapYZero: () => b.setYOffset(0),
88
+ onSnapC12: b.snapC12,
89
+ onWrapProxy: b.wrapProxy,
90
+ onAutoPopWheels: b.autoPopWheels,
91
+ onSelectStampTool: b.setStampTool,
92
+ onUndoPatch: () => b.setPatches((e) => e.slice(0, -1)),
93
+ onSwingPanelRole: (e) => b.panelAnimRef.current?.toggleRolePrefix(e),
94
+ onDownloadGlb: () => void b.sealAndExport(!1),
95
+ onSpawnWorld: v ? () => void b.sealAndExport(!0) : void 0
93
96
  }),
94
- b.step === 1 && b.domain !== "vehicle" && /* @__PURE__ */ h(n, {
95
- domain: b.domain,
96
- hasCustomFile: y.hasCustomFile,
97
- targetMeters: y.targetMeters,
98
- onChangeTargetMeters: y.setTargetMeters,
99
- onSnapC12: y.snapC12,
100
- onLoadVaultUrl: y.loadStarterCar,
101
- onForgeLauncherRecipe: y.forgeScene,
102
- onAddSocketPatch: w,
103
- workingScene: y.workingScene,
104
- onEnforceCrispyPerson: () => r(y.workingScene),
105
- onUploadToVault: y.uploadToVault
97
+ x.step === 1 && x.domain !== "vehicle" && /* @__PURE__ */ g(n, {
98
+ domain: x.domain,
99
+ hasCustomFile: b.hasCustomFile,
100
+ targetMeters: b.targetMeters,
101
+ onChangeTargetMeters: b.setTargetMeters,
102
+ onSnapC12: b.snapC12,
103
+ onLoadVaultUrl: b.loadStarterCar,
104
+ onForgeLauncherRecipe: b.forgeScene,
105
+ onAddSocketPatch: D,
106
+ workingScene: b.workingScene,
107
+ onEnforceCrispyPerson: () => r(b.workingScene),
108
+ onUploadToVault: b.uploadToVault
106
109
  }),
107
- S && /* @__PURE__ */ h(t, {
108
- targetMeters: y.targetMeters,
109
- onChangeTargetMeters: y.setTargetMeters,
110
- activeRole: y.activeRole,
111
- onSelectRole: y.setActiveRole,
112
- surfaceMode: y.surfaceMode,
110
+ T && /* @__PURE__ */ g(t, {
111
+ vehicleArchetype: x.vehicleArchetype,
112
+ wizardTab: b.wizardTab,
113
+ onChangeWizardTab: b.handleChangeWizardTab,
114
+ targetMeters: b.targetMeters,
115
+ onChangeTargetMeters: b.setTargetMeters,
116
+ onBumpTurn: b.bumpTurn,
117
+ onSnapYZero: () => b.setYOffset(0),
118
+ onAutoPopWheels: b.autoPopWheels,
119
+ activeRole: b.activeRole,
120
+ onSelectRole: b.setActiveRole,
121
+ surfaceMode: b.surfaceMode,
113
122
  onChangeSurfaceMode: (e) => {
114
- y.setSurfaceMode(e), y.setFaceSelection(null), y.setLoopDots(null);
123
+ b.setSurfaceMode(e), e !== "loop" && b.setLoopDots(null);
115
124
  },
116
- creaseDeg: y.creaseDeg,
117
- onChangeCreaseDeg: y.setCreaseDeg,
118
- mirrorX: y.mirrorX,
119
- onToggleMirrorX: y.setMirrorX,
120
- splitCoarse: y.splitCoarse,
121
- onToggleSplitCoarse: y.setSplitCoarse,
122
- selectedFaces: y.faceSelection?.triangles.length ?? 0,
123
- mirroredFaces: y.faceSelection?.mirrored.length ?? 0,
124
- loopDotCount: y.loopDots?.points.length ?? 0,
125
- undoCount: y.undoStack.length,
126
- partPicks: y.partPicks,
127
- wheelCount: y.wheelCount,
128
- wheelSource: y.wheelSource,
129
- onChangeWheelSource: y.setWheelSource,
130
- driveType: b.driveType,
131
- onChangeDriveType: (e) => b.setField("driveType", e),
132
- horsepower: b.powerOrThrust,
133
- onChangeHorsepower: (e) => b.setField("powerOrThrust", e),
134
- hingeScrub: y.hingeScrub,
135
- onChangeHingeScrub: y.setHingeScrub,
136
- explodeAmount: y.explodeAmount,
137
- onChangeExplodeAmount: y.setExplodeAmount,
138
- statusNote: y.statusNote,
139
- unlocked: y.unlocked,
140
- busy: y.busy,
141
- onCloseLoop: y.handleCloseLoop,
142
- onPeel: y.handlePeelSelection,
125
+ creaseDeg: b.creaseDeg,
126
+ onChangeCreaseDeg: b.setCreaseDeg,
127
+ mirrorX: b.mirrorX,
128
+ onToggleMirrorX: b.setMirrorX,
129
+ splitCoarse: b.splitCoarse,
130
+ onToggleSplitCoarse: b.setSplitCoarse,
131
+ selectedFaces: b.selectedCounts.primary,
132
+ mirroredFaces: b.selectedCounts.mirrored,
133
+ loopDotCount: b.loopDots?.points.length ?? 0,
134
+ undoCount: b.undoStack.length,
135
+ partPicks: b.partPicks,
136
+ wheelCount: b.wheelCount,
137
+ propellerCount: b.propellerCount,
138
+ wheelSource: b.wheelSource,
139
+ onChangeWheelSource: b.setWheelSource,
140
+ shellViewMode: b.shellViewMode,
141
+ onChangeShellViewMode: b.setShellViewMode,
142
+ cabin: b.cabin,
143
+ cabinFit: b.cabinFit,
144
+ carBounds: b.carBounds,
145
+ onUpdateCabin: b.updateCabin,
146
+ onSetCabinLayout: b.setCabinLayout,
147
+ onAutoFitCabin: b.autoFitCabin,
148
+ driveType: x.driveType,
149
+ onChangeDriveType: (e) => x.setField("driveType", e),
150
+ massKg: x.massKg,
151
+ onChangeMassKg: (e) => x.setField("massKg", e),
152
+ horsepower: x.powerOrThrust,
153
+ onChangeHorsepower: (e) => x.setField("powerOrThrust", e),
154
+ tirePreset: x.tirePreset,
155
+ onChangeTirePreset: (e) => x.setField("tirePreset", e),
156
+ torqueCurve: x.torqueCurve,
157
+ onChangeTorqueCurve: (e) => x.setField("torqueCurve", e),
158
+ steerCurve: x.steerCurve,
159
+ onChangeSteerCurve: (e) => x.setField("steerCurve", e),
160
+ hingeScrub: b.hingeScrub,
161
+ onChangeHingeScrub: b.setHingeScrub,
162
+ explodeAmount: b.explodeAmount,
163
+ onChangeExplodeAmount: b.setExplodeAmount,
164
+ statusNote: b.statusNote,
165
+ unlocked: b.unlocked,
166
+ busy: b.busy,
167
+ onCloseLoop: b.handleCloseLoop,
168
+ onPeel: b.handlePeelSelection,
143
169
  onClearSelection: () => {
144
- y.setFaceSelection(null), y.setLoopDots(null);
170
+ b.setFaceSelection(null), b.setLoopDots(null);
145
171
  },
146
- onUndoCut: y.handleUndoCut,
172
+ onUndoCut: b.handleUndoCut,
147
173
  onClearTags: () => {
148
- y.setPartPicks({}), y.setHingeScrub(0);
174
+ b.setPartPicks({}), b.setPropellerIds([]), b.setHingeScrub(0);
149
175
  },
150
- onGoTestDrive: () => b.setField("step", 2),
151
- onSpawnWorld: _ ? () => void y.sealAndExport(!0) : void 0
176
+ onGoTestDrive: () => x.setField("step", 2),
177
+ onDownloadGlb: () => void b.sealAndExport(!1),
178
+ onSpawnWorld: v ? () => void b.sealAndExport(!0) : void 0
152
179
  }),
153
- /* @__PURE__ */ h("div", {
180
+ /* @__PURE__ */ g("div", {
154
181
  style: {
155
182
  flex: 1,
156
183
  minHeight: 0
157
184
  },
158
- children: /* @__PURE__ */ g(f, {
159
- dpr: b.eraMode === "psx-1-3" ? .333 : [1, 1.5],
185
+ children: /* @__PURE__ */ _(p, {
186
+ dpr: x.eraMode === "psx-1-3" ? .333 : [1, 1.5],
160
187
  gl: {
161
188
  localClippingEnabled: !0,
162
189
  antialias: !1,
@@ -171,15 +198,15 @@ function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
171
198
  fov: 45
172
199
  },
173
200
  onCreated: ({ gl: e, scene: t, camera: n }) => {
174
- x.current = () => (e.render(t, n), typeof e.domElement?.toDataURL == "function" ? e.domElement.toDataURL("image/png") : null);
201
+ S.current = () => (e.render(t, n), typeof e.domElement?.toDataURL == "function" ? e.domElement.toDataURL("image/png") : null);
175
202
  },
176
203
  children: [
177
- /* @__PURE__ */ h("color", {
204
+ /* @__PURE__ */ g("color", {
178
205
  attach: "background",
179
206
  args: ["#0A0C0E"]
180
207
  }),
181
- /* @__PURE__ */ h("ambientLight", { intensity: .72 }),
182
- /* @__PURE__ */ h("directionalLight", {
208
+ /* @__PURE__ */ g("ambientLight", { intensity: .72 }),
209
+ /* @__PURE__ */ g("directionalLight", {
183
210
  position: [
184
211
  6,
185
212
  10,
@@ -187,7 +214,7 @@ function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
187
214
  ],
188
215
  intensity: 1.35
189
216
  }),
190
- /* @__PURE__ */ h("directionalLight", {
217
+ /* @__PURE__ */ g("directionalLight", {
191
218
  position: [
192
219
  -6,
193
220
  4,
@@ -196,50 +223,59 @@ function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
196
223
  intensity: .45,
197
224
  color: "#00E5FF"
198
225
  }),
199
- /* @__PURE__ */ h(p, {
226
+ /* @__PURE__ */ g(m, {
200
227
  infiniteGrid: !0,
201
- cellSize: b.domain === "c12" ? 1 / 12 : .5,
228
+ cellSize: x.domain === "c12" ? 1 / 12 : .5,
202
229
  sectionSize: 3,
203
230
  sectionColor: "#1C2229",
204
231
  cellColor: "#12161B",
205
232
  fadeDistance: 90
206
233
  }),
207
- /* @__PURE__ */ h(m, {
234
+ /* @__PURE__ */ g(h, {
208
235
  makeDefault: !0,
209
- enabled: C,
236
+ enabled: E,
210
237
  enableDamping: !0
211
238
  }),
212
- b.step === 1 ? /* @__PURE__ */ h(o, {
213
- assembly: y.assembly,
214
- useProxy: b.domain === "vehicle" && b.usePaperShellProxy,
215
- previewScene: y.workingScene,
216
- islands: y.islands,
217
- axles: y.axles,
218
- wheelColors: y.wheelColors,
219
- partPicks: y.partPicks,
220
- wheelSource: y.wheelSource,
221
- surfaceMode: y.surfaceMode,
222
- activeRoleColor: y.activeRoleColor,
223
- faceSelection: y.faceSelection,
224
- loopDots: y.loopDots,
225
- hingeScrub: y.hingeScrub,
226
- explodeAmount: y.explodeAmount,
227
- rootObjRef: y.rootObjRef,
228
- onClickIsland: y.handleBucketIsland,
229
- onPickFace: y.handlePickFace
230
- }) : /* @__PURE__ */ h(s, {
231
- assembly: y.assembly,
232
- importedRoot: y.workingScene,
233
- rootObjRef: y.rootObjRef,
234
- liveBundle: y.liveBundle,
235
- patches: y.patches,
236
- stampActive: y.stampTool !== "none",
237
- panelAnimRef: y.panelAnimRef,
238
- onStampSurface: y.handleStampSurface
239
+ x.step === 1 ? /* @__PURE__ */ g(o, {
240
+ assembly: b.assembly,
241
+ useProxy: x.domain === "vehicle" && x.usePaperShellProxy,
242
+ previewScene: b.workingScene,
243
+ islands: b.islands,
244
+ axles: b.axles,
245
+ wheelColors: b.wheelColors,
246
+ propellerSet: b.propellerSet,
247
+ partPicks: b.partPicks,
248
+ wheelSource: b.wheelSource,
249
+ surfaceMode: b.surfaceMode,
250
+ activeRoleColor: b.activeRoleColor,
251
+ faceSelection: b.faceSelection,
252
+ loopDots: b.loopDots,
253
+ hingeScrub: b.hingeScrub,
254
+ explodeAmount: b.explodeAmount,
255
+ shellViewMode: b.shellViewMode,
256
+ cabin: x.domain === "vehicle" && x.vehicleArchetype === "car" ? b.cabin : void 0,
257
+ carBounds: b.carBounds,
258
+ showCabinSockets: b.wizardTab === "cabin",
259
+ rootObjRef: b.rootObjRef,
260
+ onClickIsland: b.handleBucketIsland,
261
+ onPickFace: b.handlePickFace,
262
+ onBrushActiveChange: w
263
+ }) : /* @__PURE__ */ g(s, {
264
+ assembly: b.assembly,
265
+ importedRoot: b.workingScene,
266
+ rootObjRef: b.rootObjRef,
267
+ liveBundle: b.liveBundle,
268
+ patches: b.patches,
269
+ stampActive: b.stampTool !== "none",
270
+ panelAnimRef: b.panelAnimRef,
271
+ cabin: x.domain === "vehicle" && x.vehicleArchetype === "car" ? b.cabin : void 0,
272
+ carBounds: b.carBounds,
273
+ showDriver: b.showDriverInStep2,
274
+ onStampSurface: b.handleStampSurface
239
275
  }),
240
- b.domain === "vehicle" && b.usePaperShellProxy && /* @__PURE__ */ h(c, {
241
- chassisObjRef: y.rootObjRef,
242
- emitters: y.assembly.emitters
276
+ x.domain === "vehicle" && x.usePaperShellProxy && /* @__PURE__ */ g(c, {
277
+ chassisObjRef: b.rootObjRef,
278
+ emitters: b.assembly.emitters
243
279
  })
244
280
  ]
245
281
  })
@@ -247,4 +283,4 @@ function _({ onSpawnInWorld: _, enableWebMcp: v = !0 }) {
247
283
  ]
248
284
  });
249
285
  }
250
- export { _ as GlbImportGate };
286
+ export { v as GlbImportGate };
@@ -9,10 +9,11 @@ export declare function makeStarterDomainScene(domain: GateDomain): THREE.Group;
9
9
  * - SI Bounding-Box Dimension Tag (`W × H × L m · Y-floor`)
10
10
  * - Interactive 3D Pills over tagged `Wheel` & `Door`/`Hood`/`Trunk` islands as you orbit around the model.
11
11
  */
12
- export declare function ImporterPlinthUikitTags({ cal, islands, wheelColors, partPicks, explodeAmount, onClickIsland, }: {
12
+ export declare function ImporterPlinthUikitTags({ cal, islands, wheelColors, propellerSet, partPicks, explodeAmount, onClickIsland, }: {
13
13
  readonly cal: CalibrationMetrics;
14
14
  readonly islands: readonly MeshIsland[];
15
15
  readonly wheelColors: ReadonlyMap<number, string>;
16
+ readonly propellerSet?: ReadonlySet<number>;
16
17
  readonly partPicks: Readonly<Record<number, ChopPartRole>>;
17
18
  readonly explodeAmount: number;
18
19
  readonly onClickIsland: (id: number) => void;
@@ -56,30 +56,36 @@ function d({ position: e, label: n, sub: u, accent: d, onClick: f }) {
56
56
  })
57
57
  });
58
58
  }
59
- function f({ cal: t, islands: n, wheelColors: r, partPicks: i, explodeAmount: s, onClickIsland: c }) {
60
- let l = e(() => `${t.aabbSize[0].toFixed(2)}m W × ${t.aabbSize[1].toFixed(2)}m H × ${t.aabbSize[2].toFixed(2)}m L`, [t.aabbSize]), u = e(() => `Ymin ${t.minY >= 0 ? "+" : ""}${t.minY.toFixed(3)}m`, [t.minY]), f = e(() => {
59
+ function f({ cal: t, islands: n, wheelColors: r, propellerSet: i, partPicks: s, explodeAmount: c, onClickIsland: l }) {
60
+ let u = e(() => `${t.aabbSize[0].toFixed(2)}m W × ${t.aabbSize[1].toFixed(2)}m H × ${t.aabbSize[2].toFixed(2)}m L`, [t.aabbSize]), f = e(() => `Ymin ${t.minY >= 0 ? "+" : ""}${t.minY.toFixed(3)}m`, [t.minY]), p = e(() => {
61
61
  let e = [];
62
62
  for (let t of n) {
63
- let n = r.get(t.id), a = i[t.id];
64
- if (!n && !a) continue;
65
- let o = Math.sign(t.center[0] || 1) * s * .65, c = [
66
- t.center[0] + o,
67
- t.center[1] + t.size[1] * .5 + .16,
63
+ let n = r.get(t.id), a = !!i?.has(t.id), o = s[t.id];
64
+ if (!n && !a && !o) continue;
65
+ let l = Math.sign(t.center[0] || 1) * c * .65, u = [
66
+ t.center[0] + (n ? l : 0),
67
+ t.center[1] + t.size[1] * .5 + .16 + (a ? c * .65 : 0),
68
68
  t.center[2]
69
69
  ];
70
70
  if (n) {
71
- let r = t.center[0] >= 0 ? "L" : "R", i = t.center[2] >= 0 ? "F" : "R";
71
+ let r = Math.abs(t.center[0]) <= .1 ? "C" : t.center[0] > 0 ? "L" : "R", i = t.center[2] >= 0 ? "F" : "R";
72
72
  e.push({
73
73
  id: t.id,
74
- pos: c,
74
+ pos: u,
75
75
  label: `WHEEL ${i}${r}`,
76
76
  sub: `R ${(t.size[1] * .5).toFixed(2)}m`,
77
77
  accent: n
78
78
  });
79
- } else a && e.push({
79
+ } else a ? e.push({
80
80
  id: t.id,
81
- pos: c,
82
- label: a.toUpperCase(),
81
+ pos: u,
82
+ label: "ROTOR",
83
+ sub: `${t.triangleIndices.length} tris`,
84
+ accent: "#EC4899"
85
+ }) : o && e.push({
86
+ id: t.id,
87
+ pos: u,
88
+ label: o.toUpperCase(),
83
89
  sub: `${t.triangleIndices.length} tris`,
84
90
  accent: "#38bdf8"
85
91
  });
@@ -90,7 +96,8 @@ function f({ cal: t, islands: n, wheelColors: r, partPicks: i, explodeAmount: s,
90
96
  n,
91
97
  r,
92
98
  i,
93
- s
99
+ s,
100
+ c
94
101
  ]);
95
102
  return /* @__PURE__ */ o("group", { children: [/* @__PURE__ */ a(d, {
96
103
  position: [
@@ -99,14 +106,14 @@ function f({ cal: t, islands: n, wheelColors: r, partPicks: i, explodeAmount: s,
99
106
  0
100
107
  ],
101
108
  label: "SI BOUNDS",
102
- sub: `${l} · ${u}`,
109
+ sub: `${u} · ${f}`,
103
110
  accent: "#00e5ff"
104
- }), f.map((e) => /* @__PURE__ */ a(d, {
111
+ }), p.map((e) => /* @__PURE__ */ a(d, {
105
112
  position: e.pos,
106
113
  label: e.label,
107
114
  sub: e.sub,
108
115
  accent: e.accent,
109
- onClick: () => c(e.id)
116
+ onClick: () => l(e.id)
110
117
  }, `pill_${e.id}`))] });
111
118
  }
112
119
  export { f as ImporterPlinthUikitTags, u as makeStarterDomainScene };
@@ -1,6 +1,7 @@
1
1
  import type { PaperShellAssembly } from "@khr3/vehicles/paper-shell";
2
2
  import React from "react";
3
3
  import * as THREE from "three";
4
+ import type { CarCabinConfig, ShellViewMode } from "./cabinMixamoRig.js";
4
5
  import { makeStarterDomainScene } from "./ImporterPlinthUikitTags.js";
5
6
  export { makeStarterDomainScene };
6
7
  import { type WheelVisualSource } from "./khrCompiler.js";
@@ -20,6 +21,7 @@ export interface Step1CalibrationPlinthProps {
20
21
  readonly islands: readonly MeshIsland[];
21
22
  readonly axles: readonly WheelAxle[];
22
23
  readonly wheelColors: ReadonlyMap<number, string>;
24
+ readonly propellerSet?: ReadonlySet<number>;
23
25
  readonly partPicks: Readonly<Record<number, ChopPartRole>>;
24
26
  readonly wheelSource: WheelVisualSource;
25
27
  readonly surfaceMode: SurfaceSelectMode;
@@ -31,8 +33,16 @@ export interface Step1CalibrationPlinthProps {
31
33
  } | null;
32
34
  readonly hingeScrub: number;
33
35
  readonly explodeAmount: number;
36
+ readonly shellViewMode?: ShellViewMode;
37
+ readonly cabin?: CarCabinConfig;
38
+ readonly carBounds?: {
39
+ readonly min: readonly [number, number, number];
40
+ readonly max: readonly [number, number, number];
41
+ };
42
+ readonly showCabinSockets?: boolean;
34
43
  readonly onClickIsland: (id: number) => void;
35
44
  readonly onPickFace: (hit: Step1FaceHit) => void;
45
+ readonly onBrushActiveChange?: (active: boolean) => void;
36
46
  readonly rootObjRef: React.RefObject<THREE.Group | null>;
37
47
  }
38
48
  export declare function Step1CalibrationPlinth(p: Step1CalibrationPlinthProps): React.JSX.Element;