@flighthq/physics3d 0.5.1-next.650.5d3df0b → 0.5.1-next.658.9cb44d7
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/README.md +2 -2
- package/package.json +7 -7
- package/src/explainPhysics3DCollision.test.ts +13 -8
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/physics3d`. The `@fl
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/physics3d@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/physics3d@0.5.1-next.658.9cb44d7](https://github.com/flighthq/flight/tree/9cb44d76b981adad2503d5e62207be99adb35c55/packages/physics3d)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/9cb44d76b981adad2503d5e62207be99adb35c55/LICENSE.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/physics3d",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.658.9cb44d7",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/collision": "0.5.1-next.
|
|
42
|
-
"@flighthq/log": "0.5.1-next.
|
|
43
|
-
"@flighthq/math": "0.5.1-next.
|
|
44
|
-
"@flighthq/node": "0.5.1-next.
|
|
45
|
-
"@flighthq/spatial": "0.5.1-next.
|
|
46
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/collision": "0.5.1-next.658.9cb44d7",
|
|
42
|
+
"@flighthq/log": "0.5.1-next.658.9cb44d7",
|
|
43
|
+
"@flighthq/math": "0.5.1-next.658.9cb44d7",
|
|
44
|
+
"@flighthq/node": "0.5.1-next.658.9cb44d7",
|
|
45
|
+
"@flighthq/spatial": "0.5.1-next.658.9cb44d7",
|
|
46
|
+
"@flighthq/types": "0.5.1-next.658.9cb44d7"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@flighthq/geometry": "*",
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
clearCollisionPairTests3D,
|
|
3
|
+
clearCollisionSupports3D,
|
|
4
|
+
registerBuiltInCollisionSupports3D,
|
|
5
|
+
} from '@flighthq/collision/contract';
|
|
2
6
|
import { describe, expect, it } from 'vitest';
|
|
3
7
|
|
|
4
8
|
import { explainPhysics3DCollision } from './explainPhysics3DCollision';
|
|
@@ -10,11 +14,14 @@ import {
|
|
|
10
14
|
createRigidBody3D,
|
|
11
15
|
} from './world';
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
clearCollisionSupports3D();
|
|
19
|
+
clearCollisionPairTests3D();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
afterEach(() => {
|
|
23
|
+
registerBuiltInCollisionSupports3D();
|
|
24
|
+
});
|
|
18
25
|
|
|
19
26
|
function addSphereBody(world: ReturnType<typeof createPhysics3DWorld>, radius = 1): void {
|
|
20
27
|
const body = createRigidBody3D('dynamic');
|
|
@@ -52,8 +59,6 @@ describe('explainPhysics3DCollision', () => {
|
|
|
52
59
|
});
|
|
53
60
|
|
|
54
61
|
it('reads the WORLD kind, which is what the narrow phase is actually handed', () => {
|
|
55
|
-
// An `aabb` local shape carries a `box` world shape, so a world of aabb colliders needs the BOX
|
|
56
|
-
// support registered. Asking about the local kind would report a world ready that is not.
|
|
57
62
|
const world = createPhysics3DWorld();
|
|
58
63
|
const body = createRigidBody3D('dynamic');
|
|
59
64
|
addPhysics3DBody(world, body);
|