@ignifx/physics 0.21.0 → 0.21.1

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 ADDED
@@ -0,0 +1,22 @@
1
+ # @ignifx/physics
2
+
3
+ ignifx 3D physics on Havok through Babylon Lite: rigidbodies, colliders, triggers, a character controller and queries, stepped by the engine's fixed loop. It runs headless under Node with no GPU.
4
+
5
+ Part of [ignifx](https://ignifx.com), a code-first TypeScript game engine for WebGPU-capable browsers and Electron. The engine is pre-1.0: minor releases may include breaking changes.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add @ignifx/physics @ignifx/core
11
+ ```
12
+
13
+ `@babylonjs/lite` (at the version `@ignifx/core` pins) and `@babylonjs/havok` are peer dependencies; pnpm and npm install them for you. With `@ignifx/vite-plugin`, list `@ignifx/physics` in the project's own `package.json` so the plugin copies `HavokPhysics.wasm`.
14
+ The `ignifx` umbrella package re-exports this package.
15
+
16
+ ## Documentation
17
+
18
+ The package ships its guide as an agent skill: `skills/physics/SKILL.md` (`node_modules/@ignifx/physics/skills/physics/SKILL.md` once installed). It covers setup, the main APIs, recipes and gotchas.
19
+
20
+ ## License
21
+
22
+ Apache-2.0 © Astrum Forge Studios
package/dist/index.d.ts CHANGED
@@ -218,7 +218,7 @@ export declare function describePhysicsMaterialFileFormat(): SchemaDescription;
218
218
  * - `_stepWorld` (`lib/physics/havok.js:73-107`) pre-syncs node→body only for `ANIMATED` bodies and
219
219
  * for bodies with `_preStep` set, then steps once, then syncs body→node for `DYNAMIC` bodies. A
220
220
  * `DYNAMIC` body therefore never reads its node, which is what makes the interpolated display
221
- * pose of `09-physics.md` §1 safe (spike S4.3).
221
+ * pose of `09-physics.md` §1 safe.
222
222
  * - `_syncBodyToNode` writes `node.position` / `node.rotationQuaternion` — the node's **local** TRS.
223
223
  * A body's node must therefore be a root node for its pose to be world space; the extension
224
224
  * reports `IGX-0907` otherwise.
@@ -1405,7 +1405,7 @@ interface BodyObserver {
1405
1405
  replaced(previous: LitePhysicsBody, next: LitePhysicsBody): void;
1406
1406
  }
1407
1407
  /**
1408
- * The counters `09-physics.md` §9 and the plan's diagnostics deliverable name.
1408
+ * The counters `09-physics.md` §9 names.
1409
1409
  *
1410
1410
  * @public
1411
1411
  */
@@ -1489,7 +1489,7 @@ declare class PhysicsRuntime {
1489
1489
  /**
1490
1490
  * Restores the authoritative pose of every interpolated body and controller, undoing the display
1491
1491
  * pose the `Update` system wrote at the top of the previous frame's `Update`
1492
- * (`09-physics.md` §1, spike S4.3).
1492
+ * (`09-physics.md` §1).
1493
1493
  */
1494
1494
  restorePoses(): void;
1495
1495
  /**
package/dist/index.js CHANGED
@@ -878,7 +878,7 @@ const ShapeGeometry = {
878
878
  mesh: 6
879
879
  };
880
880
  /**
881
- * Creates the null-engine scene the Havok world is hosted on (`09-physics.md` §1, spike S4.1).
881
+ * Creates the null-engine scene the Havok world is hosted on (`09-physics.md` §1).
882
882
  *
883
883
  * @returns The engine and scene. Release with {@link disposeSimulation}.
884
884
  *
@@ -2227,7 +2227,7 @@ function offsetAlong(center, direction, distance) {
2227
2227
  * `fetch` refuses `file:` URLs. Emscripten's `wasmBinary` option is the supported escape and is what
2228
2228
  * this module always uses: the bytes are obtained first (from the caller, from `fetch`, or from
2229
2229
  * `node:fs`) and handed to the factory. `app.isHeadless` therefore only changes *where the bytes
2230
- * come from*, exactly as the Phase 4 brief requires.
2230
+ * come from*.
2231
2231
  *
2232
2232
  * The `@babylonjs/havok` import lives here because this file is under `src/lite/`, the only place
2233
2233
  * `ignifx/no-lite-outside-adapter` and dependency-cruiser allow a native backend.
@@ -2333,7 +2333,7 @@ const HAVOK_PACKAGE_WASM = "@babylonjs/havok/lib/esm/HavokPhysics.wasm";
2333
2333
  /**
2334
2334
  * Reads the binary straight out of the installed `@babylonjs/havok` package, which is what makes a
2335
2335
  * headless Node app work with no configuration at all: `app.isHeadless` only changes *where the
2336
- * bytes come from* (Phase 4 brief), and under Node the answer is the package itself.
2336
+ * bytes come from*, and under Node the answer is the package itself.
2337
2337
  *
2338
2338
  * @returns The bytes, or `null` when `import.meta.resolve` is unavailable or the package cannot be
2339
2339
  * resolved.
@@ -2607,7 +2607,7 @@ function toSupportState(value) {
2607
2607
  //#endregion
2608
2608
  //#region src/runtime/runtime.ts
2609
2609
  /**
2610
- * The counters `09-physics.md` §9 and the plan's diagnostics deliverable name.
2610
+ * The counters `09-physics.md` §9 names.
2611
2611
  *
2612
2612
  * @public
2613
2613
  */
@@ -2790,7 +2790,7 @@ var PhysicsRuntime = class {
2790
2790
  /**
2791
2791
  * Restores the authoritative pose of every interpolated body and controller, undoing the display
2792
2792
  * pose the `Update` system wrote at the top of the previous frame's `Update`
2793
- * (`09-physics.md` §1, spike S4.3).
2793
+ * (`09-physics.md` §1).
2794
2794
  */
2795
2795
  restorePoses() {
2796
2796
  for (let index = 0; index < this.#records.length; index += 1) {
@@ -4008,7 +4008,7 @@ const PHYSICS_RESTORE_ORDER = -100;
4008
4008
  const PHYSICS_INTERPOLATE_ORDER = -900;
4009
4009
  /**
4010
4010
  * Undoes the display pose the interpolation system wrote at the top of the previous `Update`, so
4011
- * `fixedUpdate` and Havok both see the authoritative pose (spike S4.3).
4011
+ * `fixedUpdate` and Havok both see the authoritative pose.
4012
4012
  *
4013
4013
  * @internal
4014
4014
  */