@newkrok/nape-js 3.16.1 → 3.17.0
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 +3 -0
- package/dist/{ConvexResult-CzVZh3d_.d.cts → ConvexResult-DafossGq.d.cts} +19 -0
- package/dist/{ConvexResult-CzVZh3d_.d.ts → ConvexResult-DafossGq.d.ts} +19 -0
- package/dist/{chunk-ON6LCM4U.js → chunk-SQVUZDT6.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/serialization/index.cjs +1 -1
- package/dist/serialization/index.d.cts +1 -1
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
[](https://github.com/NewKrok/nape-js/actions/workflows/ci.yml)
|
|
10
10
|
[](https://github.com/NewKrok/nape-js)
|
|
11
11
|
[](https://github.com/NewKrok/nape-js/blob/master/LICENSE)
|
|
12
|
+
[](https://newkrok.github.io/nape-js/)
|
|
12
13
|
|
|
13
14
|
Fully typed, tree-shakeable 2D physics engine — a modern TypeScript rewrite of the
|
|
14
15
|
[Nape](https://github.com/deltaluca/nape) Haxe physics engine.
|
|
15
16
|
|
|
17
|
+
**[Homepage & Interactive Demos](https://newkrok.github.io/nape-js/)** | **[API Reference](https://newkrok.github.io/nape-js/api/)** | **[Examples](https://newkrok.github.io/nape-js/examples.html)** | **[Multiplayer Demo](https://newkrok.github.io/nape-js/multiplayer.html)**
|
|
18
|
+
|
|
16
19
|
- Originally created in Haxe by Luca Deltodesco
|
|
17
20
|
- Ported to TypeScript by Istvan Krisztian Somoracz
|
|
18
21
|
|
|
@@ -1866,6 +1866,25 @@ declare class Space {
|
|
|
1866
1866
|
*/
|
|
1867
1867
|
get deterministic(): boolean;
|
|
1868
1868
|
set deterministic(value: boolean);
|
|
1869
|
+
/**
|
|
1870
|
+
* Number of sub-steps performed per `step()` call. Each sub-step uses
|
|
1871
|
+
* `deltaTime / subSteps` and the same velocity/position iteration counts.
|
|
1872
|
+
*
|
|
1873
|
+
* Higher values improve simulation stability (stacking, fast objects, joint
|
|
1874
|
+
* stiffness) at the cost of proportionally more CPU time.
|
|
1875
|
+
*
|
|
1876
|
+
* - `1` (default) — standard single-step behaviour, zero overhead.
|
|
1877
|
+
* - `4` — good balance between quality and performance for most games.
|
|
1878
|
+
* - `8+` — high-precision, useful for stiff constraints or very fast objects.
|
|
1879
|
+
*
|
|
1880
|
+
* **Performance:** cost scales linearly — `subSteps = 4` ≈ 4× solver work.
|
|
1881
|
+
* Tip: you can lower `velocityIterations` to compensate (e.g. 10 iter × 1 step
|
|
1882
|
+
* → 3 iter × 4 sub-steps ≈ similar quality at ~1.2× cost).
|
|
1883
|
+
*
|
|
1884
|
+
* @throws If set to a value less than 1 or NaN.
|
|
1885
|
+
*/
|
|
1886
|
+
get subSteps(): number;
|
|
1887
|
+
set subSteps(value: number);
|
|
1869
1888
|
/**
|
|
1870
1889
|
* Global angular drag coefficient applied to all bodies.
|
|
1871
1890
|
* @throws If set to NaN.
|
|
@@ -1866,6 +1866,25 @@ declare class Space {
|
|
|
1866
1866
|
*/
|
|
1867
1867
|
get deterministic(): boolean;
|
|
1868
1868
|
set deterministic(value: boolean);
|
|
1869
|
+
/**
|
|
1870
|
+
* Number of sub-steps performed per `step()` call. Each sub-step uses
|
|
1871
|
+
* `deltaTime / subSteps` and the same velocity/position iteration counts.
|
|
1872
|
+
*
|
|
1873
|
+
* Higher values improve simulation stability (stacking, fast objects, joint
|
|
1874
|
+
* stiffness) at the cost of proportionally more CPU time.
|
|
1875
|
+
*
|
|
1876
|
+
* - `1` (default) — standard single-step behaviour, zero overhead.
|
|
1877
|
+
* - `4` — good balance between quality and performance for most games.
|
|
1878
|
+
* - `8+` — high-precision, useful for stiff constraints or very fast objects.
|
|
1879
|
+
*
|
|
1880
|
+
* **Performance:** cost scales linearly — `subSteps = 4` ≈ 4× solver work.
|
|
1881
|
+
* Tip: you can lower `velocityIterations` to compensate (e.g. 10 iter × 1 step
|
|
1882
|
+
* → 3 iter × 4 sub-steps ≈ similar quality at ~1.2× cost).
|
|
1883
|
+
*
|
|
1884
|
+
* @throws If set to a value less than 1 or NaN.
|
|
1885
|
+
*/
|
|
1886
|
+
get subSteps(): number;
|
|
1887
|
+
set subSteps(value: number);
|
|
1869
1888
|
/**
|
|
1870
1889
|
* Global angular drag coefficient applied to all bodies.
|
|
1871
1890
|
* @throws If set to NaN.
|