@flighthq/physics3d 0.4.0-next.1836.147ae1e → 0.4.0-next.1888.e9e80b4
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/package.json +6 -6
- package/src/stress.test.ts +5 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/physics3d",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.1888.e9e80b4",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/collision": "0.4.0-next.
|
|
42
|
-
"@flighthq/log": "0.4.0-next.
|
|
43
|
-
"@flighthq/math": "0.4.0-next.
|
|
44
|
-
"@flighthq/spatial": "0.4.0-next.
|
|
45
|
-
"@flighthq/types": "0.4.0-next.
|
|
41
|
+
"@flighthq/collision": "0.4.0-next.1888.e9e80b4",
|
|
42
|
+
"@flighthq/log": "0.4.0-next.1888.e9e80b4",
|
|
43
|
+
"@flighthq/math": "0.4.0-next.1888.e9e80b4",
|
|
44
|
+
"@flighthq/spatial": "0.4.0-next.1888.e9e80b4",
|
|
45
|
+
"@flighthq/types": "0.4.0-next.1888.e9e80b4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@flighthq/geometry": "*",
|
package/src/stress.test.ts
CHANGED
|
@@ -191,13 +191,11 @@ describe('physics3d stress qualification', () => {
|
|
|
191
191
|
for (const body of pile) expectFiniteBody(body);
|
|
192
192
|
// Still stacked in the order they were built: nothing tunnelled past a neighbour.
|
|
193
193
|
for (let i = 1; i < pile.length; i += 1) expect(pile[i].y).toBeGreaterThan(pile[i - 1].y);
|
|
194
|
-
// The bottom box still rests on the floor rather than having sunk into it.
|
|
195
|
-
|
|
196
|
-
//
|
|
197
|
-
|
|
198
|
-
//
|
|
199
|
-
// This bound is deliberately tight: it caught the position pass correcting against a STALE depth,
|
|
200
|
-
// which cost 3 units of compression here while every single-contact test still passed.
|
|
194
|
+
// The bottom box still rests on the floor rather than having sunk into it. The bound accommodates
|
|
195
|
+
// platform-dependent convergence rates (~0.47 locally, ~0.43 on CI) while still catching the stale-
|
|
196
|
+
// depth position correction bug that measured 0.23 of sink (pile[0].y ≈ 0.27).
|
|
197
|
+
expect(pile[0].y).toBeGreaterThan(0.4);
|
|
198
|
+
// And the pile has not collapsed: twelve unit boxes stand about twelve units tall.
|
|
201
199
|
expect(pile[pile.length - 1].y).toBeGreaterThan(11);
|
|
202
200
|
expect(pile.every((body) => body.sleeping)).toBe(true);
|
|
203
201
|
});
|