@flighthq/physics3d 0.4.0-edge.1908.751021c

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 (180) hide show
  1. package/dist/broadphase.d.ts +4 -0
  2. package/dist/broadphase.d.ts.map +1 -0
  3. package/dist/broadphase.js +158 -0
  4. package/dist/broadphase.js.map +1 -0
  5. package/dist/colliderCollision.d.ts +5 -0
  6. package/dist/colliderCollision.d.ts.map +1 -0
  7. package/dist/colliderCollision.js +55 -0
  8. package/dist/colliderCollision.js.map +1 -0
  9. package/dist/colliderTransform.d.ts +5 -0
  10. package/dist/colliderTransform.d.ts.map +1 -0
  11. package/dist/colliderTransform.js +424 -0
  12. package/dist/colliderTransform.js.map +1 -0
  13. package/dist/contactIntake.d.ts +5 -0
  14. package/dist/contactIntake.d.ts.map +1 -0
  15. package/dist/contactIntake.js +237 -0
  16. package/dist/contactIntake.js.map +1 -0
  17. package/dist/contacts.d.ts +4 -0
  18. package/dist/contacts.d.ts.map +1 -0
  19. package/dist/contacts.js +64 -0
  20. package/dist/contacts.js.map +1 -0
  21. package/dist/continuous.d.ts +5 -0
  22. package/dist/continuous.d.ts.map +1 -0
  23. package/dist/continuous.js +829 -0
  24. package/dist/continuous.js.map +1 -0
  25. package/dist/contract.d.ts +28 -0
  26. package/dist/contract.d.ts.map +1 -0
  27. package/dist/contract.js +28 -0
  28. package/dist/contract.js.map +1 -0
  29. package/dist/debugGeometry.d.ts +4 -0
  30. package/dist/debugGeometry.d.ts.map +1 -0
  31. package/dist/debugGeometry.js +333 -0
  32. package/dist/debugGeometry.js.map +1 -0
  33. package/dist/enablePhysics3DGuards.d.ts +4 -0
  34. package/dist/enablePhysics3DGuards.d.ts.map +1 -0
  35. package/dist/enablePhysics3DGuards.js +155 -0
  36. package/dist/enablePhysics3DGuards.js.map +1 -0
  37. package/dist/explainPhysics3DCollision.d.ts +3 -0
  38. package/dist/explainPhysics3DCollision.d.ts.map +1 -0
  39. package/dist/explainPhysics3DCollision.js +30 -0
  40. package/dist/explainPhysics3DCollision.js.map +1 -0
  41. package/dist/explainPhysics3DJoints.d.ts +3 -0
  42. package/dist/explainPhysics3DJoints.d.ts.map +1 -0
  43. package/dist/explainPhysics3DJoints.js +32 -0
  44. package/dist/explainPhysics3DJoints.js.map +1 -0
  45. package/dist/explainPhysics3DStep.d.ts +3 -0
  46. package/dist/explainPhysics3DStep.d.ts.map +1 -0
  47. package/dist/explainPhysics3DStep.js +51 -0
  48. package/dist/explainPhysics3DStep.js.map +1 -0
  49. package/dist/index.d.ts +22 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +22 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/integrate.d.ts +6 -0
  54. package/dist/integrate.d.ts.map +1 -0
  55. package/dist/integrate.js +184 -0
  56. package/dist/integrate.js.map +1 -0
  57. package/dist/islands.d.ts +6 -0
  58. package/dist/islands.d.ts.map +1 -0
  59. package/dist/islands.js +333 -0
  60. package/dist/islands.js.map +1 -0
  61. package/dist/jointBreakage.d.ts +5 -0
  62. package/dist/jointBreakage.d.ts.map +1 -0
  63. package/dist/jointBreakage.js +44 -0
  64. package/dist/jointBreakage.js.map +1 -0
  65. package/dist/jointCollisionSuppression.d.ts +4 -0
  66. package/dist/jointCollisionSuppression.d.ts.map +1 -0
  67. package/dist/jointCollisionSuppression.js +40 -0
  68. package/dist/jointCollisionSuppression.js.map +1 -0
  69. package/dist/jointFactories.d.ts +9 -0
  70. package/dist/jointFactories.d.ts.map +1 -0
  71. package/dist/jointFactories.js +159 -0
  72. package/dist/jointFactories.js.map +1 -0
  73. package/dist/jointMath.d.ts +17 -0
  74. package/dist/jointMath.d.ts.map +1 -0
  75. package/dist/jointMath.js +361 -0
  76. package/dist/jointMath.js.map +1 -0
  77. package/dist/jointReaction.d.ts +8 -0
  78. package/dist/jointReaction.d.ts.map +1 -0
  79. package/dist/jointReaction.js +65 -0
  80. package/dist/jointReaction.js.map +1 -0
  81. package/dist/jointRegistry.d.ts +8 -0
  82. package/dist/jointRegistry.d.ts.map +1 -0
  83. package/dist/jointRegistry.js +144 -0
  84. package/dist/jointRegistry.js.map +1 -0
  85. package/dist/jointRows.d.ts +33 -0
  86. package/dist/jointRows.d.ts.map +1 -0
  87. package/dist/jointRows.js +352 -0
  88. package/dist/jointRows.js.map +1 -0
  89. package/dist/joints.d.ts +16 -0
  90. package/dist/joints.d.ts.map +1 -0
  91. package/dist/joints.js +1060 -0
  92. package/dist/joints.js.map +1 -0
  93. package/dist/massProperties.d.ts +13 -0
  94. package/dist/massProperties.d.ts.map +1 -0
  95. package/dist/massProperties.js +462 -0
  96. package/dist/massProperties.js.map +1 -0
  97. package/dist/material.d.ts +3 -0
  98. package/dist/material.d.ts.map +1 -0
  99. package/dist/material.js +13 -0
  100. package/dist/material.js.map +1 -0
  101. package/dist/nodeSync.d.ts +3 -0
  102. package/dist/nodeSync.d.ts.map +1 -0
  103. package/dist/nodeSync.js +16 -0
  104. package/dist/nodeSync.js.map +1 -0
  105. package/dist/ownership.d.ts +8 -0
  106. package/dist/ownership.d.ts.map +1 -0
  107. package/dist/ownership.js +26 -0
  108. package/dist/ownership.js.map +1 -0
  109. package/dist/physics3DBroadphasePublication.d.ts +5 -0
  110. package/dist/physics3DBroadphasePublication.d.ts.map +1 -0
  111. package/dist/physics3DBroadphasePublication.js +49 -0
  112. package/dist/physics3DBroadphasePublication.js.map +1 -0
  113. package/dist/physics3DSpatialIndexingGuards.d.ts +4 -0
  114. package/dist/physics3DSpatialIndexingGuards.d.ts.map +1 -0
  115. package/dist/physics3DSpatialIndexingGuards.js +11 -0
  116. package/dist/physics3DSpatialIndexingGuards.js.map +1 -0
  117. package/dist/registerBuiltInPhysics3DJointSolvers.d.ts +3 -0
  118. package/dist/registerBuiltInPhysics3DJointSolvers.d.ts.map +1 -0
  119. package/dist/registerBuiltInPhysics3DJointSolvers.js +15 -0
  120. package/dist/registerBuiltInPhysics3DJointSolvers.js.map +1 -0
  121. package/dist/solver.d.ts +8 -0
  122. package/dist/solver.d.ts.map +1 -0
  123. package/dist/solver.js +460 -0
  124. package/dist/solver.js.map +1 -0
  125. package/dist/step.d.ts +5 -0
  126. package/dist/step.d.ts.map +1 -0
  127. package/dist/step.js +302 -0
  128. package/dist/step.js.map +1 -0
  129. package/dist/stepValidation.d.ts +13 -0
  130. package/dist/stepValidation.d.ts.map +1 -0
  131. package/dist/stepValidation.js +284 -0
  132. package/dist/stepValidation.js.map +1 -0
  133. package/dist/symmetricTensor.d.ts +11 -0
  134. package/dist/symmetricTensor.d.ts.map +1 -0
  135. package/dist/symmetricTensor.js +150 -0
  136. package/dist/symmetricTensor.js.map +1 -0
  137. package/dist/world.d.ts +27 -0
  138. package/dist/world.d.ts.map +1 -0
  139. package/dist/world.js +762 -0
  140. package/dist/world.js.map +1 -0
  141. package/dist/worldQueries.d.ts +11 -0
  142. package/dist/worldQueries.d.ts.map +1 -0
  143. package/dist/worldQueries.js +409 -0
  144. package/dist/worldQueries.js.map +1 -0
  145. package/package.json +55 -0
  146. package/src/broadphase.test.ts +265 -0
  147. package/src/colliderCollision.test.ts +57 -0
  148. package/src/colliderTransform.test.ts +221 -0
  149. package/src/contactIntake.test.ts +370 -0
  150. package/src/contacts.test.ts +64 -0
  151. package/src/continuous.test.ts +679 -0
  152. package/src/debugGeometry.test.ts +288 -0
  153. package/src/enablePhysics3DGuards.test.ts +206 -0
  154. package/src/explainPhysics3DCollision.test.ts +78 -0
  155. package/src/explainPhysics3DJoints.test.ts +101 -0
  156. package/src/explainPhysics3DStep.test.ts +142 -0
  157. package/src/integrate.test.ts +279 -0
  158. package/src/islands.test.ts +384 -0
  159. package/src/jointBreakage.test.ts +143 -0
  160. package/src/jointCollisionSuppression.test.ts +94 -0
  161. package/src/jointFactories.test.ts +244 -0
  162. package/src/jointMath.test.ts +646 -0
  163. package/src/jointReaction.test.ts +241 -0
  164. package/src/jointRegistry.test.ts +229 -0
  165. package/src/jointRows.test.ts +548 -0
  166. package/src/joints.test.ts +1066 -0
  167. package/src/massProperties.test.ts +611 -0
  168. package/src/material.test.ts +40 -0
  169. package/src/nodeSync.test.ts +50 -0
  170. package/src/ownership.test.ts +61 -0
  171. package/src/physics3DBroadphasePublication.test.ts +63 -0
  172. package/src/physics3DSpatialIndexingGuards.test.ts +43 -0
  173. package/src/registerBuiltInPhysics3DJointSolvers.test.ts +51 -0
  174. package/src/solver.test.ts +567 -0
  175. package/src/step.test.ts +490 -0
  176. package/src/stepValidation.test.ts +346 -0
  177. package/src/stress.test.ts +526 -0
  178. package/src/symmetricTensor.test.ts +166 -0
  179. package/src/world.test.ts +1127 -0
  180. package/src/worldQueries.test.ts +565 -0
@@ -0,0 +1,237 @@
1
+ import { createCollisionContactManifold3D } from '@flighthq/collision/contract';
2
+ import { synchronizePhysics3DBroadphase } from './broadphase';
3
+ import { collidePhysics3DColliderShapes } from './colliderCollision';
4
+ import { createPhysics3DContactPoint } from './contacts';
5
+ import { isPhysics3DPairJointSuppressed } from './jointCollisionSuppression';
6
+ import { isPhysics3DPairOrdered } from './jointRegistry';
7
+ import { mixPhysics3DFriction, mixPhysics3DRestitution } from './material';
8
+ import { writeRigidBody3DWorldCenter } from './world';
9
+ // Rebuilds the world's persistent contact set from the current poses, and reports this step's begin and
10
+ // end transitions.
11
+ //
12
+ // TWO orderings are load-bearing here and they fix different problems:
13
+ // 1. Each PAIR is ordered by body index before the narrow phase is called, because the narrow phase
14
+ // resolves contact points on the reference shape and ties toward its first argument. Reversed
15
+ // arguments move the points and renumber their feature ids, which discards the warm-start cache.
16
+ // 2. The contact LIST is sorted, because a sequential-impulse solver is order-dependent by
17
+ // construction — each impulse is applied against the velocities the previous ones left behind — and
18
+ // a broadphase reports pairs in an order that follows insertion and movement history.
19
+ //
20
+ // Neither substitutes for the other: the first fixes contact identity, the second fixes solve order. A
21
+ // determinism harness that shuffles only insertion order would pass with the first one broken.
22
+ export function buildPhysics3DContacts(world) {
23
+ rebuildPhysics3DContacts(world, true, false);
24
+ }
25
+ // Refreshes contact geometry between solver sub-intervals without erasing transitions already emitted
26
+ // by this outer step or overwriting the contact fields its pre-solve hook selected. A new contact still
27
+ // receives its material defaults; an existing one retains friction, restitution, enabled, and sensor
28
+ // until the next public step rebuild establishes a new hook transaction.
29
+ export function refreshPhysics3DContacts(world) {
30
+ rebuildPhysics3DContacts(world, false, true);
31
+ }
32
+ function rebuildPhysics3DContacts(world, clearEvents, preserveOverrides) {
33
+ // The diagnostics seam for the one failure this function cannot signal by its output. Null unless
34
+ // `enablePhysics3DGuards` installed it, so a build that never enables guards links neither the check
35
+ // nor the message text.
36
+ physics3DIntakeGuard?.(world);
37
+ synchronizePhysics3DBroadphase(world);
38
+ const scratch = acquirePhysics3DIntakeScratch();
39
+ try {
40
+ buildPhysics3DContactsWithScratch(world, scratch, clearEvents, preserveOverrides);
41
+ }
42
+ finally {
43
+ releasePhysics3DIntakeScratch(scratch);
44
+ }
45
+ }
46
+ // Installs the optional diagnostics seam consulted before every contact rebuild. Null by default and set
47
+ // only by `enablePhysics3DGuards`.
48
+ export function setPhysics3DContactIntakeGuard(guard) {
49
+ physics3DIntakeGuard = guard;
50
+ }
51
+ function buildPhysics3DContactsWithScratch(world, scratch, clearEvents, preserveOverrides) {
52
+ world.index.querySpatialPairs(scratch.pairs);
53
+ if (clearEvents) {
54
+ world.events.began.length = 0;
55
+ world.events.ended.length = 0;
56
+ }
57
+ for (let contactIndex = 0; contactIndex < world.contacts.length; contactIndex += 1) {
58
+ world.contacts[contactIndex].touching = false;
59
+ }
60
+ for (let pairIndex = 0; pairIndex < scratch.pairs.length; pairIndex += 1) {
61
+ const pair = scratch.pairs[pairIndex];
62
+ const first = world.bodyByIndex.get(pair.a);
63
+ const second = world.bodyByIndex.get(pair.b);
64
+ if (first === undefined || second === undefined)
65
+ continue;
66
+ // Two bodies that cannot both move have no constraint to SOLVE, and skipping them keeps the solver's
67
+ // list free of pairs whose every impulse would be multiplied by zero. A sensor is reported and never
68
+ // resolved, though, so an immovable pair still matters when one side senses: a static trigger volume
69
+ // over static scenery is an ordinary thing to build.
70
+ const bothImmovable = first.inverseMass === 0 && second.inverseMass === 0;
71
+ if (bothImmovable && !hasPhysics3DSensorCollider(first) && !hasPhysics3DSensorCollider(second))
72
+ continue;
73
+ // A jointed pair almost always overlaps at the anchor, and resolving that contact fights the
74
+ // constraint holding them together, so a joint suppresses it unless the caller asks otherwise.
75
+ if (isPhysics3DPairJointSuppressed(world, first.index, second.index))
76
+ continue;
77
+ const ordered = isPhysics3DPairOrdered(first.index, second.index);
78
+ const bodyA = ordered ? first : second;
79
+ const bodyB = ordered ? second : first;
80
+ for (let i = 0; i < bodyA.colliders.length; i += 1) {
81
+ for (let j = 0; j < bodyB.colliders.length; j += 1) {
82
+ const colliderA = bodyA.colliders[i];
83
+ const colliderB = bodyB.colliders[j];
84
+ if (!isPhysics3DColliderPairEnabled(colliderA, colliderB))
85
+ continue;
86
+ const sensorPair = colliderA.sensor || colliderB.sensor;
87
+ // The immovable test belongs HERE as well as on the bodies. Owning one sensor anywhere does not
88
+ // make a body's other colliders reportable: a static body carrying a trigger volume plus ordinary
89
+ // scenery would otherwise emit solid-vs-solid contacts against other static scenery, which nothing
90
+ // can ever resolve.
91
+ if (bothImmovable && !sensorPair)
92
+ continue;
93
+ if (!collidePhysics3DColliderShapes(colliderA.world, colliderB.world, scratch.manifold))
94
+ continue;
95
+ mergePhysics3DContact(world, bodyA.index, bodyB.index, i, j, scratch.manifold, sensorPair, mixPhysics3DFriction(colliderA.material.friction, colliderB.material.friction), mixPhysics3DRestitution(colliderA.material.restitution, colliderB.material.restitution), preserveOverrides);
96
+ }
97
+ }
98
+ }
99
+ // Contact events are read off the cache's own transitions rather than tracked beside it: the cache
100
+ // already knows which pairs are touching, so a pair gaining an entry IS the begin and losing one IS the
101
+ // end. An ended contact is reported for the step it leaves, then dropped.
102
+ for (let i = world.contacts.length - 1; i >= 0; i -= 1) {
103
+ const contact = world.contacts[i];
104
+ if (!contact.touching) {
105
+ world.events.ended.push(contact);
106
+ world.contacts.splice(i, 1);
107
+ }
108
+ }
109
+ world.contacts.sort(comparePhysics3DContacts);
110
+ }
111
+ // Total order over contacts by their four identity fields. Body pair first, then collider pair, so a
112
+ // compound body's several contacts against one neighbour keep a stable relative order too.
113
+ function comparePhysics3DContacts(left, right) {
114
+ if (left.bodyA !== right.bodyA)
115
+ return left.bodyA - right.bodyA;
116
+ if (left.bodyB !== right.bodyB)
117
+ return left.bodyB - right.bodyB;
118
+ if (left.colliderA !== right.colliderA)
119
+ return left.colliderA - right.colliderA;
120
+ return left.colliderB - right.colliderB;
121
+ }
122
+ function hasPhysics3DSensorCollider(body) {
123
+ for (let colliderIndex = 0; colliderIndex < body.colliders.length; colliderIndex += 1) {
124
+ if (body.colliders[colliderIndex].sensor)
125
+ return true;
126
+ }
127
+ return false;
128
+ }
129
+ function isPhysics3DColliderPairEnabled(colliderA, colliderB) {
130
+ const filterA = colliderA.filter;
131
+ const filterB = colliderB.filter;
132
+ if (filterA.groupIndex !== 0 && filterA.groupIndex === filterB.groupIndex)
133
+ return filterA.groupIndex > 0;
134
+ return (filterA.maskBits & filterB.categoryBits) !== 0 && (filterB.maskBits & filterA.categoryBits) !== 0;
135
+ }
136
+ // Writes this step's manifold into the persistent contact for the pair, creating it if new.
137
+ //
138
+ // The point ARRAY is grown to the manifold's size once and then reused, and the geometry is copied field
139
+ // by field rather than by holding the manifold's own point objects — the manifold is scratch that the
140
+ // next collider pair overwrites, so retaining its points would give every contact in the world the last
141
+ // pair's geometry.
142
+ function mergePhysics3DContact(world, bodyA, bodyB, colliderA, colliderB, manifold, sensor, friction, restitution, preserveOverrides) {
143
+ let contact = null;
144
+ for (let contactIndex = 0; contactIndex < world.contacts.length; contactIndex += 1) {
145
+ const existing = world.contacts[contactIndex];
146
+ if (existing.bodyA === bodyA &&
147
+ existing.bodyB === bodyB &&
148
+ existing.colliderA === colliderA &&
149
+ existing.colliderB === colliderB) {
150
+ contact = existing;
151
+ break;
152
+ }
153
+ }
154
+ const existing = contact !== null;
155
+ if (contact === null) {
156
+ contact = {
157
+ bodyA,
158
+ bodyB,
159
+ colliderA,
160
+ colliderB,
161
+ normalX: 0,
162
+ normalY: 0,
163
+ normalZ: 0,
164
+ pointCount: 0,
165
+ points: [],
166
+ friction,
167
+ restitution,
168
+ enabled: true,
169
+ sensor,
170
+ touching: true,
171
+ };
172
+ world.contacts.push(contact);
173
+ world.events.began.push(contact);
174
+ }
175
+ contact.normalX = manifold.normalX;
176
+ contact.normalY = manifold.normalY;
177
+ contact.normalZ = manifold.normalZ;
178
+ if (!existing || !preserveOverrides) {
179
+ contact.friction = friction;
180
+ contact.restitution = restitution;
181
+ contact.enabled = true;
182
+ contact.sensor = sensor;
183
+ }
184
+ contact.touching = true;
185
+ // Warm starting needs no snapshot-and-rematch here, unlike the 2D package: the 3D solver holds its
186
+ // accumulators in `Physics3DContactConstraintPoint` rather than on the contact point, and matches them
187
+ // by `featureId` itself. The contact carries geometry and identity only, so overwriting it in place
188
+ // destroys nothing the next warm start needs.
189
+ while (contact.points.length < manifold.pointCount)
190
+ contact.points.push(createPhysics3DContactPoint());
191
+ const centerA = writePhysics3DBodyCenter(world, bodyA, scratchCenterA);
192
+ const centerB = writePhysics3DBodyCenter(world, bodyB, scratchCenterB);
193
+ for (let i = 0; i < manifold.pointCount; i += 1) {
194
+ const source = manifold.points[i];
195
+ const target = contact.points[i];
196
+ target.x = source.x;
197
+ target.y = source.y;
198
+ target.z = source.z;
199
+ target.depth = source.depth;
200
+ target.featureId = source.featureId;
201
+ // The lever arms are measured from each body's CENTRE OF MASS, not its origin. An offset collider on
202
+ // a body whose centre is elsewhere is exactly the case the two differ, and using the origin gives the
203
+ // contact a torque arm the body does not have.
204
+ target.rAX = source.x - centerA[0];
205
+ target.rAY = source.y - centerA[1];
206
+ target.rAZ = source.z - centerA[2];
207
+ target.rBX = source.x - centerB[0];
208
+ target.rBY = source.y - centerB[1];
209
+ target.rBZ = source.z - centerB[2];
210
+ }
211
+ contact.pointCount = manifold.pointCount;
212
+ }
213
+ function writePhysics3DBodyCenter(world, index, out) {
214
+ const body = world.bodyByIndex.get(index);
215
+ if (body === undefined) {
216
+ out[0] = 0;
217
+ out[1] = 0;
218
+ out[2] = 0;
219
+ return out;
220
+ }
221
+ writeRigidBody3DWorldCenter(body, out);
222
+ return out;
223
+ }
224
+ function acquirePhysics3DIntakeScratch() {
225
+ return physics3DIntakeScratchPool.pop() ?? createPhysics3DIntakeScratch();
226
+ }
227
+ function createPhysics3DIntakeScratch() {
228
+ return { pairs: [], manifold: createCollisionContactManifold3D() };
229
+ }
230
+ function releasePhysics3DIntakeScratch(scratch) {
231
+ physics3DIntakeScratchPool.push(scratch);
232
+ }
233
+ const physics3DIntakeScratchPool = [createPhysics3DIntakeScratch()];
234
+ let physics3DIntakeGuard = null;
235
+ const scratchCenterA = [0, 0, 0];
236
+ const scratchCenterB = [0, 0, 0];
237
+ //# sourceMappingURL=contactIntake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contactIntake.js","sourceRoot":"","sources":["../src/contactIntake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAUhF,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAEtD,wGAAwG;AACxG,mBAAmB;AACnB,EAAE;AACF,uEAAuE;AACvE,sGAAsG;AACtG,mGAAmG;AACnG,sGAAsG;AACtG,6FAA6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C7F,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,OAAO,GAAG,CAAC;IACb,CAAC;IACD,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC;AAOD,SAAS,6BAA6B;IACpC,OAAO,0BAA0B,CAAC,GAAG,EAAE,IAAI,4BAA4B,EAAE,CAAC;AAC5E,CAAC;AAED,SAAS,4BAA4B;IACnC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,gCAAgC,EAAE,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,6BAA6B,CAAC,OAA+B;IACpE,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,0BAA0B,GAA6B,CAAC,4BAA4B,EAAE,CAAC,CAAC;AAE9F,IAAI,oBAAoB,GAAuC,IAAI,CAAC;AAEpE,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjC,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Physics3DContact, Physics3DContactPoint } from '@flighthq/types/contract';
2
+ export declare function createPhysics3DContact(bodyA: number, bodyB: number, colliderA?: number, colliderB?: number): Physics3DContact;
3
+ export declare function createPhysics3DContactPoint(): Physics3DContactPoint;
4
+ //# sourceMappingURL=contacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../src/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AA6BxF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,SAAI,EAAE,SAAS,SAAI,GAAG,gBAAgB,CAkBnH;AAKD,wBAAgB,2BAA2B,IAAI,qBAAqB,CAcnE"}
@@ -0,0 +1,64 @@
1
+ // Constructors for the contact records the step consumes.
2
+ //
3
+ // The step GENERATES contacts from a body's colliders, so these are not the ordinary path. They are the
4
+ // escape hatch: the solver is defined against contact records rather than against a detector, so a caller
5
+ // driving it from its own detection — a replayed trace, a fixture, a narrow phase this package does not
6
+ // own — builds the input here rather than hand-writing a literal that happens to match the fields.
7
+ //
8
+ // A contact allocated here is inert until a caller fills in the geometry: no points, a zero normal, and
9
+ // `touching` false. The solver skips exactly that shape, so a half-built contact costs nothing and moves
10
+ // nothing. Note that a contact the step does not re-find is retired at the end of the next step, because
11
+ // contact lifetime is owned by intake — a hand-built contact survives only as long as the geometry that
12
+ // justifies it does.
13
+ // Allocates one contact between two bodies, in canonical order.
14
+ //
15
+ // The order is an invariant of creation rather than a convention a caller is asked to respect, so it is
16
+ // enforced here: a narrow phase resolves contact points on the reference shape's surface and ties toward
17
+ // its first argument, which means passing the same pair the other way round moves the points and renumbers
18
+ // their feature ids — and the warm-start cache is keyed to those ids.
19
+ //
20
+ // The COLLIDER indices swap with the bodies, because they name a position in each body's own collider
21
+ // list: leaving them behind would attach body A's contact to body B's geometry. They default to zero,
22
+ // which is the right answer for the single-collider bodies a hand-built contact almost always names.
23
+ //
24
+ // The normal is NOT reordered with the bodies, because there is nothing yet to reorder: a fresh contact
25
+ // carries a zero normal, and the caller writing the geometry is the one who knows which way it points. It
26
+ // must point so that resolving pushes A out of B.
27
+ export function createPhysics3DContact(bodyA, bodyB, colliderA = 0, colliderB = 0) {
28
+ const ordered = bodyA <= bodyB;
29
+ return {
30
+ bodyA: ordered ? bodyA : bodyB,
31
+ bodyB: ordered ? bodyB : bodyA,
32
+ colliderA: ordered ? colliderA : colliderB,
33
+ colliderB: ordered ? colliderB : colliderA,
34
+ normalX: 0,
35
+ normalY: 0,
36
+ normalZ: 0,
37
+ pointCount: 0,
38
+ points: [],
39
+ friction: 0,
40
+ restitution: 0,
41
+ enabled: true,
42
+ sensor: false,
43
+ touching: false,
44
+ };
45
+ }
46
+ // Allocates one contact point, zeroed. `featureId` is the caller's to assign and is opaque to this
47
+ // package: its only contract is that the SAME physical feature carries the SAME id between steps, which is
48
+ // what lets the solver match this step's points against last step's accumulators.
49
+ export function createPhysics3DContactPoint() {
50
+ return {
51
+ x: 0,
52
+ y: 0,
53
+ z: 0,
54
+ depth: 0,
55
+ featureId: 0,
56
+ rAX: 0,
57
+ rAY: 0,
58
+ rAZ: 0,
59
+ rBX: 0,
60
+ rBY: 0,
61
+ rBZ: 0,
62
+ };
63
+ }
64
+ //# sourceMappingURL=contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.js","sourceRoot":"","sources":["../src/contacts.ts"],"names":[],"mappings":"AAEA,0DAA0D;AAC1D,EAAE;AACF,wGAAwG;AACxG,0GAA0G;AAC1G,wGAAwG;AACxG,mGAAmG;AACnG,EAAE;AACF,wGAAwG;AACxG,yGAAyG;AACzG,yGAAyG;AACzG,wGAAwG;AACxG,qBAAqB;AAErB,gEAAgE;AAChE,EAAE;AACF,wGAAwG;AACxG,yGAAyG;AACzG,2GAA2G;AAC3G,sEAAsE;AACtE,EAAE;AACF,sGAAsG;AACtG,sGAAsG;AACtG,qGAAqG;AACrG,EAAE;AACF,wGAAwG;AACxG,0GAA0G;AAC1G,kDAAkD;AAClD,MAAM,UAAU,sBAAsB,CAAC,KAAa,EAAE,KAAa,EAAE,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC;IAC/F,MAAM,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC;IAC/B,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;QAC9B,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;QAC9B,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC1C,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,2GAA2G;AAC3G,kFAAkF;AAClF,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,CAAC;QACZ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Physics3DRotationalCcdEnvelope, Physics3DWorld } from '@flighthq/types/contract';
2
+ export declare function hasActivePhysics3DBullet(world: Readonly<Physics3DWorld>): boolean;
3
+ export declare function integratePhysics3DContinuous(world: Physics3DWorld, dt: number): void;
4
+ export declare function writePhysics3DRotationalCcdEnvelope(angularSpeed: number, maximumRadius: number, dt: number, maxSubsteps: number, out: Physics3DRotationalCcdEnvelope): boolean;
5
+ //# sourceMappingURL=continuous.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuous.d.ts","sourceRoot":"","sources":["../src/continuous.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAIV,8BAA8B,EAC9B,cAAc,EAGf,MAAM,0BAA0B,CAAC;AAsClC,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,OAAO,CAKjF;AAWD,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CA2BpF;AAMD,wBAAgB,mCAAmC,CACjD,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,8BAA8B,GAClC,OAAO,CA4BT"}