@newkrok/nape-js 3.5.0 → 3.5.2

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/dist/index.d.cts CHANGED
@@ -1,19 +1,3 @@
1
- /**
2
- * ZNPNode<T> — Generic linked list node used by ZNPList<T>.
3
- *
4
- * Replaces 35 identical ZNPNode_* classes previously generated by
5
- * createZNPNode() factory in nape-compiled.js.
6
- */
7
- declare class ZNPNode<T> {
8
- static zpp_pool: any;
9
- elt: T | null;
10
- next: ZNPNode<T> | null;
11
- __class__: any;
12
- alloc(): void;
13
- free(): void;
14
- elem(): T | null;
15
- }
16
-
17
1
  /**
18
2
  * ZNPList<T> — Generic singly-linked list backed by ZNPNode<T>.
19
3
  *
@@ -24,39 +8,6 @@ declare class ZNPNode<T> {
24
8
  * to the corresponding ZNPNode subclass for pool allocation.
25
9
  */
26
10
 
27
- interface ZNPNodeClass<T> {
28
- new (): ZNPNode<T>;
29
- zpp_pool: ZNPNode<T> | null;
30
- }
31
- declare class ZNPList<T> {
32
- static _NodeClass: ZNPNodeClass<unknown>;
33
- head: ZNPNode<T> | null;
34
- length: number;
35
- modified: boolean;
36
- pushmod: boolean;
37
- private _allocNode;
38
- private _freeNode;
39
- begin(): ZNPNode<T> | null;
40
- setbegin(i: ZNPNode<T> | null): void;
41
- add(o: T): T;
42
- addAll(x: ZNPList<T>): void;
43
- insert(cur: ZNPNode<T> | null, o: T): ZNPNode<T>;
44
- pop(): void;
45
- pop_unsafe(): T;
46
- erase(pre: ZNPNode<T> | null): ZNPNode<T> | null;
47
- remove(obj: T): void;
48
- try_remove(obj: T): boolean;
49
- splice(pre: ZNPNode<T>, n: number): ZNPNode<T> | null;
50
- clear(): void;
51
- reverse(): void;
52
- empty(): boolean;
53
- size(): number;
54
- has(obj: T): boolean;
55
- front(): T;
56
- back(): T;
57
- iterator_at(ind: number): ZNPNode<T> | null;
58
- at(ind: number): T | null;
59
- }
60
11
  declare module "./ZNPList" {
61
12
  interface ZNPList<T> {
62
13
  inlined_add: ZNPList<T>["add"];
@@ -71,95 +22,6 @@ declare module "./ZNPList" {
71
22
  }
72
23
  }
73
24
 
74
- /**
75
- * Core engine module — manages access to the nape namespace.
76
- *
77
- * Priority 20: nape-compiled.js has been fully eliminated. The nape namespace
78
- * is now built entirely in TypeScript via registerZPPClasses() in ZPPRegistry.ts.
79
- */
80
- /**
81
- * Returns the internal nape namespace object.
82
- *
83
- * Lazily initializes on first call so that side-effect imports (Config, Listener,
84
- * etc.) that call getNape() during ESM module evaluation always succeed, even
85
- * before the engine.ts module body has fully executed.
86
- *
87
- * @internal
88
- */
89
- declare function getNape(): any;
90
-
91
- /**
92
- * ZPP_Vec2 — Internal 2D vector AND intrusive linked list for the nape physics engine.
93
- *
94
- * Serves three roles simultaneously (Haxe ZNPList template expansion):
95
- * 1. 2D vector data: x, y coordinates
96
- * 2. Intrusive linked list container: add/remove/insert/pop (head via `next`)
97
- * 3. Pooled object with wrapper/validation pattern
98
- *
99
- * Converted from nape-compiled.js lines 83820–84273, 134996.
100
- */
101
-
102
- declare class ZPP_Vec2 {
103
- static zpp_pool: ZPP_Vec2 | null;
104
- static __name__: string[];
105
- static _nape: any;
106
- static _zpp: any;
107
- static _wrapFn: ((zpp: ZPP_Vec2) => Vec2) | null;
108
- x: number;
109
- y: number;
110
- next: ZPP_Vec2 | null;
111
- length: number;
112
- modified: boolean;
113
- pushmod: boolean;
114
- _inuse: boolean;
115
- weak: boolean;
116
- outer: any;
117
- _immutable: boolean;
118
- _isimmutable: (() => void) | null;
119
- _validate: (() => void) | null;
120
- _invalidate: ((self: ZPP_Vec2) => void) | null;
121
- /** Static factory with optional pooling and immutability. */
122
- static get(x: number, y: number, immutable?: boolean): ZPP_Vec2;
123
- validate(): void;
124
- invalidate(): void;
125
- immutable(): void;
126
- wrapper(): any;
127
- free(): void;
128
- alloc(): void;
129
- elem(): ZPP_Vec2;
130
- begin(): ZPP_Vec2 | null;
131
- setbegin(i: ZPP_Vec2 | null): void;
132
- add(o: ZPP_Vec2): ZPP_Vec2;
133
- inlined_add(o: ZPP_Vec2): ZPP_Vec2;
134
- addAll(x: ZPP_Vec2): void;
135
- insert(cur: ZPP_Vec2 | null, o: ZPP_Vec2): ZPP_Vec2;
136
- inlined_insert(cur: ZPP_Vec2 | null, o: ZPP_Vec2): ZPP_Vec2;
137
- pop(): void;
138
- inlined_pop(): void;
139
- pop_unsafe(): ZPP_Vec2;
140
- inlined_pop_unsafe(): ZPP_Vec2;
141
- remove(obj: ZPP_Vec2): void;
142
- try_remove(obj: ZPP_Vec2): boolean;
143
- inlined_remove(obj: ZPP_Vec2): void;
144
- inlined_try_remove(obj: ZPP_Vec2): boolean;
145
- erase(pre: ZPP_Vec2 | null): ZPP_Vec2 | null;
146
- inlined_erase(pre: ZPP_Vec2 | null): ZPP_Vec2 | null;
147
- splice(pre: ZPP_Vec2, n: number): ZPP_Vec2 | null;
148
- clear(): void;
149
- inlined_clear(): void;
150
- reverse(): void;
151
- empty(): boolean;
152
- size(): number;
153
- has(obj: ZPP_Vec2): boolean;
154
- inlined_has(obj: ZPP_Vec2): boolean;
155
- front(): ZPP_Vec2 | null;
156
- back(): ZPP_Vec2 | null;
157
- iterator_at(ind: number): ZPP_Vec2 | null;
158
- at(ind: number): ZPP_Vec2 | null;
159
- copy(): ZPP_Vec2;
160
- toString(): string;
161
- }
162
-
163
25
  /**
164
26
  * 2D vector used for positions, velocities, forces, and other 2D quantities.
165
27
  *
@@ -170,18 +32,6 @@ declare class ZPP_Vec2 {
170
32
  */
171
33
  declare class Vec2 {
172
34
  static __name__: string[];
173
- /** @internal The internal ZPP_Vec2 this wrapper owns. */
174
- zpp_inner: ZPP_Vec2;
175
- /** @internal Public Vec2 pool link. */
176
- zpp_pool: Vec2 | null;
177
- /** @internal Whether this Vec2 has been disposed. */
178
- zpp_disp: boolean;
179
- /**
180
- * Backward-compatible accessor — returns `this` so that compiled engine
181
- * code that receives `vec._inner` can still access `zpp_inner`.
182
- * @internal
183
- */
184
- get _inner(): NapeInner;
185
35
  /**
186
36
  * Creates a Vec2 with the given components. Defaults to (0, 0).
187
37
  *
@@ -189,25 +39,6 @@ declare class Vec2 {
189
39
  * @param y - The y component (default 0).
190
40
  */
191
41
  constructor(x?: number, y?: number);
192
- /** @internal Check that this Vec2 has not been disposed. */
193
- private _checkDisposed;
194
- /** @internal Check immutability. */
195
- private _checkImmutable;
196
- /** @internal Validate (lazy evaluation callback). */
197
- private _validate;
198
- /** @internal Invalidate (notify dependents). */
199
- private _invalidate;
200
- /** @internal Dispose a weak Vec2 argument after use. */
201
- private static _disposeWeak;
202
- /**
203
- * @internal Set x and y on zpp_inner with validation/invalidation.
204
- * Only invalidates if values actually changed.
205
- */
206
- private _setXY;
207
- /** @internal Get a Vec2 from the public pool or create a new one. */
208
- private static _poolGet;
209
- /** @internal Wrap a ZPP_Vec2 (or legacy compiled Vec2) with caching. */
210
- static _wrap(inner: any): Vec2;
211
42
  /**
212
43
  * Allocate a Vec2 from the public object pool. If `weak` is true, the vector
213
44
  * auto-disposes after a single API call.
@@ -434,31 +265,9 @@ declare class Vec2 {
434
265
  */
435
266
  toString(): string;
436
267
  }
437
- /** @internal Opaque handle for any Haxe-compiled nape object. */
268
+ /** Opaque handle for any nape internal object. */
438
269
  type NapeInner = any;
439
270
 
440
- /**
441
- * ZPP_Vec3 — Internal 3D vector for the nape physics engine.
442
- *
443
- * Simple x, y, z data container with optional validation callback.
444
- * Used internally for constraint anchor points and similar 3-component values.
445
- *
446
- * Converted from nape-compiled.js lines 83412–83434.
447
- */
448
- declare class ZPP_Vec3 {
449
- static __name__: string[];
450
- static _zpp: object | null;
451
- static _wrapFn: ((zpp: ZPP_Vec3) => any) | null;
452
- outer: object | null;
453
- x: number;
454
- y: number;
455
- z: number;
456
- immutable: boolean;
457
- _validate: (() => void) | null;
458
- validate(): void;
459
- wrapper(): any;
460
- }
461
-
462
271
  /**
463
272
  * 3D vector used for constraint impulses and other 3-component values.
464
273
  *
@@ -468,18 +277,6 @@ declare class ZPP_Vec3 {
468
277
  */
469
278
  declare class Vec3 {
470
279
  static __name__: string[];
471
- /** @internal The internal ZPP_Vec3 this wrapper owns. */
472
- zpp_inner: ZPP_Vec3;
473
- /** @internal Public Vec3 pool link. */
474
- zpp_pool: Vec3 | null;
475
- /** @internal Whether this Vec3 has been disposed. */
476
- zpp_disp: boolean;
477
- /**
478
- * Backward-compatible accessor — returns `this` so that compiled engine
479
- * code that receives `v3._inner` can still access `zpp_inner`.
480
- * @internal
481
- */
482
- get _inner(): NapeInner;
483
280
  /**
484
281
  * Create a Vec3 with the given components. Defaults to (0, 0, 0).
485
282
  * @param x - The x component.
@@ -487,12 +284,6 @@ declare class Vec3 {
487
284
  * @param z - The z component.
488
285
  */
489
286
  constructor(x?: number, y?: number, z?: number);
490
- /** @internal Check that this Vec3 has not been disposed. */
491
- private _checkDisposed;
492
- /** @internal Check immutability. */
493
- private _checkImmutable;
494
- /** @internal Wrap a ZPP_Vec3 (or legacy compiled Vec3) with caching. */
495
- static _wrap(inner: any): Vec3;
496
287
  /**
497
288
  * Allocate a Vec3 from the public object pool, or create a new one if the pool is empty.
498
289
  * @param x - Initial x component (default 0).
@@ -560,41 +351,6 @@ declare class Vec3 {
560
351
  toString(): string;
561
352
  }
562
353
 
563
- /**
564
- * ZPP_Mat23 — Internal 2×3 transformation matrix for the nape physics engine.
565
- *
566
- * Represents affine transforms with components [a, b, c, d, tx, ty].
567
- * Supports object pooling and lazy wrapper creation.
568
- *
569
- * Converted from nape-compiled.js lines 73495–73561, 133826.
570
- */
571
- declare class ZPP_Mat23 {
572
- static __name__: string[];
573
- static _nape: any;
574
- static _wrapFn: ((zpp: ZPP_Mat23) => any) | null;
575
- static zpp_pool: ZPP_Mat23 | null;
576
- outer: any;
577
- a: number;
578
- b: number;
579
- c: number;
580
- d: number;
581
- tx: number;
582
- ty: number;
583
- _invalidate: (() => void) | null;
584
- next: ZPP_Mat23 | null;
585
- /** Static factory with pooling. */
586
- static get(): ZPP_Mat23;
587
- /** Create an identity matrix from pool. */
588
- static identity(): ZPP_Mat23;
589
- /** Create a public wrapper, recycling any existing inner. */
590
- wrapper(): any;
591
- invalidate(): void;
592
- set(m: ZPP_Mat23): void;
593
- setas(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
594
- free(): void;
595
- alloc(): void;
596
- }
597
-
598
354
  /**
599
355
  * 2x3 affine transformation matrix [a b tx; c d ty].
600
356
  *
@@ -602,8 +358,6 @@ declare class ZPP_Mat23 {
602
358
  */
603
359
  declare class Mat23 {
604
360
  static __name__: string[];
605
- zpp_inner: ZPP_Mat23;
606
- get _inner(): NapeInner;
607
361
  /**
608
362
  * Create a Mat23 with the given components. Defaults to the identity matrix `[1 0 0; 0 1 0]`.
609
363
  * @param a - Component at row 0, col 0.
@@ -755,20 +509,6 @@ declare class Mat23 {
755
509
  toString(): string;
756
510
  }
757
511
 
758
- /**
759
- * ZPP_GeomPoly — Internal polygon geometry holder for the nape physics engine.
760
- *
761
- * Simple data container linking a public GeomPoly wrapper to its vertex list.
762
- *
763
- * Converted from nape-compiled.js lines 69554–69563.
764
- */
765
- declare class ZPP_GeomPoly {
766
- static __name__: string[];
767
- outer: object | null;
768
- vertices: any;
769
- constructor(outer?: object | null);
770
- }
771
-
772
512
  /**
773
513
  * Polygon winding order.
774
514
  *
@@ -798,34 +538,8 @@ declare class Winding {
798
538
  */
799
539
  declare class GeomPoly {
800
540
  static __name__: string[];
801
- zpp_inner: ZPP_GeomPoly;
802
- zpp_pool: GeomPoly | null;
803
- zpp_disp: boolean;
804
- get _inner(): any;
805
541
  constructor(vertices?: any);
806
542
  private _checkDisposed;
807
- /** @internal Create a ZPP_GeomVert from pool or new */
808
- private static _createVert;
809
- /** @internal Insert vertex after current head (push pattern) */
810
- private static _pushVert;
811
- /** @internal Insert vertex before current head (unshift pattern) */
812
- private static _unshiftVert;
813
- /** @internal Free a vertex: cleanup wrap + return to pool */
814
- private static _freeVert;
815
- /** @internal Remove head, new head = prev (pop direction) */
816
- private _popHead;
817
- /** @internal Remove head, new head = next (shift direction) */
818
- private _shiftHead;
819
- /** @internal Check if polygon is degenerate (< 3 vertices) */
820
- private _isDegenRing;
821
- /** @internal Iterate all vertices, calling fn for each */
822
- private _forEachVert;
823
- /** @internal Find extremal vertex (min/max of x or y) */
824
- private _extremalVert;
825
- /** @internal Add vertices from constructor/get argument */
826
- private static _addVertices;
827
- /** @internal After copying, dispose weak Vec2 inputs */
828
- private static _disposeWeakInputs;
829
543
  static get(vertices?: any): GeomPoly;
830
544
  empty(): boolean;
831
545
  size(): number;
@@ -867,71 +581,6 @@ declare class GeomPoly {
867
581
  toString(): string;
868
582
  }
869
583
 
870
- /**
871
- * ZPP_AABB — Internal axis-aligned bounding box for the nape physics engine.
872
- *
873
- * Stores min/max coordinates and provides intersection/combine/contain tests.
874
- * Lazily creates Vec2 wrappers for the min and max points.
875
- *
876
- * Converted from nape-compiled.js lines 63546–63965, 134951.
877
- */
878
- declare class ZPP_AABB {
879
- static zpp_pool: ZPP_AABB | null;
880
- static __name__: string[];
881
- static _nape: any;
882
- static _zpp: any;
883
- static _wrapFn: ((zpp: ZPP_AABB) => any) | null;
884
- _invalidate: ((self: ZPP_AABB) => void) | null;
885
- _validate: (() => void) | null;
886
- _immutable: boolean;
887
- outer: any;
888
- next: ZPP_AABB | null;
889
- minx: number;
890
- miny: number;
891
- maxx: number;
892
- maxy: number;
893
- wrap_min: any;
894
- wrap_max: any;
895
- /** Static factory with pooling. */
896
- static get(minx: number, miny: number, maxx: number, maxy: number): ZPP_AABB;
897
- validate(): void;
898
- invalidate(): void;
899
- wrapper(): any;
900
- alloc(): void;
901
- free(): void;
902
- copy(): ZPP_AABB;
903
- width(): number;
904
- height(): number;
905
- perimeter(): number;
906
- /** Helper: create a Vec2 wrapper from the compiled namespace pools. */
907
- private static _makeVec2Wrapper;
908
- getmin(): void;
909
- dom_min(): void;
910
- mod_min(min: {
911
- x: number;
912
- y: number;
913
- }): void;
914
- getmax(): void;
915
- dom_max(): void;
916
- mod_max(max: {
917
- x: number;
918
- y: number;
919
- }): void;
920
- intersectX(x: ZPP_AABB): boolean;
921
- intersectY(x: ZPP_AABB): boolean;
922
- intersect(x: ZPP_AABB): boolean;
923
- combine(x: ZPP_AABB): void;
924
- contains(x: ZPP_AABB): boolean;
925
- containsPoint(v: {
926
- x: number;
927
- y: number;
928
- }): boolean;
929
- setCombine(a: ZPP_AABB, b: ZPP_AABB): void;
930
- setExpand(a: ZPP_AABB, fatten: number): void;
931
- setExpandPoint(x: number, y: number): void;
932
- toString(): string;
933
- }
934
-
935
584
  /**
936
585
  * Axis-aligned bounding box defined by min/max corners or x/y/width/height.
937
586
  *
@@ -942,14 +591,6 @@ declare class ZPP_AABB {
942
591
  */
943
592
  declare class AABB {
944
593
  static __name__: string[];
945
- /** @internal The internal ZPP_AABB this wrapper owns. */
946
- zpp_inner: ZPP_AABB;
947
- /**
948
- * Backward-compatible accessor — returns `this` so that compiled engine
949
- * code that receives `aabb._inner` can still access `zpp_inner`.
950
- * @internal
951
- */
952
- get _inner(): NapeInner;
953
594
  /**
954
595
  * Create an AABB at position (x, y) with the given width and height. All
955
596
  * values default to 0.
@@ -960,8 +601,6 @@ declare class AABB {
960
601
  * @param height - The height of the box (default 0). Must be ≥ 0.
961
602
  */
962
603
  constructor(x?: number, y?: number, width?: number, height?: number);
963
- /** @internal Wrap a ZPP_AABB (or legacy compiled AABB) with caching. */
964
- static _wrap(inner: any): AABB;
965
604
  /** The x position of the left edge (minx). Setting shifts the box horizontally. */
966
605
  get x(): number;
967
606
  /** The x position of the left edge (minx). Setting shifts the box horizontally. */
@@ -1001,10 +640,6 @@ declare class AABB {
1001
640
  * @param max - A Vec2 whose components become the new (maxx, maxy).
1002
641
  */
1003
642
  set max(max: any);
1004
- /** @internal Assign source Vec2 values to target Vec2 wrapper. */
1005
- private _assignVec2;
1006
- /** @internal Dispose a weak Vec2 back to the pool. */
1007
- private _disposeVec2;
1008
643
  /**
1009
644
  * Return a new AABB with the same bounds.
1010
645
  *
@@ -1019,22 +654,6 @@ declare class AABB {
1019
654
  toString(): string;
1020
655
  }
1021
656
 
1022
- /**
1023
- * ZPP_MatMN — Internal M×N matrix for the nape physics engine.
1024
- *
1025
- * Variable-sized matrix stored as a flat array of m*n elements.
1026
- *
1027
- * Converted from nape-compiled.js lines 72949–72972.
1028
- */
1029
- declare class ZPP_MatMN {
1030
- static __name__: string[];
1031
- outer: object | null;
1032
- m: number;
1033
- n: number;
1034
- x: number[];
1035
- constructor(m: number, n: number);
1036
- }
1037
-
1038
657
  /**
1039
658
  * Variable-sized M×N matrix.
1040
659
  *
@@ -1042,15 +661,12 @@ declare class ZPP_MatMN {
1042
661
  */
1043
662
  declare class MatMN {
1044
663
  static __name__: string[];
1045
- zpp_inner: ZPP_MatMN;
1046
- get _inner(): NapeInner;
1047
664
  /**
1048
665
  * Create a zero-filled M×N matrix. Both dimensions must be ≥ 1.
1049
666
  * @param rows - Number of rows (must be ≥ 1).
1050
667
  * @param cols - Number of columns (must be ≥ 1).
1051
668
  */
1052
669
  constructor(rows: number, cols: number);
1053
- static _wrap(inner: ZPP_MatMN | MatMN | null): MatMN;
1054
670
  /** Number of rows. */
1055
671
  get rows(): number;
1056
672
  /** Number of columns. */
@@ -1113,51 +729,6 @@ declare class MarchingSquares {
1113
729
  static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: any): any;
1114
730
  }
1115
731
 
1116
- /**
1117
- * ZPP_Ray — Internal ray representation for the nape physics engine.
1118
- *
1119
- * Manages ray origin/direction with invalidation callbacks, plus ray-shape
1120
- * intersection methods (AABB, circle, polygon).
1121
- *
1122
- * Converted from nape-compiled.js lines 31239–33172, 65896.
1123
- */
1124
-
1125
- declare class ZPP_Ray {
1126
- static __name__: string[];
1127
- static internal: boolean;
1128
- zip_dir: boolean;
1129
- absnormaly: number;
1130
- absnormalx: number;
1131
- normaly: number;
1132
- normalx: number;
1133
- idiry: number;
1134
- idirx: number;
1135
- diry: number;
1136
- dirx: number;
1137
- originy: number;
1138
- originx: number;
1139
- userData: unknown;
1140
- maxdist: number;
1141
- direction: any;
1142
- origin: any;
1143
- constructor();
1144
- origin_invalidate(x: ZPP_Vec2): void;
1145
- direction_invalidate(x: ZPP_Vec2): void;
1146
- invalidate_dir(): void;
1147
- validate_dir(): void;
1148
- rayAABB(): ZPP_AABB;
1149
- aabbtest(a: ZPP_AABB): boolean;
1150
- aabbsect(a: ZPP_AABB): number;
1151
- private static _allocVec2;
1152
- private static _validateWorldCOM;
1153
- private _circleNormal;
1154
- private static _insertSorted;
1155
- circlesect(c: any, inner: boolean, mint: number): any;
1156
- circlesect2(c: any, inner: boolean, list: any): void;
1157
- polysect(p: any, inner: boolean, mint: number): any;
1158
- polysect2(p: any, inner: boolean, list: any): void;
1159
- }
1160
-
1161
732
  /**
1162
733
  * A ray for raycasting queries.
1163
734
  *
@@ -1165,10 +736,6 @@ declare class ZPP_Ray {
1165
736
  */
1166
737
  declare class Ray {
1167
738
  static __name__: string[];
1168
- /** Direct access to the extracted internal ZPP_Ray. */
1169
- zpp_inner: ZPP_Ray;
1170
- /** Backward-compat alias for compiled code. */
1171
- get _inner(): this;
1172
739
  /**
1173
740
  * Create a Ray from an origin point and a direction vector.
1174
741
  * Both must be non-null, non-disposed Vec2s.
@@ -1176,8 +743,6 @@ declare class Ray {
1176
743
  * @param direction - The direction vector (need not be unit length).
1177
744
  */
1178
745
  constructor(origin: Vec2, direction: Vec2);
1179
- /** @internal */
1180
- static _wrap(inner: ZPP_Ray | Ray | null): Ray;
1181
746
  /**
1182
747
  * Create a Ray from a line segment.
1183
748
  * The ray origin is `start`, direction is `end − start`, and `maxDistance` is the segment length.
@@ -1217,43 +782,6 @@ declare class Ray {
1217
782
  * @returns A deep copy of this Ray.
1218
783
  */
1219
784
  copy(): Ray;
1220
- /** @internal */ get_origin(): Vec2;
1221
- /** @internal */ set_origin(v: Vec2): Vec2;
1222
- /** @internal */ get_direction(): Vec2;
1223
- /** @internal */ set_direction(v: Vec2): Vec2;
1224
- /** @internal */ get_maxDistance(): number;
1225
- /** @internal */ set_maxDistance(v: number): number;
1226
- /** @internal */ get_userData(): Record<string, unknown>;
1227
- }
1228
-
1229
- /**
1230
- * ZPP_ConvexRayResult — Internal result object for ray-cast and convex-cast queries.
1231
- *
1232
- * Serves as the shared internal type for both RayResult and ConvexResult public wrappers.
1233
- * Uses separate pools for ray results vs convex results.
1234
- *
1235
- * Converted from nape-compiled.js lines 38897–39076, 86860–86862.
1236
- */
1237
- declare class ZPP_ConvexRayResult {
1238
- static __name__: string[];
1239
- static rayPool: ZPP_ConvexRayResult | null;
1240
- static convexPool: ZPP_ConvexRayResult | null;
1241
- static internal: boolean;
1242
- static _createRayResult: (() => any) | null;
1243
- static _createConvexResult: (() => any) | null;
1244
- normal: any;
1245
- shape: any;
1246
- convex: any;
1247
- position: any;
1248
- ray: any;
1249
- inner: boolean;
1250
- next: ZPP_ConvexRayResult | null;
1251
- toiDistance: number;
1252
- static getRay(normal: any, time: number, inner: boolean, shape: any): any;
1253
- static getConvex(normal: any, position: any, toiDistance: number, shape: any): any;
1254
- disposed(): void;
1255
- free(): void;
1256
- private static _disposeVec2;
1257
785
  }
1258
786
 
1259
787
  /**
@@ -1262,12 +790,6 @@ declare class ZPP_ConvexRayResult {
1262
790
  * Provides a modern iterable interface with `for...of`, `length`, `at()`, etc.
1263
791
  */
1264
792
  declare class NapeList<T> implements Iterable<T> {
1265
- /** @internal */
1266
- readonly _inner: NapeInner;
1267
- /** @internal Function that wraps a raw Haxe element into its TS counterpart. */
1268
- private readonly _wrap;
1269
- /** @internal */
1270
- constructor(inner: NapeInner, wrap: (inner: NapeInner) => T);
1271
793
  /** Number of elements in the list. */
1272
794
  get length(): number;
1273
795
  /** Get element at index. */
@@ -1309,43 +831,6 @@ declare class NapeList<T> implements Iterable<T> {
1309
831
  toString(): string;
1310
832
  }
1311
833
 
1312
- /**
1313
- * ZPP_InteractionGroup — Internal interaction group for the nape physics engine.
1314
- *
1315
- * Hierarchical groups that can override interaction filters. When two shapes
1316
- * share a common group with `ignore = true`, their interaction is suppressed.
1317
- *
1318
- * Converted from nape-compiled.js lines 63367–63463, 135330–135331.
1319
- */
1320
- declare class ZPP_InteractionGroup {
1321
- static SHAPE: number;
1322
- static BODY: number;
1323
- static __name__: string[];
1324
- static _zpp: any;
1325
- static _wrapFn: ((zpp: ZPP_InteractionGroup) => any) | null;
1326
- outer: any;
1327
- ignore: boolean;
1328
- group: ZPP_InteractionGroup | null;
1329
- groups: any;
1330
- wrap_groups: any;
1331
- interactors: any;
1332
- wrap_interactors: any;
1333
- depth: number;
1334
- constructor();
1335
- /** Set or change the parent group. */
1336
- setGroup(group: ZPP_InteractionGroup | null): void;
1337
- /** Wake all interactors and propagate to child groups. */
1338
- invalidate(force?: boolean): void;
1339
- /** Add a child group. */
1340
- addGroup(group: ZPP_InteractionGroup): void;
1341
- /** Remove a child group. */
1342
- remGroup(group: ZPP_InteractionGroup): void;
1343
- /** Register an interactor in this group. */
1344
- addInteractor(intx: any): void;
1345
- /** Unregister an interactor from this group. */
1346
- remInteractor(intx: any, flag?: number): void;
1347
- }
1348
-
1349
834
  /**
1350
835
  * Hierarchical interaction group for controlling interactions
1351
836
  * between sets of interactors.
@@ -1357,17 +842,7 @@ declare class ZPP_InteractionGroup {
1357
842
  */
1358
843
  declare class InteractionGroup {
1359
844
  static __name__: string[];
1360
- /** @internal The internal ZPP_InteractionGroup this wrapper owns. */
1361
- zpp_inner: ZPP_InteractionGroup;
1362
- /**
1363
- * Backward-compatible accessor — returns `this` so that compiled engine
1364
- * code that receives `group._inner` can still access `zpp_inner`.
1365
- * @internal
1366
- */
1367
- get _inner(): NapeInner;
1368
845
  constructor(ignore?: boolean);
1369
- /** @internal Wrap a ZPP_InteractionGroup (or legacy compiled InteractionGroup) with caching. */
1370
- static _wrap(inner: any): InteractionGroup;
1371
846
  get group(): InteractionGroup | null;
1372
847
  set group(value: InteractionGroup | null);
1373
848
  get ignore(): boolean;
@@ -1388,24 +863,6 @@ declare class InteractionGroup {
1388
863
  * via `zpp_inner_i` (no compiled prototype delegation).
1389
864
  */
1390
865
  declare class Interactor {
1391
- /** @internal – guards against direct instantiation (matches compiled zpp_internalAlloc pattern). */
1392
- static zpp_internalAlloc: boolean;
1393
- /**
1394
- * @internal ZPP_Interactor-compatible object set by subclass constructors.
1395
- * For fully modernized subclasses (Body, Compound): this is the ZPP_Body/ZPP_Compound.
1396
- * For thin wrappers (Circle, Polygon): this is copied from the compiled inner object.
1397
- */
1398
- zpp_inner_i: any;
1399
- /**
1400
- * @internal Backward-compatible accessor for compiled Shape/Circle/Polygon code.
1401
- * Thin wrappers set this to the compiled inner object; modernized subclasses set
1402
- * it to `this`. Shape-level methods still delegate through this.
1403
- */
1404
- readonly _inner: NapeInner;
1405
- /** @internal – only subclasses may construct. */
1406
- protected constructor();
1407
- /** @internal Wrap a compiled Interactor (Body/Shape/Compound) instance. */
1408
- static _wrap(inner: NapeInner): Interactor;
1409
866
  /** Unique numeric identifier for this interactor. */
1410
867
  get id(): number;
1411
868
  /** User-defined data storage object. */
@@ -1430,90 +887,6 @@ declare class Interactor {
1430
887
  toString(): string;
1431
888
  }
1432
889
 
1433
- /**
1434
- * ZPP_Compound — Internal compound representation for the nape physics engine.
1435
- *
1436
- * Hierarchical grouping of bodies, constraints, and other compounds.
1437
- * Extends ZPP_Interactor (extracted to ZPP_Interactor.ts — methods copied at init time).
1438
- *
1439
- * Converted from nape-compiled.js lines 55195–55521.
1440
- */
1441
- declare class ZPP_Compound {
1442
- static __name__: string[];
1443
- static __super__: any;
1444
- /**
1445
- * Namespace references, set by the compiled module after import.
1446
- * _nape = the `nape` public namespace (for wrapper creation in copy())
1447
- * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
1448
- */
1449
- static _nape: any;
1450
- static _zpp: any;
1451
- /**
1452
- * Wrapper factory callback, registered by the modernized Compound class.
1453
- * When set, wrapper() uses this instead of the compiled Compound constructor.
1454
- */
1455
- static _wrapFn: ((zpp: ZPP_Compound) => any) | null;
1456
- outer_i: any;
1457
- id: number;
1458
- userData: unknown;
1459
- ishape: any;
1460
- ibody: any;
1461
- icompound: any;
1462
- wrap_cbTypes: any;
1463
- cbSet: any;
1464
- cbTypes: any;
1465
- group: any;
1466
- cbsets: any;
1467
- outer: any;
1468
- bodies: any;
1469
- constraints: any;
1470
- compounds: any;
1471
- wrap_bodies: any;
1472
- wrap_constraints: any;
1473
- wrap_compounds: any;
1474
- depth: number;
1475
- compound: any;
1476
- space: any;
1477
- constructor();
1478
- __imutable_midstep(name: string): void;
1479
- addedToSpace(): void;
1480
- removedFromSpace(): void;
1481
- breakApart(): void;
1482
- private static _zppOf;
1483
- bodies_adder(x: any): boolean;
1484
- bodies_subber(x: any): void;
1485
- bodies_modifiable(): void;
1486
- constraints_adder(x: any): boolean;
1487
- constraints_subber(x: any): void;
1488
- constraints_modifiable(): void;
1489
- compounds_adder(x: any): boolean;
1490
- compounds_subber(x: any): void;
1491
- compounds_modifiable(): void;
1492
- copy(dict?: any[], todo?: any[]): any;
1493
- isShape: () => boolean;
1494
- isBody: () => boolean;
1495
- isCompound: () => boolean;
1496
- __iaddedToSpace: () => void;
1497
- __iremovedFromSpace: () => void;
1498
- wake: () => void;
1499
- getSpace: () => any;
1500
- setupcbTypes: () => void;
1501
- immutable_cbTypes: () => void;
1502
- wrap_cbTypes_subber: (pcb: any) => void;
1503
- wrap_cbTypes_adder: (cb: any) => boolean;
1504
- insert_cbtype: (cb: any) => void;
1505
- alloc_cbSet: () => void;
1506
- dealloc_cbSet: () => void;
1507
- immutable_midstep: (name: string) => void;
1508
- copyto: (ret: any) => void;
1509
- lookup_group: () => any;
1510
- /**
1511
- * Initialize prototype by copying ZPP_Interactor methods.
1512
- * Must be called after _zpp is set (during compiled module init).
1513
- */
1514
- static _init(): void;
1515
- }
1516
-
1517
890
  /**
1518
891
  * A compound physics object — a hierarchical grouping of Bodies, Constraints,
1519
892
  * and other Compounds.
@@ -1523,11 +896,7 @@ declare class ZPP_Compound {
1523
896
  declare class Compound extends Interactor {
1524
897
  static __name__: string[];
1525
898
  static __super__: typeof Interactor;
1526
- /** Direct access to the extracted internal ZPP_Compound. */
1527
- zpp_inner: ZPP_Compound;
1528
899
  constructor();
1529
- /** @internal */
1530
- static _wrap(inner: NapeInner): Compound;
1531
900
  /** Bodies in this compound. */
1532
901
  get bodies(): object;
1533
902
  /** Constraints in this compound. */
@@ -1559,88 +928,6 @@ declare class Compound extends Interactor {
1559
928
  toString(): string;
1560
929
  }
1561
930
 
1562
- /**
1563
- * ZPP_Constraint — Internal base class for all constraints / joints.
1564
- *
1565
- * Manages activation/deactivation, callback types, space integration,
1566
- * and provides stubs for solver methods overridden by joint subclasses.
1567
- *
1568
- * Converted from nape-compiled.js lines 21424–21827.
1569
- */
1570
- declare class ZPP_Constraint {
1571
- static __name__: string[];
1572
- /**
1573
- * Namespace references, set by the compiled module after import.
1574
- * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
1575
- * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
1576
- */
1577
- static _nape: any;
1578
- static _zpp: any;
1579
- outer: any;
1580
- id: number;
1581
- userData: any;
1582
- compound: any;
1583
- space: any;
1584
- active: boolean;
1585
- stiff: boolean;
1586
- frequency: number;
1587
- damping: number;
1588
- maxForce: number;
1589
- maxError: number;
1590
- breakUnderForce: boolean;
1591
- breakUnderError: boolean;
1592
- removeOnBreak: boolean;
1593
- component: any;
1594
- ignore: boolean;
1595
- __velocity: boolean;
1596
- cbTypes: any;
1597
- cbSet: any;
1598
- wrap_cbTypes: any;
1599
- pre_dt: number;
1600
- __class__: any;
1601
- constructor();
1602
- /**
1603
- * Initialise base constraint fields.
1604
- * Extracted into a separate method because compiled joint subclasses
1605
- * call `ZPP_Constraint.call(this)` — ES classes can't be invoked that
1606
- * way, so the compiled wrapper delegates to this method instead.
1607
- */
1608
- _initBase(): void;
1609
- clear(): void;
1610
- activeBodies(): void;
1611
- inactiveBodies(): void;
1612
- clearcache(): void;
1613
- validate(): void;
1614
- wake_connected(): void;
1615
- forest(): void;
1616
- broken(): void;
1617
- warmStart(): void;
1618
- draw(_g: any): void;
1619
- pair_exists(_id: any, _di: any): boolean;
1620
- preStep(_dt: number): boolean;
1621
- applyImpulseVel(): boolean;
1622
- applyImpulsePos(): boolean;
1623
- copy(_dict?: any, _todo?: any): any;
1624
- immutable_midstep(name: string): void;
1625
- setupcbTypes(): void;
1626
- immutable_cbTypes(): void;
1627
- wrap_cbTypes_subber(pcb: any): void;
1628
- wrap_cbTypes_adder(cb: any): boolean;
1629
- insert_cbtype(cb: any): void;
1630
- alloc_cbSet(): void;
1631
- dealloc_cbSet(): void;
1632
- activate(): void;
1633
- deactivate(): void;
1634
- addedToSpace(): void;
1635
- removedFromSpace(): void;
1636
- activeInSpace(): void;
1637
- inactiveOrOutSpace(): void;
1638
- wake(): void;
1639
- copyto(ret: any): void;
1640
- static _findRoot(comp: any): any;
1641
- static _unionComponents(a: any, b: any): void;
1642
- }
1643
-
1644
931
  /**
1645
932
  * Base class for all physics constraints (joints).
1646
933
  *
@@ -1661,21 +948,7 @@ declare class ZPP_Constraint {
1661
948
  */
1662
949
  declare class Constraint {
1663
950
  static __name__: string[];
1664
- static zpp_internalAlloc: boolean;
1665
- /** Direct access to the extracted internal ZPP_Constraint. */
1666
- zpp_inner: ZPP_Constraint;
1667
- /**
1668
- * Compiled joint reference for joint-specific methods (body1/body2/anchors etc.).
1669
- * Joint subclasses set this to the compiled joint instance until those joints
1670
- * are fully modernized. Also serves as backward compat for compiled code.
1671
- * @internal
1672
- */
1673
- _inner: any;
1674
951
  debugDraw: boolean;
1675
- /** @internal */
1676
- protected constructor();
1677
- /** @internal */
1678
- static _wrap(inner: any): Constraint;
1679
952
  /**
1680
953
  * The space this constraint belongs to, or `null` if not in a space.
1681
954
  *
@@ -1819,51 +1092,6 @@ declare class Constraint {
1819
1092
  toString(): string;
1820
1093
  }
1821
1094
 
1822
- /**
1823
- * ZPP_InteractionFilter — Internal interaction filter for the nape physics engine.
1824
- *
1825
- * Stores collision/sensor/fluid group and mask bitmasks that determine
1826
- * which shapes interact with each other.
1827
- *
1828
- * Converted from nape-compiled.js lines 63255–63366, 135329.
1829
- */
1830
- declare class ZPP_InteractionFilter {
1831
- static zpp_pool: ZPP_InteractionFilter | null;
1832
- static __name__: string[];
1833
- static _nape: any;
1834
- static _zpp: any;
1835
- static _wrapFn: ((zpp: ZPP_InteractionFilter) => any) | null;
1836
- collisionGroup: number;
1837
- collisionMask: number;
1838
- sensorGroup: number;
1839
- sensorMask: number;
1840
- fluidGroup: number;
1841
- fluidMask: number;
1842
- shapes: any;
1843
- wrap_shapes: any;
1844
- outer: any;
1845
- userData: any;
1846
- next: ZPP_InteractionFilter | null;
1847
- constructor();
1848
- /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
1849
- wrapper(): any;
1850
- free(): void;
1851
- alloc(): void;
1852
- feature_cons(): void;
1853
- addShape(shape: any): void;
1854
- remShape(shape: any): void;
1855
- /** Create a copy with object pooling. */
1856
- copy(): ZPP_InteractionFilter;
1857
- /** Test whether two filters allow collision between their shapes. */
1858
- shouldCollide(x: ZPP_InteractionFilter): boolean;
1859
- /** Test whether two filters allow sensor interaction. */
1860
- shouldSense(x: ZPP_InteractionFilter): boolean;
1861
- /** Test whether two filters allow fluid interaction. */
1862
- shouldFlow(x: ZPP_InteractionFilter): boolean;
1863
- /** Notify all shapes that the filter changed. */
1864
- invalidate(): void;
1865
- }
1866
-
1867
1095
  /**
1868
1096
  * Bit-mask based interaction filter for controlling which shapes
1869
1097
  * collide, sense, or interact as fluids.
@@ -1875,17 +1103,7 @@ declare class ZPP_InteractionFilter {
1875
1103
  */
1876
1104
  declare class InteractionFilter {
1877
1105
  static __name__: string[];
1878
- /** @internal The internal ZPP_InteractionFilter this wrapper owns. */
1879
- zpp_inner: ZPP_InteractionFilter;
1880
- /**
1881
- * Backward-compatible accessor — returns `this` so that compiled engine
1882
- * code that receives `filter._inner` can still access `zpp_inner`.
1883
- * @internal
1884
- */
1885
- get _inner(): NapeInner;
1886
1106
  constructor(collisionGroup?: number, collisionMask?: number, sensorGroup?: number, sensorMask?: number, fluidGroup?: number, fluidMask?: number);
1887
- /** @internal Wrap a ZPP_InteractionFilter (or legacy compiled InteractionFilter) with caching. */
1888
- static _wrap(inner: any): InteractionFilter;
1889
1107
  get collisionGroup(): number;
1890
1108
  set collisionGroup(value: number);
1891
1109
  get collisionMask(): number;
@@ -1907,202 +1125,6 @@ declare class InteractionFilter {
1907
1125
  toString(): string;
1908
1126
  }
1909
1127
 
1910
- /**
1911
- * ZPP_Callback — Internal callback data holder for the nape physics engine.
1912
- *
1913
- * Stores callback event information (listener, event type, interactors, etc.)
1914
- * and forms a doubly-linked list for callback queue management.
1915
- *
1916
- * Converted from nape-compiled.js lines 44587–44794, 133299–133300.
1917
- */
1918
- declare class ZPP_Callback {
1919
- static __name__: string[];
1920
- static _nape: any;
1921
- static _zpp: any;
1922
- static internal: boolean;
1923
- static zpp_pool: ZPP_Callback | null;
1924
- static _createBodyCb: (() => any) | null;
1925
- static _createConCb: (() => any) | null;
1926
- static _createIntCb: (() => any) | null;
1927
- static _createPreCb: (() => any) | null;
1928
- outer_body: any;
1929
- outer_con: any;
1930
- outer_int: any;
1931
- event: number;
1932
- listener: any;
1933
- space: any;
1934
- index: number;
1935
- next: ZPP_Callback | null;
1936
- prev: ZPP_Callback | null;
1937
- length: number;
1938
- int1: any;
1939
- int2: any;
1940
- set: any;
1941
- wrap_arbiters: any;
1942
- pre_arbiter: any;
1943
- pre_swapped: boolean;
1944
- body: any;
1945
- constraint: any;
1946
- wrapper_body(): any;
1947
- wrapper_con(): any;
1948
- wrapper_int(): any;
1949
- push(obj: ZPP_Callback): void;
1950
- push_rev(obj: ZPP_Callback): void;
1951
- pop(): ZPP_Callback;
1952
- pop_rev(): ZPP_Callback;
1953
- empty(): boolean;
1954
- clear(): void;
1955
- splice(o: ZPP_Callback): ZPP_Callback | null;
1956
- rotateL(): void;
1957
- rotateR(): void;
1958
- cycleNext(o: ZPP_Callback): ZPP_Callback | null;
1959
- cyclePrev(o: ZPP_Callback): ZPP_Callback | null;
1960
- at(i: number): ZPP_Callback;
1961
- rev_at(i: number): ZPP_Callback;
1962
- free(): void;
1963
- alloc(): void;
1964
- genarbs(): void;
1965
- }
1966
-
1967
- /**
1968
- * ZPP_Space -- Internal space implementation (core simulation loop).
1969
- * Converted from nape-compiled.js lines 30236-43690.
1970
- *
1971
- * This is the largest and most complex class in the engine (~13,450 lines).
1972
- * It handles integration, constraint solving, broadphase management,
1973
- * sleeping/waking, and callback dispatch.
1974
- */
1975
-
1976
- declare class ZPP_Space {
1977
- static __name__: string[];
1978
- static _zpp: any;
1979
- static _nape: any;
1980
- outer: any;
1981
- userData: any;
1982
- gravityx: any;
1983
- gravityy: any;
1984
- wrap_gravity: any;
1985
- bodies: any;
1986
- wrap_bodies: any;
1987
- compounds: any;
1988
- wrap_compounds: any;
1989
- constraints: any;
1990
- wrap_constraints: any;
1991
- kinematics: any;
1992
- bphase: any;
1993
- __static: any;
1994
- global_lin_drag: any;
1995
- global_ang_drag: any;
1996
- stamp: any;
1997
- midstep: any;
1998
- time: any;
1999
- sortcontacts: any;
2000
- c_arbiters_true: any;
2001
- c_arbiters_false: any;
2002
- f_arbiters: any;
2003
- s_arbiters: any;
2004
- wrap_arbiters: any;
2005
- live: any;
2006
- wrap_live: any;
2007
- live_constraints: any;
2008
- wrap_livecon: any;
2009
- staticsleep: any;
2010
- islands: any;
2011
- listeners: any;
2012
- wrap_listeners: any;
2013
- callbacks: any;
2014
- callbackset_list: any;
2015
- cbsets: any;
2016
- convexShapeList: any;
2017
- pre_dt: any;
2018
- toiEvents: any;
2019
- continuous: any;
2020
- precb: any;
2021
- prelisteners: any;
2022
- mrca1: any;
2023
- mrca2: any;
2024
- __class__: any;
2025
- constructor(gravity?: any, broadphase?: any);
2026
- getgravity(): void;
2027
- gravity_invalidate(x: any): void;
2028
- gravity_validate(): void;
2029
- clear(): void;
2030
- bodies_adder(x: any): boolean;
2031
- bodies_subber(x: any): void;
2032
- bodies_modifiable(): void;
2033
- compounds_adder(x: any): boolean;
2034
- compounds_subber(x: any): void;
2035
- compounds_modifiable(): void;
2036
- constraints_adder(x: any): boolean;
2037
- constraints_subber(x: any): void;
2038
- constraints_modifiable(): void;
2039
- listeners_adder(x: any): boolean;
2040
- listeners_subber(x: any): void;
2041
- listeners_modifiable(): void;
2042
- revoke_listener(x: any): void;
2043
- unrevoke_listener(x: any): void;
2044
- addListener(x: any): void;
2045
- remListener(x: any): void;
2046
- add_callbackset(cb: any): void;
2047
- remove_callbackset(cb: any): void;
2048
- transmitType(p: any, new_type: any): void;
2049
- added_shape(s: any, dontwake: any): void;
2050
- removed_shape(s: any, deleting: any): void;
2051
- addConstraint(con: any): void;
2052
- remConstraint(con: any): void;
2053
- addCompound(x: any): void;
2054
- remCompound(x: any): void;
2055
- addBody(body: any, flag?: any): void;
2056
- remBody(body: any, flag?: any): void;
2057
- shapesUnderPoint(x: any, y: any, filter: any, output: any): any;
2058
- bodiesUnderPoint(x: any, y: any, filter: any, output: any): any;
2059
- shapesInAABB(aabb: any, strict: any, cont: any, filter: any, output: any): any;
2060
- bodiesInAABB(aabb: any, strict: any, cont: any, filter: any, output: any): any;
2061
- shapesInCircle(pos: any, rad: any, cont: any, filter: any, output: any): any;
2062
- bodiesInCircle(pos: any, rad: any, cont: any, filter: any, output: any): any;
2063
- shapesInShape(shape: any, cont: any, filter: any, output: any): any;
2064
- bodiesInShape(shape: any, cont: any, filter: any, output: any): any;
2065
- rayCast(ray: any, inner: any, filter: any): any;
2066
- rayMultiCast(ray: any, inner: any, filter: any, output: any): any;
2067
- convexCast(shape: any, deltaTime: any, filter: any, dynamics: any): any;
2068
- prepareCast(s: any): void;
2069
- convexMultiCast(shape: any, deltaTime: any, filter: any, dynamics: any, output: any): any;
2070
- push_callback(i: any): ZPP_Callback;
2071
- step(deltaTime: any, velocityIterations: any, positionIterations: any): void;
2072
- continuousCollisions(deltaTime: any): void;
2073
- continuousEvent(s1: any, s2: any, stat: any, in_arb: any, _: any): any;
2074
- bodyCbWake(b: any): void;
2075
- bodyCbSleep(b: any): void;
2076
- constraintCbWake(con: any): void;
2077
- constraintCbSleep(con: any): void;
2078
- constraintCbBreak(con: any): void;
2079
- nullListenerType(cb1: any, cb2: any): void;
2080
- nullInteractorType(intx: any, me: any): void;
2081
- freshListenerType(cb1: any, cb2: any): void;
2082
- freshInteractorType(intx: any, me: any): void;
2083
- wakeCompound(x: any): void;
2084
- wakeIsland(i: any): void;
2085
- non_inlined_wake(o: any, fst?: any): void;
2086
- really_wake(o: any, fst?: any): void;
2087
- wake_constraint(con: any, fst?: any): boolean;
2088
- doForests(dt: any): void;
2089
- sleepArbiters(): void;
2090
- static_validation(body: any): void;
2091
- validation(): void;
2092
- updateVel(dt: any): void;
2093
- updatePos(dt: any): void;
2094
- presteparb(arb: any, dt: any, cont?: any): boolean;
2095
- prestep(dt: any): void;
2096
- warmStart(): void;
2097
- iterateVel(times: any): void;
2098
- iteratePos(times: any): void;
2099
- group_ignore(s1: any, s2: any): boolean;
2100
- interactionType(s1: any, s2: any, b1: any, b2: any): 0 | 1 | 2 | -1;
2101
- narrowPhase(s1: any, s2: any, stat: any, in_arb: any, continuous: any): any;
2102
- MRCA_chains(s1: any, s2: any): void;
2103
- inlined_MRCA_chains(s1: any, s2: any): void;
2104
- }
2105
-
2106
1128
  /**
2107
1129
  * Broadphase algorithm type for Space collision detection.
2108
1130
  *
@@ -2148,16 +1170,11 @@ declare class InteractionType {
2148
1170
  * The physics world. Add bodies, shapes, and constraints, then call `step()` each frame to advance the simulation.
2149
1171
  */
2150
1172
  declare class Space {
2151
- zpp_inner: ZPP_Space;
2152
1173
  /**
2153
1174
  * @param gravity - Initial gravity vector (default (0, 0)).
2154
1175
  * @param broadphase - Broadphase algorithm to use.
2155
1176
  */
2156
1177
  constructor(gravity?: Vec2, broadphase?: Broadphase);
2157
- /** @internal */
2158
- get _inner(): this;
2159
- /** @internal */
2160
- static _wrap(inner: NapeInner): Space;
2161
1178
  /** Arbitrary user data attached to this Space. */
2162
1179
  get userData(): Record<string, unknown>;
2163
1180
  /**
@@ -2410,271 +1427,6 @@ declare class BodyType {
2410
1427
  toString(): string;
2411
1428
  }
2412
1429
 
2413
- /**
2414
- * ZPP_Body — Internal body representation for the nape physics engine.
2415
- *
2416
- * Core physics body managing position, velocity, mass, inertia, shapes, and
2417
- * CCD (continuous collision detection) sweep integration.
2418
- * Extends ZPP_Interactor (still in compiled code — methods copied at init time).
2419
- *
2420
- * Converted from nape-compiled.js lines 52431–54547.
2421
- */
2422
-
2423
- declare class ZPP_Body {
2424
- static __name__: string[];
2425
- static __super__: any;
2426
- /**
2427
- * Namespace references, set by the compiled module after import.
2428
- * _nape = the `nape` public namespace
2429
- * _zpp = the `zpp_nape` internal namespace
2430
- */
2431
- static _nape: any;
2432
- static _zpp: any;
2433
- static types: any[];
2434
- static bodystack: any;
2435
- static bodyset: any;
2436
- static cur_graph_depth: number;
2437
- static bodysetlt(a: any, b: any): boolean;
2438
- static __static(): any;
2439
- outer_i: any;
2440
- id: number;
2441
- userData: any;
2442
- ishape: any;
2443
- ibody: any;
2444
- icompound: any;
2445
- wrap_cbTypes: any;
2446
- cbSet: any;
2447
- cbTypes: any;
2448
- group: any;
2449
- cbsets: any;
2450
- outer: any;
2451
- world: boolean;
2452
- type: number;
2453
- compound: any;
2454
- shapes: any;
2455
- wrap_shapes: any;
2456
- space: any;
2457
- arbiters: any;
2458
- wrap_arbiters: any;
2459
- constraints: any;
2460
- wrap_constraints: any;
2461
- component: any;
2462
- graph_depth: number;
2463
- sweepTime: number;
2464
- sweep_angvel: number;
2465
- sweepFrozen: boolean;
2466
- sweepRadius: number;
2467
- bullet: boolean;
2468
- bulletEnabled: boolean;
2469
- disableCCD: boolean;
2470
- pre_posx: number;
2471
- pre_posy: number;
2472
- posx: number;
2473
- posy: number;
2474
- wrap_pos: any;
2475
- velx: number;
2476
- vely: number;
2477
- wrap_vel: any;
2478
- forcex: number;
2479
- forcey: number;
2480
- wrap_force: any;
2481
- kinvelx: number;
2482
- kinvely: number;
2483
- wrap_kinvel: any;
2484
- svelx: number;
2485
- svely: number;
2486
- wrap_svel: any;
2487
- wrapcvel: any;
2488
- angvel: number;
2489
- torque: number;
2490
- kinangvel: number;
2491
- pre_rot: number;
2492
- rot: number;
2493
- axisx: number;
2494
- axisy: number;
2495
- zip_axis: boolean;
2496
- kinematicDelaySleep: boolean;
2497
- mass: number;
2498
- zip_mass: boolean;
2499
- massMode: number;
2500
- imass: number;
2501
- smass: number;
2502
- cmass: number;
2503
- nomove: boolean;
2504
- gravMass: number;
2505
- zip_gravMass: boolean;
2506
- gravMassMode: number;
2507
- gravMassScale: number;
2508
- zip_gravMassScale: boolean;
2509
- inertiaMode: number;
2510
- inertia: number;
2511
- zip_inertia: boolean;
2512
- cinertia: number;
2513
- iinertia: number;
2514
- sinertia: number;
2515
- norotate: boolean;
2516
- aabb: ZPP_AABB;
2517
- zip_aabb: boolean;
2518
- localCOMx: number;
2519
- localCOMy: number;
2520
- zip_localCOM: boolean;
2521
- worldCOMx: number;
2522
- worldCOMy: number;
2523
- zip_worldCOM: boolean;
2524
- wrap_localCOM: any;
2525
- wrap_worldCOM: any;
2526
- constructor();
2527
- isStatic(): boolean;
2528
- isDynamic(): boolean;
2529
- isKinematic(): boolean;
2530
- invalidate_type(): void;
2531
- invalidate_shapes(): void;
2532
- init_bodysetlist(): void;
2533
- connectedBodies_cont(b: any): void;
2534
- connectedBodies(depth: number, output: any): any;
2535
- interactingBodies(type: number, output: any): any;
2536
- atRest(dt: number): boolean;
2537
- refreshArbiters(): void;
2538
- sweepIntegrate(dt: number): void;
2539
- sweepValidate(s: any): void;
2540
- invalidate_pos(): void;
2541
- pos_invalidate(pos: any): void;
2542
- pos_validate(): void;
2543
- vel_invalidate(vel: any): void;
2544
- vel_validate(): void;
2545
- kinvel_invalidate(vel: any): void;
2546
- kinvel_validate(): void;
2547
- svel_invalidate(vel: any): void;
2548
- svel_validate(): void;
2549
- force_invalidate(force: any): void;
2550
- force_validate(): void;
2551
- private _setupVec2Wrapper;
2552
- setupPosition(): void;
2553
- setupVelocity(): void;
2554
- setupkinvel(): void;
2555
- setupsvel(): void;
2556
- setupForce(): void;
2557
- cvel_validate(): void;
2558
- setup_cvel(): void;
2559
- invalidate_rot(): void;
2560
- validate_axis(): void;
2561
- quick_validate_axis(): void;
2562
- delta_rot(dr: number): void;
2563
- invalidate_mass(): void;
2564
- validate_mass(): void;
2565
- invalidate_gravMass(): void;
2566
- validate_gravMass(): void;
2567
- invalidate_gravMassScale(): void;
2568
- validate_gravMassScale(): void;
2569
- invalidate_inertia(): void;
2570
- validate_inertia(): void;
2571
- invalidate_wake(): void;
2572
- invalidate_aabb(): void;
2573
- validate_aabb(): void;
2574
- private _validateCircleAABB;
2575
- private _validatePolygonAABB;
2576
- aabb_validate(): void;
2577
- invalidate_localCOM(): void;
2578
- invalidate_worldCOM(): void;
2579
- private _computePolygonLocalCOM;
2580
- validate_localCOM(): void;
2581
- validate_worldCOM(): void;
2582
- getlocalCOM(): void;
2583
- getworldCOM(): void;
2584
- __immutable_midstep(): void;
2585
- clear(): void;
2586
- shapes_adder(s: any): boolean;
2587
- shapes_subber(s: any): void;
2588
- shapes_invalidate(_param: any): void;
2589
- shapes_modifiable(): void;
2590
- addedToSpace(): void;
2591
- removedFromSpace(): void;
2592
- private _removeArbiterFromList;
2593
- copy(): any;
2594
- wake: () => void;
2595
- __iaddedToSpace: () => void;
2596
- __iremovedFromSpace: () => void;
2597
- immutable_midstep: (name: string) => void;
2598
- copyto: (ret: any) => void;
2599
- insert_cbtype: (cb: any) => void;
2600
- alloc_cbSet: () => void;
2601
- dealloc_cbSet: () => void;
2602
- setupcbTypes: () => void;
2603
- immutable_cbTypes: () => void;
2604
- wrap_cbTypes_subber: (pcb: any) => void;
2605
- wrap_cbTypes_adder: (cb: any) => void;
2606
- setGroup: (group: any) => void;
2607
- lookup_group: () => any;
2608
- getSpace: () => any;
2609
- isShape: () => boolean;
2610
- isBody: () => boolean;
2611
- isCompound: () => boolean;
2612
- static _initialized: boolean;
2613
- static _init(zpp: any, nape: any): void;
2614
- /**
2615
- * Initialize BodyType singleton enums. Called once from compiled factory.
2616
- */
2617
- static _initEnums(nape: any, ZPP_Flags: any): void;
2618
- }
2619
-
2620
- /**
2621
- * ZPP_Material — Internal material representation for the nape physics engine.
2622
- *
2623
- * Stores physical material properties (friction, elasticity, density) and
2624
- * manages the list of shapes that reference this material for invalidation.
2625
- *
2626
- * Converted from nape-compiled.js lines 87523–87601, 135477–135481.
2627
- */
2628
- declare class ZPP_Material {
2629
- static zpp_pool: ZPP_Material | null;
2630
- static WAKE: number;
2631
- static PROPS: number;
2632
- static ANGDRAG: number;
2633
- static ARBITERS: number;
2634
- static __name__: string[];
2635
- /**
2636
- * Namespace references, set by the compiled module after import.
2637
- * _nape = the `nape` public namespace (for wrapper creation)
2638
- * _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
2639
- */
2640
- static _nape: any;
2641
- static _zpp: any;
2642
- /**
2643
- * Wrapper factory callback, registered by the modernized Material class.
2644
- * When set, wrapper() uses this instead of creating a compiled Material.
2645
- */
2646
- static _wrapFn: ((zpp: ZPP_Material) => any) | null;
2647
- elasticity: number;
2648
- dynamicFriction: number;
2649
- staticFriction: number;
2650
- density: number;
2651
- rollingFriction: number;
2652
- shapes: any;
2653
- wrap_shapes: any;
2654
- outer: any;
2655
- userData: any;
2656
- next: ZPP_Material | null;
2657
- constructor();
2658
- /** Create/return the public nape.phys.Material wrapper for this internal object. */
2659
- wrapper(): any;
2660
- /** Called when this object is returned to the pool. */
2661
- free(): void;
2662
- /** Called when this object is taken from the pool. */
2663
- alloc(): void;
2664
- /** Initialize the shapes list (called during feature construction). */
2665
- feature_cons(): void;
2666
- /** Register a shape that uses this material. */
2667
- addShape(shape: any): void;
2668
- /** Unregister a shape that no longer uses this material. */
2669
- remShape(shape: any): void;
2670
- /** Create a copy with the same property values. */
2671
- copy(): ZPP_Material;
2672
- /** Copy all property values from another ZPP_Material. */
2673
- set(x: ZPP_Material): void;
2674
- /** Notify all shapes using this material that properties changed. */
2675
- invalidate(x: number): void;
2676
- }
2677
-
2678
1430
  /**
2679
1431
  * Physical material properties applied to shapes.
2680
1432
  *
@@ -2686,17 +1438,7 @@ declare class ZPP_Material {
2686
1438
  */
2687
1439
  declare class Material {
2688
1440
  static __name__: string[];
2689
- /** @internal The internal ZPP_Material this wrapper owns. */
2690
- zpp_inner: ZPP_Material;
2691
- /**
2692
- * Backward-compatible accessor — returns `this` so that compiled engine
2693
- * code that receives `material._inner` can still access `zpp_inner`.
2694
- * @internal
2695
- */
2696
- get _inner(): NapeInner;
2697
1441
  constructor(elasticity?: number, dynamicFriction?: number, staticFriction?: number, density?: number, rollingFriction?: number);
2698
- /** @internal Wrap a ZPP_Material (or legacy compiled Material) with caching. */
2699
- static _wrap(inner: any): Material;
2700
1442
  get elasticity(): number;
2701
1443
  set elasticity(value: number);
2702
1444
  get dynamicFriction(): number;
@@ -2718,50 +1460,6 @@ declare class Material {
2718
1460
  static sand(): Material;
2719
1461
  }
2720
1462
 
2721
- /**
2722
- * ZPP_FluidProperties — Internal fluid properties for the nape physics engine.
2723
- *
2724
- * Stores density, viscosity, and per-fluid gravity override.
2725
- * Manages the list of shapes that reference these properties for invalidation.
2726
- *
2727
- * Converted from nape-compiled.js lines 87335–87523, 135403.
2728
- */
2729
- declare class ZPP_FluidProperties {
2730
- static zpp_pool: ZPP_FluidProperties | null;
2731
- static __name__: string[];
2732
- static _nape: any;
2733
- static _zpp: any;
2734
- static _wrapFn: ((zpp: ZPP_FluidProperties) => any) | null;
2735
- viscosity: number;
2736
- density: number;
2737
- gravityx: number;
2738
- gravityy: number;
2739
- wrap_gravity: any;
2740
- shapes: any;
2741
- wrap_shapes: any;
2742
- outer: any;
2743
- userData: Record<string, unknown> | null;
2744
- next: ZPP_FluidProperties | null;
2745
- constructor();
2746
- /** Create/return the public nape.phys.FluidProperties wrapper. */
2747
- wrapper(): any;
2748
- free(): void;
2749
- alloc(): void;
2750
- feature_cons(): void;
2751
- addShape(shape: any): void;
2752
- remShape(shape: any): void;
2753
- /** Copy with object pooling. */
2754
- copy(): ZPP_FluidProperties;
2755
- /** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
2756
- gravity_invalidate(x: any): void;
2757
- /** Sync the gravity Vec2 wrapper with internal values. */
2758
- gravity_validate(): void;
2759
- /** Lazily create and return the gravity Vec2 wrapper. */
2760
- getgravity(): void;
2761
- /** Notify all shapes that fluid properties changed. */
2762
- invalidate(): void;
2763
- }
2764
-
2765
1463
  /**
2766
1464
  * Fluid properties for shapes that act as fluid regions.
2767
1465
  *
@@ -2773,17 +1471,7 @@ declare class ZPP_FluidProperties {
2773
1471
  */
2774
1472
  declare class FluidProperties {
2775
1473
  static __name__: string[];
2776
- /** @internal The internal ZPP_FluidProperties this wrapper owns. */
2777
- zpp_inner: ZPP_FluidProperties;
2778
- /**
2779
- * Backward-compatible accessor — returns `this` so that compiled engine
2780
- * code that receives `fluidProps._inner` can still access `zpp_inner`.
2781
- * @internal
2782
- */
2783
- get _inner(): NapeInner;
2784
1474
  constructor(density?: number, viscosity?: number);
2785
- /** @internal Wrap a ZPP_FluidProperties (or legacy compiled FluidProperties) with caching. */
2786
- static _wrap(inner: any): FluidProperties;
2787
1475
  get density(): number;
2788
1476
  set density(value: number);
2789
1477
  get viscosity(): number;
@@ -2852,8 +1540,6 @@ declare class GravMassMode {
2852
1540
  declare class Body extends Interactor {
2853
1541
  static __name__: string[];
2854
1542
  static __super__: typeof Interactor;
2855
- /** Direct access to the extracted internal ZPP_Body. */
2856
- zpp_inner: ZPP_Body;
2857
1543
  /** If true, this body is included in debug rendering. */
2858
1544
  debugDraw: boolean;
2859
1545
  /**
@@ -2861,8 +1547,6 @@ declare class Body extends Interactor {
2861
1547
  * @param position - Initial world-space position (defaults to origin).
2862
1548
  */
2863
1549
  constructor(type?: BodyType, position?: Vec2);
2864
- /** @internal */
2865
- static _wrap(inner: NapeInner): Body;
2866
1550
  /** The body type: DYNAMIC, STATIC, or KINEMATIC. Cannot be changed mid-step. */
2867
1551
  get type(): BodyType;
2868
1552
  set type(value: BodyType);
@@ -3218,10 +1902,6 @@ declare class ShapeType {
3218
1902
  * `new Circle(...)` or `Polygon.box(...)` etc.
3219
1903
  */
3220
1904
  declare class Shape extends Interactor {
3221
- /** @internal – shapes are created via Circle or Polygon constructors. */
3222
- protected constructor();
3223
- /** @internal */
3224
- static _wrap(inner: NapeInner): Shape;
3225
1905
  /** The shape type: CIRCLE or POLYGON. */
3226
1906
  get type(): ShapeType;
3227
1907
  /** Returns true if this is a Circle shape. */
@@ -3309,28 +1989,6 @@ declare class Shape extends Interactor {
3309
1989
  */
3310
1990
  copy(): Shape;
3311
1991
  toString(): string;
3312
- /** @internal */ get_type(): ShapeType;
3313
- /** @internal */ get_body(): Body;
3314
- /** @internal */ set_body(v: Body | null): void;
3315
- /** @internal */ get_castCircle(): Shape | null;
3316
- /** @internal */ get_castPolygon(): Shape | null;
3317
- /** @internal */ get_worldCOM(): Vec2;
3318
- /** @internal */ get_localCOM(): Vec2;
3319
- /** @internal */ set_localCOM(v: Vec2): void;
3320
- /** @internal */ get_area(): number;
3321
- /** @internal */ get_inertia(): number;
3322
- /** @internal */ get_angDrag(): number;
3323
- /** @internal */ get_material(): Material;
3324
- /** @internal */ set_material(v: Material): void;
3325
- /** @internal */ get_filter(): InteractionFilter;
3326
- /** @internal */ set_filter(v: InteractionFilter): void;
3327
- /** @internal */ get_fluidProperties(): FluidProperties;
3328
- /** @internal */ set_fluidProperties(v: FluidProperties): void;
3329
- /** @internal */ get_fluidEnabled(): boolean;
3330
- /** @internal */ set_fluidEnabled(v: boolean): void;
3331
- /** @internal */ get_sensorEnabled(): boolean;
3332
- /** @internal */ set_sensorEnabled(v: boolean): void;
3333
- /** @internal */ get_bounds(): AABB;
3334
1992
  /** Setup worldCOM lazy Vec2 wrapper */
3335
1993
  private _setupWorldCOM;
3336
1994
  }
@@ -3358,21 +2016,13 @@ interface CbTypeSet {
3358
2016
  */
3359
2017
  declare class ConvexResult {
3360
2018
  static __name__: string[];
3361
- /** @internal */
3362
- zpp_inner: ZPP_ConvexRayResult;
3363
- /** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
3364
- get _inner(): NapeInner;
3365
2019
  constructor();
3366
- /** @internal */
3367
- static _wrap(inner: ZPP_ConvexRayResult | ConvexResult | null): ConvexResult;
3368
2020
  get normal(): Vec2;
3369
2021
  get position(): Vec2;
3370
2022
  get toi(): number;
3371
2023
  get shape(): Shape;
3372
2024
  dispose(): void;
3373
2025
  toString(): string;
3374
- /** @internal */
3375
- private _disposed;
3376
2026
  }
3377
2027
 
3378
2028
  /**
@@ -3383,21 +2033,13 @@ declare class ConvexResult {
3383
2033
  */
3384
2034
  declare class RayResult {
3385
2035
  static __name__: string[];
3386
- /** @internal */
3387
- zpp_inner: ZPP_ConvexRayResult;
3388
- /** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
3389
- get _inner(): NapeInner;
3390
2036
  constructor();
3391
- /** @internal */
3392
- static _wrap(inner: ZPP_ConvexRayResult | RayResult | null): RayResult;
3393
2037
  get normal(): Vec2;
3394
2038
  get distance(): number;
3395
2039
  get inner(): boolean;
3396
2040
  get shape(): Shape;
3397
2041
  dispose(): void;
3398
2042
  toString(): string;
3399
- /** @internal */
3400
- private _disposed;
3401
2043
  }
3402
2044
 
3403
2045
  /**
@@ -3429,81 +2071,12 @@ declare class Geom {
3429
2071
  static contains(shape1: Shape, shape2: Shape): boolean;
3430
2072
  }
3431
2073
 
3432
- /**
3433
- * ZPP_Circle — Internal circle shape for the nape physics engine.
3434
- *
3435
- * Extends ZPP_Shape (type=0). Stores radius, provides AABB/area/inertia
3436
- * calculations, and handles localCOM wrappers for circles.
3437
- *
3438
- * Converted from nape-compiled.js lines 41496–41827.
3439
- */
3440
- declare class ZPP_Circle {
3441
- static __name__: string[];
3442
- static __super__: any;
3443
- static _nape: any;
3444
- static _zpp: any;
3445
- static _initialized: boolean;
3446
- radius: number;
3447
- outer_zn: any;
3448
- body: any;
3449
- type: number;
3450
- circle: any;
3451
- polygon: any;
3452
- aabb: any;
3453
- localCOMx: number;
3454
- localCOMy: number;
3455
- worldCOMx: number;
3456
- worldCOMy: number;
3457
- zip_localCOM: boolean;
3458
- zip_worldCOM: boolean;
3459
- zip_aabb: boolean;
3460
- zip_sweepRadius: boolean;
3461
- area: number;
3462
- inertia: number;
3463
- angDrag: number;
3464
- sweepCoef: number;
3465
- sweepRadius: number;
3466
- material: any;
3467
- filter: any;
3468
- wrap_localCOM: any;
3469
- outer: any;
3470
- outer_i: any;
3471
- space: any;
3472
- invalidate_area_inertia: () => void;
3473
- invalidate_angDrag: () => void;
3474
- invalidate_localCOM: () => void;
3475
- immutable_midstep: (name: string) => void;
3476
- setMaterial: (mat: any) => void;
3477
- setFilter: (filt: any) => void;
3478
- insert_cbtype: (cb: any) => void;
3479
- constructor();
3480
- static _init(): void;
3481
- __clear(): void;
3482
- invalidate_radius(): void;
3483
- localCOM_validate(): void;
3484
- localCOM_invalidate(x: any): void;
3485
- localCOM_immutable(): void;
3486
- setupLocalCOM(): void;
3487
- __validate_aabb(): void;
3488
- _force_validate_aabb(): void;
3489
- __validate_sweepRadius(): void;
3490
- __validate_area_inertia(): void;
3491
- __validate_angDrag(): void;
3492
- __scale(sx: number, sy: number): void;
3493
- __translate(x: number, y: number): void;
3494
- __rotate(x: number, y: number): void;
3495
- __transform(m: any): void;
3496
- __copy(): any;
3497
- }
3498
-
3499
2074
  /**
3500
2075
  * A circular physics shape. The simplest and most performant collision shape.
3501
2076
  */
3502
2077
  declare class Circle extends Shape {
3503
2078
  static __name__: string[];
3504
2079
  static __super__: any;
3505
- /** Direct access to the extracted internal ZPP_Circle. */
3506
- zpp_inner_zn: ZPP_Circle;
3507
2080
  /**
3508
2081
  * Create a circle with the given radius and optional local centre-of-mass offset.
3509
2082
  * @param radius - Circle radius (must be > 0).
@@ -3512,136 +2085,17 @@ declare class Circle extends Shape {
3512
2085
  * @param filter - InteractionFilter to assign (uses default if omitted).
3513
2086
  */
3514
2087
  constructor(radius?: number, localCOM?: Vec2, material?: Material, filter?: InteractionFilter);
3515
- /** @internal */
3516
- static _wrap(inner: NapeInner): Circle;
3517
2088
  /** The circle's radius. Must be > 0. */
3518
2089
  get radius(): number;
3519
2090
  set radius(value: number);
3520
2091
  }
3521
2092
 
3522
- /**
3523
- * ZPP_Polygon — Internal polygon shape for the nape physics engine.
3524
- *
3525
- * Extends ZPP_Shape (type=1). Manages vertex rings (local/world),
3526
- * edge lists, validation, and polygon-specific physics calculations.
3527
- *
3528
- * Converted from nape-compiled.js lines 42176–43786.
3529
- */
3530
- declare class ZPP_Polygon {
3531
- static __name__: string[];
3532
- static __super__: any;
3533
- static _nape: any;
3534
- static _zpp: any;
3535
- static _initialized: boolean;
3536
- outer_zn: any;
3537
- lverts: any;
3538
- wrap_lverts: any;
3539
- gverts: any;
3540
- wrap_gverts: any;
3541
- edges: any;
3542
- wrap_edges: any;
3543
- edgeCnt: number;
3544
- reverse_flag: boolean;
3545
- zip_lverts: boolean;
3546
- zip_laxi: boolean;
3547
- zip_gverts: boolean;
3548
- zip_gaxi: boolean;
3549
- zip_valid: boolean;
3550
- zip_sanitation: boolean;
3551
- validation: any;
3552
- body: any;
3553
- type: number;
3554
- circle: any;
3555
- polygon: any;
3556
- aabb: any;
3557
- localCOMx: number;
3558
- localCOMy: number;
3559
- worldCOMx: number;
3560
- worldCOMy: number;
3561
- zip_localCOM: boolean;
3562
- zip_worldCOM: boolean;
3563
- zip_aabb: boolean;
3564
- zip_sweepRadius: boolean;
3565
- zip_area_inertia: boolean;
3566
- zip_angDrag: boolean;
3567
- area: number;
3568
- inertia: number;
3569
- angDrag: number;
3570
- sweepCoef: number;
3571
- sweepRadius: number;
3572
- material: any;
3573
- filter: any;
3574
- wrap_localCOM: any;
3575
- outer: any;
3576
- outer_i: any;
3577
- invalidate_area_inertia: () => void;
3578
- invalidate_angDrag: () => void;
3579
- invalidate_localCOM: () => void;
3580
- invalidate_worldCOM: () => void;
3581
- validate_area_inertia: () => void;
3582
- validate_localCOM: () => void;
3583
- immutable_midstep: (name: string) => void;
3584
- wake: () => void;
3585
- setMaterial: (m: any) => void;
3586
- setFilter: (f: any) => void;
3587
- insert_cbtype: (cb: any) => void;
3588
- constructor();
3589
- static _init(): void;
3590
- __clear(): void;
3591
- lverts_pa_invalidate(_x: any): void;
3592
- lverts_pa_immutable(): void;
3593
- gverts_pa_validate(): void;
3594
- lverts_post_adder(x: any): void;
3595
- lverts_subber(x: any): void;
3596
- lverts_invalidate(_: any): void;
3597
- lverts_validate(): void;
3598
- lverts_modifiable(): void;
3599
- gverts_validate(): void;
3600
- edges_validate(): void;
3601
- getlverts(): void;
3602
- getgverts(): void;
3603
- getedges(): void;
3604
- invalidate_lverts(): void;
3605
- invalidate_laxi(): void;
3606
- invalidate_gverts(): void;
3607
- invalidate_gaxi(): void;
3608
- validate_lverts(): void;
3609
- validate_laxi(): void;
3610
- validate_gverts(): void;
3611
- validate_gaxi(): void;
3612
- /** Internal helper: recompute world vertex positions from local verts + body transform */
3613
- private _validateGverts;
3614
- cleanup_lvert(x: any): void;
3615
- splice_collinear(): void;
3616
- splice_collinear_real(): void;
3617
- reverse_vertices(): void;
3618
- valid(): any;
3619
- /** Helper: check if two edges (u1→v1) and (a→b) do NOT intersect */
3620
- private _checkNoIntersection;
3621
- __validate_aabb(): void;
3622
- _force_validate_aabb(): void;
3623
- __validate_sweepRadius(): void;
3624
- __validate_area_inertia(): void;
3625
- __validate_angDrag(): void;
3626
- __validate_localCOM(): void;
3627
- localCOM_validate(): void;
3628
- localCOM_invalidate(x: any): void;
3629
- setupLocalCOM(): void;
3630
- __translate(dx: number, dy: number): void;
3631
- __scale(sx: number, sy: number): void;
3632
- __rotate(ax: number, ay: number): void;
3633
- __transform(mat: any): void;
3634
- __copy(): any;
3635
- }
3636
-
3637
2093
  /**
3638
2094
  * A convex polygon physics shape.
3639
2095
  */
3640
2096
  declare class Polygon extends Shape {
3641
2097
  static __name__: string[];
3642
2098
  static __super__: any;
3643
- /** Direct access to the extracted internal ZPP_Polygon. */
3644
- zpp_inner_zn: ZPP_Polygon;
3645
2099
  /**
3646
2100
  * Create a Polygon from a list of Vec2 vertices. Vertices must form a convex polygon
3647
2101
  * in counter-clockwise order.
@@ -3650,8 +2104,6 @@ declare class Polygon extends Shape {
3650
2104
  * @param filter - InteractionFilter to assign (uses default if omitted).
3651
2105
  */
3652
2106
  constructor(localVerts?: Vec2[] | any, material?: Material, filter?: InteractionFilter);
3653
- /** @internal */
3654
- static _wrap(inner: NapeInner): Polygon;
3655
2107
  /**
3656
2108
  * Create an axis-aligned rectangle at the given position.
3657
2109
  * @param x - Left edge x coordinate.
@@ -3692,52 +2144,6 @@ declare class Polygon extends Shape {
3692
2144
  * @returns A validation result string from the underlying ZPP_Polygon.
3693
2145
  */
3694
2146
  validity(): any;
3695
- /** @internal */ get_localVerts(): any;
3696
- /** @internal */ get_worldVerts(): any;
3697
- /** @internal */ get_edges(): any;
3698
- }
3699
-
3700
- /**
3701
- * ZPP_Edge — Internal edge representation for polygon shapes.
3702
- *
3703
- * Each edge stores local/world normal, projection values, and vertex references.
3704
- * Edges are pooled and belong to a ZPP_Polygon.
3705
- *
3706
- * Converted from nape-compiled.js lines 41828–42175.
3707
- */
3708
- declare class ZPP_Edge {
3709
- static __name__: string[];
3710
- static zpp_pool: ZPP_Edge | null;
3711
- static internal: boolean;
3712
- static _nape: any;
3713
- static _zpp: any;
3714
- static _wrapFn: ((zpp: ZPP_Edge) => any) | null;
3715
- next: ZPP_Edge | null;
3716
- polygon: any;
3717
- outer: any;
3718
- lnormx: number;
3719
- lnormy: number;
3720
- wrap_lnorm: any;
3721
- gnormx: number;
3722
- gnormy: number;
3723
- wrap_gnorm: any;
3724
- length: number;
3725
- lprojection: number;
3726
- gprojection: number;
3727
- lp0: any;
3728
- gp0: any;
3729
- lp1: any;
3730
- gp1: any;
3731
- tp0: number;
3732
- tp1: number;
3733
- constructor();
3734
- free(): void;
3735
- alloc(): void;
3736
- wrapper(): any;
3737
- lnorm_validate(): void;
3738
- gnorm_validate(): void;
3739
- getlnorm(): void;
3740
- getgnorm(): void;
3741
2147
  }
3742
2148
 
3743
2149
  /**
@@ -3750,11 +2156,7 @@ declare class ZPP_Edge {
3750
2156
  */
3751
2157
  declare class Edge {
3752
2158
  static __name__: string[];
3753
- /** Direct access to the internal ZPP_Edge. */
3754
- zpp_inner: ZPP_Edge;
3755
2159
  constructor();
3756
- /** @internal */
3757
- static _wrap(inner: ZPP_Edge | Edge | null | undefined): Edge;
3758
2160
  /** Parent polygon. */
3759
2161
  get polygon(): Polygon;
3760
2162
  /** Local-space normal vector (immutable Vec2). */
@@ -3821,71 +2223,6 @@ declare class ArbiterType {
3821
2223
  toString(): string;
3822
2224
  }
3823
2225
 
3824
- /**
3825
- * ZPP_Arbiter — Internal arbiter base class for the nape physics engine.
3826
- *
3827
- * Represents an interaction (collision, fluid, or sensor) between two shapes.
3828
- * Manages body arbiter lists, pooled wrapper creation, and state tracking.
3829
- * Subclassed by ZPP_ColArbiter, ZPP_FluidArbiter, and ZPP_SensorArbiter.
3830
- *
3831
- * Converted from nape-compiled.js lines 29044–29362, 80738–80766.
3832
- */
3833
- declare class ZPP_Arbiter {
3834
- static __name__: string[];
3835
- static _nape: any;
3836
- static _zpp: any;
3837
- static internal: boolean;
3838
- static _createColArb: (() => any) | null;
3839
- static _createFluidArb: (() => any) | null;
3840
- static COL: number;
3841
- static FLUID: number;
3842
- static SENSOR: number;
3843
- static types: any[];
3844
- /**
3845
- * Initialize ArbiterType singleton enums. Called once from compiled factory.
3846
- */
3847
- static _initEnums(nape: any, ZPP_Flags: any): void;
3848
- outer: any;
3849
- hnext: ZPP_Arbiter | null;
3850
- id: number;
3851
- di: number;
3852
- stamp: number;
3853
- up_stamp: number;
3854
- sleep_stamp: number;
3855
- endGenerated: number;
3856
- active: boolean;
3857
- cleared: boolean;
3858
- sleeping: boolean;
3859
- present: number;
3860
- intchange: boolean;
3861
- presentable: boolean;
3862
- continuous: boolean;
3863
- fresh: boolean;
3864
- immState: number;
3865
- invalidated: boolean;
3866
- b1: any;
3867
- b2: any;
3868
- ws1: any;
3869
- ws2: any;
3870
- pair: any;
3871
- type: number;
3872
- colarb: any;
3873
- fluidarb: any;
3874
- sensorarb: any;
3875
- constructor();
3876
- wrapper(): any;
3877
- inactiveme(): boolean;
3878
- acting(): boolean;
3879
- swap_features(): void;
3880
- lazyRetire(s: any, b: any): void;
3881
- sup_assign(s1: any, s2: any, id: number, di: number): void;
3882
- sup_retire(): void;
3883
- /** Remove this arbiter from a ZNPList_ZPP_Arbiter */
3884
- static _removeFromArbiterList(list: any, arb: ZPP_Arbiter, zpp: any): void;
3885
- /** Add this arbiter to a ZNPList_ZPP_Arbiter */
3886
- static _addToArbiterList(list: any, arb: ZPP_Arbiter, zpp: any): void;
3887
- }
3888
-
3889
2226
  /**
3890
2227
  * An arbiter representing a physical collision between two solid shapes.
3891
2228
  *
@@ -3970,10 +2307,6 @@ declare class CollisionArbiter extends Arbiter {
3970
2307
  * @param freshOnly - Only include new contact points. Default `false`.
3971
2308
  */
3972
2309
  rollingImpulse(body?: Body | null, freshOnly?: boolean): number;
3973
- /** @internal Throw if not in pre-handler mutable window. */
3974
- private _mutableCheck;
3975
- /** @internal Accumulate impulse from contacts. */
3976
- private _accumulateImpulse;
3977
2310
  }
3978
2311
 
3979
2312
  /**
@@ -4066,10 +2399,6 @@ declare class PreFlag {
4066
2399
  */
4067
2400
  declare class Arbiter {
4068
2401
  static __name__: string[];
4069
- /** @internal */
4070
- zpp_inner: ZPP_Arbiter;
4071
- /** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
4072
- get _inner(): NapeInner;
4073
2402
  constructor();
4074
2403
  /**
4075
2404
  * Whether both interacting bodies are currently sleeping.
@@ -4114,147 +2443,6 @@ declare class Arbiter {
4114
2443
  */
4115
2444
  totalImpulse(body?: Body | null, _freshOnly?: boolean): Vec3;
4116
2445
  toString(): string;
4117
- /** @internal */
4118
- protected _activeCheck(): void;
4119
- /** @internal */
4120
- protected _checkBody(body: Body): void;
4121
- }
4122
-
4123
- /**
4124
- * ZPP_IContact — Internal impulse/mass-matrix data for a contact point.
4125
- *
4126
- * Stores relative positions (r1, r2), mass matrices (nMass, tMass),
4127
- * accumulated impulses (jnAcc, jtAcc), and friction/bounce coefficients.
4128
- * Also acts as a linked list node/container (Haxe ZNPList pattern).
4129
- *
4130
- * Converted from nape-compiled.js lines 32346–32733.
4131
- */
4132
- declare class ZPP_IContact {
4133
- static __name__: string[];
4134
- length: number;
4135
- pushmod: boolean;
4136
- modified: boolean;
4137
- _inuse: boolean;
4138
- next: ZPP_IContact | null;
4139
- r1x: number;
4140
- r1y: number;
4141
- r2x: number;
4142
- r2y: number;
4143
- nMass: number;
4144
- tMass: number;
4145
- bounce: number;
4146
- friction: number;
4147
- jnAcc: number;
4148
- jtAcc: number;
4149
- lr1x: number;
4150
- lr1y: number;
4151
- lr2x: number;
4152
- lr2y: number;
4153
- elem(): this;
4154
- begin(): ZPP_IContact | null;
4155
- setbegin(i: ZPP_IContact | null): void;
4156
- add(o: ZPP_IContact): ZPP_IContact;
4157
- inlined_add(o: ZPP_IContact): ZPP_IContact;
4158
- addAll(x: ZPP_IContact): void;
4159
- insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
4160
- inlined_insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
4161
- pop(): void;
4162
- inlined_pop(): void;
4163
- pop_unsafe(): ZPP_IContact;
4164
- inlined_pop_unsafe(): ZPP_IContact;
4165
- remove(obj: ZPP_IContact): void;
4166
- try_remove(obj: ZPP_IContact): boolean;
4167
- inlined_remove(obj: ZPP_IContact): void;
4168
- inlined_try_remove(obj: ZPP_IContact): boolean;
4169
- erase(pre: ZPP_IContact | null): ZPP_IContact | null;
4170
- inlined_erase(pre: ZPP_IContact | null): ZPP_IContact | null;
4171
- splice(pre: ZPP_IContact, n: number): ZPP_IContact | null;
4172
- clear(): void;
4173
- inlined_clear(): void;
4174
- reverse(): void;
4175
- empty(): boolean;
4176
- size(): number;
4177
- has(obj: ZPP_IContact): boolean;
4178
- inlined_has(obj: ZPP_IContact): boolean;
4179
- front(): ZPP_IContact | null;
4180
- back(): ZPP_IContact | null;
4181
- iterator_at(ind: number): ZPP_IContact | null;
4182
- at(ind: number): ZPP_IContact | null;
4183
- }
4184
-
4185
- /**
4186
- * ZPP_Contact — Internal contact point representation for the nape physics engine.
4187
- *
4188
- * Stores contact point data (position, distance, hash, stamp, etc.) and
4189
- * manages a lazy Vec2 position wrapper. Also acts as a linked list
4190
- * node/container (Haxe ZNPList pattern). Each contact holds a reference to
4191
- * a ZPP_IContact for impulse/mass data.
4192
- *
4193
- * Converted from nape-compiled.js lines 31853–32345, 81644–81645.
4194
- */
4195
-
4196
- declare class ZPP_Contact {
4197
- static __name__: string[];
4198
- static _nape: any;
4199
- static _zpp: any;
4200
- static zpp_pool: ZPP_Contact | null;
4201
- static internal: boolean;
4202
- static _wrapFn: ((zpp: ZPP_Contact) => any) | null;
4203
- outer: any;
4204
- px: number;
4205
- py: number;
4206
- wrap_position: any;
4207
- arbiter: any;
4208
- inner: ZPP_IContact;
4209
- active: boolean;
4210
- posOnly: boolean;
4211
- stamp: number;
4212
- hash: number;
4213
- fresh: boolean;
4214
- dist: number;
4215
- elasticity: number;
4216
- length: number;
4217
- pushmod: boolean;
4218
- modified: boolean;
4219
- _inuse: boolean;
4220
- next: ZPP_Contact | null;
4221
- constructor();
4222
- wrapper(): any;
4223
- position_validate(): void;
4224
- getposition(): void;
4225
- inactiveme(): boolean;
4226
- free(): void;
4227
- alloc(): void;
4228
- elem(): this;
4229
- begin(): ZPP_Contact | null;
4230
- setbegin(i: ZPP_Contact | null): void;
4231
- add(o: ZPP_Contact): ZPP_Contact;
4232
- inlined_add(o: ZPP_Contact): ZPP_Contact;
4233
- addAll(x: ZPP_Contact): void;
4234
- insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
4235
- inlined_insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
4236
- pop(): void;
4237
- inlined_pop(): void;
4238
- pop_unsafe(): ZPP_Contact;
4239
- inlined_pop_unsafe(): ZPP_Contact;
4240
- remove(obj: ZPP_Contact): void;
4241
- try_remove(obj: ZPP_Contact): boolean;
4242
- inlined_remove(obj: ZPP_Contact): void;
4243
- inlined_try_remove(obj: ZPP_Contact): boolean;
4244
- erase(pre: ZPP_Contact | null): ZPP_Contact | null;
4245
- inlined_erase(pre: ZPP_Contact | null): ZPP_Contact | null;
4246
- splice(pre: ZPP_Contact, n: number): ZPP_Contact | null;
4247
- clear(): void;
4248
- inlined_clear(): void;
4249
- reverse(): void;
4250
- empty(): boolean;
4251
- size(): number;
4252
- has(obj: ZPP_Contact): boolean;
4253
- inlined_has(obj: ZPP_Contact): boolean;
4254
- front(): ZPP_Contact | null;
4255
- back(): ZPP_Contact | null;
4256
- iterator_at(ind: number): ZPP_Contact | null;
4257
- at(ind: number): ZPP_Contact | null;
4258
2446
  }
4259
2447
 
4260
2448
  /**
@@ -4267,10 +2455,6 @@ declare class ZPP_Contact {
4267
2455
  */
4268
2456
  declare class Contact {
4269
2457
  static __name__: string[];
4270
- /** @internal Direct typed access to the extracted ZPP_Contact. */
4271
- zpp_inner: ZPP_Contact;
4272
- /** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
4273
- get _inner(): NapeInner;
4274
2458
  constructor();
4275
2459
  /** The collision arbiter this contact belongs to, or null. */
4276
2460
  get arbiter(): CollisionArbiter | null;
@@ -4307,10 +2491,6 @@ declare class Contact {
4307
2491
  */
4308
2492
  totalImpulse(body?: Body | null): Vec3;
4309
2493
  toString(): string;
4310
- /** @internal */
4311
- private _inactiveCheck;
4312
- /** @internal */
4313
- private _checkBody;
4314
2494
  }
4315
2495
 
4316
2496
  /**
@@ -4355,293 +2535,6 @@ declare class CbEvent {
4355
2535
  toString(): string;
4356
2536
  }
4357
2537
 
4358
- /**
4359
- * ZPP_Listener — Internal listener base class for the nape physics engine.
4360
- *
4361
- * Base class for ZPP_BodyListener, ZPP_ConstraintListener, and
4362
- * ZPP_InteractionListener. Holds common properties (space, precedence,
4363
- * event type, listener type) and provides stub methods for subclass override.
4364
- *
4365
- * Converted from nape-compiled.js lines 27259–27304, 112053–112139.
4366
- */
4367
- declare class ZPP_Listener {
4368
- static __name__: string[];
4369
- static _nape: any;
4370
- static _zpp: any;
4371
- static internal: boolean;
4372
- static types: any[];
4373
- static events: any[];
4374
- space: any;
4375
- interaction: any;
4376
- constraint: any;
4377
- body: any;
4378
- precedence: number;
4379
- event: number;
4380
- type: number;
4381
- id: number;
4382
- outer: any;
4383
- constructor();
4384
- /** Sort comparator: higher precedence first, then by id descending. */
4385
- static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
4386
- swapEvent(_event?: number): void;
4387
- invalidate_precedence(): void;
4388
- addedToSpace(): void;
4389
- removedFromSpace(): void;
4390
- /**
4391
- * Initialize singleton enum arrays. Called once from compiled factory after
4392
- * nape.callbacks.ListenerType and nape.callbacks.CbEvent stubs exist.
4393
- */
4394
- static _initEnums(nape: any, ZPP_Flags: any): void;
4395
- }
4396
-
4397
- /**
4398
- * ZPP_BodyListener — Internal body listener for the nape physics engine.
4399
- *
4400
- * Manages body event listeners (WAKE/SLEEP) with priority-ordered insertion
4401
- * into CbType listener lists. Handles option changes and re-registration.
4402
- *
4403
- * Converted from nape-compiled.js lines 27305–27497.
4404
- */
4405
-
4406
- declare class ZPP_BodyListener extends ZPP_Listener {
4407
- static __name__: string[];
4408
- handler: any;
4409
- options: any;
4410
- outer_zn: any;
4411
- constructor(options: any, event: number, handler: any);
4412
- immutable_options(): void;
4413
- addedToSpace(): void;
4414
- removedFromSpace(): void;
4415
- cbtype_change(cb: any, included: boolean, added: boolean): void;
4416
- invalidate_precedence(): void;
4417
- swapEvent(newev: number): void;
4418
- }
4419
-
4420
- /**
4421
- * ZPP_ConstraintListener — Internal constraint listener for the nape physics engine.
4422
- *
4423
- * Manages constraint event listeners (WAKE/SLEEP/BREAK) with priority-ordered
4424
- * insertion into CbType listener lists.
4425
- *
4426
- * Converted from nape-compiled.js lines 27498–27694.
4427
- */
4428
-
4429
- declare class ZPP_ConstraintListener extends ZPP_Listener {
4430
- static __name__: string[];
4431
- handler: any;
4432
- options: any;
4433
- outer_zn: any;
4434
- constructor(options: any, event: number, handler: any);
4435
- immutable_options(): void;
4436
- addedToSpace(): void;
4437
- removedFromSpace(): void;
4438
- cbtype_change(cb: any, included: boolean, added: boolean): void;
4439
- invalidate_precedence(): void;
4440
- swapEvent(newev: number): void;
4441
- }
4442
-
4443
- /**
4444
- * ZPP_CbSet — Internal callback set for the nape physics engine.
4445
- *
4446
- * Groups callback types together for efficient listener matching.
4447
- * Maintains lazily-validated lists of interaction, body, and constraint listeners.
4448
- * Tracks interactors and constraints that belong to this set.
4449
- *
4450
- * Converted from nape-compiled.js lines 44594–45134, 132797.
4451
- */
4452
-
4453
- declare class ZPP_CbSet {
4454
- static __name__: string[];
4455
- static _zpp: any;
4456
- static zpp_pool: ZPP_CbSet | null;
4457
- cbTypes: ZNPList<ZPP_CbType>;
4458
- count: number;
4459
- next: ZPP_CbSet | null;
4460
- id: number;
4461
- manager: any;
4462
- cbpairs: any;
4463
- listeners: ZNPList<ZPP_InteractionListener>;
4464
- zip_listeners: boolean;
4465
- bodylisteners: ZNPList<ZPP_BodyListener>;
4466
- zip_bodylisteners: boolean;
4467
- conlisteners: ZNPList<ZPP_ConstraintListener>;
4468
- zip_conlisteners: boolean;
4469
- interactors: any;
4470
- wrap_interactors: any;
4471
- constraints: any;
4472
- wrap_constraints: any;
4473
- constructor();
4474
- /** Lexicographic compare by cbTypes ids. */
4475
- static setlt(a: ZPP_CbSet, b: ZPP_CbSet): boolean;
4476
- /** Factory with pooling. Populates cbTypes from given list. */
4477
- static get(cbTypes: any): ZPP_CbSet;
4478
- /** Check if a listener is compatible with sets a and b. */
4479
- static compatible(i: any, a: ZPP_CbSet, b: ZPP_CbSet): boolean;
4480
- /** Helper: find or create a CbSetPair for sets a and b. */
4481
- private static findOrCreatePair;
4482
- static empty_intersection(a: ZPP_CbSet, b: ZPP_CbSet): boolean;
4483
- static single_intersection(a: ZPP_CbSet, b: ZPP_CbSet, i: any): boolean;
4484
- static find_all(a: ZPP_CbSet, b: ZPP_CbSet, event: number, cb: (listener: ZPP_InteractionListener) => void): void;
4485
- increment(): void;
4486
- decrement(): boolean;
4487
- invalidate_pairs(): void;
4488
- invalidate_listeners(): void;
4489
- validate_listeners(): void;
4490
- realvalidate_listeners(): void;
4491
- invalidate_bodylisteners(): void;
4492
- validate_bodylisteners(): void;
4493
- realvalidate_bodylisteners(): void;
4494
- invalidate_conlisteners(): void;
4495
- validate_conlisteners(): void;
4496
- realvalidate_conlisteners(): void;
4497
- validate(): void;
4498
- addConstraint(con: any): void;
4499
- addInteractor(intx: any): void;
4500
- remConstraint(con: any): void;
4501
- remInteractor(intx: any): void;
4502
- free(): void;
4503
- alloc(): void;
4504
- }
4505
-
4506
- /**
4507
- * ZPP_OptionType — Internal callback option type for the nape physics engine.
4508
- *
4509
- * Manages include/exclude lists of callback types with ordered insertion,
4510
- * set intersection tests, and handler delegation for live changes.
4511
- *
4512
- * Converted from nape-compiled.js lines 51337–51655.
4513
- */
4514
-
4515
- declare class ZPP_OptionType {
4516
- static __name__: string[];
4517
- static _nape: any;
4518
- static _zpp: any;
4519
- outer: any;
4520
- handler: ((val: ZPP_CbType, included: boolean, added: boolean) => void) | null;
4521
- includes: any;
4522
- excludes: any;
4523
- wrap_includes: any;
4524
- wrap_excludes: any;
4525
- constructor();
4526
- /** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
4527
- static argument(val: any): any;
4528
- setup_includes(): void;
4529
- setup_excludes(): void;
4530
- excluded(xs: any): boolean;
4531
- included(xs: any): boolean;
4532
- compatible(xs: any): boolean;
4533
- /**
4534
- * Check whether two sorted-by-id ZNPList_ZPP_CbType lists share any element.
4535
- * Both xs and ys are ZNPList_ZPP_CbType (dynamic class) — their nodes carry ZPP_CbType elements.
4536
- */
4537
- nonemptyintersection(xs: any, ys: any): boolean;
4538
- /** Insert a ZPP_CbType into a sorted ZNPList_ZPP_CbType (ordered by id ascending). */
4539
- private insertOrdered;
4540
- effect_change(val: ZPP_CbType, included: boolean, added: boolean): void;
4541
- append_type(list: any, val: ZPP_CbType): void;
4542
- set(options: ZPP_OptionType): this;
4543
- append(list: any, val: any): void;
4544
- }
4545
-
4546
- /**
4547
- * ZPP_InteractionListener — Internal interaction/pre listener for the nape physics engine.
4548
- *
4549
- * Manages interaction event listeners (BEGIN/END/ONGOING/PRE) with dual handler
4550
- * support (handleri for InteractionListener, handlerp for PreListener).
4551
- * Contains complex set intersection logic for CbType/CbSet pair operations.
4552
- *
4553
- * Converted from nape-compiled.js lines 28138–30352, 112140–112151.
4554
- */
4555
-
4556
- declare class ZPP_InteractionListener extends ZPP_Listener {
4557
- static __name__: string[];
4558
- static UCbSet: ZNPList<ZPP_CbSet> | null;
4559
- static VCbSet: ZNPList<ZPP_CbSet> | null;
4560
- static WCbSet: ZNPList<ZPP_CbSet> | null;
4561
- static UCbType: ZNPList<ZPP_CbType> | null;
4562
- static VCbType: ZNPList<ZPP_CbType> | null;
4563
- static WCbType: ZNPList<ZPP_CbType> | null;
4564
- outer_zni: any;
4565
- outer_znp: any;
4566
- itype: number;
4567
- options1: ZPP_OptionType;
4568
- options2: ZPP_OptionType;
4569
- handleri: any;
4570
- allowSleepingCallbacks: boolean;
4571
- pure: boolean;
4572
- handlerp: any;
4573
- constructor(options1: any, options2: any, event: number, type: number);
4574
- setInteractionType(itype: number): void;
4575
- wake(): void;
4576
- CbSetset(A: any, B: any, lambda: (a: ZPP_CbSet, b: ZPP_CbSet) => void): void;
4577
- CbTypeset(A: any, B: any, lambda: (a: ZPP_CbType, b: ZPP_CbType) => void): void;
4578
- with_uniquesets(fresh: boolean): void;
4579
- with_union(lambda: (cb: ZPP_CbType) => void): void;
4580
- addedToSpace(): void;
4581
- removedFromSpace(): void;
4582
- invalidate_precedence(): void;
4583
- cbtype_change1(cb: ZPP_CbType, included: boolean, added: boolean): void;
4584
- cbtype_change2(cb: ZPP_CbType, included: boolean, added: boolean): void;
4585
- cbtype_change(options: ZPP_OptionType, cb: ZPP_CbType, included: boolean, added: boolean): void;
4586
- swapEvent(newev: number): void;
4587
- private _allocCbSetNode;
4588
- private _allocCbTypeNode;
4589
- /**
4590
- * Initialize static working lists. Called once from compiled factory.
4591
- */
4592
- static _initStatics(zpp_nape: any): void;
4593
- }
4594
-
4595
- /**
4596
- * ZPP_CbType — Internal callback type for the nape physics engine.
4597
- *
4598
- * Manages three types of listener lists (interaction, body, constraint)
4599
- * with priority-ordered insertion. Tracks interactors and constraints
4600
- * that use this callback type, and invalidates callback sets on change.
4601
- *
4602
- * Converted from nape-compiled.js lines 48256–48482.
4603
- */
4604
-
4605
- declare class ZPP_CbType {
4606
- static __name__: string[];
4607
- static _zpp: any;
4608
- static ANY_SHAPE: ZPP_CbType | null;
4609
- static ANY_BODY: ZPP_CbType | null;
4610
- static ANY_COMPOUND: ZPP_CbType | null;
4611
- static ANY_CONSTRAINT: ZPP_CbType | null;
4612
- /**
4613
- * Initialize ANY_* singleton CbTypes. Called once from compiled factory.
4614
- */
4615
- static _initEnums(nape: any): void;
4616
- outer: any;
4617
- userData: Record<string, unknown> | null;
4618
- id: number;
4619
- cbsets: any;
4620
- interactors: any;
4621
- wrap_interactors: any;
4622
- constraints: any;
4623
- wrap_constraints: any;
4624
- listeners: any;
4625
- bodylisteners: any;
4626
- conlisteners: any;
4627
- constructor();
4628
- /** Sort comparator by id. */
4629
- static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
4630
- addInteractor(intx: any): void;
4631
- remInteractor(intx: any): void;
4632
- addConstraint(con: any): void;
4633
- remConstraint(con: any): void;
4634
- addint(x: ZPP_InteractionListener): void;
4635
- removeint(x: ZPP_InteractionListener): void;
4636
- invalidateint(): void;
4637
- addbody(x: ZPP_BodyListener): void;
4638
- removebody(x: ZPP_BodyListener): void;
4639
- invalidatebody(): void;
4640
- addconstraint(x: ZPP_ConstraintListener): void;
4641
- removeconstraint(x: ZPP_ConstraintListener): void;
4642
- invalidateconstraint(): void;
4643
- }
4644
-
4645
2538
  /**
4646
2539
  * Composite callback option type — combines include and exclude {@link CbType} lists
4647
2540
  * to express complex listener filter conditions.
@@ -4660,8 +2553,6 @@ declare class ZPP_CbType {
4660
2553
  */
4661
2554
  declare class OptionType {
4662
2555
  static __name__: string[];
4663
- zpp_inner: ZPP_OptionType;
4664
- get _inner(): NapeInner;
4665
2556
  /**
4666
2557
  * Creates an `OptionType` optionally seeded with initial include/exclude entries.
4667
2558
  *
@@ -4686,7 +2577,6 @@ declare class OptionType {
4686
2577
  */
4687
2578
  excluding(excludes: CbType | OptionType): this;
4688
2579
  toString(): string;
4689
- static _wrap(inner: any): OptionType;
4690
2580
  }
4691
2581
 
4692
2582
  /**
@@ -4716,8 +2606,6 @@ declare class OptionType {
4716
2606
  */
4717
2607
  declare class CbType {
4718
2608
  static __name__: string[];
4719
- zpp_inner: ZPP_CbType;
4720
- get _inner(): NapeInner;
4721
2609
  constructor();
4722
2610
  /**
4723
2611
  * Built-in type automatically assigned to every {@link Body}.
@@ -4777,7 +2665,6 @@ declare class CbType {
4777
2665
  */
4778
2666
  excluding(excludes: CbType | OptionType): OptionType;
4779
2667
  toString(): string;
4780
- static _wrap(inner: any): CbType;
4781
2668
  }
4782
2669
 
4783
2670
  /**
@@ -4823,10 +2710,7 @@ declare class ListenerType {
4823
2710
  */
4824
2711
  declare class Listener {
4825
2712
  static __name__: string[];
4826
- zpp_inner: ZPP_Listener;
4827
- get _inner(): this;
4828
2713
  constructor();
4829
- static _wrap(inner: ZPP_Listener | Listener | null | undefined): Listener;
4830
2714
  /** The type of this listener (BODY, CONSTRAINT, INTERACTION, or PRE). */
4831
2715
  get type(): ListenerType;
4832
2716
  /**
@@ -4876,7 +2760,6 @@ declare class Listener {
4876
2760
  */
4877
2761
  declare class Callback {
4878
2762
  static __name__: string[];
4879
- zpp_inner: ZPP_Callback | null;
4880
2763
  constructor();
4881
2764
  /** The event type that caused this callback to fire (e.g., `CbEvent.BEGIN`). */
4882
2765
  get event(): CbEvent;
@@ -4927,7 +2810,6 @@ declare class BodyCallback extends Callback {
4927
2810
  */
4928
2811
  declare class BodyListener extends Listener {
4929
2812
  static __name__: string[];
4930
- zpp_inner_zn: ZPP_BodyListener;
4931
2813
  /**
4932
2814
  * @param event - Must be `CbEvent.WAKE` or `CbEvent.SLEEP`.
4933
2815
  * @param options - `CbType` or `OptionType` filter, or `null` to match all bodies.
@@ -5005,7 +2887,6 @@ declare class InteractionCallback extends Callback {
5005
2887
  */
5006
2888
  declare class InteractionListener extends Listener {
5007
2889
  static __name__: string[];
5008
- zpp_inner_zn: ZPP_InteractionListener;
5009
2890
  /**
5010
2891
  * @param event - Must be `CbEvent.BEGIN`, `CbEvent.ONGOING`, or `CbEvent.END`.
5011
2892
  * @param interactionType - The kind of interaction to listen for (COLLISION, SENSOR, FLUID, or ANY).
@@ -5080,7 +2961,6 @@ declare class ConstraintCallback extends Callback {
5080
2961
  */
5081
2962
  declare class ConstraintListener extends Listener {
5082
2963
  static __name__: string[];
5083
- zpp_inner_zn: ZPP_ConstraintListener;
5084
2964
  /**
5085
2965
  * @param event - Must be `CbEvent.WAKE`, `CbEvent.SLEEP`, or `CbEvent.BREAK`.
5086
2966
  * @param options - `CbType` or `OptionType` filter, or `null` to match all constraints.
@@ -5169,7 +3049,6 @@ declare class PreCallback extends Callback {
5169
3049
  */
5170
3050
  declare class PreListener extends Listener {
5171
3051
  static __name__: string[];
5172
- zpp_inner_zn: ZPP_InteractionListener;
5173
3052
  /**
5174
3053
  * @param interactionType - The kind of interaction to intercept (COLLISION, SENSOR, FLUID, or ANY).
5175
3054
  * @param options1 - Filter for the first interactor, or `null` to match any.
@@ -5206,67 +3085,6 @@ declare class PreListener extends Listener {
5206
3085
  set interactionType(interactionType: InteractionType | null);
5207
3086
  }
5208
3087
 
5209
- /**
5210
- * ZPP_PivotJoint — Internal 2-body, 2-DOF point-to-point constraint.
5211
- *
5212
- * Constrains two anchor points (a1 on b1, a2 on b2) to coincide.
5213
- * Uses a 2×2 mass matrix (kMassa, kMassb, kMassc) for the symmetric
5214
- * positive-semi-definite effective-mass inverse.
5215
- *
5216
- * Converted from nape-compiled.js lines 24611–25474.
5217
- */
5218
-
5219
- declare class ZPP_PivotJoint extends ZPP_Constraint {
5220
- static __name__: string[];
5221
- static __super__: typeof ZPP_Constraint;
5222
- static _wrapFn: ((zpp: ZPP_PivotJoint) => any) | null;
5223
- static _createFn: ((...args: any[]) => any) | null;
5224
- outer_zn: any;
5225
- b1: any;
5226
- b2: any;
5227
- a1localx: number;
5228
- a1localy: number;
5229
- a1relx: number;
5230
- a1rely: number;
5231
- wrap_a1: any;
5232
- a2localx: number;
5233
- a2localy: number;
5234
- a2relx: number;
5235
- a2rely: number;
5236
- wrap_a2: any;
5237
- kMassa: number;
5238
- kMassb: number;
5239
- kMassc: number;
5240
- jAccx: number;
5241
- jAccy: number;
5242
- jMax: number;
5243
- gamma: number;
5244
- biasx: number;
5245
- biasy: number;
5246
- stepped: boolean;
5247
- constructor();
5248
- bodyImpulse(b: any): any;
5249
- activeBodies(): void;
5250
- inactiveBodies(): void;
5251
- validate_a1(): void;
5252
- invalidate_a1(x: any): void;
5253
- setup_a1(): void;
5254
- validate_a2(): void;
5255
- invalidate_a2(x: any): void;
5256
- setup_a2(): void;
5257
- copy(dict: any, todo: any): any;
5258
- validate(): void;
5259
- wake_connected(): void;
5260
- forest(): void;
5261
- pair_exists(id: number, di: number): boolean;
5262
- clearcache(): void;
5263
- preStep(dt: number): boolean;
5264
- warmStart(): void;
5265
- applyImpulseVel(): boolean;
5266
- applyImpulsePos(): boolean;
5267
- draw(_g: any): void;
5268
- }
5269
-
5270
3088
  /**
5271
3089
  * A pivot (pin) joint that constrains two anchor points — one on each body — to
5272
3090
  * remain coincident in world space.
@@ -5291,7 +3109,6 @@ declare class ZPP_PivotJoint extends ZPP_Constraint {
5291
3109
  * Fully modernized — uses ZPP_PivotJoint directly (extracted to TypeScript).
5292
3110
  */
5293
3111
  declare class PivotJoint extends Constraint {
5294
- zpp_inner: ZPP_PivotJoint;
5295
3112
  /**
5296
3113
  * @param body1 - First body, or `null` for a static world anchor.
5297
3114
  * @param body2 - Second body, or `null` for a static world anchor.
@@ -5299,18 +3116,12 @@ declare class PivotJoint extends Constraint {
5299
3116
  * @param anchor2 - Anchor point in `body2`'s local space (disposed if weak).
5300
3117
  */
5301
3118
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2);
5302
- /** @internal */
5303
- static _wrap(inner: any): PivotJoint;
5304
3119
  /** First body. `null` treats the anchor as a static world point. */
5305
3120
  get body1(): Body;
5306
3121
  set body1(value: Body | null);
5307
- /** @internal */
5308
- private _setBody1;
5309
3122
  /** Second body. `null` treats the anchor as a static world point. */
5310
3123
  get body2(): Body;
5311
3124
  set body2(value: Body | null);
5312
- /** @internal */
5313
- private _setBody2;
5314
3125
  /** Anchor point on `body1` in local coordinates. */
5315
3126
  get anchor1(): Vec2;
5316
3127
  set anchor1(value: Vec2);
@@ -5320,83 +3131,6 @@ declare class PivotJoint extends Constraint {
5320
3131
  impulse(): MatMN;
5321
3132
  bodyImpulse(body: Body): Vec3;
5322
3133
  visitBodies(lambda: (body: Body) => void): void;
5323
- /** @internal backward compat alias for zpp_inner */
5324
- get zpp_inner_zn(): ZPP_PivotJoint;
5325
- set zpp_inner_zn(v: ZPP_PivotJoint);
5326
- }
5327
-
5328
- /**
5329
- * ZPP_DistanceJoint — Internal 2-body, 1-DOF distance constraint.
5330
- *
5331
- * Constrains the distance between two anchor points (a1 on b1, a2 on b2)
5332
- * to lie within [jointMin, jointMax]. Supports equal (exact) mode, slack
5333
- * detection, soft (spring) and stiff modes, and position correction.
5334
- *
5335
- * Converted from nape-compiled.js lines 22329–23204.
5336
- */
5337
-
5338
- declare class ZPP_DistanceJoint extends ZPP_Constraint {
5339
- static __name__: string[];
5340
- static __super__: typeof ZPP_Constraint;
5341
- static _wrapFn: ((zpp: ZPP_DistanceJoint) => any) | null;
5342
- static _createFn: ((...args: any[]) => any) | null;
5343
- outer_zn: any;
5344
- jointMin: number;
5345
- jointMax: number;
5346
- slack: boolean;
5347
- equal: boolean;
5348
- nx: number;
5349
- ny: number;
5350
- cx1: number;
5351
- cx2: number;
5352
- b1: any;
5353
- b2: any;
5354
- a1localx: number;
5355
- a1localy: number;
5356
- a1relx: number;
5357
- a1rely: number;
5358
- a2localx: number;
5359
- a2localy: number;
5360
- a2relx: number;
5361
- a2rely: number;
5362
- wrap_a1: any;
5363
- wrap_a2: any;
5364
- kMass: number;
5365
- jAcc: number;
5366
- jMax: number;
5367
- gamma: number;
5368
- bias: number;
5369
- stepped: boolean;
5370
- constructor();
5371
- is_slack(): boolean;
5372
- bodyImpulse(b: any): any;
5373
- activeBodies(): void;
5374
- inactiveBodies(): void;
5375
- validate_a1(): void;
5376
- invalidate_a1(x: any): void;
5377
- setup_a1(): void;
5378
- validate_a2(): void;
5379
- invalidate_a2(x: any): void;
5380
- setup_a2(): void;
5381
- copy(dict: any, todo: any): any;
5382
- validate(): void;
5383
- wake_connected(): void;
5384
- forest(): void;
5385
- pair_exists(id: number, di: number): boolean;
5386
- clearcache(): void;
5387
- preStep(dt: number): boolean;
5388
- warmStart(): void;
5389
- applyImpulseVel(): boolean;
5390
- applyImpulsePos(): boolean;
5391
- draw(_g: any): void;
5392
- /**
5393
- * Creates (or reuses from pool) a public Vec2 wrapper for a constraint anchor
5394
- * point stored as (localx, localy). Installs the given validate and invalidate
5395
- * callbacks so that the Vec2 stays in sync with the internal coordinate fields.
5396
- *
5397
- * Shared by all anchor-based joints (DistanceJoint, PivotJoint, LineJoint, etc.)
5398
- */
5399
- static _setupAnchorVec2(localx: number, localy: number, validateFn: (() => void) | null, invalidateFn: ((vec: any) => void) | null): any;
5400
3134
  }
5401
3135
 
5402
3136
  /**
@@ -5424,7 +3158,6 @@ declare class ZPP_DistanceJoint extends ZPP_Constraint {
5424
3158
  * Fully modernized — uses ZPP_DistanceJoint directly (extracted to TypeScript).
5425
3159
  */
5426
3160
  declare class DistanceJoint extends Constraint {
5427
- zpp_inner: ZPP_DistanceJoint;
5428
3161
  /**
5429
3162
  * @param body1 - First body, or `null` for a static world anchor.
5430
3163
  * @param body2 - Second body, or `null` for a static world anchor.
@@ -5434,18 +3167,12 @@ declare class DistanceJoint extends Constraint {
5434
3167
  * @param jointMax - Maximum allowed distance (must be `>= jointMin`).
5435
3168
  */
5436
3169
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, jointMin: number, jointMax: number);
5437
- /** @internal */
5438
- static _wrap(inner: any): DistanceJoint;
5439
3170
  /** First body. `null` treats the anchor as a static world point. */
5440
3171
  get body1(): Body;
5441
3172
  set body1(value: Body | null);
5442
- /** @internal */
5443
- private _setBody1;
5444
3173
  /** Second body. `null` treats the anchor as a static world point. */
5445
3174
  get body2(): Body;
5446
3175
  set body2(value: Body | null);
5447
- /** @internal */
5448
- private _setBody2;
5449
3176
  /** Anchor point on `body1` in local coordinates. Modifying this wakes the constraint. */
5450
3177
  get anchor1(): Vec2;
5451
3178
  set anchor1(value: Vec2);
@@ -5468,63 +3195,6 @@ declare class DistanceJoint extends Constraint {
5468
3195
  impulse(): MatMN;
5469
3196
  bodyImpulse(body: Body): Vec3;
5470
3197
  visitBodies(lambda: (body: Body) => void): void;
5471
- /** @internal backward compat alias for zpp_inner */
5472
- get zpp_inner_zn(): ZPP_DistanceJoint;
5473
- set zpp_inner_zn(v: ZPP_DistanceJoint);
5474
- }
5475
-
5476
- /**
5477
- * ZPP_AngleJoint — Internal class for angle joint constraints.
5478
- *
5479
- * Constrains the relative angle between two bodies within min/max bounds.
5480
- * Contains the complete solver logic (preStep, warmStart, impulse application).
5481
- *
5482
- * Converted from nape-compiled.js lines 21441–21912.
5483
- */
5484
-
5485
- declare class ZPP_AngleJoint extends ZPP_Constraint {
5486
- static __name__: string[];
5487
- static _wrapFn: ((zpp: ZPP_AngleJoint) => any) | null;
5488
- static _createFn: ((...args: any[]) => any) | null;
5489
- outer_zn: any;
5490
- ratio: number;
5491
- jointMin: number;
5492
- jointMax: number;
5493
- slack: boolean;
5494
- equal: boolean;
5495
- scale: number;
5496
- b1: any;
5497
- b2: any;
5498
- kMass: number;
5499
- jAcc: number;
5500
- jMax: number;
5501
- gamma: number;
5502
- bias: number;
5503
- stepped: boolean;
5504
- constructor();
5505
- is_slack(): boolean;
5506
- bodyImpulse(b: any): any;
5507
- activeBodies(): void;
5508
- inactiveBodies(): void;
5509
- copy(dict?: any, todo?: any): any;
5510
- validate(): void;
5511
- wake_connected(): void;
5512
- forest(): void;
5513
- pair_exists(id: any, di: any): boolean;
5514
- clearcache(): void;
5515
- preStep(dt: number): boolean;
5516
- warmStart(): void;
5517
- applyImpulseVel(): boolean;
5518
- applyImpulsePos(): boolean;
5519
- draw(_g: any): void;
5520
- /**
5521
- * Small-angle-optimized body rotation. Used by all joints' applyImpulsePos.
5522
- */
5523
- static _rotateBody(body: any, dr: number): void;
5524
- /**
5525
- * Dict-lookup / deferred-todo body copying. Used by all joints' copy().
5526
- */
5527
- static _copyBody(dict: any, todo: any, srcBody: any, ret: any, field: string): void;
5528
3198
  }
5529
3199
 
5530
3200
  /**
@@ -5550,7 +3220,6 @@ declare class ZPP_AngleJoint extends ZPP_Constraint {
5550
3220
  * Fully modernized — uses ZPP_AngleJoint directly (extracted to TypeScript).
5551
3221
  */
5552
3222
  declare class AngleJoint extends Constraint {
5553
- zpp_inner: ZPP_AngleJoint;
5554
3223
  /**
5555
3224
  * @param body1 - First body, or `null` for a static anchor.
5556
3225
  * @param body2 - Second body, or `null` for a static anchor.
@@ -5559,18 +3228,12 @@ declare class AngleJoint extends Constraint {
5559
3228
  * @param ratio - Gear ratio applied to `body1`'s rotation. Default `1.0`.
5560
3229
  */
5561
3230
  constructor(body1: Body | null, body2: Body | null, jointMin: number, jointMax: number, ratio?: number);
5562
- /** @internal */
5563
- static _wrap(inner: any): AngleJoint;
5564
3231
  /** First body in the constraint. Setting `null` treats it as a static world-anchored reference. */
5565
3232
  get body1(): Body;
5566
3233
  set body1(value: Body | null);
5567
- /** @internal */
5568
- private _setBody1;
5569
3234
  /** Second body in the constraint. Setting `null` treats it as a static world-anchored reference. */
5570
3235
  get body2(): Body;
5571
3236
  set body2(value: Body | null);
5572
- /** @internal */
5573
- private _setBody2;
5574
3237
  /** Minimum allowed relative angle in radians (`jointMin ≤ jointMax`). */
5575
3238
  get jointMin(): number;
5576
3239
  set jointMin(value: number);
@@ -5595,76 +3258,6 @@ declare class AngleJoint extends Constraint {
5595
3258
  impulse(): MatMN;
5596
3259
  bodyImpulse(body: Body): Vec3;
5597
3260
  visitBodies(lambda: (body: Body) => void): void;
5598
- /** @internal backward compat alias for zpp_inner */
5599
- get zpp_inner_zn(): ZPP_AngleJoint;
5600
- set zpp_inner_zn(v: ZPP_AngleJoint);
5601
- }
5602
-
5603
- /**
5604
- * ZPP_WeldJoint — Internal weld constraint between two bodies.
5605
- *
5606
- * A 3-DOF constraint that locks relative position (x, y) and angle
5607
- * between two bodies, with an optional phase (target angle offset).
5608
- * Uses a 3×3 effective-mass matrix (stored as upper triangular a/b/c/d/e/f).
5609
- *
5610
- * Converted from nape-compiled.js lines 28055–29046.
5611
- */
5612
-
5613
- declare class ZPP_WeldJoint extends ZPP_Constraint {
5614
- static __name__: string[];
5615
- static __super__: typeof ZPP_Constraint;
5616
- static _wrapFn: ((zpp: ZPP_WeldJoint) => any) | null;
5617
- static _createFn: ((...args: any[]) => any) | null;
5618
- outer_zn: any;
5619
- b1: any;
5620
- b2: any;
5621
- a1localx: number;
5622
- a1localy: number;
5623
- a1relx: number;
5624
- a1rely: number;
5625
- wrap_a1: any;
5626
- a2localx: number;
5627
- a2localy: number;
5628
- a2relx: number;
5629
- a2rely: number;
5630
- wrap_a2: any;
5631
- phase: number;
5632
- kMassa: number;
5633
- kMassb: number;
5634
- kMassc: number;
5635
- kMassd: number;
5636
- kMasse: number;
5637
- kMassf: number;
5638
- jAccx: number;
5639
- jAccy: number;
5640
- jAccz: number;
5641
- jMax: number;
5642
- gamma: number;
5643
- biasx: number;
5644
- biasy: number;
5645
- biasz: number;
5646
- stepped: boolean;
5647
- constructor();
5648
- bodyImpulse(b: any): any;
5649
- activeBodies(): void;
5650
- inactiveBodies(): void;
5651
- validate_a1(): void;
5652
- invalidate_a1(x: any): void;
5653
- setup_a1(): void;
5654
- validate_a2(): void;
5655
- invalidate_a2(x: any): void;
5656
- setup_a2(): void;
5657
- copy(dict: any, todo: any): any;
5658
- validate(): void;
5659
- wake_connected(): void;
5660
- forest(): void;
5661
- pair_exists(id: number, di: number): boolean;
5662
- clearcache(): void;
5663
- preStep(dt: number): boolean;
5664
- warmStart(): void;
5665
- applyImpulseVel(): boolean;
5666
- applyImpulsePos(): boolean;
5667
- draw(_g: any): void;
5668
3261
  }
5669
3262
 
5670
3263
  /**
@@ -5689,7 +3282,6 @@ declare class ZPP_WeldJoint extends ZPP_Constraint {
5689
3282
  * Fully modernized — uses ZPP_WeldJoint directly (extracted to TypeScript).
5690
3283
  */
5691
3284
  declare class WeldJoint extends Constraint {
5692
- zpp_inner: ZPP_WeldJoint;
5693
3285
  /**
5694
3286
  * @param body1 - First body, or `null` for a static world anchor.
5695
3287
  * @param body2 - Second body, or `null` for a static world anchor.
@@ -5698,18 +3290,12 @@ declare class WeldJoint extends Constraint {
5698
3290
  * @param phase - Target relative angle offset in radians. Default `0.0`.
5699
3291
  */
5700
3292
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, phase?: number);
5701
- /** @internal */
5702
- static _wrap(inner: any): WeldJoint;
5703
3293
  /** First body. `null` treats the anchor as a static world point. */
5704
3294
  get body1(): Body;
5705
3295
  set body1(value: Body | null);
5706
- /** @internal */
5707
- private _setBody1;
5708
3296
  /** Second body. `null` treats the anchor as a static world point. */
5709
3297
  get body2(): Body;
5710
3298
  set body2(value: Body | null);
5711
- /** @internal */
5712
- private _setBody2;
5713
3299
  /** Anchor point on `body1` in local coordinates. */
5714
3300
  get anchor1(): Vec2;
5715
3301
  set anchor1(value: Vec2);
@@ -5726,47 +3312,6 @@ declare class WeldJoint extends Constraint {
5726
3312
  impulse(): MatMN;
5727
3313
  bodyImpulse(body: Body): Vec3;
5728
3314
  visitBodies(lambda: (body: Body) => void): void;
5729
- /** @internal backward compat alias for zpp_inner */
5730
- get zpp_inner_zn(): ZPP_WeldJoint;
5731
- set zpp_inner_zn(v: ZPP_WeldJoint);
5732
- }
5733
-
5734
- /**
5735
- * ZPP_MotorJoint — Internal class for motor joint constraints.
5736
- *
5737
- * Applies angular velocity to rotate bodies relative to each other.
5738
- * Velocity-only constraint (no position correction).
5739
- *
5740
- * Converted from nape-compiled.js lines 23892–24197.
5741
- */
5742
-
5743
- declare class ZPP_MotorJoint extends ZPP_Constraint {
5744
- static __name__: string[];
5745
- static _wrapFn: ((zpp: ZPP_MotorJoint) => any) | null;
5746
- static _createFn: ((...args: any[]) => any) | null;
5747
- outer_zn: any;
5748
- ratio: number;
5749
- rate: number;
5750
- b1: any;
5751
- b2: any;
5752
- kMass: number;
5753
- jAcc: number;
5754
- jMax: number;
5755
- stepped: boolean;
5756
- constructor();
5757
- bodyImpulse(b: any): any;
5758
- activeBodies(): void;
5759
- inactiveBodies(): void;
5760
- copy(dict?: any, todo?: any): any;
5761
- validate(): void;
5762
- wake_connected(): void;
5763
- forest(): void;
5764
- pair_exists(id: any, di: any): boolean;
5765
- clearcache(): void;
5766
- preStep(dt: number): boolean;
5767
- warmStart(): void;
5768
- applyImpulseVel(): boolean;
5769
- applyImpulsePos(): boolean;
5770
3315
  }
5771
3316
 
5772
3317
  /**
@@ -5790,7 +3335,6 @@ declare class ZPP_MotorJoint extends ZPP_Constraint {
5790
3335
  * Fully modernized — uses ZPP_MotorJoint directly (extracted to TypeScript).
5791
3336
  */
5792
3337
  declare class MotorJoint extends Constraint {
5793
- zpp_inner: ZPP_MotorJoint;
5794
3338
  /**
5795
3339
  * @param body1 - First body, or `null` for a static world reference.
5796
3340
  * @param body2 - Second body, or `null` for a static world reference.
@@ -5798,18 +3342,12 @@ declare class MotorJoint extends Constraint {
5798
3342
  * @param ratio - Gear ratio applied to `body1`'s angular velocity. Default `1.0`.
5799
3343
  */
5800
3344
  constructor(body1: Body | null, body2: Body | null, rate?: number, ratio?: number);
5801
- /** @internal */
5802
- static _wrap(inner: any): MotorJoint;
5803
3345
  /** First body (its angular velocity is scaled by `ratio`). */
5804
3346
  get body1(): Body;
5805
3347
  set body1(value: Body | null);
5806
- /** @internal */
5807
- private _setBody1;
5808
3348
  /** Second body (driven toward the target angular velocity). */
5809
3349
  get body2(): Body;
5810
3350
  set body2(value: Body | null);
5811
- /** @internal */
5812
- private _setBody2;
5813
3351
  /**
5814
3352
  * Target relative angular velocity in rad/s.
5815
3353
  *
@@ -5829,94 +3367,6 @@ declare class MotorJoint extends Constraint {
5829
3367
  impulse(): MatMN;
5830
3368
  bodyImpulse(body: Body): Vec3;
5831
3369
  visitBodies(lambda: (body: Body) => void): void;
5832
- /** @internal backward compat alias for zpp_inner */
5833
- get zpp_inner_zn(): ZPP_MotorJoint;
5834
- set zpp_inner_zn(v: ZPP_MotorJoint);
5835
- }
5836
-
5837
- /**
5838
- * ZPP_LineJoint — Internal 2-body, 2-DOF line (sliding) constraint.
5839
- *
5840
- * Constrains body2's anchor (a2) to slide along the line defined by
5841
- * body1's anchor (a1) and direction vector (n). The distance along
5842
- * the line is bounded by [jointMin, jointMax].
5843
- *
5844
- * Converted from nape-compiled.js lines 23205–23304.
5845
- */
5846
-
5847
- declare class ZPP_LineJoint extends ZPP_Constraint {
5848
- static __name__: string[];
5849
- static __super__: typeof ZPP_Constraint;
5850
- static _wrapFn: ((zpp: ZPP_LineJoint) => any) | null;
5851
- static _createFn: ((...args: any[]) => any) | null;
5852
- outer_zn: any;
5853
- scale: number;
5854
- jointMin: number;
5855
- jointMax: number;
5856
- equal: boolean;
5857
- dot1: number;
5858
- dot2: number;
5859
- cx1: number;
5860
- cx2: number;
5861
- b1: any;
5862
- a1localx: number;
5863
- a1localy: number;
5864
- a1relx: number;
5865
- a1rely: number;
5866
- wrap_a1: any;
5867
- b2: any;
5868
- a2localx: number;
5869
- a2localy: number;
5870
- a2relx: number;
5871
- a2rely: number;
5872
- wrap_a2: any;
5873
- zip_n: any;
5874
- nlocalx: number;
5875
- nlocaly: number;
5876
- nrelx: number;
5877
- nrely: number;
5878
- wrap_n: any;
5879
- kMassa: number;
5880
- kMassb: number;
5881
- kMassc: number;
5882
- jAccx: number;
5883
- jAccy: number;
5884
- jMax: any;
5885
- gamma: any;
5886
- biasx: number;
5887
- biasy: number;
5888
- stepped: boolean;
5889
- constructor();
5890
- /**
5891
- * Creates or recycles a Vec2 from the public pool, sets its x/y,
5892
- * wires up _validate/_invalidate callbacks, and stores it in the given
5893
- * wrapper field. Used by setup_a1, setup_a2, and setup_n.
5894
- */
5895
- private _setupVec2;
5896
- validate_a1(): void;
5897
- invalidate_a1(x: any): void;
5898
- setup_a1(): void;
5899
- validate_a2(): void;
5900
- invalidate_a2(x: any): void;
5901
- setup_a2(): void;
5902
- validate_n(): void;
5903
- invalidate_n(x: any): void;
5904
- setup_n(): void;
5905
- validate_norm(): void;
5906
- bodyImpulse(b: any): any;
5907
- activeBodies(): void;
5908
- inactiveBodies(): void;
5909
- copy(dict: any, todo: any): any;
5910
- validate(): void;
5911
- wake_connected(): void;
5912
- forest(): void;
5913
- pair_exists(id: number, di: number): boolean;
5914
- clearcache(): void;
5915
- preStep(dt: number): boolean;
5916
- warmStart(): void;
5917
- applyImpulseVel(): boolean;
5918
- applyImpulsePos(): boolean;
5919
- draw(_g: any): void;
5920
3370
  }
5921
3371
 
5922
3372
  /**
@@ -5942,7 +3392,6 @@ declare class ZPP_LineJoint extends ZPP_Constraint {
5942
3392
  * Fully modernized — uses ZPP_LineJoint directly (extracted to TypeScript).
5943
3393
  */
5944
3394
  declare class LineJoint extends Constraint {
5945
- zpp_inner: ZPP_LineJoint;
5946
3395
  /**
5947
3396
  * @param body1 - First body (defines the line), or `null` for a static world line.
5948
3397
  * @param body2 - Second body (slides along the line), or `null` for a static anchor.
@@ -5953,18 +3402,12 @@ declare class LineJoint extends Constraint {
5953
3402
  * @param jointMax - Maximum allowed displacement along the line.
5954
3403
  */
5955
3404
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, direction: Vec2, jointMin: number, jointMax: number);
5956
- /** @internal */
5957
- static _wrap(inner: any): LineJoint;
5958
3405
  /** Body that defines the line's origin and direction. */
5959
3406
  get body1(): Body;
5960
3407
  set body1(value: Body | null);
5961
- /** @internal */
5962
- private _setBody1;
5963
3408
  /** Body whose anchor slides along the line. */
5964
3409
  get body2(): Body;
5965
3410
  set body2(value: Body | null);
5966
- /** @internal */
5967
- private _setBody2;
5968
3411
  /** Origin of the line on `body1` in local coordinates. */
5969
3412
  get anchor1(): Vec2;
5970
3413
  set anchor1(value: Vec2);
@@ -5983,98 +3426,6 @@ declare class LineJoint extends Constraint {
5983
3426
  impulse(): MatMN;
5984
3427
  bodyImpulse(body: Body): Vec3;
5985
3428
  visitBodies(lambda: (body: Body) => void): void;
5986
- /** @internal backward compat alias for zpp_inner */
5987
- get zpp_inner_zn(): ZPP_LineJoint;
5988
- set zpp_inner_zn(v: ZPP_LineJoint);
5989
- }
5990
-
5991
- /**
5992
- * ZPP_PulleyJoint — Internal 4-body, 1-DOF pulley constraint.
5993
- *
5994
- * Constrains (dist(b1,b2) + ratio * dist(b3,b4)) to [jointMin, jointMax].
5995
- * Supports mechanical advantage ratio, slack detection, stiffness/damping,
5996
- * and large-error pre-correction in applyImpulsePos.
5997
- *
5998
- * Converted from nape-compiled.js lines 25475–25367.
5999
- */
6000
-
6001
- declare class ZPP_PulleyJoint extends ZPP_Constraint {
6002
- static __name__: string[];
6003
- static __super__: typeof ZPP_Constraint;
6004
- static _wrapFn: ((zpp: ZPP_PulleyJoint) => any) | null;
6005
- static _createFn: ((...args: any[]) => any) | null;
6006
- outer_zn: any;
6007
- ratio: number;
6008
- jointMin: number;
6009
- jointMax: number;
6010
- slack: boolean;
6011
- equal: boolean;
6012
- n12x: number;
6013
- n12y: number;
6014
- n34x: number;
6015
- n34y: number;
6016
- cx1: number;
6017
- cx2: number;
6018
- cx3: number;
6019
- cx4: number;
6020
- b1: any;
6021
- a1localx: number;
6022
- a1localy: number;
6023
- a1relx: number;
6024
- a1rely: number;
6025
- wrap_a1: any;
6026
- b2: any;
6027
- a2localx: number;
6028
- a2localy: number;
6029
- a2relx: number;
6030
- a2rely: number;
6031
- wrap_a2: any;
6032
- b3: any;
6033
- a3localx: number;
6034
- a3localy: number;
6035
- a3relx: number;
6036
- a3rely: number;
6037
- wrap_a3: any;
6038
- b4: any;
6039
- a4localx: number;
6040
- a4localy: number;
6041
- a4relx: number;
6042
- a4rely: number;
6043
- wrap_a4: any;
6044
- kMass: number;
6045
- jAcc: number;
6046
- jMax: number;
6047
- gamma: number;
6048
- bias: number;
6049
- stepped: boolean;
6050
- constructor();
6051
- is_slack(): boolean;
6052
- bodyImpulse(b: any): any;
6053
- activeBodies(): void;
6054
- inactiveBodies(): void;
6055
- validate_a1(): void;
6056
- invalidate_a1(x: any): void;
6057
- setup_a1(): void;
6058
- validate_a2(): void;
6059
- invalidate_a2(x: any): void;
6060
- setup_a2(): void;
6061
- validate_a3(): void;
6062
- invalidate_a3(x: any): void;
6063
- setup_a3(): void;
6064
- validate_a4(): void;
6065
- invalidate_a4(x: any): void;
6066
- setup_a4(): void;
6067
- copy(dict: any, todo: any): any;
6068
- validate(): void;
6069
- wake_connected(): void;
6070
- forest(): void;
6071
- pair_exists(id: number, di: number): boolean;
6072
- clearcache(): void;
6073
- preStep(dt: number): boolean;
6074
- warmStart(): void;
6075
- applyImpulseVel(): boolean;
6076
- applyImpulsePos(): boolean;
6077
- draw(_g: any): void;
6078
3429
  }
6079
3430
 
6080
3431
  /**
@@ -6101,7 +3452,6 @@ declare class ZPP_PulleyJoint extends ZPP_Constraint {
6101
3452
  * Fully modernized — uses ZPP_PulleyJoint directly (extracted to TypeScript).
6102
3453
  */
6103
3454
  declare class PulleyJoint extends Constraint {
6104
- zpp_inner: ZPP_PulleyJoint;
6105
3455
  /**
6106
3456
  * @param body1 - First body (pulley side 1), or `null` for a static anchor.
6107
3457
  * @param body2 - Second body (pulley side 1), or `null` for a static anchor.
@@ -6116,10 +3466,6 @@ declare class PulleyJoint extends Constraint {
6116
3466
  * @param ratio - Weight of the second distance segment. Default `1.0`.
6117
3467
  */
6118
3468
  constructor(body1: Body | null, body2: Body | null, body3: Body | null, body4: Body | null, anchor1: Vec2, anchor2: Vec2, anchor3: Vec2, anchor4: Vec2, jointMin: number, jointMax: number, ratio?: number);
6119
- /** @internal Helper to set an anchor during construction. */
6120
- private _setAnchorInit;
6121
- /** @internal */
6122
- static _wrap(inner: any): PulleyJoint;
6123
3469
  /** First body of the first rope segment. `null` = static world point. */
6124
3470
  get body1(): Body;
6125
3471
  set body1(value: Body | null);
@@ -6132,14 +3478,6 @@ declare class PulleyJoint extends Constraint {
6132
3478
  /** Second body of the second rope segment. `null` = static world point. */
6133
3479
  get body4(): Body;
6134
3480
  set body4(value: Body | null);
6135
- /** @internal */
6136
- private _setBody1;
6137
- /** @internal */
6138
- private _setBody2;
6139
- /** @internal */
6140
- private _setBody3;
6141
- /** @internal */
6142
- private _setBody4;
6143
3481
  /** Anchor on `body1` in local coordinates. */
6144
3482
  get anchor1(): Vec2;
6145
3483
  set anchor1(value: Vec2);
@@ -6176,11 +3514,8 @@ declare class PulleyJoint extends Constraint {
6176
3514
  impulse(): MatMN;
6177
3515
  bodyImpulse(body: Body): Vec3;
6178
3516
  visitBodies(lambda: (body: Body) => void): void;
6179
- /** @internal backward compat alias for zpp_inner */
6180
- get zpp_inner_zn(): ZPP_PulleyJoint;
6181
- set zpp_inner_zn(v: ZPP_PulleyJoint);
6182
3517
  }
6183
3518
 
6184
3519
  declare const VERSION: string;
6185
3520
 
6186
- export { AABB, AngleJoint, Arbiter, ArbiterType, Body, BodyCallback, BodyListener, BodyType, Broadphase, Callback, CbEvent, CbType, Circle, CollisionArbiter, Compound, Constraint, ConstraintCallback, ConstraintListener, Contact, ConvexResult, DistanceJoint, Edge, FluidArbiter, FluidProperties, Geom, GeomPoly, GravMassMode, InertiaMode, InteractionCallback, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, Interactor, LineJoint, Listener, ListenerType, MarchingSquares, MassMode, Mat23, MatMN, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreCallback, PreFlag, PreListener, PulleyJoint, Ray, RayResult, Shape, ShapeType, Space, VERSION, ValidationResult, Vec2, Vec3, WeldJoint, Winding, getNape };
3521
+ export { AABB, AngleJoint, Arbiter, ArbiterType, Body, BodyCallback, BodyListener, BodyType, Broadphase, Callback, CbEvent, CbType, Circle, CollisionArbiter, Compound, Constraint, ConstraintCallback, ConstraintListener, Contact, ConvexResult, DistanceJoint, Edge, FluidArbiter, FluidProperties, Geom, GeomPoly, GravMassMode, InertiaMode, InteractionCallback, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, Interactor, LineJoint, Listener, ListenerType, MarchingSquares, MassMode, Mat23, MatMN, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreCallback, PreFlag, PreListener, PulleyJoint, Ray, RayResult, Shape, ShapeType, Space, VERSION, ValidationResult, Vec2, Vec3, WeldJoint, Winding };