@newkrok/nape-js 3.3.39 → 3.3.40

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
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Converted from nape-compiled.js lines 32346–32733.
9
9
  */
10
- type Any$V = any;
10
+ type Any$X = any;
11
11
  declare class ZPP_IContact {
12
12
  static __name__: string[];
13
13
  length: number;
@@ -29,7 +29,7 @@ declare class ZPP_IContact {
29
29
  lr1y: number;
30
30
  lr2x: number;
31
31
  lr2y: number;
32
- __class__: Any$V;
32
+ __class__: Any$X;
33
33
  elem(): this;
34
34
  begin(): ZPP_IContact | null;
35
35
  setbegin(i: ZPP_IContact | null): void;
@@ -73,19 +73,19 @@ declare class ZPP_IContact {
73
73
  * Converted from nape-compiled.js lines 31853–32345, 81644–81645.
74
74
  */
75
75
 
76
- type Any$U = any;
76
+ type Any$W = any;
77
77
  declare class ZPP_Contact {
78
78
  static __name__: string[];
79
- static _nape: Any$U;
80
- static _zpp: Any$U;
79
+ static _nape: Any$W;
80
+ static _zpp: Any$W;
81
81
  static zpp_pool: ZPP_Contact | null;
82
82
  static internal: boolean;
83
- static _wrapFn: ((zpp: ZPP_Contact) => Any$U) | null;
84
- outer: Any$U;
83
+ static _wrapFn: ((zpp: ZPP_Contact) => Any$W) | null;
84
+ outer: Any$W;
85
85
  px: number;
86
86
  py: number;
87
- wrap_position: Any$U;
88
- arbiter: Any$U;
87
+ wrap_position: Any$W;
88
+ arbiter: Any$W;
89
89
  inner: ZPP_IContact;
90
90
  active: boolean;
91
91
  posOnly: boolean;
@@ -99,9 +99,9 @@ declare class ZPP_Contact {
99
99
  modified: boolean;
100
100
  _inuse: boolean;
101
101
  next: ZPP_Contact | null;
102
- __class__: Any$U;
102
+ __class__: Any$W;
103
103
  constructor();
104
- wrapper(): Any$U;
104
+ wrapper(): Any$W;
105
105
  position_validate(): void;
106
106
  getposition(): void;
107
107
  inactiveme(): boolean;
@@ -166,13 +166,13 @@ declare function getNape(): any;
166
166
  *
167
167
  * Converted from nape-compiled.js lines 83820–84273, 134996.
168
168
  */
169
- type Any$T = any;
169
+ type Any$V = any;
170
170
  declare class ZPP_Vec2 {
171
171
  static zpp_pool: ZPP_Vec2 | null;
172
172
  static __name__: string[];
173
- static _nape: Any$T;
174
- static _zpp: Any$T;
175
- static _wrapFn: ((zpp: ZPP_Vec2) => Any$T) | null;
173
+ static _nape: Any$V;
174
+ static _zpp: Any$V;
175
+ static _wrapFn: ((zpp: ZPP_Vec2) => Any$V) | null;
176
176
  x: number;
177
177
  y: number;
178
178
  next: ZPP_Vec2 | null;
@@ -181,18 +181,18 @@ declare class ZPP_Vec2 {
181
181
  pushmod: boolean;
182
182
  _inuse: boolean;
183
183
  weak: boolean;
184
- outer: Any$T;
184
+ outer: Any$V;
185
185
  _immutable: boolean;
186
186
  _isimmutable: (() => void) | null;
187
187
  _validate: (() => void) | null;
188
188
  _invalidate: ((self: ZPP_Vec2) => void) | null;
189
- __class__: Any$T;
189
+ __class__: Any$V;
190
190
  /** Static factory with optional pooling and immutability. */
191
191
  static get(x: number, y: number, immutable?: boolean): ZPP_Vec2;
192
192
  validate(): void;
193
193
  invalidate(): void;
194
194
  immutable(): void;
195
- wrapper(): Any$T;
195
+ wrapper(): Any$V;
196
196
  free(): void;
197
197
  alloc(): void;
198
198
  elem(): ZPP_Vec2;
@@ -344,20 +344,20 @@ type NapeInner = any;
344
344
  *
345
345
  * Converted from nape-compiled.js lines 83412–83434.
346
346
  */
347
- type Any$S = any;
347
+ type Any$U = any;
348
348
  declare class ZPP_Vec3 {
349
349
  static __name__: string[];
350
- static _zpp: Any$S;
351
- static _wrapFn: ((zpp: ZPP_Vec3) => Any$S) | null;
352
- outer: Any$S;
350
+ static _zpp: Any$U;
351
+ static _wrapFn: ((zpp: ZPP_Vec3) => Any$U) | null;
352
+ outer: Any$U;
353
353
  x: number;
354
354
  y: number;
355
355
  z: number;
356
356
  immutable: boolean;
357
357
  _validate: (() => void) | null;
358
- __class__: Any$S;
358
+ __class__: Any$U;
359
359
  validate(): void;
360
- wrapper(): Any$S;
360
+ wrapper(): Any$U;
361
361
  }
362
362
 
363
363
  /**
@@ -421,13 +421,13 @@ declare class Vec3 {
421
421
  *
422
422
  * Converted from nape-compiled.js lines 73495–73561, 133826.
423
423
  */
424
- type Any$R = any;
424
+ type Any$T = any;
425
425
  declare class ZPP_Mat23 {
426
426
  static __name__: string[];
427
- static _nape: Any$R;
428
- static _wrapFn: ((zpp: ZPP_Mat23) => Any$R) | null;
427
+ static _nape: Any$T;
428
+ static _wrapFn: ((zpp: ZPP_Mat23) => Any$T) | null;
429
429
  static zpp_pool: ZPP_Mat23 | null;
430
- outer: Any$R;
430
+ outer: Any$T;
431
431
  a: number;
432
432
  b: number;
433
433
  c: number;
@@ -436,13 +436,13 @@ declare class ZPP_Mat23 {
436
436
  ty: number;
437
437
  _invalidate: (() => void) | null;
438
438
  next: ZPP_Mat23 | null;
439
- __class__: Any$R;
439
+ __class__: Any$T;
440
440
  /** Static factory with pooling. */
441
441
  static get(): ZPP_Mat23;
442
442
  /** Create an identity matrix from pool. */
443
443
  static identity(): ZPP_Mat23;
444
444
  /** Create a public wrapper, recycling any existing inner. */
445
- wrapper(): Any$R;
445
+ wrapper(): Any$T;
446
446
  invalidate(): void;
447
447
  set(m: ZPP_Mat23): void;
448
448
  setas(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
@@ -503,13 +503,13 @@ declare class Mat23 {
503
503
  *
504
504
  * Converted from nape-compiled.js lines 69554–69563.
505
505
  */
506
- type Any$Q = any;
506
+ type Any$S = any;
507
507
  declare class ZPP_GeomPoly {
508
508
  static __name__: string[];
509
- outer: Any$Q;
510
- vertices: Any$Q;
511
- __class__: Any$Q;
512
- constructor(outer?: Any$Q);
509
+ outer: Any$S;
510
+ vertices: Any$S;
511
+ __class__: Any$S;
512
+ constructor(outer?: Any$S);
513
513
  }
514
514
 
515
515
  /**
@@ -533,7 +533,7 @@ declare class Winding {
533
533
  toString(): string;
534
534
  }
535
535
 
536
- type Any$P = any;
536
+ type Any$R = any;
537
537
  /**
538
538
  * A polygon represented as a circular doubly-linked list of vertices.
539
539
  *
@@ -548,8 +548,8 @@ declare class GeomPoly {
548
548
  zpp_inner: ZPP_GeomPoly;
549
549
  zpp_pool: GeomPoly | null;
550
550
  zpp_disp: boolean;
551
- get _inner(): Any$P;
552
- constructor(vertices?: Any$P);
551
+ get _inner(): Any$R;
552
+ constructor(vertices?: Any$R);
553
553
  private _checkDisposed;
554
554
  /** @internal Get compiled ZPP_GeomVert class */
555
555
  private static _gvClass;
@@ -575,12 +575,12 @@ declare class GeomPoly {
575
575
  private static _addVertices;
576
576
  /** @internal After copying, dispose weak Vec2 inputs */
577
577
  private static _disposeWeakInputs;
578
- static get(vertices?: Any$P): GeomPoly;
578
+ static get(vertices?: Any$R): GeomPoly;
579
579
  empty(): boolean;
580
580
  size(): number;
581
- iterator(): Any$P;
582
- forwardIterator(): Any$P;
583
- backwardsIterator(): Any$P;
581
+ iterator(): Any$R;
582
+ forwardIterator(): Any$R;
583
+ backwardsIterator(): Any$R;
584
584
  current(): Vec2;
585
585
  push(vertex: Vec2): this;
586
586
  pop(): this;
@@ -593,7 +593,7 @@ declare class GeomPoly {
593
593
  copy(): GeomPoly;
594
594
  dispose(): void;
595
595
  area(): number;
596
- winding(): Any$P;
596
+ winding(): Any$R;
597
597
  contains(point: Vec2): boolean;
598
598
  isClockwise(): boolean;
599
599
  isConvex(): boolean;
@@ -601,14 +601,14 @@ declare class GeomPoly {
601
601
  isMonotone(): boolean;
602
602
  isDegenerate(): boolean;
603
603
  simplify(epsilon: number): GeomPoly;
604
- simpleDecomposition(output?: Any$P): Any$P;
605
- monotoneDecomposition(output?: Any$P): Any$P;
606
- convexDecomposition(delaunay?: boolean, output?: Any$P): Any$P;
607
- triangularDecomposition(delaunay?: boolean, output?: Any$P): Any$P;
604
+ simpleDecomposition(output?: Any$R): Any$R;
605
+ monotoneDecomposition(output?: Any$R): Any$R;
606
+ convexDecomposition(delaunay?: boolean, output?: Any$R): Any$R;
607
+ triangularDecomposition(delaunay?: boolean, output?: Any$R): Any$R;
608
608
  inflate(inflation: number): GeomPoly;
609
- cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$P): Any$P;
610
- transform(matrix: Any$P): this;
611
- bounds(): Any$P;
609
+ cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$R): Any$R;
610
+ transform(matrix: Any$R): this;
611
+ bounds(): Any$R;
612
612
  top(): Vec2;
613
613
  bottom(): Vec2;
614
614
  left(): Vec2;
@@ -624,30 +624,30 @@ declare class GeomPoly {
624
624
  *
625
625
  * Converted from nape-compiled.js lines 63546–63965, 134951.
626
626
  */
627
- type Any$O = any;
627
+ type Any$Q = any;
628
628
  declare class ZPP_AABB {
629
629
  static zpp_pool: ZPP_AABB | null;
630
630
  static __name__: string[];
631
- static _nape: Any$O;
632
- static _zpp: Any$O;
633
- static _wrapFn: ((zpp: ZPP_AABB) => Any$O) | null;
631
+ static _nape: Any$Q;
632
+ static _zpp: Any$Q;
633
+ static _wrapFn: ((zpp: ZPP_AABB) => Any$Q) | null;
634
634
  _invalidate: ((self: ZPP_AABB) => void) | null;
635
635
  _validate: (() => void) | null;
636
636
  _immutable: boolean;
637
- outer: Any$O;
637
+ outer: Any$Q;
638
638
  next: ZPP_AABB | null;
639
639
  minx: number;
640
640
  miny: number;
641
641
  maxx: number;
642
642
  maxy: number;
643
- wrap_min: Any$O;
644
- wrap_max: Any$O;
645
- __class__: Any$O;
643
+ wrap_min: Any$Q;
644
+ wrap_max: Any$Q;
645
+ __class__: Any$Q;
646
646
  /** Static factory with pooling. */
647
647
  static get(minx: number, miny: number, maxx: number, maxy: number): ZPP_AABB;
648
648
  validate(): void;
649
649
  invalidate(): void;
650
- wrapper(): Any$O;
650
+ wrapper(): Any$Q;
651
651
  alloc(): void;
652
652
  free(): void;
653
653
  copy(): ZPP_AABB;
@@ -658,10 +658,10 @@ declare class ZPP_AABB {
658
658
  private static _makeVec2Wrapper;
659
659
  getmin(): void;
660
660
  dom_min(): void;
661
- mod_min(min: Any$O): void;
661
+ mod_min(min: Any$Q): void;
662
662
  getmax(): void;
663
663
  dom_max(): void;
664
- mod_max(max: Any$O): void;
664
+ mod_max(max: Any$Q): void;
665
665
  intersectX(x: ZPP_AABB): boolean;
666
666
  intersectY(x: ZPP_AABB): boolean;
667
667
  intersect(x: ZPP_AABB): boolean;
@@ -725,18 +725,18 @@ declare class AABB {
725
725
  *
726
726
  * Converted from nape-compiled.js lines 72949–72972.
727
727
  */
728
- type Any$N = any;
728
+ type Any$P = any;
729
729
  declare class ZPP_MatMN {
730
730
  static __name__: string[];
731
- outer: Any$N;
731
+ outer: Any$P;
732
732
  m: number;
733
733
  n: number;
734
734
  x: number[];
735
- __class__: Any$N;
735
+ __class__: Any$P;
736
736
  constructor(m: number, n: number);
737
737
  }
738
738
 
739
- type Any$M = any;
739
+ type Any$O = any;
740
740
  /**
741
741
  * Variable-sized M×N matrix.
742
742
  *
@@ -747,7 +747,7 @@ declare class MatMN {
747
747
  zpp_inner: ZPP_MatMN;
748
748
  get _inner(): NapeInner;
749
749
  constructor(rows: number, cols: number);
750
- static _wrap(inner: Any$M): MatMN;
750
+ static _wrap(inner: Any$O): MatMN;
751
751
  get rows(): number;
752
752
  get cols(): number;
753
753
  x(row: number, col: number): number;
@@ -757,7 +757,7 @@ declare class MatMN {
757
757
  mul(matrix: MatMN): MatMN;
758
758
  }
759
759
 
760
- type Any$L = any;
760
+ type Any$N = any;
761
761
  /**
762
762
  * Isosurface extraction using the marching squares algorithm.
763
763
  *
@@ -780,7 +780,7 @@ declare class MarchingSquares {
780
780
  * @param output - Optional GeomPolyList to populate. If null, a new one is created.
781
781
  * @returns The populated GeomPolyList.
782
782
  */
783
- static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$L): Any$L;
783
+ static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$N): Any$N;
784
784
  }
785
785
 
786
786
  /**
@@ -816,31 +816,31 @@ declare class Ray {
816
816
  *
817
817
  * Converted from nape-compiled.js lines 38897–39076, 86860–86862.
818
818
  */
819
- type Any$K = any;
819
+ type Any$M = any;
820
820
  declare class ZPP_ConvexRayResult {
821
821
  static __name__: string[];
822
822
  static rayPool: ZPP_ConvexRayResult | null;
823
823
  static convexPool: ZPP_ConvexRayResult | null;
824
824
  static internal: boolean;
825
- static _createRayResult: (() => Any$K) | null;
826
- static _createConvexResult: (() => Any$K) | null;
827
- normal: Any$K;
828
- shape: Any$K;
829
- convex: Any$K;
830
- position: Any$K;
831
- ray: Any$K;
825
+ static _createRayResult: (() => Any$M) | null;
826
+ static _createConvexResult: (() => Any$M) | null;
827
+ normal: Any$M;
828
+ shape: Any$M;
829
+ convex: Any$M;
830
+ position: Any$M;
831
+ ray: Any$M;
832
832
  inner: boolean;
833
833
  next: ZPP_ConvexRayResult | null;
834
834
  toiDistance: number;
835
- __class__: Any$K;
836
- static getRay(normal: Any$K, time: number, inner: boolean, shape: Any$K): Any$K;
837
- static getConvex(normal: Any$K, position: Any$K, toiDistance: number, shape: Any$K): Any$K;
835
+ __class__: Any$M;
836
+ static getRay(normal: Any$M, time: number, inner: boolean, shape: Any$M): Any$M;
837
+ static getConvex(normal: Any$M, position: Any$M, toiDistance: number, shape: Any$M): Any$M;
838
838
  disposed(): void;
839
839
  free(): void;
840
840
  private static _disposeVec2;
841
841
  }
842
842
 
843
- type Any$J = any;
843
+ type Any$L = any;
844
844
  /**
845
845
  * Result from a convex-cast query.
846
846
  *
@@ -855,18 +855,18 @@ declare class ConvexResult {
855
855
  get _inner(): NapeInner;
856
856
  constructor();
857
857
  /** @internal */
858
- static _wrap(inner: Any$J): ConvexResult;
858
+ static _wrap(inner: Any$L): ConvexResult;
859
859
  get normal(): Vec2;
860
860
  get position(): Vec2;
861
861
  get toi(): number;
862
- get shape(): Any$J;
862
+ get shape(): Any$L;
863
863
  dispose(): void;
864
864
  toString(): string;
865
865
  /** @internal */
866
866
  private _disposed;
867
867
  }
868
868
 
869
- type Any$I = any;
869
+ type Any$K = any;
870
870
  /**
871
871
  * Result from a raycast query.
872
872
  *
@@ -881,18 +881,18 @@ declare class RayResult {
881
881
  get _inner(): NapeInner;
882
882
  constructor();
883
883
  /** @internal */
884
- static _wrap(inner: Any$I): RayResult;
884
+ static _wrap(inner: Any$K): RayResult;
885
885
  get normal(): Vec2;
886
886
  get distance(): number;
887
887
  get inner(): boolean;
888
- get shape(): Any$I;
888
+ get shape(): Any$K;
889
889
  dispose(): void;
890
890
  toString(): string;
891
891
  /** @internal */
892
892
  private _disposed;
893
893
  }
894
894
 
895
- type Any$H = any;
895
+ type Any$J = any;
896
896
  /**
897
897
  * Static utility class for geometric queries between shapes and bodies.
898
898
  *
@@ -910,7 +910,7 @@ declare class Geom {
910
910
  * @param out2 - Output Vec2 for closest point on body2.
911
911
  * @returns The distance between the two bodies.
912
912
  */
913
- static distanceBody(body1: Any$H, body2: Any$H, out1: Vec2, out2: Vec2): number;
913
+ static distanceBody(body1: Any$J, body2: Any$J, out1: Vec2, out2: Vec2): number;
914
914
  /**
915
915
  * Calculate minimum distance between two shapes and return closest points.
916
916
  * @param shape1 - First shape (must be part of a body).
@@ -919,28 +919,28 @@ declare class Geom {
919
919
  * @param out2 - Output Vec2 for closest point on shape2.
920
920
  * @returns The distance between the two shapes.
921
921
  */
922
- static distance(shape1: Any$H, shape2: Any$H, out1: Vec2, out2: Vec2): number;
922
+ static distance(shape1: Any$J, shape2: Any$J, out1: Vec2, out2: Vec2): number;
923
923
  /**
924
924
  * Test if two bodies intersect (any of their shapes overlap).
925
925
  * @param body1 - First body (must have shapes).
926
926
  * @param body2 - Second body (must have shapes).
927
927
  * @returns True if the bodies intersect.
928
928
  */
929
- static intersectsBody(body1: Any$H, body2: Any$H): boolean;
929
+ static intersectsBody(body1: Any$J, body2: Any$J): boolean;
930
930
  /**
931
931
  * Test if two shapes intersect.
932
932
  * @param shape1 - First shape (must be part of a body).
933
933
  * @param shape2 - Second shape (must be part of a body).
934
934
  * @returns True if the shapes intersect.
935
935
  */
936
- static intersects(shape1: Any$H, shape2: Any$H): boolean;
936
+ static intersects(shape1: Any$J, shape2: Any$J): boolean;
937
937
  /**
938
938
  * Test if shape1 fully contains shape2.
939
939
  * @param shape1 - Containing shape (must be part of a body).
940
940
  * @param shape2 - Contained shape (must be part of a body).
941
941
  * @returns True if shape1 contains shape2.
942
942
  */
943
- static contains(shape1: Any$H, shape2: Any$H): boolean;
943
+ static contains(shape1: Any$J, shape2: Any$J): boolean;
944
944
  }
945
945
 
946
946
  /**
@@ -1004,7 +1004,7 @@ declare class NapeList<T> implements Iterable<T> {
1004
1004
  *
1005
1005
  * Converted from nape-compiled.js lines 87523–87601, 135477–135481.
1006
1006
  */
1007
- type Any$G = any;
1007
+ type Any$I = any;
1008
1008
  declare class ZPP_Material {
1009
1009
  static zpp_pool: ZPP_Material | null;
1010
1010
  static WAKE: number;
@@ -1017,27 +1017,27 @@ declare class ZPP_Material {
1017
1017
  * _nape = the `nape` public namespace (for wrapper creation)
1018
1018
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
1019
1019
  */
1020
- static _nape: Any$G;
1021
- static _zpp: Any$G;
1020
+ static _nape: Any$I;
1021
+ static _zpp: Any$I;
1022
1022
  /**
1023
1023
  * Wrapper factory callback, registered by the modernized Material class.
1024
1024
  * When set, wrapper() uses this instead of creating a compiled Material.
1025
1025
  */
1026
- static _wrapFn: ((zpp: ZPP_Material) => Any$G) | null;
1026
+ static _wrapFn: ((zpp: ZPP_Material) => Any$I) | null;
1027
1027
  elasticity: number;
1028
1028
  dynamicFriction: number;
1029
1029
  staticFriction: number;
1030
1030
  density: number;
1031
1031
  rollingFriction: number;
1032
- shapes: Any$G;
1033
- wrap_shapes: Any$G;
1034
- outer: Any$G;
1035
- userData: Any$G;
1032
+ shapes: Any$I;
1033
+ wrap_shapes: Any$I;
1034
+ outer: Any$I;
1035
+ userData: Any$I;
1036
1036
  next: ZPP_Material | null;
1037
- __class__: Any$G;
1037
+ __class__: Any$I;
1038
1038
  constructor();
1039
1039
  /** Create/return the public nape.phys.Material wrapper for this internal object. */
1040
- wrapper(): Any$G;
1040
+ wrapper(): Any$I;
1041
1041
  /** Called when this object is returned to the pool. */
1042
1042
  free(): void;
1043
1043
  /** Called when this object is taken from the pool. */
@@ -1045,9 +1045,9 @@ declare class ZPP_Material {
1045
1045
  /** Initialize the shapes list (called during feature construction). */
1046
1046
  feature_cons(): void;
1047
1047
  /** Register a shape that uses this material. */
1048
- addShape(shape: Any$G): void;
1048
+ addShape(shape: Any$I): void;
1049
1049
  /** Unregister a shape that no longer uses this material. */
1050
- remShape(shape: Any$G): void;
1050
+ remShape(shape: Any$I): void;
1051
1051
  /** Create a copy with the same property values. */
1052
1052
  copy(): ZPP_Material;
1053
1053
  /** Copy all property values from another ZPP_Material. */
@@ -1107,36 +1107,36 @@ declare class Material {
1107
1107
  *
1108
1108
  * Converted from nape-compiled.js lines 87335–87523, 135403.
1109
1109
  */
1110
- type Any$F = any;
1110
+ type Any$H = any;
1111
1111
  declare class ZPP_FluidProperties {
1112
1112
  static zpp_pool: ZPP_FluidProperties | null;
1113
1113
  static __name__: string[];
1114
- static _nape: Any$F;
1115
- static _zpp: Any$F;
1116
- static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$F) | null;
1114
+ static _nape: Any$H;
1115
+ static _zpp: Any$H;
1116
+ static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$H) | null;
1117
1117
  viscosity: number;
1118
1118
  density: number;
1119
1119
  gravityx: number;
1120
1120
  gravityy: number;
1121
- wrap_gravity: Any$F;
1122
- shapes: Any$F;
1123
- wrap_shapes: Any$F;
1124
- outer: Any$F;
1125
- userData: Any$F;
1121
+ wrap_gravity: Any$H;
1122
+ shapes: Any$H;
1123
+ wrap_shapes: Any$H;
1124
+ outer: Any$H;
1125
+ userData: Any$H;
1126
1126
  next: ZPP_FluidProperties | null;
1127
- __class__: Any$F;
1127
+ __class__: Any$H;
1128
1128
  constructor();
1129
1129
  /** Create/return the public nape.phys.FluidProperties wrapper. */
1130
- wrapper(): Any$F;
1130
+ wrapper(): Any$H;
1131
1131
  free(): void;
1132
1132
  alloc(): void;
1133
1133
  feature_cons(): void;
1134
- addShape(shape: Any$F): void;
1135
- remShape(shape: Any$F): void;
1134
+ addShape(shape: Any$H): void;
1135
+ remShape(shape: Any$H): void;
1136
1136
  /** Copy with object pooling. */
1137
1137
  copy(): ZPP_FluidProperties;
1138
1138
  /** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
1139
- gravity_invalidate(x: Any$F): void;
1139
+ gravity_invalidate(x: Any$H): void;
1140
1140
  /** Sync the gravity Vec2 wrapper with internal values. */
1141
1141
  gravity_validate(): void;
1142
1142
  /** Lazily create and return the gravity Vec2 wrapper. */
@@ -1187,33 +1187,33 @@ declare class FluidProperties {
1187
1187
  *
1188
1188
  * Converted from nape-compiled.js lines 63255–63366, 135329.
1189
1189
  */
1190
- type Any$E = any;
1190
+ type Any$G = any;
1191
1191
  declare class ZPP_InteractionFilter {
1192
1192
  static zpp_pool: ZPP_InteractionFilter | null;
1193
1193
  static __name__: string[];
1194
- static _nape: Any$E;
1195
- static _zpp: Any$E;
1196
- static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$E) | null;
1194
+ static _nape: Any$G;
1195
+ static _zpp: Any$G;
1196
+ static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$G) | null;
1197
1197
  collisionGroup: number;
1198
1198
  collisionMask: number;
1199
1199
  sensorGroup: number;
1200
1200
  sensorMask: number;
1201
1201
  fluidGroup: number;
1202
1202
  fluidMask: number;
1203
- shapes: Any$E;
1204
- wrap_shapes: Any$E;
1205
- outer: Any$E;
1206
- userData: Any$E;
1203
+ shapes: Any$G;
1204
+ wrap_shapes: Any$G;
1205
+ outer: Any$G;
1206
+ userData: Any$G;
1207
1207
  next: ZPP_InteractionFilter | null;
1208
- __class__: Any$E;
1208
+ __class__: Any$G;
1209
1209
  constructor();
1210
1210
  /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
1211
- wrapper(): Any$E;
1211
+ wrapper(): Any$G;
1212
1212
  free(): void;
1213
1213
  alloc(): void;
1214
1214
  feature_cons(): void;
1215
- addShape(shape: Any$E): void;
1216
- remShape(shape: Any$E): void;
1215
+ addShape(shape: Any$G): void;
1216
+ remShape(shape: Any$G): void;
1217
1217
  /** Create a copy with object pooling. */
1218
1218
  copy(): ZPP_InteractionFilter;
1219
1219
  /** Test whether two filters allow collision between their shapes. */
@@ -1277,22 +1277,22 @@ declare class InteractionFilter {
1277
1277
  *
1278
1278
  * Converted from nape-compiled.js lines 63367–63463, 135330–135331.
1279
1279
  */
1280
- type Any$D = any;
1280
+ type Any$F = any;
1281
1281
  declare class ZPP_InteractionGroup {
1282
1282
  static SHAPE: number;
1283
1283
  static BODY: number;
1284
1284
  static __name__: string[];
1285
- static _zpp: Any$D;
1286
- static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$D) | null;
1287
- outer: Any$D;
1285
+ static _zpp: Any$F;
1286
+ static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$F) | null;
1287
+ outer: Any$F;
1288
1288
  ignore: boolean;
1289
1289
  group: ZPP_InteractionGroup | null;
1290
- groups: Any$D;
1291
- wrap_groups: Any$D;
1292
- interactors: Any$D;
1293
- wrap_interactors: Any$D;
1290
+ groups: Any$F;
1291
+ wrap_groups: Any$F;
1292
+ interactors: Any$F;
1293
+ wrap_interactors: Any$F;
1294
1294
  depth: number;
1295
- __class__: Any$D;
1295
+ __class__: Any$F;
1296
1296
  constructor();
1297
1297
  /** Set or change the parent group. */
1298
1298
  setGroup(group: ZPP_InteractionGroup | null): void;
@@ -1303,9 +1303,9 @@ declare class ZPP_InteractionGroup {
1303
1303
  /** Remove a child group. */
1304
1304
  remGroup(group: ZPP_InteractionGroup): void;
1305
1305
  /** Register an interactor in this group. */
1306
- addInteractor(intx: Any$D): void;
1306
+ addInteractor(intx: Any$F): void;
1307
1307
  /** Unregister an interactor from this group. */
1308
- remInteractor(intx: Any$D, flag?: number): void;
1308
+ remInteractor(intx: Any$F, flag?: number): void;
1309
1309
  }
1310
1310
 
1311
1311
  /**
@@ -1345,9 +1345,22 @@ declare class InteractionGroup {
1345
1345
  * Cannot be instantiated directly — only via Body, Shape, or Compound.
1346
1346
  * Provides shared properties: id, userData, group, cbTypes, and type
1347
1347
  * casting methods (castBody, castShape, castCompound).
1348
+ *
1349
+ * Fully modernized — all methods use ZPP_Interactor fields directly
1350
+ * via `zpp_inner_i` (no compiled prototype delegation).
1348
1351
  */
1349
1352
  declare class Interactor {
1350
- /** @internal */
1353
+ /**
1354
+ * @internal ZPP_Interactor-compatible object set by subclass constructors.
1355
+ * For fully modernized subclasses (Body, Compound): this is the ZPP_Body/ZPP_Compound.
1356
+ * For thin wrappers (Circle, Polygon): this is copied from the compiled inner object.
1357
+ */
1358
+ zpp_inner_i: any;
1359
+ /**
1360
+ * @internal Backward-compatible accessor for compiled Shape/Circle/Polygon code.
1361
+ * Thin wrappers set this to the compiled inner object; modernized subclasses set
1362
+ * it to `this`. Shape-level methods still delegate through this.
1363
+ */
1351
1364
  readonly _inner: NapeInner;
1352
1365
  /** @internal – only subclasses may construct. */
1353
1366
  protected constructor();
@@ -1361,7 +1374,7 @@ declare class Interactor {
1361
1374
  get group(): InteractionGroup | null;
1362
1375
  set group(value: InteractionGroup | null);
1363
1376
  /** Callback types assigned to this interactor. */
1364
- get cbTypes(): NapeInner;
1377
+ get cbTypes(): any;
1365
1378
  /** Cast to Body — returns the Body wrapper if this is a Body, else null. */
1366
1379
  get castBody(): any;
1367
1380
  /** Cast to Shape — returns the Shape wrapper if this is a Shape, else null. */
@@ -1465,7 +1478,7 @@ interface CbTypeSet {
1465
1478
  *
1466
1479
  * Converted from nape-compiled.js lines 21424–21827.
1467
1480
  */
1468
- type Any$C = any;
1481
+ type Any$E = any;
1469
1482
  declare class ZPP_Constraint {
1470
1483
  static __name__: string[];
1471
1484
  /**
@@ -1473,13 +1486,13 @@ declare class ZPP_Constraint {
1473
1486
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
1474
1487
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
1475
1488
  */
1476
- static _nape: Any$C;
1477
- static _zpp: Any$C;
1478
- outer: Any$C;
1489
+ static _nape: Any$E;
1490
+ static _zpp: Any$E;
1491
+ outer: Any$E;
1479
1492
  id: number;
1480
- userData: Any$C;
1481
- compound: Any$C;
1482
- space: Any$C;
1493
+ userData: Any$E;
1494
+ compound: Any$E;
1495
+ space: Any$E;
1483
1496
  active: boolean;
1484
1497
  stiff: boolean;
1485
1498
  frequency: number;
@@ -1489,14 +1502,14 @@ declare class ZPP_Constraint {
1489
1502
  breakUnderForce: boolean;
1490
1503
  breakUnderError: boolean;
1491
1504
  removeOnBreak: boolean;
1492
- component: Any$C;
1505
+ component: Any$E;
1493
1506
  ignore: boolean;
1494
1507
  __velocity: boolean;
1495
- cbTypes: Any$C;
1496
- cbSet: Any$C;
1497
- wrap_cbTypes: Any$C;
1508
+ cbTypes: Any$E;
1509
+ cbSet: Any$E;
1510
+ wrap_cbTypes: Any$E;
1498
1511
  pre_dt: number;
1499
- __class__: Any$C;
1512
+ __class__: Any$E;
1500
1513
  constructor();
1501
1514
  /**
1502
1515
  * Initialise base constraint fields.
@@ -1514,18 +1527,18 @@ declare class ZPP_Constraint {
1514
1527
  forest(): void;
1515
1528
  broken(): void;
1516
1529
  warmStart(): void;
1517
- draw(_g: Any$C): void;
1518
- pair_exists(_id: Any$C, _di: Any$C): boolean;
1530
+ draw(_g: Any$E): void;
1531
+ pair_exists(_id: Any$E, _di: Any$E): boolean;
1519
1532
  preStep(_dt: number): boolean;
1520
1533
  applyImpulseVel(): boolean;
1521
1534
  applyImpulsePos(): boolean;
1522
- copy(_dict?: Any$C, _todo?: Any$C): Any$C;
1535
+ copy(_dict?: Any$E, _todo?: Any$E): Any$E;
1523
1536
  immutable_midstep(name: string): void;
1524
1537
  setupcbTypes(): void;
1525
1538
  immutable_cbTypes(): void;
1526
- wrap_cbTypes_subber(pcb: Any$C): void;
1527
- wrap_cbTypes_adder(cb: Any$C): boolean;
1528
- insert_cbtype(cb: Any$C): void;
1539
+ wrap_cbTypes_subber(pcb: Any$E): void;
1540
+ wrap_cbTypes_adder(cb: Any$E): boolean;
1541
+ insert_cbtype(cb: Any$E): void;
1529
1542
  alloc_cbSet(): void;
1530
1543
  dealloc_cbSet(): void;
1531
1544
  activate(): void;
@@ -1535,12 +1548,12 @@ declare class ZPP_Constraint {
1535
1548
  activeInSpace(): void;
1536
1549
  inactiveOrOutSpace(): void;
1537
1550
  wake(): void;
1538
- copyto(ret: Any$C): void;
1539
- static _findRoot(comp: Any$C): Any$C;
1540
- static _unionComponents(a: Any$C, b: Any$C): void;
1551
+ copyto(ret: Any$E): void;
1552
+ static _findRoot(comp: Any$E): Any$E;
1553
+ static _unionComponents(a: Any$E, b: Any$E): void;
1541
1554
  }
1542
1555
 
1543
- type Any$B = any;
1556
+ type Any$D = any;
1544
1557
  /**
1545
1558
  * Base class for all constraints / joints.
1546
1559
  *
@@ -1557,16 +1570,16 @@ declare class Constraint {
1557
1570
  * are fully modernized. Also serves as backward compat for compiled code.
1558
1571
  * @internal
1559
1572
  */
1560
- _inner: Any$B;
1573
+ _inner: Any$D;
1561
1574
  debugDraw: boolean;
1562
1575
  /** @internal */
1563
1576
  protected constructor();
1564
1577
  /** @internal */
1565
- static _wrap(inner: Any$B): Constraint;
1578
+ static _wrap(inner: Any$D): Constraint;
1566
1579
  get space(): Space | null;
1567
1580
  set space(value: Space | null);
1568
- get compound(): Any$B;
1569
- set compound(value: Any$B);
1581
+ get compound(): Any$D;
1582
+ set compound(value: Any$D);
1570
1583
  get active(): boolean;
1571
1584
  set active(value: boolean);
1572
1585
  get ignore(): boolean;
@@ -1589,17 +1602,17 @@ declare class Constraint {
1589
1602
  set removeOnBreak(value: boolean);
1590
1603
  get isSleeping(): boolean;
1591
1604
  get userData(): Record<string, unknown>;
1592
- get cbTypes(): Any$B;
1593
- impulse(): Any$B;
1594
- bodyImpulse(_body: Body): Any$B;
1605
+ get cbTypes(): Any$D;
1606
+ impulse(): Any$D;
1607
+ bodyImpulse(_body: Body): Any$D;
1595
1608
  visitBodies(_fn: (body: Body) => void): void;
1596
1609
  copy(): Constraint;
1597
1610
  toString(): string;
1598
- /** @internal */ get_userData(): Any$B;
1599
- /** @internal */ get_compound(): Any$B;
1600
- /** @internal */ set_compound(v: Any$B): Any$B;
1601
- /** @internal */ get_space(): Any$B;
1602
- /** @internal */ set_space(v: Any$B): Any$B;
1611
+ /** @internal */ get_userData(): Any$D;
1612
+ /** @internal */ get_compound(): Any$D;
1613
+ /** @internal */ set_compound(v: Any$D): Any$D;
1614
+ /** @internal */ get_space(): Any$D;
1615
+ /** @internal */ set_space(v: Any$D): Any$D;
1603
1616
  /** @internal */ get_isSleeping(): boolean;
1604
1617
  /** @internal */ get_active(): boolean;
1605
1618
  /** @internal */ set_active(v: boolean): boolean;
@@ -1621,7 +1634,7 @@ declare class Constraint {
1621
1634
  /** @internal */ set_breakUnderError(v: boolean): boolean;
1622
1635
  /** @internal */ get_removeOnBreak(): boolean;
1623
1636
  /** @internal */ set_removeOnBreak(v: boolean): boolean;
1624
- /** @internal */ get_cbTypes(): Any$B;
1637
+ /** @internal */ get_cbTypes(): Any$D;
1625
1638
  }
1626
1639
 
1627
1640
  /**
@@ -1633,24 +1646,24 @@ declare class Constraint {
1633
1646
  *
1634
1647
  * Converted from nape-compiled.js lines 27259–27304, 112053–112139.
1635
1648
  */
1636
- type Any$A = any;
1649
+ type Any$C = any;
1637
1650
  declare class ZPP_Listener {
1638
1651
  static __name__: string[];
1639
- static _nape: Any$A;
1640
- static _zpp: Any$A;
1652
+ static _nape: Any$C;
1653
+ static _zpp: Any$C;
1641
1654
  static internal: boolean;
1642
- static types: Any$A[];
1643
- static events: Any$A[];
1644
- space: Any$A;
1645
- interaction: Any$A;
1646
- constraint: Any$A;
1647
- body: Any$A;
1655
+ static types: Any$C[];
1656
+ static events: Any$C[];
1657
+ space: Any$C;
1658
+ interaction: Any$C;
1659
+ constraint: Any$C;
1660
+ body: Any$C;
1648
1661
  precedence: number;
1649
1662
  event: number;
1650
1663
  type: number;
1651
1664
  id: number;
1652
- outer: Any$A;
1653
- __class__: Any$A;
1665
+ outer: Any$C;
1666
+ __class__: Any$C;
1654
1667
  constructor();
1655
1668
  /** Sort comparator: higher precedence first, then by id descending. */
1656
1669
  static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
@@ -1726,20 +1739,20 @@ declare class ListenerType {
1726
1739
  * Fully modernized from nape-compiled.js lines 231–433.
1727
1740
  */
1728
1741
 
1729
- type Any$z = any;
1742
+ type Any$B = any;
1730
1743
  declare class Listener {
1731
1744
  static __name__: string[];
1732
1745
  zpp_inner: ZPP_Listener;
1733
- get _inner(): Any$z;
1746
+ get _inner(): Any$B;
1734
1747
  constructor();
1735
- static _wrap(inner: Any$z): Listener;
1748
+ static _wrap(inner: Any$B): Listener;
1736
1749
  get type(): ListenerType;
1737
1750
  get event(): CbEvent;
1738
1751
  set event(event: CbEvent);
1739
1752
  get precedence(): number;
1740
1753
  set precedence(precedence: number);
1741
1754
  get space(): Space | null;
1742
- set space(space: Space | Any$z | null);
1755
+ set space(space: Space | Any$B | null);
1743
1756
  toString(): string;
1744
1757
  }
1745
1758
 
@@ -1826,46 +1839,46 @@ declare class BodyType {
1826
1839
  * Converted from nape-compiled.js lines 52431–54547.
1827
1840
  */
1828
1841
 
1829
- type Any$y = any;
1842
+ type Any$A = any;
1830
1843
  declare class ZPP_Body {
1831
1844
  static __name__: string[];
1832
- static __super__: Any$y;
1845
+ static __super__: Any$A;
1833
1846
  /**
1834
1847
  * Namespace references, set by the compiled module after import.
1835
1848
  * _nape = the `nape` public namespace
1836
1849
  * _zpp = the `zpp_nape` internal namespace
1837
1850
  */
1838
- static _nape: Any$y;
1839
- static _zpp: Any$y;
1840
- static types: Any$y[];
1841
- static bodystack: Any$y;
1842
- static bodyset: Any$y;
1851
+ static _nape: Any$A;
1852
+ static _zpp: Any$A;
1853
+ static types: Any$A[];
1854
+ static bodystack: Any$A;
1855
+ static bodyset: Any$A;
1843
1856
  static cur_graph_depth: number;
1844
- static bodysetlt(a: Any$y, b: Any$y): boolean;
1845
- static __static(): Any$y;
1846
- outer_i: Any$y;
1857
+ static bodysetlt(a: Any$A, b: Any$A): boolean;
1858
+ static __static(): Any$A;
1859
+ outer_i: Any$A;
1847
1860
  id: number;
1848
- userData: Any$y;
1849
- ishape: Any$y;
1850
- ibody: Any$y;
1851
- icompound: Any$y;
1852
- wrap_cbTypes: Any$y;
1853
- cbSet: Any$y;
1854
- cbTypes: Any$y;
1855
- group: Any$y;
1856
- cbsets: Any$y;
1857
- outer: Any$y;
1861
+ userData: Any$A;
1862
+ ishape: Any$A;
1863
+ ibody: Any$A;
1864
+ icompound: Any$A;
1865
+ wrap_cbTypes: Any$A;
1866
+ cbSet: Any$A;
1867
+ cbTypes: Any$A;
1868
+ group: Any$A;
1869
+ cbsets: Any$A;
1870
+ outer: Any$A;
1858
1871
  world: boolean;
1859
1872
  type: number;
1860
- compound: Any$y;
1861
- shapes: Any$y;
1862
- wrap_shapes: Any$y;
1863
- space: Any$y;
1864
- arbiters: Any$y;
1865
- wrap_arbiters: Any$y;
1866
- constraints: Any$y;
1867
- wrap_constraints: Any$y;
1868
- component: Any$y;
1873
+ compound: Any$A;
1874
+ shapes: Any$A;
1875
+ wrap_shapes: Any$A;
1876
+ space: Any$A;
1877
+ arbiters: Any$A;
1878
+ wrap_arbiters: Any$A;
1879
+ constraints: Any$A;
1880
+ wrap_constraints: Any$A;
1881
+ component: Any$A;
1869
1882
  graph_depth: number;
1870
1883
  sweepTime: number;
1871
1884
  sweep_angvel: number;
@@ -1878,20 +1891,20 @@ declare class ZPP_Body {
1878
1891
  pre_posy: number;
1879
1892
  posx: number;
1880
1893
  posy: number;
1881
- wrap_pos: Any$y;
1894
+ wrap_pos: Any$A;
1882
1895
  velx: number;
1883
1896
  vely: number;
1884
- wrap_vel: Any$y;
1897
+ wrap_vel: Any$A;
1885
1898
  forcex: number;
1886
1899
  forcey: number;
1887
- wrap_force: Any$y;
1900
+ wrap_force: Any$A;
1888
1901
  kinvelx: number;
1889
1902
  kinvely: number;
1890
- wrap_kinvel: Any$y;
1903
+ wrap_kinvel: Any$A;
1891
1904
  svelx: number;
1892
1905
  svely: number;
1893
- wrap_svel: Any$y;
1894
- wrapcvel: Any$y;
1906
+ wrap_svel: Any$A;
1907
+ wrapcvel: Any$A;
1895
1908
  angvel: number;
1896
1909
  torque: number;
1897
1910
  kinangvel: number;
@@ -1928,9 +1941,9 @@ declare class ZPP_Body {
1928
1941
  worldCOMx: number;
1929
1942
  worldCOMy: number;
1930
1943
  zip_worldCOM: boolean;
1931
- wrap_localCOM: Any$y;
1932
- wrap_worldCOM: Any$y;
1933
- __class__: Any$y;
1944
+ wrap_localCOM: Any$A;
1945
+ wrap_worldCOM: Any$A;
1946
+ __class__: Any$A;
1934
1947
  constructor();
1935
1948
  isStatic(): boolean;
1936
1949
  isDynamic(): boolean;
@@ -1938,23 +1951,23 @@ declare class ZPP_Body {
1938
1951
  invalidate_type(): void;
1939
1952
  invalidate_shapes(): void;
1940
1953
  init_bodysetlist(): void;
1941
- connectedBodies_cont(b: Any$y): void;
1942
- connectedBodies(depth: number, output: Any$y): Any$y;
1943
- interactingBodies(type: number, output: Any$y): Any$y;
1954
+ connectedBodies_cont(b: Any$A): void;
1955
+ connectedBodies(depth: number, output: Any$A): Any$A;
1956
+ interactingBodies(type: number, output: Any$A): Any$A;
1944
1957
  atRest(dt: number): boolean;
1945
1958
  refreshArbiters(): void;
1946
1959
  sweepIntegrate(dt: number): void;
1947
- sweepValidate(s: Any$y): void;
1960
+ sweepValidate(s: Any$A): void;
1948
1961
  invalidate_pos(): void;
1949
- pos_invalidate(pos: Any$y): void;
1962
+ pos_invalidate(pos: Any$A): void;
1950
1963
  pos_validate(): void;
1951
- vel_invalidate(vel: Any$y): void;
1964
+ vel_invalidate(vel: Any$A): void;
1952
1965
  vel_validate(): void;
1953
- kinvel_invalidate(vel: Any$y): void;
1966
+ kinvel_invalidate(vel: Any$A): void;
1954
1967
  kinvel_validate(): void;
1955
- svel_invalidate(vel: Any$y): void;
1968
+ svel_invalidate(vel: Any$A): void;
1956
1969
  svel_validate(): void;
1957
- force_invalidate(force: Any$y): void;
1970
+ force_invalidate(force: Any$A): void;
1958
1971
  force_validate(): void;
1959
1972
  private _setupVec2Wrapper;
1960
1973
  setupPosition(): void;
@@ -1991,37 +2004,37 @@ declare class ZPP_Body {
1991
2004
  getworldCOM(): void;
1992
2005
  __immutable_midstep(): void;
1993
2006
  clear(): void;
1994
- shapes_adder(s: Any$y): boolean;
1995
- shapes_subber(s: Any$y): void;
1996
- shapes_invalidate(_param: Any$y): void;
2007
+ shapes_adder(s: Any$A): boolean;
2008
+ shapes_subber(s: Any$A): void;
2009
+ shapes_invalidate(_param: Any$A): void;
1997
2010
  shapes_modifiable(): void;
1998
2011
  addedToSpace(): void;
1999
2012
  removedFromSpace(): void;
2000
2013
  private _removeArbiterFromList;
2001
- copy(): Any$y;
2014
+ copy(): Any$A;
2002
2015
  wake: () => void;
2003
2016
  __iaddedToSpace: () => void;
2004
2017
  __iremovedFromSpace: () => void;
2005
2018
  immutable_midstep: (name: string) => void;
2006
- copyto: (ret: Any$y) => void;
2007
- insert_cbtype: (cb: Any$y) => void;
2019
+ copyto: (ret: Any$A) => void;
2020
+ insert_cbtype: (cb: Any$A) => void;
2008
2021
  alloc_cbSet: () => void;
2009
2022
  dealloc_cbSet: () => void;
2010
2023
  setupcbTypes: () => void;
2011
2024
  immutable_cbTypes: () => void;
2012
- wrap_cbTypes_subber: (pcb: Any$y) => void;
2013
- wrap_cbTypes_adder: (cb: Any$y) => void;
2014
- setGroup: (group: Any$y) => void;
2015
- lookup_group: () => Any$y;
2016
- getSpace: () => Any$y;
2025
+ wrap_cbTypes_subber: (pcb: Any$A) => void;
2026
+ wrap_cbTypes_adder: (cb: Any$A) => void;
2027
+ setGroup: (group: Any$A) => void;
2028
+ lookup_group: () => Any$A;
2029
+ getSpace: () => Any$A;
2017
2030
  isShape: () => boolean;
2018
2031
  isBody: () => boolean;
2019
2032
  isCompound: () => boolean;
2020
2033
  static _initialized: boolean;
2021
- static _init(zpp: Any$y, nape: Any$y): void;
2034
+ static _init(zpp: Any$A, nape: Any$A): void;
2022
2035
  }
2023
2036
 
2024
- type Any$x = any;
2037
+ type Any$z = any;
2025
2038
  /**
2026
2039
  * A rigid body in the physics simulation.
2027
2040
  *
@@ -2029,7 +2042,7 @@ type Any$x = any;
2029
2042
  */
2030
2043
  declare class Body extends Interactor {
2031
2044
  static __name__: string[];
2032
- static __super__: Any$x;
2045
+ static __super__: Any$z;
2033
2046
  /** Direct access to the extracted internal ZPP_Body. */
2034
2047
  zpp_inner: ZPP_Body;
2035
2048
  debugDraw: boolean;
@@ -2081,47 +2094,47 @@ declare class Body extends Interactor {
2081
2094
  get shapes(): NapeList<Shape>;
2082
2095
  get space(): Space;
2083
2096
  set space(value: Space | null);
2084
- get compound(): Any$x;
2085
- set compound(value: Any$x);
2097
+ get compound(): Any$z;
2098
+ set compound(value: Any$z);
2086
2099
  get bounds(): AABB;
2087
2100
  get constraintVelocity(): Vec2;
2088
2101
  get localCOM(): Vec2;
2089
2102
  get worldCOM(): Vec2;
2090
- get massMode(): Any$x;
2091
- set massMode(value: Any$x);
2092
- get inertiaMode(): Any$x;
2093
- set inertiaMode(value: Any$x);
2094
- get gravMassMode(): Any$x;
2095
- set gravMassMode(value: Any$x);
2103
+ get massMode(): Any$z;
2104
+ set massMode(value: Any$z);
2105
+ get inertiaMode(): Any$z;
2106
+ set inertiaMode(value: Any$z);
2107
+ get gravMassMode(): Any$z;
2108
+ set gravMassMode(value: Any$z);
2096
2109
  copy(): Body;
2097
2110
  toString(): string;
2098
- get_type(): Any$x;
2099
- set_type(type: Any$x): Any$x;
2100
- get_shapes(): Any$x;
2111
+ get_type(): Any$z;
2112
+ set_type(type: Any$z): Any$z;
2113
+ get_shapes(): Any$z;
2101
2114
  get_isBullet(): boolean;
2102
2115
  set_isBullet(v: boolean): boolean;
2103
2116
  get_disableCCD(): boolean;
2104
2117
  set_disableCCD(v: boolean): boolean;
2105
- get_position(): Any$x;
2106
- set_position(position: Any$x): Any$x;
2107
- get_velocity(): Any$x;
2108
- set_velocity(velocity: Any$x): Any$x;
2118
+ get_position(): Any$z;
2119
+ set_position(position: Any$z): Any$z;
2120
+ get_velocity(): Any$z;
2121
+ set_velocity(velocity: Any$z): Any$z;
2109
2122
  get_rotation(): number;
2110
2123
  set_rotation(rotation: number): number;
2111
2124
  get_angularVel(): number;
2112
2125
  set_angularVel(angularVel: number): number;
2113
- get_kinematicVel(): Any$x;
2114
- set_kinematicVel(kinematicVel: Any$x): Any$x;
2126
+ get_kinematicVel(): Any$z;
2127
+ set_kinematicVel(kinematicVel: Any$z): Any$z;
2115
2128
  get_kinAngVel(): number;
2116
2129
  set_kinAngVel(kinAngVel: number): number;
2117
- get_surfaceVel(): Any$x;
2118
- set_surfaceVel(surfaceVel: Any$x): Any$x;
2119
- get_force(): Any$x;
2120
- set_force(force: Any$x): Any$x;
2130
+ get_surfaceVel(): Any$z;
2131
+ set_surfaceVel(surfaceVel: Any$z): Any$z;
2132
+ get_force(): Any$z;
2133
+ set_force(force: Any$z): Any$z;
2121
2134
  get_torque(): number;
2122
2135
  set_torque(torque: number): number;
2123
- get_bounds(): Any$x;
2124
- get_constraintVelocity(): Any$x;
2136
+ get_bounds(): Any$z;
2137
+ get_constraintVelocity(): Any$z;
2125
2138
  get_constraintMass(): number;
2126
2139
  get_constraintInertia(): number;
2127
2140
  get_allowMovement(): boolean;
@@ -2129,28 +2142,28 @@ declare class Body extends Interactor {
2129
2142
  get_allowRotation(): boolean;
2130
2143
  set_allowRotation(allowRotation: boolean): boolean;
2131
2144
  get_isSleeping(): boolean;
2132
- get_compound(): Any$x;
2133
- set_compound(compound: Any$x): Any$x;
2134
- get_space(): Any$x;
2135
- set_space(space: Any$x): Any$x;
2136
- get_arbiters(): Any$x;
2137
- get_constraints(): Any$x;
2138
- get_massMode(): Any$x;
2139
- set_massMode(massMode: Any$x): Any$x;
2145
+ get_compound(): Any$z;
2146
+ set_compound(compound: Any$z): Any$z;
2147
+ get_space(): Any$z;
2148
+ set_space(space: Any$z): Any$z;
2149
+ get_arbiters(): Any$z;
2150
+ get_constraints(): Any$z;
2151
+ get_massMode(): Any$z;
2152
+ set_massMode(massMode: Any$z): Any$z;
2140
2153
  get_mass(): number;
2141
2154
  set_mass(mass: number): number;
2142
- get_gravMassMode(): Any$x;
2143
- set_gravMassMode(gravMassMode: Any$x): Any$x;
2155
+ get_gravMassMode(): Any$z;
2156
+ set_gravMassMode(gravMassMode: Any$z): Any$z;
2144
2157
  get_gravMass(): number;
2145
2158
  set_gravMass(gravMass: number): number;
2146
2159
  get_gravMassScale(): number;
2147
2160
  set_gravMassScale(gravMassScale: number): number;
2148
- get_inertiaMode(): Any$x;
2149
- set_inertiaMode(inertiaMode: Any$x): Any$x;
2161
+ get_inertiaMode(): Any$z;
2162
+ set_inertiaMode(inertiaMode: Any$z): Any$z;
2150
2163
  get_inertia(): number;
2151
2164
  set_inertia(inertia: number): number;
2152
- get_localCOM(): Any$x;
2153
- get_worldCOM(): Any$x;
2165
+ get_localCOM(): Any$z;
2166
+ get_worldCOM(): Any$z;
2154
2167
  integrate(deltaTime: number): Body;
2155
2168
  localPointToWorld(point: Vec2, weak?: boolean): Vec2;
2156
2169
  worldPointToLocal(point: Vec2, weak?: boolean): Vec2;
@@ -2162,24 +2175,24 @@ declare class Body extends Interactor {
2162
2175
  translateShapes(translation: Vec2): Body;
2163
2176
  rotateShapes(angle: number): Body;
2164
2177
  scaleShapes(scaleX: number, scaleY: number): Body;
2165
- transformShapes(matrix: Any$x): Body;
2178
+ transformShapes(matrix: Any$z): Body;
2166
2179
  align(): Body;
2167
2180
  rotate(centre: Vec2, angle: number): Body;
2168
- setShapeMaterials(material: Any$x): Body;
2169
- setShapeFilters(filter: Any$x): Body;
2170
- setShapeFluidProperties(fluidProperties: Any$x): Body;
2181
+ setShapeMaterials(material: Any$z): Body;
2182
+ setShapeFilters(filter: Any$z): Body;
2183
+ setShapeFluidProperties(fluidProperties: Any$z): Body;
2171
2184
  contains(point: Vec2): boolean;
2172
- connectedBodies(depth?: number, output?: Any$x): Any$x;
2173
- interactingBodies(type?: Any$x, depth?: number, output?: Any$x): Any$x;
2174
- normalImpulse(body?: Any$x, freshOnly?: boolean): Vec3;
2175
- tangentImpulse(body?: Any$x, freshOnly?: boolean): Vec3;
2176
- totalContactsImpulse(body?: Any$x, freshOnly?: boolean): Vec3;
2177
- rollingImpulse(body?: Any$x, freshOnly?: boolean): number;
2178
- buoyancyImpulse(body?: Any$x): Vec3;
2179
- dragImpulse(body?: Any$x): Vec3;
2180
- totalFluidImpulse(body?: Any$x): Vec3;
2185
+ connectedBodies(depth?: number, output?: Any$z): Any$z;
2186
+ interactingBodies(type?: Any$z, depth?: number, output?: Any$z): Any$z;
2187
+ normalImpulse(body?: Any$z, freshOnly?: boolean): Vec3;
2188
+ tangentImpulse(body?: Any$z, freshOnly?: boolean): Vec3;
2189
+ totalContactsImpulse(body?: Any$z, freshOnly?: boolean): Vec3;
2190
+ rollingImpulse(body?: Any$z, freshOnly?: boolean): number;
2191
+ buoyancyImpulse(body?: Any$z): Vec3;
2192
+ dragImpulse(body?: Any$z): Vec3;
2193
+ totalFluidImpulse(body?: Any$z): Vec3;
2181
2194
  constraintsImpulse(): Vec3;
2182
- totalImpulse(body?: Any$x, freshOnly?: boolean): Vec3;
2195
+ totalImpulse(body?: Any$z, freshOnly?: boolean): Vec3;
2183
2196
  crushFactor(): number;
2184
2197
  private _arbiterImpulseQuery;
2185
2198
  }
@@ -2192,77 +2205,77 @@ declare class Body extends Interactor {
2192
2205
  *
2193
2206
  * Converted from nape-compiled.js lines 55195–55521.
2194
2207
  */
2195
- type Any$w = any;
2208
+ type Any$y = any;
2196
2209
  declare class ZPP_Compound {
2197
2210
  static __name__: string[];
2198
- static __super__: Any$w;
2211
+ static __super__: Any$y;
2199
2212
  /**
2200
2213
  * Namespace references, set by the compiled module after import.
2201
2214
  * _nape = the `nape` public namespace (for wrapper creation in copy())
2202
2215
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
2203
2216
  */
2204
- static _nape: Any$w;
2205
- static _zpp: Any$w;
2217
+ static _nape: Any$y;
2218
+ static _zpp: Any$y;
2206
2219
  /**
2207
2220
  * Wrapper factory callback, registered by the modernized Compound class.
2208
2221
  * When set, wrapper() uses this instead of the compiled Compound constructor.
2209
2222
  */
2210
- static _wrapFn: ((zpp: ZPP_Compound) => Any$w) | null;
2211
- outer_i: Any$w;
2223
+ static _wrapFn: ((zpp: ZPP_Compound) => Any$y) | null;
2224
+ outer_i: Any$y;
2212
2225
  id: number;
2213
- userData: Any$w;
2214
- ishape: Any$w;
2215
- ibody: Any$w;
2216
- icompound: Any$w;
2217
- wrap_cbTypes: Any$w;
2218
- cbSet: Any$w;
2219
- cbTypes: Any$w;
2220
- group: Any$w;
2221
- cbsets: Any$w;
2222
- outer: Any$w;
2223
- bodies: Any$w;
2224
- constraints: Any$w;
2225
- compounds: Any$w;
2226
- wrap_bodies: Any$w;
2227
- wrap_constraints: Any$w;
2228
- wrap_compounds: Any$w;
2226
+ userData: Any$y;
2227
+ ishape: Any$y;
2228
+ ibody: Any$y;
2229
+ icompound: Any$y;
2230
+ wrap_cbTypes: Any$y;
2231
+ cbSet: Any$y;
2232
+ cbTypes: Any$y;
2233
+ group: Any$y;
2234
+ cbsets: Any$y;
2235
+ outer: Any$y;
2236
+ bodies: Any$y;
2237
+ constraints: Any$y;
2238
+ compounds: Any$y;
2239
+ wrap_bodies: Any$y;
2240
+ wrap_constraints: Any$y;
2241
+ wrap_compounds: Any$y;
2229
2242
  depth: number;
2230
- compound: Any$w;
2231
- space: Any$w;
2232
- __class__: Any$w;
2243
+ compound: Any$y;
2244
+ space: Any$y;
2245
+ __class__: Any$y;
2233
2246
  constructor();
2234
2247
  __imutable_midstep(name: string): void;
2235
2248
  addedToSpace(): void;
2236
2249
  removedFromSpace(): void;
2237
2250
  breakApart(): void;
2238
2251
  private static _zppOf;
2239
- bodies_adder(x: Any$w): boolean;
2240
- bodies_subber(x: Any$w): void;
2252
+ bodies_adder(x: Any$y): boolean;
2253
+ bodies_subber(x: Any$y): void;
2241
2254
  bodies_modifiable(): void;
2242
- constraints_adder(x: Any$w): boolean;
2243
- constraints_subber(x: Any$w): void;
2255
+ constraints_adder(x: Any$y): boolean;
2256
+ constraints_subber(x: Any$y): void;
2244
2257
  constraints_modifiable(): void;
2245
- compounds_adder(x: Any$w): boolean;
2246
- compounds_subber(x: Any$w): void;
2258
+ compounds_adder(x: Any$y): boolean;
2259
+ compounds_subber(x: Any$y): void;
2247
2260
  compounds_modifiable(): void;
2248
- copy(dict?: Any$w[], todo?: Any$w[]): Any$w;
2261
+ copy(dict?: Any$y[], todo?: Any$y[]): Any$y;
2249
2262
  isShape: () => boolean;
2250
2263
  isBody: () => boolean;
2251
2264
  isCompound: () => boolean;
2252
2265
  __iaddedToSpace: () => void;
2253
2266
  __iremovedFromSpace: () => void;
2254
2267
  wake: () => void;
2255
- getSpace: () => Any$w;
2268
+ getSpace: () => Any$y;
2256
2269
  setupcbTypes: () => void;
2257
2270
  immutable_cbTypes: () => void;
2258
- wrap_cbTypes_subber: (pcb: Any$w) => void;
2259
- wrap_cbTypes_adder: (cb: Any$w) => boolean;
2260
- insert_cbtype: (cb: Any$w) => void;
2271
+ wrap_cbTypes_subber: (pcb: Any$y) => void;
2272
+ wrap_cbTypes_adder: (cb: Any$y) => boolean;
2273
+ insert_cbtype: (cb: Any$y) => void;
2261
2274
  alloc_cbSet: () => void;
2262
2275
  dealloc_cbSet: () => void;
2263
2276
  immutable_midstep: (name: string) => void;
2264
- copyto: (ret: Any$w) => void;
2265
- lookup_group: () => Any$w;
2277
+ copyto: (ret: Any$y) => void;
2278
+ lookup_group: () => Any$y;
2266
2279
  /**
2267
2280
  * Initialize prototype by copying ZPP_Interactor methods.
2268
2281
  * Must be called after _zpp is set (during compiled module init).
@@ -2270,7 +2283,7 @@ declare class ZPP_Compound {
2270
2283
  static _init(): void;
2271
2284
  }
2272
2285
 
2273
- type Any$v = any;
2286
+ type Any$x = any;
2274
2287
  /**
2275
2288
  * A compound physics object — a hierarchical grouping of Bodies, Constraints,
2276
2289
  * and other Compounds.
@@ -2279,18 +2292,18 @@ type Any$v = any;
2279
2292
  */
2280
2293
  declare class Compound extends Interactor {
2281
2294
  static __name__: string[];
2282
- static __super__: Any$v;
2295
+ static __super__: Any$x;
2283
2296
  /** Direct access to the extracted internal ZPP_Compound. */
2284
2297
  zpp_inner: ZPP_Compound;
2285
2298
  constructor();
2286
2299
  /** @internal */
2287
2300
  static _wrap(inner: NapeInner): Compound;
2288
2301
  /** Bodies in this compound. */
2289
- get bodies(): Any$v;
2302
+ get bodies(): Any$x;
2290
2303
  /** Constraints in this compound. */
2291
- get constraints(): Any$v;
2304
+ get constraints(): Any$x;
2292
2305
  /** Child compounds in this compound. */
2293
- get compounds(): Any$v;
2306
+ get compounds(): Any$x;
2294
2307
  /** Parent compound, or null if this is a root compound. */
2295
2308
  get compound(): Compound | null;
2296
2309
  set compound(value: Compound | null);
@@ -2304,7 +2317,7 @@ declare class Compound extends Interactor {
2304
2317
  /** Recursively visit all bodies in this compound and its sub-compounds. */
2305
2318
  visitBodies(lambda: (body: Body) => void): void;
2306
2319
  /** Recursively visit all constraints in this compound and its sub-compounds. */
2307
- visitConstraints(lambda: (constraint: Any$v) => void): void;
2320
+ visitConstraints(lambda: (constraint: Any$x) => void): void;
2308
2321
  /** Recursively visit all sub-compounds in this compound. */
2309
2322
  visitCompounds(lambda: (compound: Compound) => void): void;
2310
2323
  /** Calculate the center of mass of all bodies in this compound. */
@@ -2314,13 +2327,13 @@ declare class Compound extends Interactor {
2314
2327
  /** Rotate all bodies in this compound around the given centre point. */
2315
2328
  rotate(centre: Vec2, angle: number): Compound;
2316
2329
  toString(): string;
2317
- get_bodies(): Any$v;
2318
- get_constraints(): Any$v;
2319
- get_compounds(): Any$v;
2320
- get_compound(): Any$v;
2321
- set_compound(compound: Any$v): Any$v;
2322
- get_space(): Any$v;
2323
- set_space(space: Any$v): Any$v;
2330
+ get_bodies(): Any$x;
2331
+ get_constraints(): Any$x;
2332
+ get_compounds(): Any$x;
2333
+ get_compound(): Any$x;
2334
+ set_compound(compound: Any$x): Any$x;
2335
+ get_space(): Any$x;
2336
+ set_space(space: Any$x): Any$x;
2324
2337
  }
2325
2338
 
2326
2339
  /**
@@ -2380,10 +2393,88 @@ declare class MassMode {
2380
2393
  toString(): string;
2381
2394
  }
2382
2395
 
2396
+ /**
2397
+ * ZPP_Circle — Internal circle shape for the nape physics engine.
2398
+ *
2399
+ * Extends ZPP_Shape (type=0). Stores radius, provides AABB/area/inertia
2400
+ * calculations, and handles localCOM wrappers for circles.
2401
+ *
2402
+ * Converted from nape-compiled.js lines 41496–41827.
2403
+ */
2404
+ type Any$w = any;
2405
+ declare class ZPP_Circle {
2406
+ static __name__: string[];
2407
+ static __super__: Any$w;
2408
+ static _nape: Any$w;
2409
+ static _zpp: Any$w;
2410
+ static _initialized: boolean;
2411
+ radius: number;
2412
+ outer_zn: Any$w;
2413
+ __class__: Any$w;
2414
+ body: Any$w;
2415
+ type: number;
2416
+ circle: Any$w;
2417
+ polygon: Any$w;
2418
+ aabb: Any$w;
2419
+ localCOMx: number;
2420
+ localCOMy: number;
2421
+ worldCOMx: number;
2422
+ worldCOMy: number;
2423
+ zip_localCOM: boolean;
2424
+ zip_worldCOM: boolean;
2425
+ zip_aabb: boolean;
2426
+ zip_sweepRadius: boolean;
2427
+ area: number;
2428
+ inertia: number;
2429
+ angDrag: number;
2430
+ sweepCoef: number;
2431
+ sweepRadius: number;
2432
+ material: Any$w;
2433
+ filter: Any$w;
2434
+ wrap_localCOM: Any$w;
2435
+ outer: Any$w;
2436
+ outer_i: Any$w;
2437
+ space: Any$w;
2438
+ invalidate_area_inertia: () => void;
2439
+ invalidate_angDrag: () => void;
2440
+ invalidate_localCOM: () => void;
2441
+ immutable_midstep: (name: string) => void;
2442
+ setMaterial: (mat: Any$w) => void;
2443
+ setFilter: (filt: Any$w) => void;
2444
+ insert_cbtype: (cb: Any$w) => void;
2445
+ constructor();
2446
+ static _init(): void;
2447
+ __clear(): void;
2448
+ invalidate_radius(): void;
2449
+ localCOM_validate(): void;
2450
+ localCOM_invalidate(x: Any$w): void;
2451
+ localCOM_immutable(): void;
2452
+ setupLocalCOM(): void;
2453
+ __validate_aabb(): void;
2454
+ _force_validate_aabb(): void;
2455
+ __validate_sweepRadius(): void;
2456
+ __validate_area_inertia(): void;
2457
+ __validate_angDrag(): void;
2458
+ __scale(sx: number, sy: number): void;
2459
+ __translate(x: number, y: number): void;
2460
+ __rotate(x: number, y: number): void;
2461
+ __transform(m: Any$w): void;
2462
+ __copy(): Any$w;
2463
+ }
2464
+
2465
+ type Any$v = any;
2383
2466
  /**
2384
2467
  * A circular physics shape.
2468
+ *
2469
+ * Fully modernized — constructor and radius getter/setter use ZPP_Circle
2470
+ * directly. Shape-level properties still delegate through compiled Shape
2471
+ * prototype methods (copied to Circle.prototype at module load time).
2385
2472
  */
2386
2473
  declare class Circle extends Shape {
2474
+ static __name__: string[];
2475
+ static __super__: Any$v;
2476
+ /** Direct access to the extracted internal ZPP_Circle. */
2477
+ zpp_inner_zn: ZPP_Circle;
2387
2478
  constructor(radius?: number, localCOM?: Vec2, material?: Material, filter?: InteractionFilter);
2388
2479
  /** @internal */
2389
2480
  static _wrap(inner: NapeInner): Circle;