@newkrok/nape-js 3.3.39 → 3.3.41

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.ts 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$Z = 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$Z;
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$Y = 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$Y;
80
+ static _zpp: Any$Y;
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$Y) | null;
84
+ outer: Any$Y;
85
85
  px: number;
86
86
  py: number;
87
- wrap_position: Any$U;
88
- arbiter: Any$U;
87
+ wrap_position: Any$Y;
88
+ arbiter: Any$Y;
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$Y;
103
103
  constructor();
104
- wrapper(): Any$U;
104
+ wrapper(): Any$Y;
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$X = 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$X;
174
+ static _zpp: Any$X;
175
+ static _wrapFn: ((zpp: ZPP_Vec2) => Any$X) | 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$X;
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$X;
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$X;
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$W = 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$W;
351
+ static _wrapFn: ((zpp: ZPP_Vec3) => Any$W) | null;
352
+ outer: Any$W;
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$W;
359
359
  validate(): void;
360
- wrapper(): Any$S;
360
+ wrapper(): Any$W;
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$V = 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$V;
428
+ static _wrapFn: ((zpp: ZPP_Mat23) => Any$V) | null;
429
429
  static zpp_pool: ZPP_Mat23 | null;
430
- outer: Any$R;
430
+ outer: Any$V;
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$V;
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$V;
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$U = 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$U;
510
+ vertices: Any$U;
511
+ __class__: Any$U;
512
+ constructor(outer?: Any$U);
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$T = 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$T;
552
+ constructor(vertices?: Any$T);
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$T): GeomPoly;
579
579
  empty(): boolean;
580
580
  size(): number;
581
- iterator(): Any$P;
582
- forwardIterator(): Any$P;
583
- backwardsIterator(): Any$P;
581
+ iterator(): Any$T;
582
+ forwardIterator(): Any$T;
583
+ backwardsIterator(): Any$T;
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$T;
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$T): Any$T;
605
+ monotoneDecomposition(output?: Any$T): Any$T;
606
+ convexDecomposition(delaunay?: boolean, output?: Any$T): Any$T;
607
+ triangularDecomposition(delaunay?: boolean, output?: Any$T): Any$T;
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$T): Any$T;
610
+ transform(matrix: Any$T): this;
611
+ bounds(): Any$T;
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$S = 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$S;
632
+ static _zpp: Any$S;
633
+ static _wrapFn: ((zpp: ZPP_AABB) => Any$S) | 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$S;
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$S;
644
+ wrap_max: Any$S;
645
+ __class__: Any$S;
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$S;
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$S): void;
662
662
  getmax(): void;
663
663
  dom_max(): void;
664
- mod_max(max: Any$O): void;
664
+ mod_max(max: Any$S): 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$R = any;
729
729
  declare class ZPP_MatMN {
730
730
  static __name__: string[];
731
- outer: Any$N;
731
+ outer: Any$R;
732
732
  m: number;
733
733
  n: number;
734
734
  x: number[];
735
- __class__: Any$N;
735
+ __class__: Any$R;
736
736
  constructor(m: number, n: number);
737
737
  }
738
738
 
739
- type Any$M = any;
739
+ type Any$Q = 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$Q): 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$P = 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$P): Any$P;
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$O = 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$O) | null;
826
+ static _createConvexResult: (() => Any$O) | null;
827
+ normal: Any$O;
828
+ shape: Any$O;
829
+ convex: Any$O;
830
+ position: Any$O;
831
+ ray: Any$O;
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$O;
836
+ static getRay(normal: Any$O, time: number, inner: boolean, shape: Any$O): Any$O;
837
+ static getConvex(normal: Any$O, position: Any$O, toiDistance: number, shape: Any$O): Any$O;
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$N = 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$N): 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$N;
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$M = 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$M): 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$M;
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$L = 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$L, body2: Any$L, 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$L, shape2: Any$L, 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$L, body2: Any$L): 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$L, shape2: Any$L): 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$L, shape2: Any$L): 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$K = 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$K;
1021
+ static _zpp: Any$K;
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$K) | 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$K;
1033
+ wrap_shapes: Any$K;
1034
+ outer: Any$K;
1035
+ userData: Any$K;
1036
1036
  next: ZPP_Material | null;
1037
- __class__: Any$G;
1037
+ __class__: Any$K;
1038
1038
  constructor();
1039
1039
  /** Create/return the public nape.phys.Material wrapper for this internal object. */
1040
- wrapper(): Any$G;
1040
+ wrapper(): Any$K;
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$K): void;
1049
1049
  /** Unregister a shape that no longer uses this material. */
1050
- remShape(shape: Any$G): void;
1050
+ remShape(shape: Any$K): 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$J = 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$J;
1115
+ static _zpp: Any$J;
1116
+ static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$J) | 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$J;
1122
+ shapes: Any$J;
1123
+ wrap_shapes: Any$J;
1124
+ outer: Any$J;
1125
+ userData: Any$J;
1126
1126
  next: ZPP_FluidProperties | null;
1127
- __class__: Any$F;
1127
+ __class__: Any$J;
1128
1128
  constructor();
1129
1129
  /** Create/return the public nape.phys.FluidProperties wrapper. */
1130
- wrapper(): Any$F;
1130
+ wrapper(): Any$J;
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$J): void;
1135
+ remShape(shape: Any$J): 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$J): 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$I = 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$I;
1195
+ static _zpp: Any$I;
1196
+ static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$I) | 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$I;
1204
+ wrap_shapes: Any$I;
1205
+ outer: Any$I;
1206
+ userData: Any$I;
1207
1207
  next: ZPP_InteractionFilter | null;
1208
- __class__: Any$E;
1208
+ __class__: Any$I;
1209
1209
  constructor();
1210
1210
  /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
1211
- wrapper(): Any$E;
1211
+ wrapper(): Any$I;
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$I): void;
1216
+ remShape(shape: Any$I): 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$H = 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$H;
1286
+ static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$H) | null;
1287
+ outer: Any$H;
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$H;
1291
+ wrap_groups: Any$H;
1292
+ interactors: Any$H;
1293
+ wrap_interactors: Any$H;
1294
1294
  depth: number;
1295
- __class__: Any$D;
1295
+ __class__: Any$H;
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$H): void;
1307
1307
  /** Unregister an interactor from this group. */
1308
- remInteractor(intx: Any$D, flag?: number): void;
1308
+ remInteractor(intx: Any$H, 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. */
@@ -1397,6 +1410,8 @@ declare class ShapeType {
1397
1410
 
1398
1411
  /**
1399
1412
  * Base class for physics shapes (Circle, Polygon).
1413
+ *
1414
+ * Fully modernized — all getters/setters access the ZPP_Shape inner directly.
1400
1415
  */
1401
1416
  declare class Shape extends Interactor {
1402
1417
  /** @internal – shapes are created via Circle or Polygon constructors. */
@@ -1404,8 +1419,12 @@ declare class Shape extends Interactor {
1404
1419
  /** @internal */
1405
1420
  static _wrap(inner: NapeInner): Shape;
1406
1421
  get type(): ShapeType;
1422
+ isCircle(): boolean;
1423
+ isPolygon(): boolean;
1407
1424
  get body(): Body;
1408
1425
  set body(value: Body | null);
1426
+ get castCircle(): Shape | null;
1427
+ get castPolygon(): Shape | null;
1409
1428
  get worldCOM(): Vec2;
1410
1429
  get localCOM(): Vec2;
1411
1430
  set localCOM(value: Vec2);
@@ -1425,21 +1444,39 @@ declare class Shape extends Interactor {
1425
1444
  get sensorEnabled(): boolean;
1426
1445
  set sensorEnabled(value: boolean);
1427
1446
  get bounds(): AABB;
1428
- /** Cast to Circle — returns the Circle wrapper or null if not a circle. */
1429
- get castCircle(): Shape | null;
1430
- /** Cast to Polygon — returns the Polygon wrapper or null if not a polygon. */
1431
- get castPolygon(): Shape | null;
1432
- isCircle(): boolean;
1433
- isPolygon(): boolean;
1434
- translate(translation: Vec2): void;
1435
- scale(scaleX: number, scaleY: number): void;
1436
- rotate(angle: number): void;
1447
+ translate(translation: Vec2): Shape;
1448
+ scale(scaleX: number, scaleY: number): Shape;
1449
+ rotate(angle: number): Shape;
1437
1450
  transform(matrix: {
1438
1451
  _inner: NapeInner;
1439
- }): void;
1452
+ }): Shape;
1440
1453
  contains(point: Vec2): boolean;
1441
1454
  copy(): Shape;
1442
1455
  toString(): string;
1456
+ /** @internal */ get_type(): ShapeType;
1457
+ /** @internal */ get_body(): Body;
1458
+ /** @internal */ set_body(v: Body | null): void;
1459
+ /** @internal */ get_castCircle(): Shape | null;
1460
+ /** @internal */ get_castPolygon(): Shape | null;
1461
+ /** @internal */ get_worldCOM(): Vec2;
1462
+ /** @internal */ get_localCOM(): Vec2;
1463
+ /** @internal */ set_localCOM(v: Vec2): void;
1464
+ /** @internal */ get_area(): number;
1465
+ /** @internal */ get_inertia(): number;
1466
+ /** @internal */ get_angDrag(): number;
1467
+ /** @internal */ get_material(): Material;
1468
+ /** @internal */ set_material(v: Material): void;
1469
+ /** @internal */ get_filter(): InteractionFilter;
1470
+ /** @internal */ set_filter(v: InteractionFilter): void;
1471
+ /** @internal */ get_fluidProperties(): FluidProperties;
1472
+ /** @internal */ set_fluidProperties(v: FluidProperties): void;
1473
+ /** @internal */ get_fluidEnabled(): boolean;
1474
+ /** @internal */ set_fluidEnabled(v: boolean): void;
1475
+ /** @internal */ get_sensorEnabled(): boolean;
1476
+ /** @internal */ set_sensorEnabled(v: boolean): void;
1477
+ /** @internal */ get_bounds(): AABB;
1478
+ /** Setup worldCOM lazy Vec2 wrapper */
1479
+ private _setupWorldCOM;
1443
1480
  }
1444
1481
  /** Lightweight typed interface for the callback type set on a shape. */
1445
1482
  interface CbTypeSet {
@@ -1465,7 +1502,7 @@ interface CbTypeSet {
1465
1502
  *
1466
1503
  * Converted from nape-compiled.js lines 21424–21827.
1467
1504
  */
1468
- type Any$C = any;
1505
+ type Any$G = any;
1469
1506
  declare class ZPP_Constraint {
1470
1507
  static __name__: string[];
1471
1508
  /**
@@ -1473,13 +1510,13 @@ declare class ZPP_Constraint {
1473
1510
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
1474
1511
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
1475
1512
  */
1476
- static _nape: Any$C;
1477
- static _zpp: Any$C;
1478
- outer: Any$C;
1513
+ static _nape: Any$G;
1514
+ static _zpp: Any$G;
1515
+ outer: Any$G;
1479
1516
  id: number;
1480
- userData: Any$C;
1481
- compound: Any$C;
1482
- space: Any$C;
1517
+ userData: Any$G;
1518
+ compound: Any$G;
1519
+ space: Any$G;
1483
1520
  active: boolean;
1484
1521
  stiff: boolean;
1485
1522
  frequency: number;
@@ -1489,14 +1526,14 @@ declare class ZPP_Constraint {
1489
1526
  breakUnderForce: boolean;
1490
1527
  breakUnderError: boolean;
1491
1528
  removeOnBreak: boolean;
1492
- component: Any$C;
1529
+ component: Any$G;
1493
1530
  ignore: boolean;
1494
1531
  __velocity: boolean;
1495
- cbTypes: Any$C;
1496
- cbSet: Any$C;
1497
- wrap_cbTypes: Any$C;
1532
+ cbTypes: Any$G;
1533
+ cbSet: Any$G;
1534
+ wrap_cbTypes: Any$G;
1498
1535
  pre_dt: number;
1499
- __class__: Any$C;
1536
+ __class__: Any$G;
1500
1537
  constructor();
1501
1538
  /**
1502
1539
  * Initialise base constraint fields.
@@ -1514,18 +1551,18 @@ declare class ZPP_Constraint {
1514
1551
  forest(): void;
1515
1552
  broken(): void;
1516
1553
  warmStart(): void;
1517
- draw(_g: Any$C): void;
1518
- pair_exists(_id: Any$C, _di: Any$C): boolean;
1554
+ draw(_g: Any$G): void;
1555
+ pair_exists(_id: Any$G, _di: Any$G): boolean;
1519
1556
  preStep(_dt: number): boolean;
1520
1557
  applyImpulseVel(): boolean;
1521
1558
  applyImpulsePos(): boolean;
1522
- copy(_dict?: Any$C, _todo?: Any$C): Any$C;
1559
+ copy(_dict?: Any$G, _todo?: Any$G): Any$G;
1523
1560
  immutable_midstep(name: string): void;
1524
1561
  setupcbTypes(): void;
1525
1562
  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;
1563
+ wrap_cbTypes_subber(pcb: Any$G): void;
1564
+ wrap_cbTypes_adder(cb: Any$G): boolean;
1565
+ insert_cbtype(cb: Any$G): void;
1529
1566
  alloc_cbSet(): void;
1530
1567
  dealloc_cbSet(): void;
1531
1568
  activate(): void;
@@ -1535,12 +1572,12 @@ declare class ZPP_Constraint {
1535
1572
  activeInSpace(): void;
1536
1573
  inactiveOrOutSpace(): void;
1537
1574
  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;
1575
+ copyto(ret: Any$G): void;
1576
+ static _findRoot(comp: Any$G): Any$G;
1577
+ static _unionComponents(a: Any$G, b: Any$G): void;
1541
1578
  }
1542
1579
 
1543
- type Any$B = any;
1580
+ type Any$F = any;
1544
1581
  /**
1545
1582
  * Base class for all constraints / joints.
1546
1583
  *
@@ -1557,16 +1594,16 @@ declare class Constraint {
1557
1594
  * are fully modernized. Also serves as backward compat for compiled code.
1558
1595
  * @internal
1559
1596
  */
1560
- _inner: Any$B;
1597
+ _inner: Any$F;
1561
1598
  debugDraw: boolean;
1562
1599
  /** @internal */
1563
1600
  protected constructor();
1564
1601
  /** @internal */
1565
- static _wrap(inner: Any$B): Constraint;
1602
+ static _wrap(inner: Any$F): Constraint;
1566
1603
  get space(): Space | null;
1567
1604
  set space(value: Space | null);
1568
- get compound(): Any$B;
1569
- set compound(value: Any$B);
1605
+ get compound(): Any$F;
1606
+ set compound(value: Any$F);
1570
1607
  get active(): boolean;
1571
1608
  set active(value: boolean);
1572
1609
  get ignore(): boolean;
@@ -1589,17 +1626,17 @@ declare class Constraint {
1589
1626
  set removeOnBreak(value: boolean);
1590
1627
  get isSleeping(): boolean;
1591
1628
  get userData(): Record<string, unknown>;
1592
- get cbTypes(): Any$B;
1593
- impulse(): Any$B;
1594
- bodyImpulse(_body: Body): Any$B;
1629
+ get cbTypes(): Any$F;
1630
+ impulse(): Any$F;
1631
+ bodyImpulse(_body: Body): Any$F;
1595
1632
  visitBodies(_fn: (body: Body) => void): void;
1596
1633
  copy(): Constraint;
1597
1634
  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;
1635
+ /** @internal */ get_userData(): Any$F;
1636
+ /** @internal */ get_compound(): Any$F;
1637
+ /** @internal */ set_compound(v: Any$F): Any$F;
1638
+ /** @internal */ get_space(): Any$F;
1639
+ /** @internal */ set_space(v: Any$F): Any$F;
1603
1640
  /** @internal */ get_isSleeping(): boolean;
1604
1641
  /** @internal */ get_active(): boolean;
1605
1642
  /** @internal */ set_active(v: boolean): boolean;
@@ -1621,7 +1658,7 @@ declare class Constraint {
1621
1658
  /** @internal */ set_breakUnderError(v: boolean): boolean;
1622
1659
  /** @internal */ get_removeOnBreak(): boolean;
1623
1660
  /** @internal */ set_removeOnBreak(v: boolean): boolean;
1624
- /** @internal */ get_cbTypes(): Any$B;
1661
+ /** @internal */ get_cbTypes(): Any$F;
1625
1662
  }
1626
1663
 
1627
1664
  /**
@@ -1633,24 +1670,24 @@ declare class Constraint {
1633
1670
  *
1634
1671
  * Converted from nape-compiled.js lines 27259–27304, 112053–112139.
1635
1672
  */
1636
- type Any$A = any;
1673
+ type Any$E = any;
1637
1674
  declare class ZPP_Listener {
1638
1675
  static __name__: string[];
1639
- static _nape: Any$A;
1640
- static _zpp: Any$A;
1676
+ static _nape: Any$E;
1677
+ static _zpp: Any$E;
1641
1678
  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;
1679
+ static types: Any$E[];
1680
+ static events: Any$E[];
1681
+ space: Any$E;
1682
+ interaction: Any$E;
1683
+ constraint: Any$E;
1684
+ body: Any$E;
1648
1685
  precedence: number;
1649
1686
  event: number;
1650
1687
  type: number;
1651
1688
  id: number;
1652
- outer: Any$A;
1653
- __class__: Any$A;
1689
+ outer: Any$E;
1690
+ __class__: Any$E;
1654
1691
  constructor();
1655
1692
  /** Sort comparator: higher precedence first, then by id descending. */
1656
1693
  static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
@@ -1726,20 +1763,20 @@ declare class ListenerType {
1726
1763
  * Fully modernized from nape-compiled.js lines 231–433.
1727
1764
  */
1728
1765
 
1729
- type Any$z = any;
1766
+ type Any$D = any;
1730
1767
  declare class Listener {
1731
1768
  static __name__: string[];
1732
1769
  zpp_inner: ZPP_Listener;
1733
- get _inner(): Any$z;
1770
+ get _inner(): Any$D;
1734
1771
  constructor();
1735
- static _wrap(inner: Any$z): Listener;
1772
+ static _wrap(inner: Any$D): Listener;
1736
1773
  get type(): ListenerType;
1737
1774
  get event(): CbEvent;
1738
1775
  set event(event: CbEvent);
1739
1776
  get precedence(): number;
1740
1777
  set precedence(precedence: number);
1741
1778
  get space(): Space | null;
1742
- set space(space: Space | Any$z | null);
1779
+ set space(space: Space | Any$D | null);
1743
1780
  toString(): string;
1744
1781
  }
1745
1782
 
@@ -1826,46 +1863,46 @@ declare class BodyType {
1826
1863
  * Converted from nape-compiled.js lines 52431–54547.
1827
1864
  */
1828
1865
 
1829
- type Any$y = any;
1866
+ type Any$C = any;
1830
1867
  declare class ZPP_Body {
1831
1868
  static __name__: string[];
1832
- static __super__: Any$y;
1869
+ static __super__: Any$C;
1833
1870
  /**
1834
1871
  * Namespace references, set by the compiled module after import.
1835
1872
  * _nape = the `nape` public namespace
1836
1873
  * _zpp = the `zpp_nape` internal namespace
1837
1874
  */
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;
1875
+ static _nape: Any$C;
1876
+ static _zpp: Any$C;
1877
+ static types: Any$C[];
1878
+ static bodystack: Any$C;
1879
+ static bodyset: Any$C;
1843
1880
  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;
1881
+ static bodysetlt(a: Any$C, b: Any$C): boolean;
1882
+ static __static(): Any$C;
1883
+ outer_i: Any$C;
1847
1884
  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;
1885
+ userData: Any$C;
1886
+ ishape: Any$C;
1887
+ ibody: Any$C;
1888
+ icompound: Any$C;
1889
+ wrap_cbTypes: Any$C;
1890
+ cbSet: Any$C;
1891
+ cbTypes: Any$C;
1892
+ group: Any$C;
1893
+ cbsets: Any$C;
1894
+ outer: Any$C;
1858
1895
  world: boolean;
1859
1896
  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;
1897
+ compound: Any$C;
1898
+ shapes: Any$C;
1899
+ wrap_shapes: Any$C;
1900
+ space: Any$C;
1901
+ arbiters: Any$C;
1902
+ wrap_arbiters: Any$C;
1903
+ constraints: Any$C;
1904
+ wrap_constraints: Any$C;
1905
+ component: Any$C;
1869
1906
  graph_depth: number;
1870
1907
  sweepTime: number;
1871
1908
  sweep_angvel: number;
@@ -1878,20 +1915,20 @@ declare class ZPP_Body {
1878
1915
  pre_posy: number;
1879
1916
  posx: number;
1880
1917
  posy: number;
1881
- wrap_pos: Any$y;
1918
+ wrap_pos: Any$C;
1882
1919
  velx: number;
1883
1920
  vely: number;
1884
- wrap_vel: Any$y;
1921
+ wrap_vel: Any$C;
1885
1922
  forcex: number;
1886
1923
  forcey: number;
1887
- wrap_force: Any$y;
1924
+ wrap_force: Any$C;
1888
1925
  kinvelx: number;
1889
1926
  kinvely: number;
1890
- wrap_kinvel: Any$y;
1927
+ wrap_kinvel: Any$C;
1891
1928
  svelx: number;
1892
1929
  svely: number;
1893
- wrap_svel: Any$y;
1894
- wrapcvel: Any$y;
1930
+ wrap_svel: Any$C;
1931
+ wrapcvel: Any$C;
1895
1932
  angvel: number;
1896
1933
  torque: number;
1897
1934
  kinangvel: number;
@@ -1928,9 +1965,9 @@ declare class ZPP_Body {
1928
1965
  worldCOMx: number;
1929
1966
  worldCOMy: number;
1930
1967
  zip_worldCOM: boolean;
1931
- wrap_localCOM: Any$y;
1932
- wrap_worldCOM: Any$y;
1933
- __class__: Any$y;
1968
+ wrap_localCOM: Any$C;
1969
+ wrap_worldCOM: Any$C;
1970
+ __class__: Any$C;
1934
1971
  constructor();
1935
1972
  isStatic(): boolean;
1936
1973
  isDynamic(): boolean;
@@ -1938,23 +1975,23 @@ declare class ZPP_Body {
1938
1975
  invalidate_type(): void;
1939
1976
  invalidate_shapes(): void;
1940
1977
  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;
1978
+ connectedBodies_cont(b: Any$C): void;
1979
+ connectedBodies(depth: number, output: Any$C): Any$C;
1980
+ interactingBodies(type: number, output: Any$C): Any$C;
1944
1981
  atRest(dt: number): boolean;
1945
1982
  refreshArbiters(): void;
1946
1983
  sweepIntegrate(dt: number): void;
1947
- sweepValidate(s: Any$y): void;
1984
+ sweepValidate(s: Any$C): void;
1948
1985
  invalidate_pos(): void;
1949
- pos_invalidate(pos: Any$y): void;
1986
+ pos_invalidate(pos: Any$C): void;
1950
1987
  pos_validate(): void;
1951
- vel_invalidate(vel: Any$y): void;
1988
+ vel_invalidate(vel: Any$C): void;
1952
1989
  vel_validate(): void;
1953
- kinvel_invalidate(vel: Any$y): void;
1990
+ kinvel_invalidate(vel: Any$C): void;
1954
1991
  kinvel_validate(): void;
1955
- svel_invalidate(vel: Any$y): void;
1992
+ svel_invalidate(vel: Any$C): void;
1956
1993
  svel_validate(): void;
1957
- force_invalidate(force: Any$y): void;
1994
+ force_invalidate(force: Any$C): void;
1958
1995
  force_validate(): void;
1959
1996
  private _setupVec2Wrapper;
1960
1997
  setupPosition(): void;
@@ -1991,37 +2028,37 @@ declare class ZPP_Body {
1991
2028
  getworldCOM(): void;
1992
2029
  __immutable_midstep(): void;
1993
2030
  clear(): void;
1994
- shapes_adder(s: Any$y): boolean;
1995
- shapes_subber(s: Any$y): void;
1996
- shapes_invalidate(_param: Any$y): void;
2031
+ shapes_adder(s: Any$C): boolean;
2032
+ shapes_subber(s: Any$C): void;
2033
+ shapes_invalidate(_param: Any$C): void;
1997
2034
  shapes_modifiable(): void;
1998
2035
  addedToSpace(): void;
1999
2036
  removedFromSpace(): void;
2000
2037
  private _removeArbiterFromList;
2001
- copy(): Any$y;
2038
+ copy(): Any$C;
2002
2039
  wake: () => void;
2003
2040
  __iaddedToSpace: () => void;
2004
2041
  __iremovedFromSpace: () => void;
2005
2042
  immutable_midstep: (name: string) => void;
2006
- copyto: (ret: Any$y) => void;
2007
- insert_cbtype: (cb: Any$y) => void;
2043
+ copyto: (ret: Any$C) => void;
2044
+ insert_cbtype: (cb: Any$C) => void;
2008
2045
  alloc_cbSet: () => void;
2009
2046
  dealloc_cbSet: () => void;
2010
2047
  setupcbTypes: () => void;
2011
2048
  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;
2049
+ wrap_cbTypes_subber: (pcb: Any$C) => void;
2050
+ wrap_cbTypes_adder: (cb: Any$C) => void;
2051
+ setGroup: (group: Any$C) => void;
2052
+ lookup_group: () => Any$C;
2053
+ getSpace: () => Any$C;
2017
2054
  isShape: () => boolean;
2018
2055
  isBody: () => boolean;
2019
2056
  isCompound: () => boolean;
2020
2057
  static _initialized: boolean;
2021
- static _init(zpp: Any$y, nape: Any$y): void;
2058
+ static _init(zpp: Any$C, nape: Any$C): void;
2022
2059
  }
2023
2060
 
2024
- type Any$x = any;
2061
+ type Any$B = any;
2025
2062
  /**
2026
2063
  * A rigid body in the physics simulation.
2027
2064
  *
@@ -2029,7 +2066,7 @@ type Any$x = any;
2029
2066
  */
2030
2067
  declare class Body extends Interactor {
2031
2068
  static __name__: string[];
2032
- static __super__: Any$x;
2069
+ static __super__: Any$B;
2033
2070
  /** Direct access to the extracted internal ZPP_Body. */
2034
2071
  zpp_inner: ZPP_Body;
2035
2072
  debugDraw: boolean;
@@ -2081,47 +2118,47 @@ declare class Body extends Interactor {
2081
2118
  get shapes(): NapeList<Shape>;
2082
2119
  get space(): Space;
2083
2120
  set space(value: Space | null);
2084
- get compound(): Any$x;
2085
- set compound(value: Any$x);
2121
+ get compound(): Any$B;
2122
+ set compound(value: Any$B);
2086
2123
  get bounds(): AABB;
2087
2124
  get constraintVelocity(): Vec2;
2088
2125
  get localCOM(): Vec2;
2089
2126
  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);
2127
+ get massMode(): Any$B;
2128
+ set massMode(value: Any$B);
2129
+ get inertiaMode(): Any$B;
2130
+ set inertiaMode(value: Any$B);
2131
+ get gravMassMode(): Any$B;
2132
+ set gravMassMode(value: Any$B);
2096
2133
  copy(): Body;
2097
2134
  toString(): string;
2098
- get_type(): Any$x;
2099
- set_type(type: Any$x): Any$x;
2100
- get_shapes(): Any$x;
2135
+ get_type(): Any$B;
2136
+ set_type(type: Any$B): Any$B;
2137
+ get_shapes(): Any$B;
2101
2138
  get_isBullet(): boolean;
2102
2139
  set_isBullet(v: boolean): boolean;
2103
2140
  get_disableCCD(): boolean;
2104
2141
  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;
2142
+ get_position(): Any$B;
2143
+ set_position(position: Any$B): Any$B;
2144
+ get_velocity(): Any$B;
2145
+ set_velocity(velocity: Any$B): Any$B;
2109
2146
  get_rotation(): number;
2110
2147
  set_rotation(rotation: number): number;
2111
2148
  get_angularVel(): number;
2112
2149
  set_angularVel(angularVel: number): number;
2113
- get_kinematicVel(): Any$x;
2114
- set_kinematicVel(kinematicVel: Any$x): Any$x;
2150
+ get_kinematicVel(): Any$B;
2151
+ set_kinematicVel(kinematicVel: Any$B): Any$B;
2115
2152
  get_kinAngVel(): number;
2116
2153
  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;
2154
+ get_surfaceVel(): Any$B;
2155
+ set_surfaceVel(surfaceVel: Any$B): Any$B;
2156
+ get_force(): Any$B;
2157
+ set_force(force: Any$B): Any$B;
2121
2158
  get_torque(): number;
2122
2159
  set_torque(torque: number): number;
2123
- get_bounds(): Any$x;
2124
- get_constraintVelocity(): Any$x;
2160
+ get_bounds(): Any$B;
2161
+ get_constraintVelocity(): Any$B;
2125
2162
  get_constraintMass(): number;
2126
2163
  get_constraintInertia(): number;
2127
2164
  get_allowMovement(): boolean;
@@ -2129,28 +2166,28 @@ declare class Body extends Interactor {
2129
2166
  get_allowRotation(): boolean;
2130
2167
  set_allowRotation(allowRotation: boolean): boolean;
2131
2168
  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;
2169
+ get_compound(): Any$B;
2170
+ set_compound(compound: Any$B): Any$B;
2171
+ get_space(): Any$B;
2172
+ set_space(space: Any$B): Any$B;
2173
+ get_arbiters(): Any$B;
2174
+ get_constraints(): Any$B;
2175
+ get_massMode(): Any$B;
2176
+ set_massMode(massMode: Any$B): Any$B;
2140
2177
  get_mass(): number;
2141
2178
  set_mass(mass: number): number;
2142
- get_gravMassMode(): Any$x;
2143
- set_gravMassMode(gravMassMode: Any$x): Any$x;
2179
+ get_gravMassMode(): Any$B;
2180
+ set_gravMassMode(gravMassMode: Any$B): Any$B;
2144
2181
  get_gravMass(): number;
2145
2182
  set_gravMass(gravMass: number): number;
2146
2183
  get_gravMassScale(): number;
2147
2184
  set_gravMassScale(gravMassScale: number): number;
2148
- get_inertiaMode(): Any$x;
2149
- set_inertiaMode(inertiaMode: Any$x): Any$x;
2185
+ get_inertiaMode(): Any$B;
2186
+ set_inertiaMode(inertiaMode: Any$B): Any$B;
2150
2187
  get_inertia(): number;
2151
2188
  set_inertia(inertia: number): number;
2152
- get_localCOM(): Any$x;
2153
- get_worldCOM(): Any$x;
2189
+ get_localCOM(): Any$B;
2190
+ get_worldCOM(): Any$B;
2154
2191
  integrate(deltaTime: number): Body;
2155
2192
  localPointToWorld(point: Vec2, weak?: boolean): Vec2;
2156
2193
  worldPointToLocal(point: Vec2, weak?: boolean): Vec2;
@@ -2162,24 +2199,24 @@ declare class Body extends Interactor {
2162
2199
  translateShapes(translation: Vec2): Body;
2163
2200
  rotateShapes(angle: number): Body;
2164
2201
  scaleShapes(scaleX: number, scaleY: number): Body;
2165
- transformShapes(matrix: Any$x): Body;
2202
+ transformShapes(matrix: Any$B): Body;
2166
2203
  align(): Body;
2167
2204
  rotate(centre: Vec2, angle: number): Body;
2168
- setShapeMaterials(material: Any$x): Body;
2169
- setShapeFilters(filter: Any$x): Body;
2170
- setShapeFluidProperties(fluidProperties: Any$x): Body;
2205
+ setShapeMaterials(material: Any$B): Body;
2206
+ setShapeFilters(filter: Any$B): Body;
2207
+ setShapeFluidProperties(fluidProperties: Any$B): Body;
2171
2208
  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;
2209
+ connectedBodies(depth?: number, output?: Any$B): Any$B;
2210
+ interactingBodies(type?: Any$B, depth?: number, output?: Any$B): Any$B;
2211
+ normalImpulse(body?: Any$B, freshOnly?: boolean): Vec3;
2212
+ tangentImpulse(body?: Any$B, freshOnly?: boolean): Vec3;
2213
+ totalContactsImpulse(body?: Any$B, freshOnly?: boolean): Vec3;
2214
+ rollingImpulse(body?: Any$B, freshOnly?: boolean): number;
2215
+ buoyancyImpulse(body?: Any$B): Vec3;
2216
+ dragImpulse(body?: Any$B): Vec3;
2217
+ totalFluidImpulse(body?: Any$B): Vec3;
2181
2218
  constraintsImpulse(): Vec3;
2182
- totalImpulse(body?: Any$x, freshOnly?: boolean): Vec3;
2219
+ totalImpulse(body?: Any$B, freshOnly?: boolean): Vec3;
2183
2220
  crushFactor(): number;
2184
2221
  private _arbiterImpulseQuery;
2185
2222
  }
@@ -2192,77 +2229,77 @@ declare class Body extends Interactor {
2192
2229
  *
2193
2230
  * Converted from nape-compiled.js lines 55195–55521.
2194
2231
  */
2195
- type Any$w = any;
2232
+ type Any$A = any;
2196
2233
  declare class ZPP_Compound {
2197
2234
  static __name__: string[];
2198
- static __super__: Any$w;
2235
+ static __super__: Any$A;
2199
2236
  /**
2200
2237
  * Namespace references, set by the compiled module after import.
2201
2238
  * _nape = the `nape` public namespace (for wrapper creation in copy())
2202
2239
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
2203
2240
  */
2204
- static _nape: Any$w;
2205
- static _zpp: Any$w;
2241
+ static _nape: Any$A;
2242
+ static _zpp: Any$A;
2206
2243
  /**
2207
2244
  * Wrapper factory callback, registered by the modernized Compound class.
2208
2245
  * When set, wrapper() uses this instead of the compiled Compound constructor.
2209
2246
  */
2210
- static _wrapFn: ((zpp: ZPP_Compound) => Any$w) | null;
2211
- outer_i: Any$w;
2247
+ static _wrapFn: ((zpp: ZPP_Compound) => Any$A) | null;
2248
+ outer_i: Any$A;
2212
2249
  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;
2250
+ userData: Any$A;
2251
+ ishape: Any$A;
2252
+ ibody: Any$A;
2253
+ icompound: Any$A;
2254
+ wrap_cbTypes: Any$A;
2255
+ cbSet: Any$A;
2256
+ cbTypes: Any$A;
2257
+ group: Any$A;
2258
+ cbsets: Any$A;
2259
+ outer: Any$A;
2260
+ bodies: Any$A;
2261
+ constraints: Any$A;
2262
+ compounds: Any$A;
2263
+ wrap_bodies: Any$A;
2264
+ wrap_constraints: Any$A;
2265
+ wrap_compounds: Any$A;
2229
2266
  depth: number;
2230
- compound: Any$w;
2231
- space: Any$w;
2232
- __class__: Any$w;
2267
+ compound: Any$A;
2268
+ space: Any$A;
2269
+ __class__: Any$A;
2233
2270
  constructor();
2234
2271
  __imutable_midstep(name: string): void;
2235
2272
  addedToSpace(): void;
2236
2273
  removedFromSpace(): void;
2237
2274
  breakApart(): void;
2238
2275
  private static _zppOf;
2239
- bodies_adder(x: Any$w): boolean;
2240
- bodies_subber(x: Any$w): void;
2276
+ bodies_adder(x: Any$A): boolean;
2277
+ bodies_subber(x: Any$A): void;
2241
2278
  bodies_modifiable(): void;
2242
- constraints_adder(x: Any$w): boolean;
2243
- constraints_subber(x: Any$w): void;
2279
+ constraints_adder(x: Any$A): boolean;
2280
+ constraints_subber(x: Any$A): void;
2244
2281
  constraints_modifiable(): void;
2245
- compounds_adder(x: Any$w): boolean;
2246
- compounds_subber(x: Any$w): void;
2282
+ compounds_adder(x: Any$A): boolean;
2283
+ compounds_subber(x: Any$A): void;
2247
2284
  compounds_modifiable(): void;
2248
- copy(dict?: Any$w[], todo?: Any$w[]): Any$w;
2285
+ copy(dict?: Any$A[], todo?: Any$A[]): Any$A;
2249
2286
  isShape: () => boolean;
2250
2287
  isBody: () => boolean;
2251
2288
  isCompound: () => boolean;
2252
2289
  __iaddedToSpace: () => void;
2253
2290
  __iremovedFromSpace: () => void;
2254
2291
  wake: () => void;
2255
- getSpace: () => Any$w;
2292
+ getSpace: () => Any$A;
2256
2293
  setupcbTypes: () => void;
2257
2294
  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;
2295
+ wrap_cbTypes_subber: (pcb: Any$A) => void;
2296
+ wrap_cbTypes_adder: (cb: Any$A) => boolean;
2297
+ insert_cbtype: (cb: Any$A) => void;
2261
2298
  alloc_cbSet: () => void;
2262
2299
  dealloc_cbSet: () => void;
2263
2300
  immutable_midstep: (name: string) => void;
2264
- copyto: (ret: Any$w) => void;
2265
- lookup_group: () => Any$w;
2301
+ copyto: (ret: Any$A) => void;
2302
+ lookup_group: () => Any$A;
2266
2303
  /**
2267
2304
  * Initialize prototype by copying ZPP_Interactor methods.
2268
2305
  * Must be called after _zpp is set (during compiled module init).
@@ -2270,7 +2307,7 @@ declare class ZPP_Compound {
2270
2307
  static _init(): void;
2271
2308
  }
2272
2309
 
2273
- type Any$v = any;
2310
+ type Any$z = any;
2274
2311
  /**
2275
2312
  * A compound physics object — a hierarchical grouping of Bodies, Constraints,
2276
2313
  * and other Compounds.
@@ -2279,18 +2316,18 @@ type Any$v = any;
2279
2316
  */
2280
2317
  declare class Compound extends Interactor {
2281
2318
  static __name__: string[];
2282
- static __super__: Any$v;
2319
+ static __super__: Any$z;
2283
2320
  /** Direct access to the extracted internal ZPP_Compound. */
2284
2321
  zpp_inner: ZPP_Compound;
2285
2322
  constructor();
2286
2323
  /** @internal */
2287
2324
  static _wrap(inner: NapeInner): Compound;
2288
2325
  /** Bodies in this compound. */
2289
- get bodies(): Any$v;
2326
+ get bodies(): Any$z;
2290
2327
  /** Constraints in this compound. */
2291
- get constraints(): Any$v;
2328
+ get constraints(): Any$z;
2292
2329
  /** Child compounds in this compound. */
2293
- get compounds(): Any$v;
2330
+ get compounds(): Any$z;
2294
2331
  /** Parent compound, or null if this is a root compound. */
2295
2332
  get compound(): Compound | null;
2296
2333
  set compound(value: Compound | null);
@@ -2304,7 +2341,7 @@ declare class Compound extends Interactor {
2304
2341
  /** Recursively visit all bodies in this compound and its sub-compounds. */
2305
2342
  visitBodies(lambda: (body: Body) => void): void;
2306
2343
  /** Recursively visit all constraints in this compound and its sub-compounds. */
2307
- visitConstraints(lambda: (constraint: Any$v) => void): void;
2344
+ visitConstraints(lambda: (constraint: Any$z) => void): void;
2308
2345
  /** Recursively visit all sub-compounds in this compound. */
2309
2346
  visitCompounds(lambda: (compound: Compound) => void): void;
2310
2347
  /** Calculate the center of mass of all bodies in this compound. */
@@ -2314,13 +2351,13 @@ declare class Compound extends Interactor {
2314
2351
  /** Rotate all bodies in this compound around the given centre point. */
2315
2352
  rotate(centre: Vec2, angle: number): Compound;
2316
2353
  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;
2354
+ get_bodies(): Any$z;
2355
+ get_constraints(): Any$z;
2356
+ get_compounds(): Any$z;
2357
+ get_compound(): Any$z;
2358
+ set_compound(compound: Any$z): Any$z;
2359
+ get_space(): Any$z;
2360
+ set_space(space: Any$z): Any$z;
2324
2361
  }
2325
2362
 
2326
2363
  /**
@@ -2380,10 +2417,88 @@ declare class MassMode {
2380
2417
  toString(): string;
2381
2418
  }
2382
2419
 
2420
+ /**
2421
+ * ZPP_Circle — Internal circle shape for the nape physics engine.
2422
+ *
2423
+ * Extends ZPP_Shape (type=0). Stores radius, provides AABB/area/inertia
2424
+ * calculations, and handles localCOM wrappers for circles.
2425
+ *
2426
+ * Converted from nape-compiled.js lines 41496–41827.
2427
+ */
2428
+ type Any$y = any;
2429
+ declare class ZPP_Circle {
2430
+ static __name__: string[];
2431
+ static __super__: Any$y;
2432
+ static _nape: Any$y;
2433
+ static _zpp: Any$y;
2434
+ static _initialized: boolean;
2435
+ radius: number;
2436
+ outer_zn: Any$y;
2437
+ __class__: Any$y;
2438
+ body: Any$y;
2439
+ type: number;
2440
+ circle: Any$y;
2441
+ polygon: Any$y;
2442
+ aabb: Any$y;
2443
+ localCOMx: number;
2444
+ localCOMy: number;
2445
+ worldCOMx: number;
2446
+ worldCOMy: number;
2447
+ zip_localCOM: boolean;
2448
+ zip_worldCOM: boolean;
2449
+ zip_aabb: boolean;
2450
+ zip_sweepRadius: boolean;
2451
+ area: number;
2452
+ inertia: number;
2453
+ angDrag: number;
2454
+ sweepCoef: number;
2455
+ sweepRadius: number;
2456
+ material: Any$y;
2457
+ filter: Any$y;
2458
+ wrap_localCOM: Any$y;
2459
+ outer: Any$y;
2460
+ outer_i: Any$y;
2461
+ space: Any$y;
2462
+ invalidate_area_inertia: () => void;
2463
+ invalidate_angDrag: () => void;
2464
+ invalidate_localCOM: () => void;
2465
+ immutable_midstep: (name: string) => void;
2466
+ setMaterial: (mat: Any$y) => void;
2467
+ setFilter: (filt: Any$y) => void;
2468
+ insert_cbtype: (cb: Any$y) => void;
2469
+ constructor();
2470
+ static _init(): void;
2471
+ __clear(): void;
2472
+ invalidate_radius(): void;
2473
+ localCOM_validate(): void;
2474
+ localCOM_invalidate(x: Any$y): void;
2475
+ localCOM_immutable(): void;
2476
+ setupLocalCOM(): void;
2477
+ __validate_aabb(): void;
2478
+ _force_validate_aabb(): void;
2479
+ __validate_sweepRadius(): void;
2480
+ __validate_area_inertia(): void;
2481
+ __validate_angDrag(): void;
2482
+ __scale(sx: number, sy: number): void;
2483
+ __translate(x: number, y: number): void;
2484
+ __rotate(x: number, y: number): void;
2485
+ __transform(m: Any$y): void;
2486
+ __copy(): Any$y;
2487
+ }
2488
+
2489
+ type Any$x = any;
2383
2490
  /**
2384
2491
  * A circular physics shape.
2492
+ *
2493
+ * Fully modernized — constructor and radius getter/setter use ZPP_Circle
2494
+ * directly. Shape-level properties still delegate through compiled Shape
2495
+ * prototype methods (copied to Circle.prototype at module load time).
2385
2496
  */
2386
2497
  declare class Circle extends Shape {
2498
+ static __name__: string[];
2499
+ static __super__: Any$x;
2500
+ /** Direct access to the extracted internal ZPP_Circle. */
2501
+ zpp_inner_zn: ZPP_Circle;
2387
2502
  constructor(radius?: number, localCOM?: Vec2, material?: Material, filter?: InteractionFilter);
2388
2503
  /** @internal */
2389
2504
  static _wrap(inner: NapeInner): Circle;
@@ -2413,6 +2528,95 @@ declare class Polygon extends Shape {
2413
2528
  validity(): NapeInner;
2414
2529
  }
2415
2530
 
2531
+ /**
2532
+ * ZPP_Edge — Internal edge representation for polygon shapes.
2533
+ *
2534
+ * Each edge stores local/world normal, projection values, and vertex references.
2535
+ * Edges are pooled and belong to a ZPP_Polygon.
2536
+ *
2537
+ * Converted from nape-compiled.js lines 41828–42175.
2538
+ */
2539
+ type Any$w = any;
2540
+ declare class ZPP_Edge {
2541
+ static __name__: string[];
2542
+ static zpp_pool: ZPP_Edge | null;
2543
+ static internal: boolean;
2544
+ static _nape: Any$w;
2545
+ static _zpp: Any$w;
2546
+ static _wrapFn: ((zpp: ZPP_Edge) => Any$w) | null;
2547
+ next: ZPP_Edge | null;
2548
+ polygon: Any$w;
2549
+ outer: Any$w;
2550
+ lnormx: number;
2551
+ lnormy: number;
2552
+ wrap_lnorm: Any$w;
2553
+ gnormx: number;
2554
+ gnormy: number;
2555
+ wrap_gnorm: Any$w;
2556
+ length: number;
2557
+ lprojection: number;
2558
+ gprojection: number;
2559
+ lp0: Any$w;
2560
+ gp0: Any$w;
2561
+ lp1: Any$w;
2562
+ gp1: Any$w;
2563
+ tp0: number;
2564
+ tp1: number;
2565
+ __class__: Any$w;
2566
+ constructor();
2567
+ free(): void;
2568
+ alloc(): void;
2569
+ wrapper(): Any$w;
2570
+ lnorm_validate(): void;
2571
+ gnorm_validate(): void;
2572
+ getlnorm(): void;
2573
+ getgnorm(): void;
2574
+ }
2575
+
2576
+ type Any$v = any;
2577
+ /**
2578
+ * An edge of a polygon shape.
2579
+ *
2580
+ * Edges are read-only and managed by the polygon they belong to.
2581
+ * Cannot be instantiated directly — only obtained from Polygon.edges.
2582
+ *
2583
+ * Fully modernized — all getters access ZPP_Edge directly.
2584
+ */
2585
+ declare class Edge {
2586
+ static __name__: string[];
2587
+ /** Direct access to the internal ZPP_Edge. */
2588
+ zpp_inner: ZPP_Edge;
2589
+ constructor();
2590
+ /** @internal */
2591
+ static _wrap(inner: Any$v): Edge;
2592
+ /** Parent polygon (as compiled Polygon wrapper). */
2593
+ get polygon(): Any$v;
2594
+ /** Local-space normal vector (immutable Vec2). */
2595
+ get localNormal(): Vec2;
2596
+ /** World-space normal vector (immutable Vec2). Requires polygon in a body. */
2597
+ get worldNormal(): Vec2;
2598
+ /** Edge length. */
2599
+ get length(): number;
2600
+ /** Local-space projection along the edge normal. */
2601
+ get localProjection(): number;
2602
+ /** World-space projection. Requires polygon in a body. */
2603
+ get worldProjection(): number;
2604
+ /** First local vertex of this edge. */
2605
+ get localVertex1(): Vec2;
2606
+ /** Second local vertex of this edge. */
2607
+ get localVertex2(): Vec2;
2608
+ /** First world vertex. Requires polygon in a body. */
2609
+ get worldVertex1(): Vec2;
2610
+ /** Second world vertex. Requires polygon in a body. */
2611
+ get worldVertex2(): Vec2;
2612
+ toString(): string;
2613
+ /**
2614
+ * Wrap a ZPP_Vec2 vertex into its public Vec2 outer.
2615
+ * Mirrors the compiled vertex wrapping pattern.
2616
+ */
2617
+ private _wrapVert;
2618
+ }
2619
+
2416
2620
  /**
2417
2621
  * Result of polygon shape validation.
2418
2622
  *
@@ -3517,4 +3721,4 @@ declare class PulleyJoint extends Constraint {
3517
3721
 
3518
3722
  declare const VERSION: string;
3519
3723
 
3520
- export { AABB, AngleJoint, Arbiter, ArbiterType, Body, BodyCallback, BodyListener, BodyType, Broadphase, Callback, CbEvent, CbType, Circle, CollisionArbiter, Compound, Constraint, ConstraintCallback, ConstraintListener, Contact, ConvexResult, DistanceJoint, 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 };
3724
+ 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 };