@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.
- package/bin/kolmo.mjs +1 -1
- package/dist/engine/kolmoActor.js +125 -83
- package/dist/engine/kolmoLongDrive.js +136 -91
- package/dist/engine/kolmoStore.d.ts +6 -5
- package/dist/engine/kolmoStore.js +115 -79
- package/dist/engine/kolmoVehicle.d.ts +1 -1
- package/dist/engine/kolmoVehicle.js +160 -147
- package/dist/engine/kolmoVehicleDriver.d.ts +12 -4
- package/dist/engine/kolmoVehicleDriver.js +40 -20
- package/dist/engine/kolmoWorld.js +55 -35
- package/dist/importer/CabinPreviewRig.d.ts +13 -0
- package/dist/importer/CabinPreviewRig.js +138 -0
- package/dist/importer/CabinStepSection.d.ts +17 -0
- package/dist/importer/CabinStepSection.js +222 -0
- package/dist/importer/ChopShopPanel.d.ts +31 -1
- package/dist/importer/ChopShopPanel.js +474 -380
- package/dist/importer/GateHudBar.d.ts +3 -0
- package/dist/importer/GateHudBar.js +8 -2
- package/dist/importer/GlbImportGate.js +183 -147
- package/dist/importer/ImporterPlinthUikitTags.d.ts +2 -1
- package/dist/importer/ImporterPlinthUikitTags.js +23 -16
- package/dist/importer/Step1CalibrationPlinth.d.ts +10 -0
- package/dist/importer/Step1CalibrationPlinth.js +203 -141
- package/dist/importer/Step2UniversalPad.d.ts +8 -1
- package/dist/importer/Step2UniversalPad.js +112 -90
- package/dist/importer/cabinMeshBuilders.d.ts +13 -0
- package/dist/importer/cabinMeshBuilders.js +104 -0
- package/dist/importer/cabinMixamoRig.d.ts +53 -0
- package/dist/importer/cabinMixamoRig.js +150 -0
- package/dist/importer/chopShopActions.d.ts +6 -0
- package/dist/importer/chopShopActions.js +86 -61
- package/dist/importer/chopShopUiComponents.d.ts +22 -0
- package/dist/importer/chopShopUiComponents.js +91 -0
- package/dist/importer/gateStore.d.ts +5 -2
- package/dist/importer/gateStore.js +13 -10
- package/dist/importer/glbNormalizer.d.ts +10 -1
- package/dist/importer/glbNormalizer.js +114 -49
- package/dist/importer/importerWebMcp.js +4 -1
- package/dist/importer/index.d.ts +4 -2
- package/dist/importer/index.js +24 -21
- package/dist/importer/khrCompiler.d.ts +20 -1
- package/dist/importer/khrCompiler.js +539 -290
- package/dist/importer/launcherBake.js +12 -8
- package/dist/importer/meshIslands.d.ts +4 -0
- package/dist/importer/meshIslands.js +104 -99
- package/dist/importer/surfaceCutter.d.ts +12 -3
- package/dist/importer/surfaceCutter.js +220 -127
- package/dist/importer/surfaceTopology.d.ts +13 -2
- package/dist/importer/surfaceTopology.js +57 -29
- package/dist/importer/universalGateBake.d.ts +7 -1
- package/dist/importer/universalGateBake.js +63 -60
- package/dist/importer/usdToGlb.js +19 -7
- package/dist/importer/useChopShopController.d.ts +27 -1
- package/dist/importer/useChopShopController.js +369 -255
- package/dist/importer/wheelAxlePairing.d.ts +3 -1
- package/dist/importer/wheelAxlePairing.js +82 -33
- package/dist/index.js +31 -28
- package/dist/junk/ShardPieces.js +3 -3
- package/dist/physics/index.d.ts +7 -0
- package/dist/physics/index.js +66 -40
- package/package.json +1 -1
|
@@ -1,67 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
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
|
|
13
|
-
let n = new
|
|
14
|
-
return n.setAttribute("position", new
|
|
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
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
let
|
|
35
|
-
if (!
|
|
36
|
-
let e =
|
|
37
|
-
return e ?
|
|
38
|
-
}, [
|
|
39
|
-
if (
|
|
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
|
|
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 =
|
|
76
|
+
let t = u(r.islands, a);
|
|
45
77
|
e.push({
|
|
46
|
-
key: `f12_${
|
|
78
|
+
key: `f12_${n}_${i}`,
|
|
47
79
|
pos: t.center,
|
|
48
|
-
group:
|
|
80
|
+
group: l(Math.max(.1, t.radius), Math.max(.08, t.halfWidth * 2))
|
|
49
81
|
});
|
|
50
82
|
}
|
|
51
83
|
}), e;
|
|
52
84
|
}, [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
85
|
+
r.wheelSource,
|
|
86
|
+
r.axles,
|
|
87
|
+
r.islands
|
|
56
88
|
]);
|
|
57
|
-
|
|
58
|
-
for (let e of
|
|
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
|
-
}, [
|
|
63
|
-
let
|
|
64
|
-
e
|
|
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:
|
|
73
|
-
isDrag:
|
|
74
|
-
})
|
|
116
|
+
erase: a,
|
|
117
|
+
isDrag: n
|
|
118
|
+
});
|
|
75
119
|
};
|
|
76
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
124
|
+
children: /* @__PURE__ */ x(_, {
|
|
81
125
|
firstHitOnly: !0,
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
ref:
|
|
84
|
-
children: [
|
|
85
|
-
|
|
86
|
-
|
|
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:
|
|
89
|
-
children: /* @__PURE__ */
|
|
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 || !!
|
|
93
|
-
opacity:
|
|
94
|
-
wireframe: !!
|
|
95
|
-
flatShading:
|
|
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
|
-
|
|
142
|
+
r.assembly.wheels.map((e) => /* @__PURE__ */ b("group", {
|
|
99
143
|
position: e.position,
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
geometry:
|
|
102
|
-
children: /* @__PURE__ */
|
|
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
|
-
] }) :
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
if (
|
|
113
|
-
let
|
|
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
|
-
],
|
|
161
|
+
], d = [
|
|
118
162
|
0,
|
|
119
163
|
0,
|
|
120
164
|
0
|
|
121
|
-
],
|
|
122
|
-
if (
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
|
130
|
-
Math.sign(
|
|
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__ */
|
|
182
|
+
return /* @__PURE__ */ b("group", {
|
|
135
183
|
position: [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
184
|
+
d[0] + u[0],
|
|
185
|
+
d[1] + u[1],
|
|
186
|
+
d[2] + u[2]
|
|
139
187
|
],
|
|
140
|
-
quaternion:
|
|
141
|
-
children: /* @__PURE__ */
|
|
188
|
+
quaternion: f,
|
|
189
|
+
children: /* @__PURE__ */ x("group", {
|
|
142
190
|
position: [
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
191
|
+
-d[0],
|
|
192
|
+
-d[1],
|
|
193
|
+
-d[2]
|
|
146
194
|
],
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
-
geometry:
|
|
149
|
-
material:
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
154
|
-
|
|
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
|
-
|
|
157
|
-
|
|
207
|
+
onContextMenu: (e) => {
|
|
208
|
+
r.surfaceMode !== "island" && (e.nativeEvent.preventDefault(), I(e, t.id, !1, !0));
|
|
158
209
|
},
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
}),
|
|
163
|
-
geometry:
|
|
216
|
+
}), (s || c) && /* @__PURE__ */ b("mesh", {
|
|
217
|
+
geometry: t.geometry,
|
|
164
218
|
raycast: () => null,
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
color:
|
|
219
|
+
children: /* @__PURE__ */ b("meshBasicMaterial", {
|
|
220
|
+
color: s ?? r.activeRoleColor,
|
|
167
221
|
transparent: !0,
|
|
168
|
-
opacity: .
|
|
222
|
+
opacity: s ? .36 : .22,
|
|
169
223
|
depthWrite: !1
|
|
170
224
|
})
|
|
171
225
|
})]
|
|
172
226
|
})
|
|
173
|
-
},
|
|
227
|
+
}, t.id);
|
|
174
228
|
}),
|
|
175
|
-
|
|
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) *
|
|
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
|
-
|
|
184
|
-
geometry:
|
|
237
|
+
j && /* @__PURE__ */ b("mesh", {
|
|
238
|
+
geometry: j,
|
|
185
239
|
raycast: () => null,
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
-
color:
|
|
240
|
+
children: /* @__PURE__ */ b("meshBasicMaterial", {
|
|
241
|
+
color: r.activeRoleColor,
|
|
188
242
|
transparent: !0,
|
|
189
243
|
opacity: .62,
|
|
190
|
-
side:
|
|
244
|
+
side: h.DoubleSide,
|
|
191
245
|
depthWrite: !1
|
|
192
246
|
})
|
|
193
247
|
}),
|
|
194
|
-
|
|
195
|
-
geometry:
|
|
248
|
+
M && /* @__PURE__ */ b("mesh", {
|
|
249
|
+
geometry: M,
|
|
196
250
|
raycast: () => null,
|
|
197
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ b("meshBasicMaterial", {
|
|
198
252
|
color: "#00E5FF",
|
|
199
253
|
transparent: !0,
|
|
200
254
|
opacity: .48,
|
|
201
|
-
side:
|
|
255
|
+
side: h.DoubleSide,
|
|
202
256
|
depthWrite: !1
|
|
203
257
|
})
|
|
204
258
|
}),
|
|
205
|
-
|
|
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__ */
|
|
266
|
+
children: [/* @__PURE__ */ b("sphereGeometry", { args: [
|
|
213
267
|
.032,
|
|
214
268
|
10,
|
|
215
269
|
10
|
|
216
|
-
] }), /* @__PURE__ */
|
|
270
|
+
] }), /* @__PURE__ */ b("meshBasicMaterial", {
|
|
217
271
|
color: t === 0 ? "#10B981" : "#FFB000",
|
|
218
272
|
depthTest: !1
|
|
219
273
|
})]
|
|
220
274
|
}, `dot_${t}`)),
|
|
221
|
-
|
|
222
|
-
points:
|
|
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
|
-
] }) :
|
|
287
|
+
] }) : r.previewScene && /* @__PURE__ */ b("primitive", { object: r.previewScene }), /* @__PURE__ */ x("mesh", {
|
|
227
288
|
position: [
|
|
228
289
|
0,
|
|
229
|
-
|
|
290
|
+
a.aabbSize[1] * .5 + a.minY,
|
|
230
291
|
0
|
|
231
292
|
],
|
|
232
293
|
raycast: () => null,
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
] }), /* @__PURE__ */
|
|
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__ */
|
|
305
|
+
}), /* @__PURE__ */ x("mesh", {
|
|
245
306
|
position: [
|
|
246
307
|
0,
|
|
247
308
|
.01,
|
|
248
|
-
Math.max(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__ */
|
|
317
|
+
children: [/* @__PURE__ */ b("coneGeometry", { args: [
|
|
257
318
|
.25,
|
|
258
319
|
.6,
|
|
259
320
|
3
|
|
260
|
-
] }), /* @__PURE__ */
|
|
321
|
+
] }), /* @__PURE__ */ b("meshBasicMaterial", {
|
|
261
322
|
color: 58879,
|
|
262
323
|
wireframe: !0
|
|
263
324
|
})]
|
|
264
325
|
})]
|
|
265
326
|
})
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
cal:
|
|
268
|
-
islands:
|
|
269
|
-
wheelColors:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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 {
|
|
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;
|