@pinkaphant/kolmo 0.1.1 → 0.1.3
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/LICENSE +21 -0
- package/README.md +16 -14
- package/bin/kolmo.mjs +19 -54
- package/dist/body/HeldItem.d.ts +22 -0
- package/dist/body/HeldItem.js +171 -0
- package/dist/body/KhrBody.d.ts +26 -0
- package/dist/body/KhrBody.js +179 -0
- package/dist/body/bodySi.d.ts +59 -0
- package/dist/body/bodySi.js +61 -0
- package/dist/body/index.d.ts +3 -0
- package/dist/body/index.js +4 -0
- package/dist/engine/index.d.ts +4 -4
- package/dist/engine/index.js +12 -3
- package/dist/engine/kolmoActor.d.ts +11 -4
- package/dist/engine/kolmoActor.js +197 -0
- package/dist/engine/kolmoInput.d.ts +12 -0
- package/dist/engine/kolmoInput.js +80 -0
- package/dist/engine/kolmoIsland.d.ts +3 -1
- package/dist/engine/kolmoIsland.js +311 -0
- package/dist/engine/kolmoLongDrive.js +223 -0
- package/dist/engine/kolmoRigs.js +59 -0
- package/dist/engine/kolmoStore.d.ts +53 -27
- package/dist/engine/kolmoStore.js +211 -0
- package/dist/engine/kolmoSurface.d.ts +1 -1
- package/dist/engine/kolmoSurface.js +182 -0
- package/dist/engine/kolmoVehicle.d.ts +2 -1
- package/dist/engine/kolmoVehicle.js +244 -0
- package/dist/engine/kolmoVehicleDriver.d.ts +30 -0
- package/dist/engine/kolmoVehicleDriver.js +38 -0
- package/dist/engine/kolmoWorld.d.ts +7 -15
- package/dist/engine/kolmoWorld.js +136 -0
- package/dist/engine/longDriveKit.d.ts +4 -2
- package/dist/engine/longDriveKit.js +254 -0
- package/dist/engine/mainlandMacroCell.d.ts +3 -7
- package/dist/engine/mainlandMacroCell.js +247 -0
- package/dist/engine/shiftedFixedBody.d.ts +13 -0
- package/dist/engine/shiftedFixedBody.js +64 -0
- package/dist/importer/ChopShopPanel.js +465 -0
- package/dist/importer/DomainWorkshopPanel.d.ts +9 -4
- package/dist/importer/DomainWorkshopPanel.js +385 -0
- package/dist/importer/GateHudBar.js +312 -0
- package/dist/importer/GlbImportGate.js +250 -0
- package/dist/importer/ImperativeVehicleRig.js +336 -0
- package/dist/importer/ImporterPlinthUikitTags.js +112 -0
- package/dist/importer/Step1CalibrationPlinth.js +275 -0
- package/dist/importer/Step2UniversalPad.js +244 -0
- package/dist/importer/VfxEmitterPool.js +91 -0
- package/dist/importer/chopShopActions.d.ts +22 -2
- package/dist/importer/chopShopActions.js +232 -0
- package/dist/importer/gateStore.d.ts +1 -1
- package/dist/importer/gateStore.js +92 -0
- package/dist/importer/glbNormalizer.js +133 -0
- package/dist/importer/importerWebMcp.d.ts +17 -6
- package/dist/importer/importerWebMcp.js +343 -0
- package/dist/importer/index.js +22 -3
- package/dist/importer/khrCompiler.d.ts +1 -1
- package/dist/importer/khrCompiler.js +434 -0
- package/dist/importer/launcherBake.js +51 -0
- package/dist/importer/meshIslands.d.ts +1 -1
- package/dist/importer/meshIslands.js +301 -0
- package/dist/importer/surfaceCutter.js +254 -0
- package/dist/importer/surfaceTopology.js +183 -0
- package/dist/importer/universalGateBake.js +162 -0
- package/dist/importer/usdToGlb.js +294 -0
- package/dist/importer/useChopShopController.d.ts +11 -2
- package/dist/importer/useChopShopController.js +364 -0
- package/dist/importer/vehiclePanelAnim.js +214 -0
- package/dist/importer/wheelAxlePairing.d.ts +1 -2
- package/dist/importer/wheelAxlePairing.js +102 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +69 -14
- package/dist/junk/DestructibleTarget.js +154 -0
- package/dist/junk/KolmoJunk.js +65 -0
- package/dist/junk/ShardPieces.d.ts +6 -4
- package/dist/junk/ShardPieces.js +74 -0
- package/dist/junk/TargetDecals.js +51 -0
- package/dist/junk/bvhShatter.js +55 -0
- package/dist/junk/bvhTriCollector.js +78 -0
- package/dist/junk/index.js +11 -1
- package/dist/junk/junkGeometry.js +69 -0
- package/dist/junk/junkImportSanitize.js +54 -0
- package/dist/junk/junkImporter.js +95 -0
- package/dist/junk/junkLabelCanvas.js +67 -0
- package/dist/junk/junkLabels.js +35 -0
- package/dist/junk/targetHelpers.js +103 -0
- package/dist/junk/targetHitLogic.js +128 -0
- package/dist/junk/useTargetAssets.js +102 -0
- package/dist/physics/index.d.ts +26 -0
- package/dist/physics/index.js +84 -0
- package/dist/schema/kolmoSchema.d.ts +2 -1
- package/dist/schema/kolmoSchema.js +184 -0
- package/dist/shaders/celestialBackdrop.d.ts +1 -1
- package/dist/shaders/celestialBackdrop.js +344 -0
- package/dist/shaders/index.d.ts +0 -1
- package/dist/shaders/index.js +9 -1
- package/dist/shaders/plumeAndSparkle.js +271 -0
- package/dist/shaders/ps2GlslShared.d.ts +1 -1
- package/dist/shaders/ps2GlslShared.js +3 -0
- package/dist/shaders/ps2MaterialsTSL.js +65 -0
- package/dist/shaders/ps2MaterialsWebGL.js +40 -0
- package/dist/shaders/ps2RoadWebGL.js +101 -0
- package/dist/shaders/ps2TerrainWebGL.js +54 -0
- package/dist/shaders/ps2Textures.js +224 -0
- package/dist/shaders/retroPalettes.js +188 -0
- package/dist/shaders/retroShader.d.ts +31 -3
- package/dist/shaders/retroShader.js +249 -0
- package/dist/shaders/tsl.d.ts +1 -0
- package/dist/shaders/tsl.js +1 -0
- package/dist/vite/index.d.ts +15 -0
- package/dist/vite/index.js +90 -0
- package/dist/world/frontage.js +32 -0
- package/dist/world/index.d.ts +1 -1
- package/dist/world/index.js +11 -3
- package/dist/world/infiniteWorld2D.js +244 -0
- package/dist/world/island.js +201 -0
- package/dist/world/macroCellSchema.js +27 -0
- package/dist/world/macroKnightAStar.js +171 -0
- package/dist/world/random.js +33 -0
- package/dist/world/road.js +136 -0
- package/dist/world/roadRibbon.d.ts +6 -6
- package/dist/world/roadRibbon.js +161 -0
- package/dist/world/terrain.js +87 -0
- package/dist/world/worldTypes.js +111 -0
- package/package.json +36 -19
- package/dist/engine-BeKvBM8d.js +0 -1745
- package/dist/importer-D9bdcGTh.js +0 -5113
- package/dist/junk-B4bC1zAl.js +0 -1049
- package/dist/kolmoSurface-DTnrFXH0.js +0 -558
- package/dist/shaders-GS71Ek1A.js +0 -1383
- package/dist/world-PRWPYrlx.js +0 -947
- package/dist/worldTypes-Z0KfdCd0.js +0 -226
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { CHOP_ROLES as e } from "./surfaceTopology.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
// src/importer/ChopShopPanel.tsx
|
|
5
|
+
var r = [
|
|
6
|
+
{
|
|
7
|
+
mode: "island",
|
|
8
|
+
label: "1 · Bucket",
|
|
9
|
+
hint: "1-click any separate mesh piece (auto-mirrors X=0)."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
mode: "crease",
|
|
13
|
+
label: "2 · Crease Flood",
|
|
14
|
+
hint: "Click a fused panel/tire face to flood up to shutlines."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
mode: "loop",
|
|
18
|
+
label: "3 · Tape Lasso",
|
|
19
|
+
hint: "Click 3+ seam dots around a fused door/hood/wheel, Close Loop, then Peel."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
mode: "triangle",
|
|
23
|
+
label: "4 · Brush",
|
|
24
|
+
hint: "Click or drag to paint faces. Alt / Right-click erases."
|
|
25
|
+
}
|
|
26
|
+
], i = {
|
|
27
|
+
position: "absolute",
|
|
28
|
+
top: 52,
|
|
29
|
+
right: 10,
|
|
30
|
+
bottom: 48,
|
|
31
|
+
width: 306,
|
|
32
|
+
display: "flex",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
gap: 8,
|
|
35
|
+
padding: "10px 11px",
|
|
36
|
+
background: "rgba(10, 13, 18, 0.93)",
|
|
37
|
+
border: "1px solid #1C2632",
|
|
38
|
+
borderRadius: 6,
|
|
39
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
40
|
+
color: "#E6EDF3",
|
|
41
|
+
overflowY: "auto",
|
|
42
|
+
zIndex: 18,
|
|
43
|
+
backdropFilter: "blur(6px)"
|
|
44
|
+
}, a = {
|
|
45
|
+
border: "1px solid #1E293B",
|
|
46
|
+
borderRadius: 4,
|
|
47
|
+
padding: "7px 8px",
|
|
48
|
+
display: "grid",
|
|
49
|
+
gap: 6
|
|
50
|
+
};
|
|
51
|
+
function o({ label: e, active: n = !1, disabled: r = !1, color: i = "#FFB000", onClick: a }) {
|
|
52
|
+
return /* @__PURE__ */ t("button", {
|
|
53
|
+
type: "button",
|
|
54
|
+
disabled: r,
|
|
55
|
+
onClick: a,
|
|
56
|
+
style: {
|
|
57
|
+
padding: "5px 7px",
|
|
58
|
+
borderRadius: 3,
|
|
59
|
+
fontSize: 10.5,
|
|
60
|
+
fontWeight: n ? 700 : 600,
|
|
61
|
+
fontFamily: "inherit",
|
|
62
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
63
|
+
border: `1px solid ${r ? "#1E293B" : n ? i : "#2B3A4E"}`,
|
|
64
|
+
background: n ? i : "#0F151E",
|
|
65
|
+
color: r ? "#475569" : n ? "#080B10" : "#E2E8F0",
|
|
66
|
+
textAlign: "left"
|
|
67
|
+
},
|
|
68
|
+
children: e
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function s(s) {
|
|
72
|
+
let c = e.find((e) => e.role === s.activeRole) ?? e[0], l = (e) => e === "wheel" ? s.wheelCount : Object.values(s.partPicks).filter((t) => t === e).length, u = Object.keys(s.partPicks).length;
|
|
73
|
+
return /* @__PURE__ */ n("aside", {
|
|
74
|
+
style: i,
|
|
75
|
+
"aria-label": "Car Chop-Shop",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ n("div", {
|
|
78
|
+
style: {
|
|
79
|
+
display: "flex",
|
|
80
|
+
justifyContent: "space-between",
|
|
81
|
+
alignItems: "center"
|
|
82
|
+
},
|
|
83
|
+
children: [/* @__PURE__ */ t("span", {
|
|
84
|
+
style: {
|
|
85
|
+
fontSize: 11.5,
|
|
86
|
+
fontWeight: 800,
|
|
87
|
+
color: "#FFB000",
|
|
88
|
+
letterSpacing: "0.05em"
|
|
89
|
+
},
|
|
90
|
+
children: "CHOP-SHOP · CUT & HINGE"
|
|
91
|
+
}), /* @__PURE__ */ t("span", {
|
|
92
|
+
style: {
|
|
93
|
+
fontSize: 10,
|
|
94
|
+
color: "#38BDF8"
|
|
95
|
+
},
|
|
96
|
+
children: `${s.wheelCount}W · ${u}P`
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ n("div", {
|
|
100
|
+
style: a,
|
|
101
|
+
children: [/* @__PURE__ */ n("div", {
|
|
102
|
+
style: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
justifyContent: "space-between",
|
|
105
|
+
fontSize: 10.5,
|
|
106
|
+
color: "#94A3B8"
|
|
107
|
+
},
|
|
108
|
+
children: [/* @__PURE__ */ t("span", { children: "LENGTH (+Z SI)" }), /* @__PURE__ */ t("span", {
|
|
109
|
+
style: {
|
|
110
|
+
color: "#00E5FF",
|
|
111
|
+
fontWeight: 700
|
|
112
|
+
},
|
|
113
|
+
children: `${s.targetMeters.toFixed(2)} m`
|
|
114
|
+
})]
|
|
115
|
+
}), /* @__PURE__ */ t("input", {
|
|
116
|
+
type: "range",
|
|
117
|
+
min: 1.6,
|
|
118
|
+
max: 7.5,
|
|
119
|
+
step: .05,
|
|
120
|
+
value: s.targetMeters,
|
|
121
|
+
onChange: (e) => s.onChangeTargetMeters(Number(e.target.value)),
|
|
122
|
+
style: {
|
|
123
|
+
width: "100%",
|
|
124
|
+
accentColor: "#00E5FF"
|
|
125
|
+
}
|
|
126
|
+
})]
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ n("div", {
|
|
129
|
+
style: a,
|
|
130
|
+
children: [/* @__PURE__ */ t("span", {
|
|
131
|
+
style: {
|
|
132
|
+
fontSize: 10,
|
|
133
|
+
color: "#94A3B8",
|
|
134
|
+
letterSpacing: "0.06em"
|
|
135
|
+
},
|
|
136
|
+
children: "1. PICK PART ROLE TO TAG OR CUT"
|
|
137
|
+
}), /* @__PURE__ */ t("div", {
|
|
138
|
+
style: {
|
|
139
|
+
display: "grid",
|
|
140
|
+
gridTemplateColumns: "1fr 1fr",
|
|
141
|
+
gap: 5
|
|
142
|
+
},
|
|
143
|
+
children: e.map((e) => {
|
|
144
|
+
let n = l(e.role);
|
|
145
|
+
return /* @__PURE__ */ t(o, {
|
|
146
|
+
active: s.activeRole === e.role,
|
|
147
|
+
color: e.color,
|
|
148
|
+
label: `${e.label}${n > 0 ? ` (${n})` : ""}`,
|
|
149
|
+
onClick: () => s.onSelectRole(e.role)
|
|
150
|
+
}, e.role);
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ n("div", {
|
|
155
|
+
style: a,
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ t("span", {
|
|
158
|
+
style: {
|
|
159
|
+
fontSize: 10,
|
|
160
|
+
color: "#94A3B8",
|
|
161
|
+
letterSpacing: "0.06em"
|
|
162
|
+
},
|
|
163
|
+
children: "2. SURFACE CUTTER (FUSED MESHES)"
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ t("div", {
|
|
166
|
+
style: {
|
|
167
|
+
display: "grid",
|
|
168
|
+
gridTemplateColumns: "1fr 1fr",
|
|
169
|
+
gap: 5
|
|
170
|
+
},
|
|
171
|
+
children: r.map((e) => /* @__PURE__ */ t(o, {
|
|
172
|
+
label: e.label,
|
|
173
|
+
active: s.surfaceMode === e.mode,
|
|
174
|
+
color: "#00E5FF",
|
|
175
|
+
onClick: () => s.onChangeSurfaceMode(e.mode)
|
|
176
|
+
}, e.mode))
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ t("div", {
|
|
179
|
+
style: {
|
|
180
|
+
fontSize: 10,
|
|
181
|
+
color: "#94A3B8",
|
|
182
|
+
lineHeight: 1.35
|
|
183
|
+
},
|
|
184
|
+
children: r.find((e) => e.mode === s.surfaceMode)?.hint
|
|
185
|
+
}),
|
|
186
|
+
s.surfaceMode === "crease" && /* @__PURE__ */ n("label", {
|
|
187
|
+
style: {
|
|
188
|
+
display: "grid",
|
|
189
|
+
gridTemplateColumns: "72px 1fr 36px",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
gap: 6,
|
|
192
|
+
fontSize: 10.5
|
|
193
|
+
},
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ t("span", { children: "Crease" }),
|
|
196
|
+
/* @__PURE__ */ t("input", {
|
|
197
|
+
type: "range",
|
|
198
|
+
min: 12,
|
|
199
|
+
max: 62,
|
|
200
|
+
step: 1,
|
|
201
|
+
value: s.creaseDeg,
|
|
202
|
+
onChange: (e) => s.onChangeCreaseDeg(Number(e.target.value)),
|
|
203
|
+
style: { accentColor: "#FFB000" }
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ t("span", {
|
|
206
|
+
style: {
|
|
207
|
+
textAlign: "right",
|
|
208
|
+
color: "#FFB000"
|
|
209
|
+
},
|
|
210
|
+
children: `${s.creaseDeg}°`
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ n("label", {
|
|
215
|
+
style: {
|
|
216
|
+
display: "flex",
|
|
217
|
+
alignItems: "center",
|
|
218
|
+
gap: 6,
|
|
219
|
+
fontSize: 10.5,
|
|
220
|
+
cursor: "pointer"
|
|
221
|
+
},
|
|
222
|
+
children: [/* @__PURE__ */ t("input", {
|
|
223
|
+
type: "checkbox",
|
|
224
|
+
checked: s.mirrorX,
|
|
225
|
+
onChange: (e) => s.onToggleMirrorX(e.target.checked),
|
|
226
|
+
style: { accentColor: "#00E5FF" }
|
|
227
|
+
}), /* @__PURE__ */ t("span", { children: "Mirror cut/tag across X = 0 (L + R)" })]
|
|
228
|
+
}),
|
|
229
|
+
s.surfaceMode === "loop" && /* @__PURE__ */ n("label", {
|
|
230
|
+
style: {
|
|
231
|
+
display: "flex",
|
|
232
|
+
alignItems: "center",
|
|
233
|
+
gap: 6,
|
|
234
|
+
fontSize: 10.5,
|
|
235
|
+
cursor: "pointer"
|
|
236
|
+
},
|
|
237
|
+
children: [/* @__PURE__ */ t("input", {
|
|
238
|
+
type: "checkbox",
|
|
239
|
+
checked: s.splitCoarse,
|
|
240
|
+
onChange: (e) => s.onToggleSplitCoarse(e.target.checked),
|
|
241
|
+
style: { accentColor: "#FFB000" }
|
|
242
|
+
}), /* @__PURE__ */ t("span", { children: "Split coarse triangles under cut line" })]
|
|
243
|
+
}),
|
|
244
|
+
s.surfaceMode !== "island" && /* @__PURE__ */ n("div", {
|
|
245
|
+
style: {
|
|
246
|
+
display: "flex",
|
|
247
|
+
flexWrap: "wrap",
|
|
248
|
+
gap: 5
|
|
249
|
+
},
|
|
250
|
+
children: [
|
|
251
|
+
s.surfaceMode === "loop" && /* @__PURE__ */ t(o, {
|
|
252
|
+
label: `[ CLOSE LOOP (${s.loopDotCount}) ]`,
|
|
253
|
+
disabled: s.loopDotCount < 3,
|
|
254
|
+
color: "#00E5FF",
|
|
255
|
+
onClick: s.onCloseLoop
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ t(o, {
|
|
258
|
+
label: `[ PEEL ${s.selectedFaces}${s.mirroredFaces > 0 ? `+${s.mirroredFaces}` : ""} FACES → ${s.activeRole.toUpperCase()} ]`,
|
|
259
|
+
active: s.selectedFaces > 0,
|
|
260
|
+
disabled: s.selectedFaces === 0,
|
|
261
|
+
color: c.color,
|
|
262
|
+
onClick: s.onPeel
|
|
263
|
+
}),
|
|
264
|
+
(s.selectedFaces > 0 || s.loopDotCount > 0) && /* @__PURE__ */ t(o, {
|
|
265
|
+
label: "[ CLEAR ]",
|
|
266
|
+
onClick: s.onClearSelection
|
|
267
|
+
})
|
|
268
|
+
]
|
|
269
|
+
}),
|
|
270
|
+
(s.undoCount > 0 || u > 0) && /* @__PURE__ */ n("div", {
|
|
271
|
+
style: {
|
|
272
|
+
display: "flex",
|
|
273
|
+
gap: 5
|
|
274
|
+
},
|
|
275
|
+
children: [s.undoCount > 0 && /* @__PURE__ */ t(o, {
|
|
276
|
+
label: `[ UNDO CUT (${s.undoCount}) ]`,
|
|
277
|
+
color: "#F43F5E",
|
|
278
|
+
onClick: s.onUndoCut
|
|
279
|
+
}), u > 0 && /* @__PURE__ */ t(o, {
|
|
280
|
+
label: "[ CLEAR TAGS ]",
|
|
281
|
+
onClick: s.onClearTags
|
|
282
|
+
})]
|
|
283
|
+
})
|
|
284
|
+
]
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ n("div", {
|
|
287
|
+
style: a,
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ t("span", {
|
|
290
|
+
style: {
|
|
291
|
+
fontSize: 10,
|
|
292
|
+
color: "#94A3B8",
|
|
293
|
+
letterSpacing: "0.06em"
|
|
294
|
+
},
|
|
295
|
+
children: "3. HINGE & EXPLODE PREVIEW"
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ n("label", {
|
|
298
|
+
style: {
|
|
299
|
+
display: "grid",
|
|
300
|
+
gridTemplateColumns: "62px 1fr 42px",
|
|
301
|
+
alignItems: "center",
|
|
302
|
+
gap: 6,
|
|
303
|
+
fontSize: 10.5
|
|
304
|
+
},
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ t("span", { children: "Hinges" }),
|
|
307
|
+
/* @__PURE__ */ t("input", {
|
|
308
|
+
type: "range",
|
|
309
|
+
min: 0,
|
|
310
|
+
max: 1,
|
|
311
|
+
step: .02,
|
|
312
|
+
value: s.hingeScrub,
|
|
313
|
+
onChange: (e) => s.onChangeHingeScrub(Number(e.target.value)),
|
|
314
|
+
style: { accentColor: "#10B981" }
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ t("span", {
|
|
317
|
+
style: {
|
|
318
|
+
textAlign: "right",
|
|
319
|
+
color: "#10B981"
|
|
320
|
+
},
|
|
321
|
+
children: `${Math.round(s.hingeScrub * 100)}%`
|
|
322
|
+
})
|
|
323
|
+
]
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ n("label", {
|
|
326
|
+
style: {
|
|
327
|
+
display: "grid",
|
|
328
|
+
gridTemplateColumns: "62px 1fr 42px",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
gap: 6,
|
|
331
|
+
fontSize: 10.5
|
|
332
|
+
},
|
|
333
|
+
children: [
|
|
334
|
+
/* @__PURE__ */ t("span", { children: "Explode" }),
|
|
335
|
+
/* @__PURE__ */ t("input", {
|
|
336
|
+
type: "range",
|
|
337
|
+
min: 0,
|
|
338
|
+
max: 1.2,
|
|
339
|
+
step: .02,
|
|
340
|
+
value: s.explodeAmount,
|
|
341
|
+
onChange: (e) => s.onChangeExplodeAmount(Number(e.target.value)),
|
|
342
|
+
style: { accentColor: "#FFB000" }
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ t("span", {
|
|
345
|
+
style: {
|
|
346
|
+
textAlign: "right",
|
|
347
|
+
color: "#FFB000"
|
|
348
|
+
},
|
|
349
|
+
children: `${s.explodeAmount.toFixed(2)}m`
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
})
|
|
353
|
+
]
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ n("div", {
|
|
356
|
+
style: a,
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ t("span", {
|
|
359
|
+
style: {
|
|
360
|
+
fontSize: 10,
|
|
361
|
+
color: "#94A3B8",
|
|
362
|
+
letterSpacing: "0.06em"
|
|
363
|
+
},
|
|
364
|
+
children: "4. WHEELS & POWERTRAIN"
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ n("div", {
|
|
367
|
+
style: {
|
|
368
|
+
display: "grid",
|
|
369
|
+
gridTemplateColumns: "1fr 1fr",
|
|
370
|
+
gap: 5
|
|
371
|
+
},
|
|
372
|
+
children: [/* @__PURE__ */ t(o, {
|
|
373
|
+
label: "Imported Tires",
|
|
374
|
+
active: s.wheelSource === "imported",
|
|
375
|
+
color: "#00E5FF",
|
|
376
|
+
onClick: () => s.onChangeWheelSource("imported")
|
|
377
|
+
}), /* @__PURE__ */ t(o, {
|
|
378
|
+
label: "12-Gon Fleet",
|
|
379
|
+
active: s.wheelSource === "fleet12",
|
|
380
|
+
color: "#10B981",
|
|
381
|
+
onClick: () => s.onChangeWheelSource("fleet12")
|
|
382
|
+
})]
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ t("div", {
|
|
385
|
+
style: {
|
|
386
|
+
display: "grid",
|
|
387
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
388
|
+
gap: 5
|
|
389
|
+
},
|
|
390
|
+
children: [
|
|
391
|
+
"AWD",
|
|
392
|
+
"RWD",
|
|
393
|
+
"FWD"
|
|
394
|
+
].map((e) => /* @__PURE__ */ t(o, {
|
|
395
|
+
label: e,
|
|
396
|
+
active: s.driveType === e,
|
|
397
|
+
color: "#FFB000",
|
|
398
|
+
onClick: () => s.onChangeDriveType(e)
|
|
399
|
+
}, e))
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ n("label", {
|
|
402
|
+
style: {
|
|
403
|
+
display: "grid",
|
|
404
|
+
gridTemplateColumns: "62px 1fr 46px",
|
|
405
|
+
alignItems: "center",
|
|
406
|
+
gap: 6,
|
|
407
|
+
fontSize: 10.5
|
|
408
|
+
},
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ t("span", { children: "Power" }),
|
|
411
|
+
/* @__PURE__ */ t("input", {
|
|
412
|
+
type: "range",
|
|
413
|
+
min: 90,
|
|
414
|
+
max: 720,
|
|
415
|
+
step: 10,
|
|
416
|
+
value: s.horsepower,
|
|
417
|
+
onChange: (e) => s.onChangeHorsepower(Number(e.target.value)),
|
|
418
|
+
style: { accentColor: "#FFB000" }
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ t("span", {
|
|
421
|
+
style: {
|
|
422
|
+
textAlign: "right",
|
|
423
|
+
color: "#FFB000"
|
|
424
|
+
},
|
|
425
|
+
children: `${s.horsepower}HP`
|
|
426
|
+
})
|
|
427
|
+
]
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
}),
|
|
431
|
+
s.statusNote && /* @__PURE__ */ t("div", {
|
|
432
|
+
style: {
|
|
433
|
+
fontSize: 10.5,
|
|
434
|
+
color: "#34D399",
|
|
435
|
+
padding: "4px 6px",
|
|
436
|
+
background: "rgba(16,185,129,0.1)",
|
|
437
|
+
border: "1px solid rgba(16,185,129,0.35)",
|
|
438
|
+
borderRadius: 4
|
|
439
|
+
},
|
|
440
|
+
children: s.statusNote
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ n("div", {
|
|
443
|
+
style: {
|
|
444
|
+
display: "grid",
|
|
445
|
+
gap: 6,
|
|
446
|
+
marginTop: "auto"
|
|
447
|
+
},
|
|
448
|
+
children: [/* @__PURE__ */ t(o, {
|
|
449
|
+
label: "[ -> STEP 2: COMPILE & TEST TRACK (WASD) ]",
|
|
450
|
+
active: s.unlocked,
|
|
451
|
+
disabled: !s.unlocked || s.busy,
|
|
452
|
+
color: "#FFB000",
|
|
453
|
+
onClick: s.onGoTestDrive
|
|
454
|
+
}), s.onSpawnWorld && /* @__PURE__ */ t(o, {
|
|
455
|
+
label: s.busy ? "[ COMPILING KHR3… ]" : "[ -> SPAWN & DRIVE ON LONG DRIVE ]",
|
|
456
|
+
active: s.unlocked,
|
|
457
|
+
disabled: !s.unlocked || s.busy,
|
|
458
|
+
color: "#10B981",
|
|
459
|
+
onClick: s.onSpawnWorld
|
|
460
|
+
})]
|
|
461
|
+
})
|
|
462
|
+
]
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
export { s as ChopShopPanel };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as THREE from "three";
|
|
3
|
+
import type { KolmoSocketRole } from "../schema/kolmoSchema.js";
|
|
3
4
|
import type { GateDomain } from "./gateStore.js";
|
|
4
5
|
export interface DomainWorkshopPanelProps {
|
|
5
6
|
readonly domain: GateDomain;
|
|
7
|
+
readonly hasCustomFile?: boolean;
|
|
6
8
|
readonly targetMeters: number;
|
|
7
9
|
readonly onChangeTargetMeters: (m: number) => void;
|
|
8
10
|
readonly onSnapC12: () => void;
|
|
9
|
-
readonly onLoadVaultUrl: (url: string, label: string) => void
|
|
11
|
+
readonly onLoadVaultUrl: (url: string, label: string) => void | Promise<void>;
|
|
10
12
|
readonly onForgeLauncherRecipe?: (recipeId: string, scene: THREE.Group, lenM: number) => void;
|
|
11
|
-
readonly onAddSocketPatch: (name: string, pos: [number, number, number]) => void;
|
|
13
|
+
readonly onAddSocketPatch: (name: string, pos: [number, number, number], role?: KolmoSocketRole) => void;
|
|
12
14
|
readonly workingScene: THREE.Group | null;
|
|
13
15
|
readonly onEnforceCrispyPerson: () => void;
|
|
14
|
-
readonly onUploadToVault?: (category: string, token: string) =>
|
|
16
|
+
readonly onUploadToVault?: (category: string, token: string) => Promise<{
|
|
17
|
+
key: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}> | void;
|
|
15
20
|
}
|
|
16
21
|
export declare function enforceRetroPersonMaterials(root: THREE.Object3D | null): number;
|
|
17
|
-
export declare function DomainWorkshopPanel({ domain, targetMeters, onChangeTargetMeters, onSnapC12, onLoadVaultUrl, onForgeLauncherRecipe, onAddSocketPatch, onEnforceCrispyPerson, onUploadToVault, }: DomainWorkshopPanelProps): React.JSX.Element | null;
|
|
22
|
+
export declare function DomainWorkshopPanel({ domain, hasCustomFile, targetMeters, onChangeTargetMeters, onSnapC12, onLoadVaultUrl, onForgeLauncherRecipe, onAddSocketPatch, onEnforceCrispyPerson, onUploadToVault, }: DomainWorkshopPanelProps): React.JSX.Element | null;
|