@ignifx/physics-2d 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-2d
2
+
3
+ ignifx 2D physics on Rapier 2D: `Rigidbody2D`, 2D colliders, `CharacterController2D` and queries, stepped by the engine's fixed loop. It runs headless under Node, and the WebAssembly is inlined, so nothing has to be served.
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-2d @ignifx/core
11
+ ```
12
+
13
+ `@ignifx/2d` is an optional peer, needed only for tilemap colliders. A world uses either this package or `@ignifx/physics`, not both.
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-2d/SKILL.md` (`node_modules/@ignifx/physics-2d/skills/physics-2d/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
@@ -1259,7 +1259,7 @@ declare class Physics2DRuntime {
1259
1259
  get world(): RapierWorld;
1260
1260
  /**
1261
1261
  * Whether at least one fixed step has run, which is what Rapier's broadphase needs before a query
1262
- * can answer (`09-physics.md` §5, spike S6.2).
1262
+ * can answer (`09-physics.md` §5).
1263
1263
  *
1264
1264
  * @returns `true` once a step has completed.
1265
1265
  */
@@ -1423,7 +1423,7 @@ declare class Physics2DRuntime {
1423
1423
  *
1424
1424
  * @remarks
1425
1425
  * Rapier refreshes its broadphase only inside a step, so after a change this runs the same
1426
- * zero-length step a game runs before its first real one (S6.2). With a zero timestep nothing
1426
+ * zero-length step a game runs before its first real one. With a zero timestep nothing
1427
1427
  * moves; the events it reports are dropped. A changed scale rebuilds the body's colliders.
1428
1428
  */
1429
1429
  syncEditMode(): void;
package/dist/index.js CHANGED
@@ -1436,7 +1436,7 @@ function stepWorld(world, queue) {
1436
1436
  *
1437
1437
  * @remarks
1438
1438
  * Rapier only refreshes its acceleration structure inside `World.step`, so a collider created since
1439
- * the last step is invisible to queries and to the character controller (S6.2). The queue is passed
1439
+ * the last step is invisible to queries and to the character controller. The queue is passed
1440
1440
  * so an enter event raised by the priming step is still delivered.
1441
1441
  *
1442
1442
  * @param world - The world.
@@ -2262,7 +2262,7 @@ var Physics2DRuntime = class {
2262
2262
  }
2263
2263
  /**
2264
2264
  * Whether at least one fixed step has run, which is what Rapier's broadphase needs before a query
2265
- * can answer (`09-physics.md` §5, spike S6.2).
2265
+ * can answer (`09-physics.md` §5).
2266
2266
  *
2267
2267
  * @returns `true` once a step has completed.
2268
2268
  */
@@ -2510,7 +2510,7 @@ var Physics2DRuntime = class {
2510
2510
  *
2511
2511
  * @remarks
2512
2512
  * Rapier refreshes its broadphase only inside a step, so after a change this runs the same
2513
- * zero-length step a game runs before its first real one (S6.2). With a zero timestep nothing
2513
+ * zero-length step a game runs before its first real one. With a zero timestep nothing
2514
2514
  * moves; the events it reports are dropped. A changed scale rebuilds the body's colliders.
2515
2515
  */
2516
2516
  syncEditMode() {
@@ -3072,7 +3072,7 @@ var Physics2DRuntime = class {
3072
3072
  * Rapier runs it from inside WebAssembly, so it reads only plain JavaScript state:
3073
3073
  * {@link Physics2DRuntime.#refreshOneWayPlatforms} caches every platform's world top *before* the
3074
3074
  * move, because calling back into Rapier (`collider.translation()`) from inside the callback is a
3075
- * re-entrant WebAssembly call and the obstacle is then never actually excluded (measured, S6.2).
3075
+ * re-entrant WebAssembly call and the obstacle is then never actually excluded (measured).
3076
3076
  *
3077
3077
  * @param collider - The obstacle Rapier is considering.
3078
3078
  * @returns `false` when the obstacle should be ignored this step.
@@ -3830,7 +3830,7 @@ var Physics2DService = class {
3830
3830
  return outlines;
3831
3831
  }
3832
3832
  /**
3833
- * Refuses a query that ran before Rapier built its broadphase (spike S6.2). In an edit-mode app,
3833
+ * Refuses a query that ran before Rapier built its broadphase. In an edit-mode app,
3834
3834
  * which never steps, it brings the bodies in line with the world instead, so the query sees what
3835
3835
  * the editor shows (ADR-0028, amendment of 2026-10-20).
3836
3836
  *