@flighthq/collision 0.4.0-next.1725.752ca79 → 0.4.0-next.1749.d81a21c

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 (69) hide show
  1. package/dist/collideContactManifold3D.d.ts +3 -0
  2. package/dist/collideContactManifold3D.d.ts.map +1 -0
  3. package/dist/collideContactManifold3D.js +247 -0
  4. package/dist/collideContactManifold3D.js.map +1 -0
  5. package/dist/collisionFace3D.d.ts +9 -0
  6. package/dist/collisionFace3D.d.ts.map +1 -0
  7. package/dist/collisionFace3D.js +256 -0
  8. package/dist/collisionFace3D.js.map +1 -0
  9. package/dist/collisionSupport3D.d.ts +13 -0
  10. package/dist/collisionSupport3D.d.ts.map +1 -0
  11. package/dist/collisionSupport3D.js +163 -0
  12. package/dist/collisionSupport3D.js.map +1 -0
  13. package/dist/contactManifold3D.d.ts +4 -0
  14. package/dist/contactManifold3D.d.ts.map +1 -0
  15. package/dist/contactManifold3D.js +25 -0
  16. package/dist/contactManifold3D.js.map +1 -0
  17. package/dist/contract.d.ts +12 -0
  18. package/dist/contract.d.ts.map +1 -1
  19. package/dist/contract.js +12 -0
  20. package/dist/contract.js.map +1 -1
  21. package/dist/convexHull3D.d.ts +2 -0
  22. package/dist/convexHull3D.d.ts.map +1 -0
  23. package/dist/convexHull3D.js +204 -0
  24. package/dist/convexHull3D.js.map +1 -0
  25. package/dist/gjk3D.d.ts +4 -0
  26. package/dist/gjk3D.d.ts.map +1 -0
  27. package/dist/gjk3D.js +535 -0
  28. package/dist/gjk3D.js.map +1 -0
  29. package/dist/gjkDistance3D.d.ts +4 -0
  30. package/dist/gjkDistance3D.d.ts.map +1 -0
  31. package/dist/gjkDistance3D.js +435 -0
  32. package/dist/gjkDistance3D.js.map +1 -0
  33. package/dist/index.d.ts +8 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +8 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/manifold3D.d.ts +4 -0
  38. package/dist/manifold3D.d.ts.map +1 -0
  39. package/dist/manifold3D.js +15 -0
  40. package/dist/manifold3D.js.map +1 -0
  41. package/dist/pointContainment3D.d.ts +3 -0
  42. package/dist/pointContainment3D.d.ts.map +1 -0
  43. package/dist/pointContainment3D.js +88 -0
  44. package/dist/pointContainment3D.js.map +1 -0
  45. package/dist/raycastCollisionShape3D.d.ts +4 -0
  46. package/dist/raycastCollisionShape3D.d.ts.map +1 -0
  47. package/dist/raycastCollisionShape3D.js +330 -0
  48. package/dist/raycastCollisionShape3D.js.map +1 -0
  49. package/dist/sweepCollisionShape3D.d.ts +4 -0
  50. package/dist/sweepCollisionShape3D.d.ts.map +1 -0
  51. package/dist/sweepCollisionShape3D.js +138 -0
  52. package/dist/sweepCollisionShape3D.js.map +1 -0
  53. package/dist/testCollision3D.d.ts +3 -0
  54. package/dist/testCollision3D.d.ts.map +1 -0
  55. package/dist/testCollision3D.js +36 -0
  56. package/dist/testCollision3D.js.map +1 -0
  57. package/package.json +4 -4
  58. package/src/collideContactManifold3D.test.ts +173 -0
  59. package/src/collisionFace3D.test.ts +192 -0
  60. package/src/collisionSupport3D.test.ts +225 -0
  61. package/src/contactManifold3D.test.ts +44 -0
  62. package/src/convexHull3D.test.ts +134 -0
  63. package/src/gjk3D.test.ts +230 -0
  64. package/src/gjkDistance3D.test.ts +225 -0
  65. package/src/manifold3D.test.ts +32 -0
  66. package/src/pointContainment3D.test.ts +142 -0
  67. package/src/raycastCollisionShape3D.test.ts +331 -0
  68. package/src/sweepCollisionShape3D.test.ts +186 -0
  69. package/src/testCollision3D.test.ts +83 -0
@@ -0,0 +1,3 @@
1
+ import type { CollisionContactManifold3D, CollisionShape3D } from '@flighthq/types/contract';
2
+ export declare function collideContactManifold3D(a: Readonly<CollisionShape3D>, b: Readonly<CollisionShape3D>, out: CollisionContactManifold3D): boolean;
3
+ //# sourceMappingURL=collideContactManifold3D.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collideContactManifold3D.d.ts","sourceRoot":"","sources":["../src/collideContactManifold3D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA6B7F,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAC7B,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAC7B,GAAG,EAAE,0BAA0B,GAC9B,OAAO,CA+ET"}
@@ -0,0 +1,247 @@
1
+ import { MAX_COLLISION_CONTACT_POINTS_3D } from '@flighthq/types/contract';
2
+ import { getCollisionFaceQuery3D } from './collisionFace3D';
3
+ import { getCollisionSupport3D } from './collisionSupport3D';
4
+ import { clearCollisionContactManifold3D } from './contactManifold3D';
5
+ import { createCollisionManifold3D } from './manifold3D';
6
+ import { testCollision3D } from './testCollision3D';
7
+ // The 3D contact lane: `testCollision3D`'s manifold-producing twin. Returns whether the pair overlaps
8
+ // and, when it does, writes the shared normal pushing **A out of B** plus the world-space points the
9
+ // two surfaces meet at.
10
+ //
11
+ // The normal and depth come from the same place `testCollision3D` gets them, so the two entry points
12
+ // can never disagree about whether a pair touches. What this adds is the POINTS, and they come from
13
+ // clipping one shape's supporting face against the other's — the shape-aware step the generic core
14
+ // cannot do, because a support function hides face topology by construction.
15
+ //
16
+ // **Argument order**, with the same caveat the 2D twin carries: overlap, normal, and depth are
17
+ // order-invariant, but for two shapes of the same kind meeting face to face the tie over which face is
18
+ // the reference resolves toward the first argument, and the points then lie on that shape's surface.
19
+ // Reversing the arguments moves them to the other surface, one depth away, and renumbers their ids.
20
+ // A caller keying a warm-start cache on feature identity must pass each pair in a STABLE order of its
21
+ // own, derived from persistent identity rather than geometry — `@flighthq/physics3d` orders every pair
22
+ // by body index before it calls.
23
+ //
24
+ // Falls back to ONE point at the midpoint of the two surfaces when either shape has no face along the
25
+ // contact direction. That is the honest answer for a sphere, which touches at a point; it is also why
26
+ // a sphere resting on a floor is stable with one point while a box needs four.
27
+ export function collideContactManifold3D(a, b, out) {
28
+ if (!testCollision3D(a, b, scratchManifold)) {
29
+ clearCollisionContactManifold3D(out);
30
+ return false;
31
+ }
32
+ const normalX = scratchManifold.normalX;
33
+ const normalY = scratchManifold.normalY;
34
+ const normalZ = scratchManifold.normalZ;
35
+ const depth = scratchManifold.depth;
36
+ out.overlapping = true;
37
+ out.normalX = normalX;
38
+ out.normalY = normalY;
39
+ out.normalZ = normalZ;
40
+ out.pointCount = 0;
41
+ // A's contacting surface faces toward B, which is the direction the normal pushes A away from.
42
+ const faceQueryA = getCollisionFaceQuery3D(a.kind);
43
+ const faceQueryB = getCollisionFaceQuery3D(b.kind);
44
+ const countA = faceQueryA === null ? 0 : faceQueryA(a, -normalX, -normalY, -normalZ, faceA);
45
+ const countB = faceQueryB === null ? 0 : faceQueryB(b, normalX, normalY, normalZ, faceB);
46
+ if (countA < 2 || countB < 2) {
47
+ writeSingleContactPoint(a, b, normalX, normalY, normalZ, depth, out);
48
+ return true;
49
+ }
50
+ // The REFERENCE face is the one whose plane the contact is measured against, and it must be the
51
+ // flatter-facing of the two: clipping the incident polygon against the reference's side planes is
52
+ // only meaningful when the reference genuinely faces along the contact normal. Choosing by which
53
+ // face is more perpendicular to the normal is what stops a glancing edge from acting as a floor.
54
+ const referenceIsA = countA >= 3 &&
55
+ (countB < 3 ||
56
+ faceAlignment(faceA, countA, normalX, normalY, normalZ) >=
57
+ faceAlignment(faceB, countB, normalX, normalY, normalZ));
58
+ const reference = referenceIsA ? faceA : faceB;
59
+ const referenceCount = referenceIsA ? countA : countB;
60
+ const incident = referenceIsA ? faceB : faceA;
61
+ const incidentCount = referenceIsA ? countB : countA;
62
+ // The reference plane's outward normal points from the reference shape toward the other one.
63
+ const planeX = referenceIsA ? -normalX : normalX;
64
+ const planeY = referenceIsA ? -normalY : normalY;
65
+ const planeZ = referenceIsA ? -normalZ : normalZ;
66
+ const clippedCount = clipIncidentAgainstReference(reference, referenceCount, incident, incidentCount, planeX, planeY, planeZ);
67
+ if (clippedCount === 0) {
68
+ writeSingleContactPoint(a, b, normalX, normalY, normalZ, depth, out);
69
+ return true;
70
+ }
71
+ const planeOffset = reference[0] * planeX + reference[1] * planeY + reference[2] * planeZ;
72
+ for (let i = 0; i < clippedCount && out.pointCount < MAX_COLLISION_CONTACT_POINTS_3D; i += 1) {
73
+ const x = clipped[i * 3];
74
+ const y = clipped[i * 3 + 1];
75
+ const z = clipped[i * 3 + 2];
76
+ // How far this point sits BELOW the reference plane. A point that has floated above it is not in
77
+ // contact and is dropped rather than reported with a negative depth a solver would push apart.
78
+ const separation = planeOffset - (x * planeX + y * planeY + z * planeZ);
79
+ if (separation < 0)
80
+ continue;
81
+ const point = out.points[out.pointCount];
82
+ point.x = x;
83
+ point.y = y;
84
+ point.z = z;
85
+ point.depth = separation;
86
+ point.featureId = packContactFeatureId3D(referenceIsA, i);
87
+ out.pointCount += 1;
88
+ }
89
+ if (out.pointCount === 0)
90
+ writeSingleContactPoint(a, b, normalX, normalY, normalZ, depth, out);
91
+ return true;
92
+ }
93
+ // Clips the incident polygon against the reference face's side planes — the Sutherland-Hodgman
94
+ // sequence, one plane per reference edge. Each side plane is perpendicular to the reference face and
95
+ // faces outward from it, so what survives is the part of the incident face lying within the reference
96
+ // face's silhouette. Returns how many vertices survived, in `clipped`.
97
+ //
98
+ // EACH SIDE PLANE IS ORIENTED AGAINST THE REFERENCE FACE'S OWN CENTROID rather than by assuming a
99
+ // winding. `edge x planeNormal` is perpendicular to both, but WHICH of the two opposite perpendiculars
100
+ // it lands on depends on the order the face's vertices happen to arrive in — and the face queries do
101
+ // not share one: a box's corners come from a local-axis walk, a convex hull's from an angular sort
102
+ // whose zero depends on which cardinal axis the normal was least aligned with. Assume a winding and
103
+ // half the faces clip away their own interior, leaving nothing and silently demoting a resting box to
104
+ // the single-point fallback, which is a box that rocks rather than rests. The centroid is unambiguous:
105
+ // the outward normal is the one pointing away from it.
106
+ function clipIncidentAgainstReference(reference, referenceCount, incident, incidentCount, planeX, planeY, planeZ) {
107
+ let count = incidentCount;
108
+ for (let i = 0; i < incidentCount * 3; i += 1)
109
+ clipped[i] = incident[i];
110
+ let centroidX = 0;
111
+ let centroidY = 0;
112
+ let centroidZ = 0;
113
+ for (let i = 0; i < referenceCount; i += 1) {
114
+ centroidX += reference[i * 3];
115
+ centroidY += reference[i * 3 + 1];
116
+ centroidZ += reference[i * 3 + 2];
117
+ }
118
+ centroidX /= referenceCount;
119
+ centroidY /= referenceCount;
120
+ centroidZ /= referenceCount;
121
+ for (let edge = 0; edge < referenceCount && count > 0; edge += 1) {
122
+ const nextEdge = (edge + 1) % referenceCount;
123
+ const originX = reference[edge * 3];
124
+ const originY = reference[edge * 3 + 1];
125
+ const originZ = reference[edge * 3 + 2];
126
+ const edgeX = reference[nextEdge * 3] - originX;
127
+ const edgeY = reference[nextEdge * 3 + 1] - originY;
128
+ const edgeZ = reference[nextEdge * 3 + 2] - originZ;
129
+ let sideX = edgeY * planeZ - edgeZ * planeY;
130
+ let sideY = edgeZ * planeX - edgeX * planeZ;
131
+ let sideZ = edgeX * planeY - edgeY * planeX;
132
+ const length = Math.sqrt(sideX * sideX + sideY * sideY + sideZ * sideZ);
133
+ if (length <= CLIP_EPSILON)
134
+ continue;
135
+ sideX /= length;
136
+ sideY /= length;
137
+ sideZ /= length;
138
+ if (sideX * (centroidX - originX) + sideY * (centroidY - originY) + sideZ * (centroidZ - originZ) > 0) {
139
+ sideX = -sideX;
140
+ sideY = -sideY;
141
+ sideZ = -sideZ;
142
+ }
143
+ count = clipAgainstPlane(count, sideX, sideY, sideZ, originX * sideX + originY * sideY + originZ * sideZ);
144
+ }
145
+ return count;
146
+ }
147
+ // One Sutherland-Hodgman pass: keeps the part of the polygon on the inner side of a plane, inserting
148
+ // the crossing point wherever an edge spans it. Reads `clipped` and writes it back through a scratch
149
+ // buffer, so the caller sees only the result.
150
+ function clipAgainstPlane(count, planeX, planeY, planeZ, offset) {
151
+ let written = 0;
152
+ for (let i = 0; i < count; i += 1) {
153
+ const next = (i + 1) % count;
154
+ const currentX = clipped[i * 3];
155
+ const currentY = clipped[i * 3 + 1];
156
+ const currentZ = clipped[i * 3 + 2];
157
+ const nextX = clipped[next * 3];
158
+ const nextY = clipped[next * 3 + 1];
159
+ const nextZ = clipped[next * 3 + 2];
160
+ const currentDistance = currentX * planeX + currentY * planeY + currentZ * planeZ - offset;
161
+ const nextDistance = nextX * planeX + nextY * planeY + nextZ * planeZ - offset;
162
+ if (currentDistance <= CLIP_TOLERANCE) {
163
+ if (written >= MAX_CLIPPED_VERTICES)
164
+ break;
165
+ clipScratch[written * 3] = currentX;
166
+ clipScratch[written * 3 + 1] = currentY;
167
+ clipScratch[written * 3 + 2] = currentZ;
168
+ written += 1;
169
+ }
170
+ // Only a genuine sign change produces a crossing. Testing the product would also fire when one end
171
+ // sits exactly on the plane, duplicating a vertex already written.
172
+ if ((currentDistance > CLIP_TOLERANCE && nextDistance < -CLIP_TOLERANCE) ||
173
+ (currentDistance < -CLIP_TOLERANCE && nextDistance > CLIP_TOLERANCE)) {
174
+ if (written >= MAX_CLIPPED_VERTICES)
175
+ break;
176
+ const t = currentDistance / (currentDistance - nextDistance);
177
+ clipScratch[written * 3] = currentX + (nextX - currentX) * t;
178
+ clipScratch[written * 3 + 1] = currentY + (nextY - currentY) * t;
179
+ clipScratch[written * 3 + 2] = currentZ + (nextZ - currentZ) * t;
180
+ written += 1;
181
+ }
182
+ }
183
+ for (let i = 0; i < written * 3; i += 1)
184
+ clipped[i] = clipScratch[i];
185
+ return written;
186
+ }
187
+ // How squarely a face faces along the contact normal, as the absolute cosine between the two. Used to
188
+ // pick the reference face; 1 is a face exactly perpendicular to the normal.
189
+ function faceAlignment(face, count, normalX, normalY, normalZ) {
190
+ if (count < 3)
191
+ return 0;
192
+ const abX = face[3] - face[0];
193
+ const abY = face[4] - face[1];
194
+ const abZ = face[5] - face[2];
195
+ const acX = face[6] - face[0];
196
+ const acY = face[7] - face[1];
197
+ const acZ = face[8] - face[2];
198
+ const faceNormalX = abY * acZ - abZ * acY;
199
+ const faceNormalY = abZ * acX - abX * acZ;
200
+ const faceNormalZ = abX * acY - abY * acX;
201
+ const length = Math.sqrt(faceNormalX * faceNormalX + faceNormalY * faceNormalY + faceNormalZ * faceNormalZ);
202
+ if (length <= CLIP_EPSILON)
203
+ return 0;
204
+ return Math.abs((faceNormalX * normalX + faceNormalY * normalY + faceNormalZ * normalZ) / length);
205
+ }
206
+ // Packs which shape owned the reference face and which clipped slot this point is into one opaque id.
207
+ //
208
+ // Positional multiplication rather than bit shifts, for the reason the 2D packing records: `<<`
209
+ // truncates to 32 bits, so a shift-packed id wraps silently once a field outgrows its width and two
210
+ // unrelated features collide on one number — which surfaces as a solver warm-starting a contact with
211
+ // an impulse belonging somewhere else, and as jitter no stack trace explains.
212
+ function packContactFeatureId3D(referenceIsA, slot) {
213
+ return (referenceIsA ? MAX_COLLISION_CONTACT_POINTS_3D : 0) + slot;
214
+ }
215
+ // Writes the single-point fallback: the midpoint of the two shapes' surfaces along the contact normal.
216
+ // Used when either shape is curved along the contact direction, and when clipping leaves nothing.
217
+ function writeSingleContactPoint(a, b, normalX, normalY, normalZ, depth, out) {
218
+ const supportA = getCollisionSupport3D(a.kind);
219
+ const supportB = getCollisionSupport3D(b.kind);
220
+ if (supportA === null || supportB === null) {
221
+ out.pointCount = 0;
222
+ return;
223
+ }
224
+ supportA(a, -normalX, -normalY, -normalZ, surfaceA);
225
+ supportB(b, normalX, normalY, normalZ, surfaceB);
226
+ const point = out.points[0];
227
+ point.x = (surfaceA[0] + surfaceB[0]) / 2;
228
+ point.y = (surfaceA[1] + surfaceB[1]) / 2;
229
+ point.z = (surfaceA[2] + surfaceB[2]) / 2;
230
+ point.depth = depth;
231
+ point.featureId = 0;
232
+ out.pointCount = 1;
233
+ }
234
+ // How far outside a clip plane a vertex may sit and still be kept. A face resting exactly on another
235
+ // puts every vertex on the plane, where floating-point noise decides the sign; a hard zero there drops
236
+ // corners of a squarely-resting box at random and leaves it rocking on two points.
237
+ const CLIP_TOLERANCE = 1e-9;
238
+ const CLIP_EPSILON = 1e-12;
239
+ const MAX_CLIPPED_VERTICES = 32;
240
+ const clipScratch = new Float64Array(MAX_CLIPPED_VERTICES * 3);
241
+ const clipped = new Float64Array(MAX_CLIPPED_VERTICES * 3);
242
+ const faceA = [];
243
+ const faceB = [];
244
+ const scratchManifold = createCollisionManifold3D();
245
+ const surfaceA = [0, 0, 0];
246
+ const surfaceB = [0, 0, 0];
247
+ //# sourceMappingURL=collideContactManifold3D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collideContactManifold3D.js","sourceRoot":"","sources":["../src/collideContactManifold3D.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,sGAAsG;AACtG,qGAAqG;AACrG,wBAAwB;AACxB,EAAE;AACF,qGAAqG;AACrG,oGAAoG;AACpG,mGAAmG;AACnG,6EAA6E;AAC7E,EAAE;AACF,+FAA+F;AAC/F,uGAAuG;AACvG,qGAAqG;AACrG,oGAAoG;AACpG,sGAAsG;AACtG,uGAAuG;AACvG,iCAAiC;AACjC,EAAE;AACF,sGAAsG;AACtG,sGAAsG;AACtG,+EAA+E;AAC/E,MAAM,UAAU,wBAAwB,CACtC,CAA6B,EAC7B,CAA6B,EAC7B,GAA+B;IAE/B,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,EAAE,CAAC;QAC5C,+BAA+B,CAAC,GAAG,CAAC,CAAC;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C;IACpB,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;IACpB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,qGAAqG;AACrG,uGAAuG;AACvG,mFAAmF;AACnF,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAM,WAAW,GAAG,IAAI,YAAY,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC;AAC3D,MAAM,KAAK,GAAa,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAa,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,yBAAyB,EAAE,CAAC;AACpD,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CollisionFaceQuery3D, CollisionShape3D, CollisionShapeKind3D } from '@flighthq/types/contract';
2
+ export declare function getCollisionFaceQuery3D(kind: CollisionShapeKind3D): CollisionFaceQuery3D | null;
3
+ export declare function queryCollisionAabbFace3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): number;
4
+ export declare function queryCollisionBoxFace3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): number;
5
+ export declare function queryCollisionCapsuleFace3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): number;
6
+ export declare function queryCollisionConvexFace3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): number;
7
+ export declare function registerBuiltInCollisionFaceQueries3D(): void;
8
+ export declare function registerCollisionFaceQuery3D(kind: CollisionShapeKind3D, query: CollisionFaceQuery3D): void;
9
+ //# sourceMappingURL=collisionFace3D.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collisionFace3D.d.ts","sourceRoot":"","sources":["../src/collisionFace3D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAalC,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,IAAI,CAE/F;AAID,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,GACZ,MAAM,CAgBR;AAMD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,GACZ,MAAM,CAQR;AASD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,GACZ,MAAM,CAkBR;AAaD,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,GACZ,MAAM,CA8BR;AAKD,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAE1G"}
@@ -0,0 +1,256 @@
1
+ // The face registry: the shape-aware half of the narrow phase, sitting beside the shape-agnostic
2
+ // support registry.
3
+ //
4
+ // `agents/collision-support-registry.md` names this boundary exactly — "GJK/EPA yields a normal and
5
+ // one deepest point, not a manifold … the clipping layer stays shape-aware" — and this is where that
6
+ // stays true. A kind that registers only a support function collides correctly and rests badly; one
7
+ // that also registers a face query can be stacked. Keeping them separate registries means the second
8
+ // is optional, which is what lets a sphere decline to have faces without declining to collide.
9
+ // The face query registered for `kind`, or null when none is. Null is an ordinary answer: a curved
10
+ // kind has no faces to give, and the contact layer falls back to a single point.
11
+ export function getCollisionFaceQuery3D(kind) {
12
+ return collisionFaceQueries3D.get(kind) ?? null;
13
+ }
14
+ // The face of an axis-aligned box most aligned with the direction: whichever of the six the direction's
15
+ // dominant axis picks out, wound counter-clockwise seen from outside.
16
+ export function queryCollisionAabbFace3D(shape, dirX, dirY, dirZ, out) {
17
+ const box = shape;
18
+ writeBoxFaceCorners((box.minX + box.maxX) / 2, (box.minY + box.maxY) / 2, (box.minZ + box.maxZ) / 2, (box.maxX - box.minX) / 2, (box.maxY - box.minY) / 2, (box.maxZ - box.minZ) / 2, dirX, dirY, dirZ, IDENTITY_ROTATION, out);
19
+ return 4;
20
+ }
21
+ // The face of an oriented box most aligned with the direction. The direction is rotated into the box's
22
+ // frame, the face is picked there by dominant axis, and its four corners are rotated back out — the
23
+ // same round trip the box support function makes, so the two can never disagree about where a corner
24
+ // is.
25
+ export function queryCollisionBoxFace3D(shape, dirX, dirY, dirZ, out) {
26
+ const box = shape;
27
+ rotation[0] = box.rotationX;
28
+ rotation[1] = box.rotationY;
29
+ rotation[2] = box.rotationZ;
30
+ rotation[3] = box.rotationW;
31
+ writeBoxFaceCorners(box.x, box.y, box.z, box.halfX, box.halfY, box.halfZ, dirX, dirY, dirZ, rotation, out);
32
+ return 4;
33
+ }
34
+ // A capsule's "face" is its axis segment, offset one radius along the direction — two vertices, which
35
+ // is an EDGE rather than a polygon and clips as one.
36
+ //
37
+ // Returns 0 when the direction runs along the axis, because the capsule is then presenting one of its
38
+ // spherical caps and a cap is curved: there is no flat feature to clip, and the single-point fallback
39
+ // is the honest answer. The cutoff is generous on purpose — a capsule lying almost flat on a floor
40
+ // should still get two points, since one point is what makes it roll.
41
+ export function queryCollisionCapsuleFace3D(shape, dirX, dirY, dirZ, out) {
42
+ const capsule = shape;
43
+ const axisX = capsule.x1 - capsule.x0;
44
+ const axisY = capsule.y1 - capsule.y0;
45
+ const axisZ = capsule.z1 - capsule.z0;
46
+ const axisLength = Math.sqrt(axisX * axisX + axisY * axisY + axisZ * axisZ);
47
+ const dirLength = Math.sqrt(dirX * dirX + dirY * dirY + dirZ * dirZ);
48
+ if (axisLength <= FACE_EPSILON || dirLength <= FACE_EPSILON)
49
+ return 0;
50
+ const alignment = Math.abs((axisX * dirX + axisY * dirY + axisZ * dirZ) / (axisLength * dirLength));
51
+ if (alignment > CAPSULE_AXIS_ALIGNMENT_LIMIT)
52
+ return 0;
53
+ const scale = capsule.radius / dirLength;
54
+ out[0] = capsule.x0 + dirX * scale;
55
+ out[1] = capsule.y0 + dirY * scale;
56
+ out[2] = capsule.z0 + dirZ * scale;
57
+ out[3] = capsule.x1 + dirX * scale;
58
+ out[4] = capsule.y1 + dirY * scale;
59
+ out[5] = capsule.z1 + dirZ * scale;
60
+ return 2;
61
+ }
62
+ // The supporting face of a convex hull, derived from the vertex list ALONE — no topology needed.
63
+ //
64
+ // Every vertex within a tolerance of the maximum projection along the direction lies on the supporting
65
+ // face, because that is what a supporting face IS: the set of points the direction cannot distinguish.
66
+ // So the face falls out of the same scan the support function already runs, and `CollisionConvex3D`
67
+ // needs no face indices, no winding convention, and no way for its topology to disagree with its
68
+ // points. The cost is a tolerance where explicit topology would have been exact, which is the right
69
+ // trade for a collider hull of a handful of vertices.
70
+ //
71
+ // The gathered vertices are then wound by angle about their own centroid, in the face's plane, so
72
+ // clipping sees a simple polygon rather than the arbitrary order the input happened to use.
73
+ export function queryCollisionConvexFace3D(shape, dirX, dirY, dirZ, out) {
74
+ const points = shape.points;
75
+ const count = Math.floor(points.length / 3);
76
+ if (count === 0)
77
+ return 0;
78
+ const dirLength = Math.sqrt(dirX * dirX + dirY * dirY + dirZ * dirZ);
79
+ if (dirLength <= FACE_EPSILON)
80
+ return 0;
81
+ const unitX = dirX / dirLength;
82
+ const unitY = dirY / dirLength;
83
+ const unitZ = dirZ / dirLength;
84
+ let best = -Infinity;
85
+ for (let i = 0; i < count; i += 1) {
86
+ const projection = points[i * 3] * unitX + points[i * 3 + 1] * unitY + points[i * 3 + 2] * unitZ;
87
+ if (projection > best)
88
+ best = projection;
89
+ }
90
+ let written = 0;
91
+ for (let i = 0; i < count && written < MAX_FACE_VERTICES; i += 1) {
92
+ const x = points[i * 3];
93
+ const y = points[i * 3 + 1];
94
+ const z = points[i * 3 + 2];
95
+ if (best - (x * unitX + y * unitY + z * unitZ) > FACE_PLANE_TOLERANCE)
96
+ continue;
97
+ out[written * 3] = x;
98
+ out[written * 3 + 1] = y;
99
+ out[written * 3 + 2] = z;
100
+ written += 1;
101
+ }
102
+ if (written < 3)
103
+ return written;
104
+ sortFaceVerticesByAngle(out, written, unitX, unitY, unitZ);
105
+ return written;
106
+ }
107
+ // Installs the built-in face queries. `sphere` is deliberately absent rather than registered as a
108
+ // zero-returning stub: absent and "returns no face" reach the same fallback, and one of them does not
109
+ // require writing a function whose whole body is a lie about having tried.
110
+ export function registerBuiltInCollisionFaceQueries3D() {
111
+ registerCollisionFaceQuery3D('aabb', queryCollisionAabbFace3D);
112
+ registerCollisionFaceQuery3D('box', queryCollisionBoxFace3D);
113
+ registerCollisionFaceQuery3D('capsule', queryCollisionCapsuleFace3D);
114
+ registerCollisionFaceQuery3D('convex', queryCollisionConvexFace3D);
115
+ }
116
+ export function registerCollisionFaceQuery3D(kind, query) {
117
+ collisionFaceQueries3D.set(kind, query);
118
+ }
119
+ // Rotates a vector by a quaternion, writing `[x,y,z]`. The same two-cross-product form the support
120
+ // module uses; duplicated rather than shared because the two modules are separate compilation units in
121
+ // the C port and neither should pull the other in for four lines of arithmetic.
122
+ function rotateFaceVector(vectorX, vectorY, vectorZ, quaternion, conjugate, out) {
123
+ const sign = conjugate ? -1 : 1;
124
+ const qx = quaternion[0] * sign;
125
+ const qy = quaternion[1] * sign;
126
+ const qz = quaternion[2] * sign;
127
+ const qw = quaternion[3];
128
+ const tempX = qy * vectorZ - qz * vectorY + qw * vectorX;
129
+ const tempY = qz * vectorX - qx * vectorZ + qw * vectorY;
130
+ const tempZ = qx * vectorY - qy * vectorX + qw * vectorZ;
131
+ out[0] = vectorX + 2 * (qy * tempZ - qz * tempY);
132
+ out[1] = vectorY + 2 * (qz * tempX - qx * tempZ);
133
+ out[2] = vectorZ + 2 * (qx * tempY - qy * tempX);
134
+ }
135
+ // Orders coplanar vertices counter-clockwise about their centroid, in the plane the unit normal
136
+ // defines. An insertion sort: a face has a handful of vertices, and the ordering must be total and
137
+ // deterministic rather than fast.
138
+ function sortFaceVerticesByAngle(vertices, count, normalX, normalY, normalZ) {
139
+ let centroidX = 0;
140
+ let centroidY = 0;
141
+ let centroidZ = 0;
142
+ for (let i = 0; i < count; i += 1) {
143
+ centroidX += vertices[i * 3];
144
+ centroidY += vertices[i * 3 + 1];
145
+ centroidZ += vertices[i * 3 + 2];
146
+ }
147
+ centroidX /= count;
148
+ centroidY /= count;
149
+ centroidZ /= count;
150
+ // Any two perpendicular axes spanning the face's plane serve as its coordinate frame; which two
151
+ // decides where angle zero sits, and that only rotates the ordering rather than changing it.
152
+ writeFacePlaneAxis(normalX, normalY, normalZ, planeAxisU);
153
+ planeAxisV[0] = normalY * planeAxisU[2] - normalZ * planeAxisU[1];
154
+ planeAxisV[1] = normalZ * planeAxisU[0] - normalX * planeAxisU[2];
155
+ planeAxisV[2] = normalX * planeAxisU[1] - normalY * planeAxisU[0];
156
+ for (let i = 0; i < count; i += 1) {
157
+ const offsetX = vertices[i * 3] - centroidX;
158
+ const offsetY = vertices[i * 3 + 1] - centroidY;
159
+ const offsetZ = vertices[i * 3 + 2] - centroidZ;
160
+ faceAngles[i] = Math.atan2(offsetX * planeAxisV[0] + offsetY * planeAxisV[1] + offsetZ * planeAxisV[2], offsetX * planeAxisU[0] + offsetY * planeAxisU[1] + offsetZ * planeAxisU[2]);
161
+ }
162
+ for (let i = 1; i < count; i += 1) {
163
+ const angle = faceAngles[i];
164
+ const x = vertices[i * 3];
165
+ const y = vertices[i * 3 + 1];
166
+ const z = vertices[i * 3 + 2];
167
+ let j = i - 1;
168
+ while (j >= 0 && faceAngles[j] > angle) {
169
+ faceAngles[j + 1] = faceAngles[j];
170
+ vertices[(j + 1) * 3] = vertices[j * 3];
171
+ vertices[(j + 1) * 3 + 1] = vertices[j * 3 + 1];
172
+ vertices[(j + 1) * 3 + 2] = vertices[j * 3 + 2];
173
+ j -= 1;
174
+ }
175
+ faceAngles[j + 1] = angle;
176
+ vertices[(j + 1) * 3] = x;
177
+ vertices[(j + 1) * 3 + 1] = y;
178
+ vertices[(j + 1) * 3 + 2] = z;
179
+ }
180
+ }
181
+ // Writes some unit vector perpendicular to the normal, crossing against whichever cardinal axis the
182
+ // normal is least aligned with so the result can never collapse to zero.
183
+ function writeFacePlaneAxis(normalX, normalY, normalZ, out) {
184
+ const absX = Math.abs(normalX);
185
+ const absY = Math.abs(normalY);
186
+ const absZ = Math.abs(normalZ);
187
+ const axisX = absX <= absY && absX <= absZ ? 1 : 0;
188
+ const axisY = axisX === 0 && absY <= absZ ? 1 : 0;
189
+ const axisZ = axisX === 0 && axisY === 0 ? 1 : 0;
190
+ let x = normalY * axisZ - normalZ * axisY;
191
+ let y = normalZ * axisX - normalX * axisZ;
192
+ let z = normalX * axisY - normalY * axisX;
193
+ const length = Math.sqrt(x * x + y * y + z * z);
194
+ if (length > FACE_EPSILON) {
195
+ x /= length;
196
+ y /= length;
197
+ z /= length;
198
+ }
199
+ out[0] = x;
200
+ out[1] = y;
201
+ out[2] = z;
202
+ }
203
+ // Writes the four corners of the box face the direction selects, for a box given as centre, half
204
+ // extents, and a rotation. Shared by the axis-aligned and oriented queries so the two cannot drift;
205
+ // the axis-aligned one passes the identity rotation and pays two no-op rotations for it.
206
+ function writeBoxFaceCorners(centreX, centreY, centreZ, halfX, halfY, halfZ, dirX, dirY, dirZ, quaternion, out) {
207
+ rotateFaceVector(dirX, dirY, dirZ, quaternion, true, localFaceDirection);
208
+ const localX = localFaceDirection[0];
209
+ const localY = localFaceDirection[1];
210
+ const localZ = localFaceDirection[2];
211
+ const absX = Math.abs(localX);
212
+ const absY = Math.abs(localY);
213
+ const absZ = Math.abs(localZ);
214
+ // The dominant local axis names the face; the other two span it.
215
+ let axis = 0;
216
+ if (absY >= absX && absY >= absZ)
217
+ axis = 1;
218
+ else if (absZ >= absX && absZ >= absY)
219
+ axis = 2;
220
+ const sign = (axis === 0 ? localX : axis === 1 ? localY : localZ) >= 0 ? 1 : -1;
221
+ const half = [halfX, halfY, halfZ];
222
+ const uAxis = (axis + 1) % 3;
223
+ const vAxis = (axis + 2) % 3;
224
+ for (let corner = 0; corner < 4; corner += 1) {
225
+ const uSign = corner === 0 || corner === 3 ? -1 : 1;
226
+ const vSign = corner < 2 ? -1 : 1;
227
+ localFaceCorner[axis] = half[axis] * sign;
228
+ localFaceCorner[uAxis] = half[uAxis] * uSign;
229
+ localFaceCorner[vAxis] = half[vAxis] * vSign;
230
+ rotateFaceVector(localFaceCorner[0], localFaceCorner[1], localFaceCorner[2], quaternion, false, rotatedCorner);
231
+ out[corner * 3] = centreX + rotatedCorner[0];
232
+ out[corner * 3 + 1] = centreY + rotatedCorner[1];
233
+ out[corner * 3 + 2] = centreZ + rotatedCorner[2];
234
+ }
235
+ }
236
+ // How nearly parallel a capsule's axis and the contact direction have to be before the capsule counts
237
+ // as presenting a cap rather than its side. cos(20 degrees): past that the segment's two points are
238
+ // close enough together that clipping them adds nothing a single point does not already say.
239
+ const CAPSULE_AXIS_ALIGNMENT_LIMIT = 0.94;
240
+ const FACE_EPSILON = 1e-12;
241
+ // How far below the maximum projection a vertex may sit and still count as on the supporting face.
242
+ // Absolute rather than relative to the hull's size: a collider hull is authored in world units near
243
+ // unit scale, and a relative band would widen with distance from the origin — admitting vertices from
244
+ // the far side of a hull that merely sits far from the world centre.
245
+ const FACE_PLANE_TOLERANCE = 1e-6;
246
+ const MAX_FACE_VERTICES = 16;
247
+ const IDENTITY_ROTATION = [0, 0, 0, 1];
248
+ const collisionFaceQueries3D = new Map();
249
+ const faceAngles = new Float64Array(MAX_FACE_VERTICES);
250
+ const localFaceCorner = [0, 0, 0];
251
+ const localFaceDirection = [0, 0, 0];
252
+ const planeAxisU = [0, 0, 0];
253
+ const planeAxisV = [0, 0, 0];
254
+ const rotatedCorner = [0, 0, 0];
255
+ const rotation = [0, 0, 0, 1];
256
+ //# sourceMappingURL=collisionFace3D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collisionFace3D.js","sourceRoot":"","sources":["../src/collisionFace3D.ts"],"names":[],"mappings":"AAUA,iGAAiG;AACjG,oBAAoB;AACpB,EAAE;AACF,oGAAoG;AACpG,qGAAqG;AACrG,oGAAoG;AACpG,qGAAqG;AACrG,+FAA+F;AAE/F,mGAAmG;AACnG,iFAAiF;AACjF,MAAM,UAAU,uBAAuB,CAAC,IAA0B;IAChE,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAClD,CAAC;AAED,wGAAwG;AACxG,sEAAsE;AACtE,MAAM,UAAU,wBAAwB,CACtC,KAAiC,EACjC,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,GAAa;IAEb,MAAM,GAAG,GAAG,KAAwB,CAAC;IACrC,mBAAmB,CACjB,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EACzB,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EACzB,CAAC,GAAG,CAAC,IAAI,GAAG,GAA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;AACvC,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAA8C,CAAC;AACrF,MAAM,UAAU,GAAG,IAAI,YAAY,CAAC,iBAAiB,CAAC,CAAC;AACvD,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7B,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7B,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAChC,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { CollisionPairTest3D, CollisionShape3D, CollisionShapeKind3D, CollisionSupport3D } from '@flighthq/types/contract';
2
+ export declare function getCollisionPairTest3D(kindA: CollisionShapeKind3D, kindB: CollisionShapeKind3D): CollisionPairTest3D | null;
3
+ export declare function getCollisionSupport3D(kind: CollisionShapeKind3D): CollisionSupport3D | null;
4
+ export declare function registerBuiltInCollisionSupports3D(): void;
5
+ export declare function registerCollisionPairTest3D(kindA: CollisionShapeKind3D, kindB: CollisionShapeKind3D, test: CollisionPairTest3D): void;
6
+ export declare function registerCollisionSupport3D(kind: CollisionShapeKind3D, support: CollisionSupport3D): void;
7
+ export declare function supportCollisionAabb3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): void;
8
+ export declare function supportCollisionBox3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): void;
9
+ export declare function supportCollisionCapsule3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): void;
10
+ export declare function supportCollisionConvex3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): void;
11
+ export declare function supportCollisionSphere3D(shape: Readonly<CollisionShape3D>, dirX: number, dirY: number, dirZ: number, out: number[]): void;
12
+ export declare function writeVertexListSupport3D(vertices: Readonly<ArrayLike<number>>, count: number, dirX: number, dirY: number, dirZ: number, out: number[]): void;
13
+ //# sourceMappingURL=collisionSupport3D.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collisionSupport3D.d.ts","sourceRoot":"","sources":["../src/collisionSupport3D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAgBlC,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,oBAAoB,GAC1B,mBAAmB,GAAG,IAAI,CAE5B;AAKD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,GAAG,kBAAkB,GAAG,IAAI,CAE3F;AAID,wBAAgB,kCAAkC,IAAI,IAAI,CAMzD;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,oBAAoB,EAC3B,IAAI,EAAE,mBAAmB,GACxB,IAAI,CAEN;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAExG;AAGD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,GACZ,IAAI,CAKN;AAUD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ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