@newkrok/nape-js 3.3.40 → 3.3.42

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$X = any;
10
+ type Any$11 = 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$X;
32
+ __class__: Any$11;
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$W = any;
76
+ type Any$10 = any;
77
77
  declare class ZPP_Contact {
78
78
  static __name__: string[];
79
- static _nape: Any$W;
80
- static _zpp: Any$W;
79
+ static _nape: Any$10;
80
+ static _zpp: Any$10;
81
81
  static zpp_pool: ZPP_Contact | null;
82
82
  static internal: boolean;
83
- static _wrapFn: ((zpp: ZPP_Contact) => Any$W) | null;
84
- outer: Any$W;
83
+ static _wrapFn: ((zpp: ZPP_Contact) => Any$10) | null;
84
+ outer: Any$10;
85
85
  px: number;
86
86
  py: number;
87
- wrap_position: Any$W;
88
- arbiter: Any$W;
87
+ wrap_position: Any$10;
88
+ arbiter: Any$10;
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$W;
102
+ __class__: Any$10;
103
103
  constructor();
104
- wrapper(): Any$W;
104
+ wrapper(): Any$10;
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$V = any;
169
+ type Any$$ = any;
170
170
  declare class ZPP_Vec2 {
171
171
  static zpp_pool: ZPP_Vec2 | null;
172
172
  static __name__: string[];
173
- static _nape: Any$V;
174
- static _zpp: Any$V;
175
- static _wrapFn: ((zpp: ZPP_Vec2) => Any$V) | null;
173
+ static _nape: Any$$;
174
+ static _zpp: Any$$;
175
+ static _wrapFn: ((zpp: ZPP_Vec2) => Any$$) | 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$V;
184
+ outer: Any$$;
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$V;
189
+ __class__: Any$$;
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$V;
195
+ wrapper(): Any$$;
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$U = any;
347
+ type Any$_ = any;
348
348
  declare class ZPP_Vec3 {
349
349
  static __name__: string[];
350
- static _zpp: Any$U;
351
- static _wrapFn: ((zpp: ZPP_Vec3) => Any$U) | null;
352
- outer: Any$U;
350
+ static _zpp: Any$_;
351
+ static _wrapFn: ((zpp: ZPP_Vec3) => Any$_) | null;
352
+ outer: Any$_;
353
353
  x: number;
354
354
  y: number;
355
355
  z: number;
356
356
  immutable: boolean;
357
357
  _validate: (() => void) | null;
358
- __class__: Any$U;
358
+ __class__: Any$_;
359
359
  validate(): void;
360
- wrapper(): Any$U;
360
+ wrapper(): Any$_;
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$T = any;
424
+ type Any$Z = any;
425
425
  declare class ZPP_Mat23 {
426
426
  static __name__: string[];
427
- static _nape: Any$T;
428
- static _wrapFn: ((zpp: ZPP_Mat23) => Any$T) | null;
427
+ static _nape: Any$Z;
428
+ static _wrapFn: ((zpp: ZPP_Mat23) => Any$Z) | null;
429
429
  static zpp_pool: ZPP_Mat23 | null;
430
- outer: Any$T;
430
+ outer: Any$Z;
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$T;
439
+ __class__: Any$Z;
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$T;
445
+ wrapper(): Any$Z;
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$S = any;
506
+ type Any$Y = any;
507
507
  declare class ZPP_GeomPoly {
508
508
  static __name__: string[];
509
- outer: Any$S;
510
- vertices: Any$S;
511
- __class__: Any$S;
512
- constructor(outer?: Any$S);
509
+ outer: Any$Y;
510
+ vertices: Any$Y;
511
+ __class__: Any$Y;
512
+ constructor(outer?: Any$Y);
513
513
  }
514
514
 
515
515
  /**
@@ -533,7 +533,7 @@ declare class Winding {
533
533
  toString(): string;
534
534
  }
535
535
 
536
- type Any$R = any;
536
+ type Any$X = 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$R;
552
- constructor(vertices?: Any$R);
551
+ get _inner(): Any$X;
552
+ constructor(vertices?: Any$X);
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$R): GeomPoly;
578
+ static get(vertices?: Any$X): GeomPoly;
579
579
  empty(): boolean;
580
580
  size(): number;
581
- iterator(): Any$R;
582
- forwardIterator(): Any$R;
583
- backwardsIterator(): Any$R;
581
+ iterator(): Any$X;
582
+ forwardIterator(): Any$X;
583
+ backwardsIterator(): Any$X;
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$R;
596
+ winding(): Any$X;
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$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;
604
+ simpleDecomposition(output?: Any$X): Any$X;
605
+ monotoneDecomposition(output?: Any$X): Any$X;
606
+ convexDecomposition(delaunay?: boolean, output?: Any$X): Any$X;
607
+ triangularDecomposition(delaunay?: boolean, output?: Any$X): Any$X;
608
608
  inflate(inflation: number): GeomPoly;
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;
609
+ cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$X): Any$X;
610
+ transform(matrix: Any$X): this;
611
+ bounds(): Any$X;
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$Q = any;
627
+ type Any$W = any;
628
628
  declare class ZPP_AABB {
629
629
  static zpp_pool: ZPP_AABB | null;
630
630
  static __name__: string[];
631
- static _nape: Any$Q;
632
- static _zpp: Any$Q;
633
- static _wrapFn: ((zpp: ZPP_AABB) => Any$Q) | null;
631
+ static _nape: Any$W;
632
+ static _zpp: Any$W;
633
+ static _wrapFn: ((zpp: ZPP_AABB) => Any$W) | null;
634
634
  _invalidate: ((self: ZPP_AABB) => void) | null;
635
635
  _validate: (() => void) | null;
636
636
  _immutable: boolean;
637
- outer: Any$Q;
637
+ outer: Any$W;
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$Q;
644
- wrap_max: Any$Q;
645
- __class__: Any$Q;
643
+ wrap_min: Any$W;
644
+ wrap_max: Any$W;
645
+ __class__: Any$W;
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$Q;
650
+ wrapper(): Any$W;
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$Q): void;
661
+ mod_min(min: Any$W): void;
662
662
  getmax(): void;
663
663
  dom_max(): void;
664
- mod_max(max: Any$Q): void;
664
+ mod_max(max: Any$W): 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$P = any;
728
+ type Any$V = any;
729
729
  declare class ZPP_MatMN {
730
730
  static __name__: string[];
731
- outer: Any$P;
731
+ outer: Any$V;
732
732
  m: number;
733
733
  n: number;
734
734
  x: number[];
735
- __class__: Any$P;
735
+ __class__: Any$V;
736
736
  constructor(m: number, n: number);
737
737
  }
738
738
 
739
- type Any$O = any;
739
+ type Any$U = 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$O): MatMN;
750
+ static _wrap(inner: Any$U): 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$N = any;
760
+ type Any$T = 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$N): Any$N;
783
+ static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$T): Any$T;
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$M = any;
819
+ type Any$S = 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$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;
825
+ static _createRayResult: (() => Any$S) | null;
826
+ static _createConvexResult: (() => Any$S) | null;
827
+ normal: Any$S;
828
+ shape: Any$S;
829
+ convex: Any$S;
830
+ position: Any$S;
831
+ ray: Any$S;
832
832
  inner: boolean;
833
833
  next: ZPP_ConvexRayResult | null;
834
834
  toiDistance: number;
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;
835
+ __class__: Any$S;
836
+ static getRay(normal: Any$S, time: number, inner: boolean, shape: Any$S): Any$S;
837
+ static getConvex(normal: Any$S, position: Any$S, toiDistance: number, shape: Any$S): Any$S;
838
838
  disposed(): void;
839
839
  free(): void;
840
840
  private static _disposeVec2;
841
841
  }
842
842
 
843
- type Any$L = any;
843
+ type Any$R = 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$L): ConvexResult;
858
+ static _wrap(inner: Any$R): ConvexResult;
859
859
  get normal(): Vec2;
860
860
  get position(): Vec2;
861
861
  get toi(): number;
862
- get shape(): Any$L;
862
+ get shape(): Any$R;
863
863
  dispose(): void;
864
864
  toString(): string;
865
865
  /** @internal */
866
866
  private _disposed;
867
867
  }
868
868
 
869
- type Any$K = any;
869
+ type Any$Q = 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$K): RayResult;
884
+ static _wrap(inner: Any$Q): RayResult;
885
885
  get normal(): Vec2;
886
886
  get distance(): number;
887
887
  get inner(): boolean;
888
- get shape(): Any$K;
888
+ get shape(): Any$Q;
889
889
  dispose(): void;
890
890
  toString(): string;
891
891
  /** @internal */
892
892
  private _disposed;
893
893
  }
894
894
 
895
- type Any$J = any;
895
+ type Any$P = 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$J, body2: Any$J, out1: Vec2, out2: Vec2): number;
913
+ static distanceBody(body1: Any$P, body2: Any$P, 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$J, shape2: Any$J, out1: Vec2, out2: Vec2): number;
922
+ static distance(shape1: Any$P, shape2: Any$P, 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$J, body2: Any$J): boolean;
929
+ static intersectsBody(body1: Any$P, body2: Any$P): 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$J, shape2: Any$J): boolean;
936
+ static intersects(shape1: Any$P, shape2: Any$P): 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$J, shape2: Any$J): boolean;
943
+ static contains(shape1: Any$P, shape2: Any$P): 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$I = any;
1007
+ type Any$O = 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$I;
1021
- static _zpp: Any$I;
1020
+ static _nape: Any$O;
1021
+ static _zpp: Any$O;
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$I) | null;
1026
+ static _wrapFn: ((zpp: ZPP_Material) => Any$O) | null;
1027
1027
  elasticity: number;
1028
1028
  dynamicFriction: number;
1029
1029
  staticFriction: number;
1030
1030
  density: number;
1031
1031
  rollingFriction: number;
1032
- shapes: Any$I;
1033
- wrap_shapes: Any$I;
1034
- outer: Any$I;
1035
- userData: Any$I;
1032
+ shapes: Any$O;
1033
+ wrap_shapes: Any$O;
1034
+ outer: Any$O;
1035
+ userData: Any$O;
1036
1036
  next: ZPP_Material | null;
1037
- __class__: Any$I;
1037
+ __class__: Any$O;
1038
1038
  constructor();
1039
1039
  /** Create/return the public nape.phys.Material wrapper for this internal object. */
1040
- wrapper(): Any$I;
1040
+ wrapper(): Any$O;
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$I): void;
1048
+ addShape(shape: Any$O): void;
1049
1049
  /** Unregister a shape that no longer uses this material. */
1050
- remShape(shape: Any$I): void;
1050
+ remShape(shape: Any$O): 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$H = any;
1110
+ type Any$N = any;
1111
1111
  declare class ZPP_FluidProperties {
1112
1112
  static zpp_pool: ZPP_FluidProperties | null;
1113
1113
  static __name__: string[];
1114
- static _nape: Any$H;
1115
- static _zpp: Any$H;
1116
- static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$H) | null;
1114
+ static _nape: Any$N;
1115
+ static _zpp: Any$N;
1116
+ static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$N) | null;
1117
1117
  viscosity: number;
1118
1118
  density: number;
1119
1119
  gravityx: number;
1120
1120
  gravityy: number;
1121
- wrap_gravity: Any$H;
1122
- shapes: Any$H;
1123
- wrap_shapes: Any$H;
1124
- outer: Any$H;
1125
- userData: Any$H;
1121
+ wrap_gravity: Any$N;
1122
+ shapes: Any$N;
1123
+ wrap_shapes: Any$N;
1124
+ outer: Any$N;
1125
+ userData: Any$N;
1126
1126
  next: ZPP_FluidProperties | null;
1127
- __class__: Any$H;
1127
+ __class__: Any$N;
1128
1128
  constructor();
1129
1129
  /** Create/return the public nape.phys.FluidProperties wrapper. */
1130
- wrapper(): Any$H;
1130
+ wrapper(): Any$N;
1131
1131
  free(): void;
1132
1132
  alloc(): void;
1133
1133
  feature_cons(): void;
1134
- addShape(shape: Any$H): void;
1135
- remShape(shape: Any$H): void;
1134
+ addShape(shape: Any$N): void;
1135
+ remShape(shape: Any$N): 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$H): void;
1139
+ gravity_invalidate(x: Any$N): 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$G = any;
1190
+ type Any$M = any;
1191
1191
  declare class ZPP_InteractionFilter {
1192
1192
  static zpp_pool: ZPP_InteractionFilter | null;
1193
1193
  static __name__: string[];
1194
- static _nape: Any$G;
1195
- static _zpp: Any$G;
1196
- static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$G) | null;
1194
+ static _nape: Any$M;
1195
+ static _zpp: Any$M;
1196
+ static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$M) | 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$G;
1204
- wrap_shapes: Any$G;
1205
- outer: Any$G;
1206
- userData: Any$G;
1203
+ shapes: Any$M;
1204
+ wrap_shapes: Any$M;
1205
+ outer: Any$M;
1206
+ userData: Any$M;
1207
1207
  next: ZPP_InteractionFilter | null;
1208
- __class__: Any$G;
1208
+ __class__: Any$M;
1209
1209
  constructor();
1210
1210
  /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
1211
- wrapper(): Any$G;
1211
+ wrapper(): Any$M;
1212
1212
  free(): void;
1213
1213
  alloc(): void;
1214
1214
  feature_cons(): void;
1215
- addShape(shape: Any$G): void;
1216
- remShape(shape: Any$G): void;
1215
+ addShape(shape: Any$M): void;
1216
+ remShape(shape: Any$M): 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$F = any;
1280
+ type Any$L = 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$F;
1286
- static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$F) | null;
1287
- outer: Any$F;
1285
+ static _zpp: Any$L;
1286
+ static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$L) | null;
1287
+ outer: Any$L;
1288
1288
  ignore: boolean;
1289
1289
  group: ZPP_InteractionGroup | null;
1290
- groups: Any$F;
1291
- wrap_groups: Any$F;
1292
- interactors: Any$F;
1293
- wrap_interactors: Any$F;
1290
+ groups: Any$L;
1291
+ wrap_groups: Any$L;
1292
+ interactors: Any$L;
1293
+ wrap_interactors: Any$L;
1294
1294
  depth: number;
1295
- __class__: Any$F;
1295
+ __class__: Any$L;
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$F): void;
1306
+ addInteractor(intx: Any$L): void;
1307
1307
  /** Unregister an interactor from this group. */
1308
- remInteractor(intx: Any$F, flag?: number): void;
1308
+ remInteractor(intx: Any$L, flag?: number): void;
1309
1309
  }
1310
1310
 
1311
1311
  /**
@@ -1410,6 +1410,8 @@ declare class ShapeType {
1410
1410
 
1411
1411
  /**
1412
1412
  * Base class for physics shapes (Circle, Polygon).
1413
+ *
1414
+ * Fully modernized — all getters/setters access the ZPP_Shape inner directly.
1413
1415
  */
1414
1416
  declare class Shape extends Interactor {
1415
1417
  /** @internal – shapes are created via Circle or Polygon constructors. */
@@ -1417,8 +1419,12 @@ declare class Shape extends Interactor {
1417
1419
  /** @internal */
1418
1420
  static _wrap(inner: NapeInner): Shape;
1419
1421
  get type(): ShapeType;
1422
+ isCircle(): boolean;
1423
+ isPolygon(): boolean;
1420
1424
  get body(): Body;
1421
1425
  set body(value: Body | null);
1426
+ get castCircle(): Shape | null;
1427
+ get castPolygon(): Shape | null;
1422
1428
  get worldCOM(): Vec2;
1423
1429
  get localCOM(): Vec2;
1424
1430
  set localCOM(value: Vec2);
@@ -1438,21 +1444,39 @@ declare class Shape extends Interactor {
1438
1444
  get sensorEnabled(): boolean;
1439
1445
  set sensorEnabled(value: boolean);
1440
1446
  get bounds(): AABB;
1441
- /** Cast to Circle — returns the Circle wrapper or null if not a circle. */
1442
- get castCircle(): Shape | null;
1443
- /** Cast to Polygon — returns the Polygon wrapper or null if not a polygon. */
1444
- get castPolygon(): Shape | null;
1445
- isCircle(): boolean;
1446
- isPolygon(): boolean;
1447
- translate(translation: Vec2): void;
1448
- scale(scaleX: number, scaleY: number): void;
1449
- rotate(angle: number): void;
1447
+ translate(translation: Vec2): Shape;
1448
+ scale(scaleX: number, scaleY: number): Shape;
1449
+ rotate(angle: number): Shape;
1450
1450
  transform(matrix: {
1451
1451
  _inner: NapeInner;
1452
- }): void;
1452
+ }): Shape;
1453
1453
  contains(point: Vec2): boolean;
1454
1454
  copy(): Shape;
1455
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;
1456
1480
  }
1457
1481
  /** Lightweight typed interface for the callback type set on a shape. */
1458
1482
  interface CbTypeSet {
@@ -1478,7 +1502,7 @@ interface CbTypeSet {
1478
1502
  *
1479
1503
  * Converted from nape-compiled.js lines 21424–21827.
1480
1504
  */
1481
- type Any$E = any;
1505
+ type Any$K = any;
1482
1506
  declare class ZPP_Constraint {
1483
1507
  static __name__: string[];
1484
1508
  /**
@@ -1486,13 +1510,13 @@ declare class ZPP_Constraint {
1486
1510
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
1487
1511
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
1488
1512
  */
1489
- static _nape: Any$E;
1490
- static _zpp: Any$E;
1491
- outer: Any$E;
1513
+ static _nape: Any$K;
1514
+ static _zpp: Any$K;
1515
+ outer: Any$K;
1492
1516
  id: number;
1493
- userData: Any$E;
1494
- compound: Any$E;
1495
- space: Any$E;
1517
+ userData: Any$K;
1518
+ compound: Any$K;
1519
+ space: Any$K;
1496
1520
  active: boolean;
1497
1521
  stiff: boolean;
1498
1522
  frequency: number;
@@ -1502,14 +1526,14 @@ declare class ZPP_Constraint {
1502
1526
  breakUnderForce: boolean;
1503
1527
  breakUnderError: boolean;
1504
1528
  removeOnBreak: boolean;
1505
- component: Any$E;
1529
+ component: Any$K;
1506
1530
  ignore: boolean;
1507
1531
  __velocity: boolean;
1508
- cbTypes: Any$E;
1509
- cbSet: Any$E;
1510
- wrap_cbTypes: Any$E;
1532
+ cbTypes: Any$K;
1533
+ cbSet: Any$K;
1534
+ wrap_cbTypes: Any$K;
1511
1535
  pre_dt: number;
1512
- __class__: Any$E;
1536
+ __class__: Any$K;
1513
1537
  constructor();
1514
1538
  /**
1515
1539
  * Initialise base constraint fields.
@@ -1527,18 +1551,18 @@ declare class ZPP_Constraint {
1527
1551
  forest(): void;
1528
1552
  broken(): void;
1529
1553
  warmStart(): void;
1530
- draw(_g: Any$E): void;
1531
- pair_exists(_id: Any$E, _di: Any$E): boolean;
1554
+ draw(_g: Any$K): void;
1555
+ pair_exists(_id: Any$K, _di: Any$K): boolean;
1532
1556
  preStep(_dt: number): boolean;
1533
1557
  applyImpulseVel(): boolean;
1534
1558
  applyImpulsePos(): boolean;
1535
- copy(_dict?: Any$E, _todo?: Any$E): Any$E;
1559
+ copy(_dict?: Any$K, _todo?: Any$K): Any$K;
1536
1560
  immutable_midstep(name: string): void;
1537
1561
  setupcbTypes(): void;
1538
1562
  immutable_cbTypes(): void;
1539
- wrap_cbTypes_subber(pcb: Any$E): void;
1540
- wrap_cbTypes_adder(cb: Any$E): boolean;
1541
- insert_cbtype(cb: Any$E): void;
1563
+ wrap_cbTypes_subber(pcb: Any$K): void;
1564
+ wrap_cbTypes_adder(cb: Any$K): boolean;
1565
+ insert_cbtype(cb: Any$K): void;
1542
1566
  alloc_cbSet(): void;
1543
1567
  dealloc_cbSet(): void;
1544
1568
  activate(): void;
@@ -1548,12 +1572,12 @@ declare class ZPP_Constraint {
1548
1572
  activeInSpace(): void;
1549
1573
  inactiveOrOutSpace(): void;
1550
1574
  wake(): 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;
1575
+ copyto(ret: Any$K): void;
1576
+ static _findRoot(comp: Any$K): Any$K;
1577
+ static _unionComponents(a: Any$K, b: Any$K): void;
1554
1578
  }
1555
1579
 
1556
- type Any$D = any;
1580
+ type Any$J = any;
1557
1581
  /**
1558
1582
  * Base class for all constraints / joints.
1559
1583
  *
@@ -1570,16 +1594,16 @@ declare class Constraint {
1570
1594
  * are fully modernized. Also serves as backward compat for compiled code.
1571
1595
  * @internal
1572
1596
  */
1573
- _inner: Any$D;
1597
+ _inner: Any$J;
1574
1598
  debugDraw: boolean;
1575
1599
  /** @internal */
1576
1600
  protected constructor();
1577
1601
  /** @internal */
1578
- static _wrap(inner: Any$D): Constraint;
1602
+ static _wrap(inner: Any$J): Constraint;
1579
1603
  get space(): Space | null;
1580
1604
  set space(value: Space | null);
1581
- get compound(): Any$D;
1582
- set compound(value: Any$D);
1605
+ get compound(): Any$J;
1606
+ set compound(value: Any$J);
1583
1607
  get active(): boolean;
1584
1608
  set active(value: boolean);
1585
1609
  get ignore(): boolean;
@@ -1602,17 +1626,17 @@ declare class Constraint {
1602
1626
  set removeOnBreak(value: boolean);
1603
1627
  get isSleeping(): boolean;
1604
1628
  get userData(): Record<string, unknown>;
1605
- get cbTypes(): Any$D;
1606
- impulse(): Any$D;
1607
- bodyImpulse(_body: Body): Any$D;
1629
+ get cbTypes(): Any$J;
1630
+ impulse(): Any$J;
1631
+ bodyImpulse(_body: Body): Any$J;
1608
1632
  visitBodies(_fn: (body: Body) => void): void;
1609
1633
  copy(): Constraint;
1610
1634
  toString(): string;
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;
1635
+ /** @internal */ get_userData(): Any$J;
1636
+ /** @internal */ get_compound(): Any$J;
1637
+ /** @internal */ set_compound(v: Any$J): Any$J;
1638
+ /** @internal */ get_space(): Any$J;
1639
+ /** @internal */ set_space(v: Any$J): Any$J;
1616
1640
  /** @internal */ get_isSleeping(): boolean;
1617
1641
  /** @internal */ get_active(): boolean;
1618
1642
  /** @internal */ set_active(v: boolean): boolean;
@@ -1634,7 +1658,7 @@ declare class Constraint {
1634
1658
  /** @internal */ set_breakUnderError(v: boolean): boolean;
1635
1659
  /** @internal */ get_removeOnBreak(): boolean;
1636
1660
  /** @internal */ set_removeOnBreak(v: boolean): boolean;
1637
- /** @internal */ get_cbTypes(): Any$D;
1661
+ /** @internal */ get_cbTypes(): Any$J;
1638
1662
  }
1639
1663
 
1640
1664
  /**
@@ -1646,24 +1670,24 @@ declare class Constraint {
1646
1670
  *
1647
1671
  * Converted from nape-compiled.js lines 27259–27304, 112053–112139.
1648
1672
  */
1649
- type Any$C = any;
1673
+ type Any$I = any;
1650
1674
  declare class ZPP_Listener {
1651
1675
  static __name__: string[];
1652
- static _nape: Any$C;
1653
- static _zpp: Any$C;
1676
+ static _nape: Any$I;
1677
+ static _zpp: Any$I;
1654
1678
  static internal: boolean;
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;
1679
+ static types: Any$I[];
1680
+ static events: Any$I[];
1681
+ space: Any$I;
1682
+ interaction: Any$I;
1683
+ constraint: Any$I;
1684
+ body: Any$I;
1661
1685
  precedence: number;
1662
1686
  event: number;
1663
1687
  type: number;
1664
1688
  id: number;
1665
- outer: Any$C;
1666
- __class__: Any$C;
1689
+ outer: Any$I;
1690
+ __class__: Any$I;
1667
1691
  constructor();
1668
1692
  /** Sort comparator: higher precedence first, then by id descending. */
1669
1693
  static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
@@ -1739,20 +1763,20 @@ declare class ListenerType {
1739
1763
  * Fully modernized from nape-compiled.js lines 231–433.
1740
1764
  */
1741
1765
 
1742
- type Any$B = any;
1766
+ type Any$H = any;
1743
1767
  declare class Listener {
1744
1768
  static __name__: string[];
1745
1769
  zpp_inner: ZPP_Listener;
1746
- get _inner(): Any$B;
1770
+ get _inner(): Any$H;
1747
1771
  constructor();
1748
- static _wrap(inner: Any$B): Listener;
1772
+ static _wrap(inner: Any$H): Listener;
1749
1773
  get type(): ListenerType;
1750
1774
  get event(): CbEvent;
1751
1775
  set event(event: CbEvent);
1752
1776
  get precedence(): number;
1753
1777
  set precedence(precedence: number);
1754
1778
  get space(): Space | null;
1755
- set space(space: Space | Any$B | null);
1779
+ set space(space: Space | Any$H | null);
1756
1780
  toString(): string;
1757
1781
  }
1758
1782
 
@@ -1839,46 +1863,46 @@ declare class BodyType {
1839
1863
  * Converted from nape-compiled.js lines 52431–54547.
1840
1864
  */
1841
1865
 
1842
- type Any$A = any;
1866
+ type Any$G = any;
1843
1867
  declare class ZPP_Body {
1844
1868
  static __name__: string[];
1845
- static __super__: Any$A;
1869
+ static __super__: Any$G;
1846
1870
  /**
1847
1871
  * Namespace references, set by the compiled module after import.
1848
1872
  * _nape = the `nape` public namespace
1849
1873
  * _zpp = the `zpp_nape` internal namespace
1850
1874
  */
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;
1875
+ static _nape: Any$G;
1876
+ static _zpp: Any$G;
1877
+ static types: Any$G[];
1878
+ static bodystack: Any$G;
1879
+ static bodyset: Any$G;
1856
1880
  static cur_graph_depth: number;
1857
- static bodysetlt(a: Any$A, b: Any$A): boolean;
1858
- static __static(): Any$A;
1859
- outer_i: Any$A;
1881
+ static bodysetlt(a: Any$G, b: Any$G): boolean;
1882
+ static __static(): Any$G;
1883
+ outer_i: Any$G;
1860
1884
  id: number;
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;
1885
+ userData: Any$G;
1886
+ ishape: Any$G;
1887
+ ibody: Any$G;
1888
+ icompound: Any$G;
1889
+ wrap_cbTypes: Any$G;
1890
+ cbSet: Any$G;
1891
+ cbTypes: Any$G;
1892
+ group: Any$G;
1893
+ cbsets: Any$G;
1894
+ outer: Any$G;
1871
1895
  world: boolean;
1872
1896
  type: number;
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;
1897
+ compound: Any$G;
1898
+ shapes: Any$G;
1899
+ wrap_shapes: Any$G;
1900
+ space: Any$G;
1901
+ arbiters: Any$G;
1902
+ wrap_arbiters: Any$G;
1903
+ constraints: Any$G;
1904
+ wrap_constraints: Any$G;
1905
+ component: Any$G;
1882
1906
  graph_depth: number;
1883
1907
  sweepTime: number;
1884
1908
  sweep_angvel: number;
@@ -1891,20 +1915,20 @@ declare class ZPP_Body {
1891
1915
  pre_posy: number;
1892
1916
  posx: number;
1893
1917
  posy: number;
1894
- wrap_pos: Any$A;
1918
+ wrap_pos: Any$G;
1895
1919
  velx: number;
1896
1920
  vely: number;
1897
- wrap_vel: Any$A;
1921
+ wrap_vel: Any$G;
1898
1922
  forcex: number;
1899
1923
  forcey: number;
1900
- wrap_force: Any$A;
1924
+ wrap_force: Any$G;
1901
1925
  kinvelx: number;
1902
1926
  kinvely: number;
1903
- wrap_kinvel: Any$A;
1927
+ wrap_kinvel: Any$G;
1904
1928
  svelx: number;
1905
1929
  svely: number;
1906
- wrap_svel: Any$A;
1907
- wrapcvel: Any$A;
1930
+ wrap_svel: Any$G;
1931
+ wrapcvel: Any$G;
1908
1932
  angvel: number;
1909
1933
  torque: number;
1910
1934
  kinangvel: number;
@@ -1941,9 +1965,9 @@ declare class ZPP_Body {
1941
1965
  worldCOMx: number;
1942
1966
  worldCOMy: number;
1943
1967
  zip_worldCOM: boolean;
1944
- wrap_localCOM: Any$A;
1945
- wrap_worldCOM: Any$A;
1946
- __class__: Any$A;
1968
+ wrap_localCOM: Any$G;
1969
+ wrap_worldCOM: Any$G;
1970
+ __class__: Any$G;
1947
1971
  constructor();
1948
1972
  isStatic(): boolean;
1949
1973
  isDynamic(): boolean;
@@ -1951,23 +1975,23 @@ declare class ZPP_Body {
1951
1975
  invalidate_type(): void;
1952
1976
  invalidate_shapes(): void;
1953
1977
  init_bodysetlist(): void;
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;
1978
+ connectedBodies_cont(b: Any$G): void;
1979
+ connectedBodies(depth: number, output: Any$G): Any$G;
1980
+ interactingBodies(type: number, output: Any$G): Any$G;
1957
1981
  atRest(dt: number): boolean;
1958
1982
  refreshArbiters(): void;
1959
1983
  sweepIntegrate(dt: number): void;
1960
- sweepValidate(s: Any$A): void;
1984
+ sweepValidate(s: Any$G): void;
1961
1985
  invalidate_pos(): void;
1962
- pos_invalidate(pos: Any$A): void;
1986
+ pos_invalidate(pos: Any$G): void;
1963
1987
  pos_validate(): void;
1964
- vel_invalidate(vel: Any$A): void;
1988
+ vel_invalidate(vel: Any$G): void;
1965
1989
  vel_validate(): void;
1966
- kinvel_invalidate(vel: Any$A): void;
1990
+ kinvel_invalidate(vel: Any$G): void;
1967
1991
  kinvel_validate(): void;
1968
- svel_invalidate(vel: Any$A): void;
1992
+ svel_invalidate(vel: Any$G): void;
1969
1993
  svel_validate(): void;
1970
- force_invalidate(force: Any$A): void;
1994
+ force_invalidate(force: Any$G): void;
1971
1995
  force_validate(): void;
1972
1996
  private _setupVec2Wrapper;
1973
1997
  setupPosition(): void;
@@ -2004,37 +2028,37 @@ declare class ZPP_Body {
2004
2028
  getworldCOM(): void;
2005
2029
  __immutable_midstep(): void;
2006
2030
  clear(): void;
2007
- shapes_adder(s: Any$A): boolean;
2008
- shapes_subber(s: Any$A): void;
2009
- shapes_invalidate(_param: Any$A): void;
2031
+ shapes_adder(s: Any$G): boolean;
2032
+ shapes_subber(s: Any$G): void;
2033
+ shapes_invalidate(_param: Any$G): void;
2010
2034
  shapes_modifiable(): void;
2011
2035
  addedToSpace(): void;
2012
2036
  removedFromSpace(): void;
2013
2037
  private _removeArbiterFromList;
2014
- copy(): Any$A;
2038
+ copy(): Any$G;
2015
2039
  wake: () => void;
2016
2040
  __iaddedToSpace: () => void;
2017
2041
  __iremovedFromSpace: () => void;
2018
2042
  immutable_midstep: (name: string) => void;
2019
- copyto: (ret: Any$A) => void;
2020
- insert_cbtype: (cb: Any$A) => void;
2043
+ copyto: (ret: Any$G) => void;
2044
+ insert_cbtype: (cb: Any$G) => void;
2021
2045
  alloc_cbSet: () => void;
2022
2046
  dealloc_cbSet: () => void;
2023
2047
  setupcbTypes: () => void;
2024
2048
  immutable_cbTypes: () => void;
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;
2049
+ wrap_cbTypes_subber: (pcb: Any$G) => void;
2050
+ wrap_cbTypes_adder: (cb: Any$G) => void;
2051
+ setGroup: (group: Any$G) => void;
2052
+ lookup_group: () => Any$G;
2053
+ getSpace: () => Any$G;
2030
2054
  isShape: () => boolean;
2031
2055
  isBody: () => boolean;
2032
2056
  isCompound: () => boolean;
2033
2057
  static _initialized: boolean;
2034
- static _init(zpp: Any$A, nape: Any$A): void;
2058
+ static _init(zpp: Any$G, nape: Any$G): void;
2035
2059
  }
2036
2060
 
2037
- type Any$z = any;
2061
+ type Any$F = any;
2038
2062
  /**
2039
2063
  * A rigid body in the physics simulation.
2040
2064
  *
@@ -2042,7 +2066,7 @@ type Any$z = any;
2042
2066
  */
2043
2067
  declare class Body extends Interactor {
2044
2068
  static __name__: string[];
2045
- static __super__: Any$z;
2069
+ static __super__: Any$F;
2046
2070
  /** Direct access to the extracted internal ZPP_Body. */
2047
2071
  zpp_inner: ZPP_Body;
2048
2072
  debugDraw: boolean;
@@ -2094,47 +2118,47 @@ declare class Body extends Interactor {
2094
2118
  get shapes(): NapeList<Shape>;
2095
2119
  get space(): Space;
2096
2120
  set space(value: Space | null);
2097
- get compound(): Any$z;
2098
- set compound(value: Any$z);
2121
+ get compound(): Any$F;
2122
+ set compound(value: Any$F);
2099
2123
  get bounds(): AABB;
2100
2124
  get constraintVelocity(): Vec2;
2101
2125
  get localCOM(): Vec2;
2102
2126
  get worldCOM(): Vec2;
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);
2127
+ get massMode(): Any$F;
2128
+ set massMode(value: Any$F);
2129
+ get inertiaMode(): Any$F;
2130
+ set inertiaMode(value: Any$F);
2131
+ get gravMassMode(): Any$F;
2132
+ set gravMassMode(value: Any$F);
2109
2133
  copy(): Body;
2110
2134
  toString(): string;
2111
- get_type(): Any$z;
2112
- set_type(type: Any$z): Any$z;
2113
- get_shapes(): Any$z;
2135
+ get_type(): Any$F;
2136
+ set_type(type: Any$F): Any$F;
2137
+ get_shapes(): Any$F;
2114
2138
  get_isBullet(): boolean;
2115
2139
  set_isBullet(v: boolean): boolean;
2116
2140
  get_disableCCD(): boolean;
2117
2141
  set_disableCCD(v: boolean): boolean;
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;
2142
+ get_position(): Any$F;
2143
+ set_position(position: Any$F): Any$F;
2144
+ get_velocity(): Any$F;
2145
+ set_velocity(velocity: Any$F): Any$F;
2122
2146
  get_rotation(): number;
2123
2147
  set_rotation(rotation: number): number;
2124
2148
  get_angularVel(): number;
2125
2149
  set_angularVel(angularVel: number): number;
2126
- get_kinematicVel(): Any$z;
2127
- set_kinematicVel(kinematicVel: Any$z): Any$z;
2150
+ get_kinematicVel(): Any$F;
2151
+ set_kinematicVel(kinematicVel: Any$F): Any$F;
2128
2152
  get_kinAngVel(): number;
2129
2153
  set_kinAngVel(kinAngVel: number): number;
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;
2154
+ get_surfaceVel(): Any$F;
2155
+ set_surfaceVel(surfaceVel: Any$F): Any$F;
2156
+ get_force(): Any$F;
2157
+ set_force(force: Any$F): Any$F;
2134
2158
  get_torque(): number;
2135
2159
  set_torque(torque: number): number;
2136
- get_bounds(): Any$z;
2137
- get_constraintVelocity(): Any$z;
2160
+ get_bounds(): Any$F;
2161
+ get_constraintVelocity(): Any$F;
2138
2162
  get_constraintMass(): number;
2139
2163
  get_constraintInertia(): number;
2140
2164
  get_allowMovement(): boolean;
@@ -2142,28 +2166,28 @@ declare class Body extends Interactor {
2142
2166
  get_allowRotation(): boolean;
2143
2167
  set_allowRotation(allowRotation: boolean): boolean;
2144
2168
  get_isSleeping(): boolean;
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;
2169
+ get_compound(): Any$F;
2170
+ set_compound(compound: Any$F): Any$F;
2171
+ get_space(): Any$F;
2172
+ set_space(space: Any$F): Any$F;
2173
+ get_arbiters(): Any$F;
2174
+ get_constraints(): Any$F;
2175
+ get_massMode(): Any$F;
2176
+ set_massMode(massMode: Any$F): Any$F;
2153
2177
  get_mass(): number;
2154
2178
  set_mass(mass: number): number;
2155
- get_gravMassMode(): Any$z;
2156
- set_gravMassMode(gravMassMode: Any$z): Any$z;
2179
+ get_gravMassMode(): Any$F;
2180
+ set_gravMassMode(gravMassMode: Any$F): Any$F;
2157
2181
  get_gravMass(): number;
2158
2182
  set_gravMass(gravMass: number): number;
2159
2183
  get_gravMassScale(): number;
2160
2184
  set_gravMassScale(gravMassScale: number): number;
2161
- get_inertiaMode(): Any$z;
2162
- set_inertiaMode(inertiaMode: Any$z): Any$z;
2185
+ get_inertiaMode(): Any$F;
2186
+ set_inertiaMode(inertiaMode: Any$F): Any$F;
2163
2187
  get_inertia(): number;
2164
2188
  set_inertia(inertia: number): number;
2165
- get_localCOM(): Any$z;
2166
- get_worldCOM(): Any$z;
2189
+ get_localCOM(): Any$F;
2190
+ get_worldCOM(): Any$F;
2167
2191
  integrate(deltaTime: number): Body;
2168
2192
  localPointToWorld(point: Vec2, weak?: boolean): Vec2;
2169
2193
  worldPointToLocal(point: Vec2, weak?: boolean): Vec2;
@@ -2175,24 +2199,24 @@ declare class Body extends Interactor {
2175
2199
  translateShapes(translation: Vec2): Body;
2176
2200
  rotateShapes(angle: number): Body;
2177
2201
  scaleShapes(scaleX: number, scaleY: number): Body;
2178
- transformShapes(matrix: Any$z): Body;
2202
+ transformShapes(matrix: Any$F): Body;
2179
2203
  align(): Body;
2180
2204
  rotate(centre: Vec2, angle: number): Body;
2181
- setShapeMaterials(material: Any$z): Body;
2182
- setShapeFilters(filter: Any$z): Body;
2183
- setShapeFluidProperties(fluidProperties: Any$z): Body;
2205
+ setShapeMaterials(material: Any$F): Body;
2206
+ setShapeFilters(filter: Any$F): Body;
2207
+ setShapeFluidProperties(fluidProperties: Any$F): Body;
2184
2208
  contains(point: Vec2): boolean;
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;
2209
+ connectedBodies(depth?: number, output?: Any$F): Any$F;
2210
+ interactingBodies(type?: Any$F, depth?: number, output?: Any$F): Any$F;
2211
+ normalImpulse(body?: Any$F, freshOnly?: boolean): Vec3;
2212
+ tangentImpulse(body?: Any$F, freshOnly?: boolean): Vec3;
2213
+ totalContactsImpulse(body?: Any$F, freshOnly?: boolean): Vec3;
2214
+ rollingImpulse(body?: Any$F, freshOnly?: boolean): number;
2215
+ buoyancyImpulse(body?: Any$F): Vec3;
2216
+ dragImpulse(body?: Any$F): Vec3;
2217
+ totalFluidImpulse(body?: Any$F): Vec3;
2194
2218
  constraintsImpulse(): Vec3;
2195
- totalImpulse(body?: Any$z, freshOnly?: boolean): Vec3;
2219
+ totalImpulse(body?: Any$F, freshOnly?: boolean): Vec3;
2196
2220
  crushFactor(): number;
2197
2221
  private _arbiterImpulseQuery;
2198
2222
  }
@@ -2205,77 +2229,77 @@ declare class Body extends Interactor {
2205
2229
  *
2206
2230
  * Converted from nape-compiled.js lines 55195–55521.
2207
2231
  */
2208
- type Any$y = any;
2232
+ type Any$E = any;
2209
2233
  declare class ZPP_Compound {
2210
2234
  static __name__: string[];
2211
- static __super__: Any$y;
2235
+ static __super__: Any$E;
2212
2236
  /**
2213
2237
  * Namespace references, set by the compiled module after import.
2214
2238
  * _nape = the `nape` public namespace (for wrapper creation in copy())
2215
2239
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
2216
2240
  */
2217
- static _nape: Any$y;
2218
- static _zpp: Any$y;
2241
+ static _nape: Any$E;
2242
+ static _zpp: Any$E;
2219
2243
  /**
2220
2244
  * Wrapper factory callback, registered by the modernized Compound class.
2221
2245
  * When set, wrapper() uses this instead of the compiled Compound constructor.
2222
2246
  */
2223
- static _wrapFn: ((zpp: ZPP_Compound) => Any$y) | null;
2224
- outer_i: Any$y;
2247
+ static _wrapFn: ((zpp: ZPP_Compound) => Any$E) | null;
2248
+ outer_i: Any$E;
2225
2249
  id: number;
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;
2250
+ userData: Any$E;
2251
+ ishape: Any$E;
2252
+ ibody: Any$E;
2253
+ icompound: Any$E;
2254
+ wrap_cbTypes: Any$E;
2255
+ cbSet: Any$E;
2256
+ cbTypes: Any$E;
2257
+ group: Any$E;
2258
+ cbsets: Any$E;
2259
+ outer: Any$E;
2260
+ bodies: Any$E;
2261
+ constraints: Any$E;
2262
+ compounds: Any$E;
2263
+ wrap_bodies: Any$E;
2264
+ wrap_constraints: Any$E;
2265
+ wrap_compounds: Any$E;
2242
2266
  depth: number;
2243
- compound: Any$y;
2244
- space: Any$y;
2245
- __class__: Any$y;
2267
+ compound: Any$E;
2268
+ space: Any$E;
2269
+ __class__: Any$E;
2246
2270
  constructor();
2247
2271
  __imutable_midstep(name: string): void;
2248
2272
  addedToSpace(): void;
2249
2273
  removedFromSpace(): void;
2250
2274
  breakApart(): void;
2251
2275
  private static _zppOf;
2252
- bodies_adder(x: Any$y): boolean;
2253
- bodies_subber(x: Any$y): void;
2276
+ bodies_adder(x: Any$E): boolean;
2277
+ bodies_subber(x: Any$E): void;
2254
2278
  bodies_modifiable(): void;
2255
- constraints_adder(x: Any$y): boolean;
2256
- constraints_subber(x: Any$y): void;
2279
+ constraints_adder(x: Any$E): boolean;
2280
+ constraints_subber(x: Any$E): void;
2257
2281
  constraints_modifiable(): void;
2258
- compounds_adder(x: Any$y): boolean;
2259
- compounds_subber(x: Any$y): void;
2282
+ compounds_adder(x: Any$E): boolean;
2283
+ compounds_subber(x: Any$E): void;
2260
2284
  compounds_modifiable(): void;
2261
- copy(dict?: Any$y[], todo?: Any$y[]): Any$y;
2285
+ copy(dict?: Any$E[], todo?: Any$E[]): Any$E;
2262
2286
  isShape: () => boolean;
2263
2287
  isBody: () => boolean;
2264
2288
  isCompound: () => boolean;
2265
2289
  __iaddedToSpace: () => void;
2266
2290
  __iremovedFromSpace: () => void;
2267
2291
  wake: () => void;
2268
- getSpace: () => Any$y;
2292
+ getSpace: () => Any$E;
2269
2293
  setupcbTypes: () => void;
2270
2294
  immutable_cbTypes: () => void;
2271
- wrap_cbTypes_subber: (pcb: Any$y) => void;
2272
- wrap_cbTypes_adder: (cb: Any$y) => boolean;
2273
- insert_cbtype: (cb: Any$y) => void;
2295
+ wrap_cbTypes_subber: (pcb: Any$E) => void;
2296
+ wrap_cbTypes_adder: (cb: Any$E) => boolean;
2297
+ insert_cbtype: (cb: Any$E) => void;
2274
2298
  alloc_cbSet: () => void;
2275
2299
  dealloc_cbSet: () => void;
2276
2300
  immutable_midstep: (name: string) => void;
2277
- copyto: (ret: Any$y) => void;
2278
- lookup_group: () => Any$y;
2301
+ copyto: (ret: Any$E) => void;
2302
+ lookup_group: () => Any$E;
2279
2303
  /**
2280
2304
  * Initialize prototype by copying ZPP_Interactor methods.
2281
2305
  * Must be called after _zpp is set (during compiled module init).
@@ -2283,7 +2307,7 @@ declare class ZPP_Compound {
2283
2307
  static _init(): void;
2284
2308
  }
2285
2309
 
2286
- type Any$x = any;
2310
+ type Any$D = any;
2287
2311
  /**
2288
2312
  * A compound physics object — a hierarchical grouping of Bodies, Constraints,
2289
2313
  * and other Compounds.
@@ -2292,18 +2316,18 @@ type Any$x = any;
2292
2316
  */
2293
2317
  declare class Compound extends Interactor {
2294
2318
  static __name__: string[];
2295
- static __super__: Any$x;
2319
+ static __super__: Any$D;
2296
2320
  /** Direct access to the extracted internal ZPP_Compound. */
2297
2321
  zpp_inner: ZPP_Compound;
2298
2322
  constructor();
2299
2323
  /** @internal */
2300
2324
  static _wrap(inner: NapeInner): Compound;
2301
2325
  /** Bodies in this compound. */
2302
- get bodies(): Any$x;
2326
+ get bodies(): Any$D;
2303
2327
  /** Constraints in this compound. */
2304
- get constraints(): Any$x;
2328
+ get constraints(): Any$D;
2305
2329
  /** Child compounds in this compound. */
2306
- get compounds(): Any$x;
2330
+ get compounds(): Any$D;
2307
2331
  /** Parent compound, or null if this is a root compound. */
2308
2332
  get compound(): Compound | null;
2309
2333
  set compound(value: Compound | null);
@@ -2317,7 +2341,7 @@ declare class Compound extends Interactor {
2317
2341
  /** Recursively visit all bodies in this compound and its sub-compounds. */
2318
2342
  visitBodies(lambda: (body: Body) => void): void;
2319
2343
  /** Recursively visit all constraints in this compound and its sub-compounds. */
2320
- visitConstraints(lambda: (constraint: Any$x) => void): void;
2344
+ visitConstraints(lambda: (constraint: Any$D) => void): void;
2321
2345
  /** Recursively visit all sub-compounds in this compound. */
2322
2346
  visitCompounds(lambda: (compound: Compound) => void): void;
2323
2347
  /** Calculate the center of mass of all bodies in this compound. */
@@ -2327,13 +2351,13 @@ declare class Compound extends Interactor {
2327
2351
  /** Rotate all bodies in this compound around the given centre point. */
2328
2352
  rotate(centre: Vec2, angle: number): Compound;
2329
2353
  toString(): string;
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;
2354
+ get_bodies(): Any$D;
2355
+ get_constraints(): Any$D;
2356
+ get_compounds(): Any$D;
2357
+ get_compound(): Any$D;
2358
+ set_compound(compound: Any$D): Any$D;
2359
+ get_space(): Any$D;
2360
+ set_space(space: Any$D): Any$D;
2337
2361
  }
2338
2362
 
2339
2363
  /**
@@ -2401,21 +2425,21 @@ declare class MassMode {
2401
2425
  *
2402
2426
  * Converted from nape-compiled.js lines 41496–41827.
2403
2427
  */
2404
- type Any$w = any;
2428
+ type Any$C = any;
2405
2429
  declare class ZPP_Circle {
2406
2430
  static __name__: string[];
2407
- static __super__: Any$w;
2408
- static _nape: Any$w;
2409
- static _zpp: Any$w;
2431
+ static __super__: Any$C;
2432
+ static _nape: Any$C;
2433
+ static _zpp: Any$C;
2410
2434
  static _initialized: boolean;
2411
2435
  radius: number;
2412
- outer_zn: Any$w;
2413
- __class__: Any$w;
2414
- body: Any$w;
2436
+ outer_zn: Any$C;
2437
+ __class__: Any$C;
2438
+ body: Any$C;
2415
2439
  type: number;
2416
- circle: Any$w;
2417
- polygon: Any$w;
2418
- aabb: Any$w;
2440
+ circle: Any$C;
2441
+ polygon: Any$C;
2442
+ aabb: Any$C;
2419
2443
  localCOMx: number;
2420
2444
  localCOMy: number;
2421
2445
  worldCOMx: number;
@@ -2429,25 +2453,25 @@ declare class ZPP_Circle {
2429
2453
  angDrag: number;
2430
2454
  sweepCoef: number;
2431
2455
  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;
2456
+ material: Any$C;
2457
+ filter: Any$C;
2458
+ wrap_localCOM: Any$C;
2459
+ outer: Any$C;
2460
+ outer_i: Any$C;
2461
+ space: Any$C;
2438
2462
  invalidate_area_inertia: () => void;
2439
2463
  invalidate_angDrag: () => void;
2440
2464
  invalidate_localCOM: () => void;
2441
2465
  immutable_midstep: (name: string) => void;
2442
- setMaterial: (mat: Any$w) => void;
2443
- setFilter: (filt: Any$w) => void;
2444
- insert_cbtype: (cb: Any$w) => void;
2466
+ setMaterial: (mat: Any$C) => void;
2467
+ setFilter: (filt: Any$C) => void;
2468
+ insert_cbtype: (cb: Any$C) => void;
2445
2469
  constructor();
2446
2470
  static _init(): void;
2447
2471
  __clear(): void;
2448
2472
  invalidate_radius(): void;
2449
2473
  localCOM_validate(): void;
2450
- localCOM_invalidate(x: Any$w): void;
2474
+ localCOM_invalidate(x: Any$C): void;
2451
2475
  localCOM_immutable(): void;
2452
2476
  setupLocalCOM(): void;
2453
2477
  __validate_aabb(): void;
@@ -2458,11 +2482,11 @@ declare class ZPP_Circle {
2458
2482
  __scale(sx: number, sy: number): void;
2459
2483
  __translate(x: number, y: number): void;
2460
2484
  __rotate(x: number, y: number): void;
2461
- __transform(m: Any$w): void;
2462
- __copy(): Any$w;
2485
+ __transform(m: Any$C): void;
2486
+ __copy(): Any$C;
2463
2487
  }
2464
2488
 
2465
- type Any$v = any;
2489
+ type Any$B = any;
2466
2490
  /**
2467
2491
  * A circular physics shape.
2468
2492
  *
@@ -2472,7 +2496,7 @@ type Any$v = any;
2472
2496
  */
2473
2497
  declare class Circle extends Shape {
2474
2498
  static __name__: string[];
2475
- static __super__: Any$v;
2499
+ static __super__: Any$B;
2476
2500
  /** Direct access to the extracted internal ZPP_Circle. */
2477
2501
  zpp_inner_zn: ZPP_Circle;
2478
2502
  constructor(radius?: number, localCOM?: Vec2, material?: Material, filter?: InteractionFilter);
@@ -2504,6 +2528,95 @@ declare class Polygon extends Shape {
2504
2528
  validity(): NapeInner;
2505
2529
  }
2506
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$A = 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$A;
2545
+ static _zpp: Any$A;
2546
+ static _wrapFn: ((zpp: ZPP_Edge) => Any$A) | null;
2547
+ next: ZPP_Edge | null;
2548
+ polygon: Any$A;
2549
+ outer: Any$A;
2550
+ lnormx: number;
2551
+ lnormy: number;
2552
+ wrap_lnorm: Any$A;
2553
+ gnormx: number;
2554
+ gnormy: number;
2555
+ wrap_gnorm: Any$A;
2556
+ length: number;
2557
+ lprojection: number;
2558
+ gprojection: number;
2559
+ lp0: Any$A;
2560
+ gp0: Any$A;
2561
+ lp1: Any$A;
2562
+ gp1: Any$A;
2563
+ tp0: number;
2564
+ tp1: number;
2565
+ __class__: Any$A;
2566
+ constructor();
2567
+ free(): void;
2568
+ alloc(): void;
2569
+ wrapper(): Any$A;
2570
+ lnorm_validate(): void;
2571
+ gnorm_validate(): void;
2572
+ getlnorm(): void;
2573
+ getgnorm(): void;
2574
+ }
2575
+
2576
+ type Any$z = 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$z): Edge;
2592
+ /** Parent polygon (as compiled Polygon wrapper). */
2593
+ get polygon(): Any$z;
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
+
2507
2620
  /**
2508
2621
  * Result of polygon shape validation.
2509
2622
  *
@@ -2576,17 +2689,17 @@ declare class ArbiterType {
2576
2689
  *
2577
2690
  * Converted from nape-compiled.js lines 29044–29362, 80738–80766.
2578
2691
  */
2579
- type Any$u = any;
2692
+ type Any$y = any;
2580
2693
  declare class ZPP_Arbiter {
2581
2694
  static __name__: string[];
2582
- static _nape: Any$u;
2583
- static _zpp: Any$u;
2695
+ static _nape: Any$y;
2696
+ static _zpp: Any$y;
2584
2697
  static internal: boolean;
2585
2698
  static COL: number;
2586
2699
  static FLUID: number;
2587
2700
  static SENSOR: number;
2588
- static types: Any$u[];
2589
- outer: Any$u;
2701
+ static types: Any$y[];
2702
+ outer: Any$y;
2590
2703
  hnext: ZPP_Arbiter | null;
2591
2704
  id: number;
2592
2705
  di: number;
@@ -2604,31 +2717,31 @@ declare class ZPP_Arbiter {
2604
2717
  fresh: boolean;
2605
2718
  immState: number;
2606
2719
  invalidated: boolean;
2607
- b1: Any$u;
2608
- b2: Any$u;
2609
- ws1: Any$u;
2610
- ws2: Any$u;
2611
- pair: Any$u;
2720
+ b1: Any$y;
2721
+ b2: Any$y;
2722
+ ws1: Any$y;
2723
+ ws2: Any$y;
2724
+ pair: Any$y;
2612
2725
  type: number;
2613
- colarb: Any$u;
2614
- fluidarb: Any$u;
2615
- sensorarb: Any$u;
2616
- __class__: Any$u;
2726
+ colarb: Any$y;
2727
+ fluidarb: Any$y;
2728
+ sensorarb: Any$y;
2729
+ __class__: Any$y;
2617
2730
  constructor();
2618
- wrapper(): Any$u;
2731
+ wrapper(): Any$y;
2619
2732
  inactiveme(): boolean;
2620
2733
  acting(): boolean;
2621
2734
  swap_features(): void;
2622
- lazyRetire(s: Any$u, b: Any$u): void;
2623
- sup_assign(s1: Any$u, s2: Any$u, id: number, di: number): void;
2735
+ lazyRetire(s: Any$y, b: Any$y): void;
2736
+ sup_assign(s1: Any$y, s2: Any$y, id: number, di: number): void;
2624
2737
  sup_retire(): void;
2625
2738
  /** Remove this arbiter from a ZNPList_ZPP_Arbiter */
2626
- static _removeFromArbiterList(list: Any$u, arb: ZPP_Arbiter, zpp: Any$u): void;
2739
+ static _removeFromArbiterList(list: Any$y, arb: ZPP_Arbiter, zpp: Any$y): void;
2627
2740
  /** Add this arbiter to a ZNPList_ZPP_Arbiter */
2628
- static _addToArbiterList(list: Any$u, arb: ZPP_Arbiter, zpp: Any$u): void;
2741
+ static _addToArbiterList(list: Any$y, arb: ZPP_Arbiter, zpp: Any$y): void;
2629
2742
  }
2630
2743
 
2631
- type Any$t = any;
2744
+ type Any$x = any;
2632
2745
  /**
2633
2746
  * Represents an interaction arbiter between two shapes.
2634
2747
  *
@@ -2647,21 +2760,21 @@ declare class Arbiter {
2647
2760
  /** Whether this arbiter is currently sleeping. */
2648
2761
  get isSleeping(): boolean;
2649
2762
  /** The type of this arbiter (COLLISION, SENSOR, or FLUID). */
2650
- get type(): Any$t;
2763
+ get type(): Any$x;
2651
2764
  /** Cast to CollisionArbiter if this is a collision, else null. */
2652
- get collisionArbiter(): Any$t;
2765
+ get collisionArbiter(): Any$x;
2653
2766
  /** Cast to FluidArbiter if this is a fluid interaction, else null. */
2654
- get fluidArbiter(): Any$t;
2767
+ get fluidArbiter(): Any$x;
2655
2768
  /** First shape (lower id). */
2656
- get shape1(): Any$t;
2769
+ get shape1(): Any$x;
2657
2770
  /** Second shape (higher id). */
2658
- get shape2(): Any$t;
2771
+ get shape2(): Any$x;
2659
2772
  /** Body of shape1. */
2660
- get body1(): Any$t;
2773
+ get body1(): Any$x;
2661
2774
  /** Body of shape2. */
2662
- get body2(): Any$t;
2775
+ get body2(): Any$x;
2663
2776
  /** The pre-handler state of this arbiter. */
2664
- get state(): Any$t;
2777
+ get state(): Any$x;
2665
2778
  /** Whether this is a collision arbiter. */
2666
2779
  isCollisionArbiter(): boolean;
2667
2780
  /** Whether this is a fluid arbiter. */
@@ -2672,15 +2785,15 @@ declare class Arbiter {
2672
2785
  * Total impulse of this arbiter. Base implementation returns Vec3(0,0,0).
2673
2786
  * Overridden by CollisionArbiter and FluidArbiter.
2674
2787
  */
2675
- totalImpulse(body?: Any$t, _freshOnly?: boolean): Vec3;
2788
+ totalImpulse(body?: Any$x, _freshOnly?: boolean): Vec3;
2676
2789
  toString(): string;
2677
2790
  /** @internal */
2678
2791
  protected _activeCheck(): void;
2679
2792
  /** @internal */
2680
- protected _checkBody(body: Any$t): void;
2793
+ protected _checkBody(body: Any$x): void;
2681
2794
  }
2682
2795
 
2683
- type Any$s = any;
2796
+ type Any$w = any;
2684
2797
  /**
2685
2798
  * A collision arbiter between two shapes in contact.
2686
2799
  *
@@ -2694,15 +2807,15 @@ declare class CollisionArbiter extends Arbiter {
2694
2807
  static __super__: typeof Arbiter;
2695
2808
  constructor();
2696
2809
  /** Contact points for this collision. */
2697
- get contacts(): Any$s;
2810
+ get contacts(): Any$w;
2698
2811
  /** Collision normal vector. */
2699
- get normal(): Any$s;
2812
+ get normal(): Any$w;
2700
2813
  /** Sum of the radii of the two shapes at the collision point. */
2701
2814
  get radius(): number;
2702
2815
  /** Reference edge of shape1 (if polygon), or null. */
2703
- get referenceEdge1(): Any$s;
2816
+ get referenceEdge1(): Any$w;
2704
2817
  /** Reference edge of shape2 (if polygon), or null. */
2705
- get referenceEdge2(): Any$s;
2818
+ get referenceEdge2(): Any$w;
2706
2819
  /** Coefficient of restitution (elasticity). Mutable in pre-handler only. */
2707
2820
  get elasticity(): number;
2708
2821
  set elasticity(value: number);
@@ -2720,20 +2833,20 @@ declare class CollisionArbiter extends Arbiter {
2720
2833
  /** Whether the second contact point lies on a polygon vertex (poly-circle only). */
2721
2834
  secondVertex(): boolean;
2722
2835
  /** Normal impulse accumulated across all contacts. */
2723
- normalImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
2836
+ normalImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
2724
2837
  /** Tangent (friction) impulse accumulated across all contacts. */
2725
- tangentImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
2838
+ tangentImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
2726
2839
  /** Total impulse (normal + tangent + rolling) accumulated across all contacts. */
2727
- totalImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
2840
+ totalImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
2728
2841
  /** Rolling impulse for this collision. */
2729
- rollingImpulse(body?: Any$s, freshOnly?: boolean): number;
2842
+ rollingImpulse(body?: Any$w, freshOnly?: boolean): number;
2730
2843
  /** @internal Throw if not in pre-handler mutable window. */
2731
2844
  private _mutableCheck;
2732
2845
  /** @internal Accumulate impulse from contacts. */
2733
2846
  private _accumulateImpulse;
2734
2847
  }
2735
2848
 
2736
- type Any$r = any;
2849
+ type Any$v = any;
2737
2850
  /**
2738
2851
  * A fluid arbiter between two shapes with fluid interaction.
2739
2852
  *
@@ -2753,14 +2866,14 @@ declare class FluidArbiter extends Arbiter {
2753
2866
  get overlap(): number;
2754
2867
  set overlap(value: number);
2755
2868
  /** Buoyancy impulse applied by this fluid arbiter. */
2756
- buoyancyImpulse(body?: Any$r): Vec3;
2869
+ buoyancyImpulse(body?: Any$v): Vec3;
2757
2870
  /** Drag impulse applied by this fluid arbiter. */
2758
- dragImpulse(body?: Any$r): Vec3;
2871
+ dragImpulse(body?: Any$v): Vec3;
2759
2872
  /** Total impulse (buoyancy + drag). */
2760
- totalImpulse(body?: Any$r, _freshOnly?: boolean): Vec3;
2873
+ totalImpulse(body?: Any$v, _freshOnly?: boolean): Vec3;
2761
2874
  }
2762
2875
 
2763
- type Any$q = any;
2876
+ type Any$u = any;
2764
2877
  /**
2765
2878
  * Represents a contact point between two colliding shapes.
2766
2879
  *
@@ -2777,7 +2890,7 @@ declare class Contact {
2777
2890
  get _inner(): NapeInner;
2778
2891
  constructor();
2779
2892
  /** The collision arbiter this contact belongs to, or null. */
2780
- get arbiter(): Any$q;
2893
+ get arbiter(): Any$u;
2781
2894
  /** Penetration depth of this contact (positive = overlapping). */
2782
2895
  get penetration(): number;
2783
2896
  /** World-space position of this contact point. */
@@ -2791,25 +2904,25 @@ declare class Contact {
2791
2904
  * @param body - If null, returns world-frame impulse. Otherwise returns
2792
2905
  * impulse on the given body (must be one of the two in contact).
2793
2906
  */
2794
- normalImpulse(body?: Any$q): Vec3;
2907
+ normalImpulse(body?: Any$u): Vec3;
2795
2908
  /**
2796
2909
  * Tangent impulse at this contact point.
2797
2910
  * @param body - If null, returns world-frame impulse. Otherwise returns
2798
2911
  * impulse on the given body.
2799
2912
  */
2800
- tangentImpulse(body?: Any$q): Vec3;
2913
+ tangentImpulse(body?: Any$u): Vec3;
2801
2914
  /**
2802
2915
  * Rolling impulse at this contact point.
2803
2916
  * @param body - If null, returns total rolling impulse. Otherwise returns
2804
2917
  * rolling impulse on the given body.
2805
2918
  */
2806
- rollingImpulse(body?: Any$q): number;
2919
+ rollingImpulse(body?: Any$u): number;
2807
2920
  /**
2808
2921
  * Total impulse (normal + tangent + rolling) at this contact point.
2809
2922
  * @param body - If null, returns world-frame impulse. Otherwise returns
2810
2923
  * impulse on the given body.
2811
2924
  */
2812
- totalImpulse(body?: Any$q): Vec3;
2925
+ totalImpulse(body?: Any$u): Vec3;
2813
2926
  toString(): string;
2814
2927
  /** @internal */
2815
2928
  private _inactiveCheck;
@@ -2826,41 +2939,41 @@ declare class Contact {
2826
2939
  *
2827
2940
  * Converted from nape-compiled.js lines 48256–48482.
2828
2941
  */
2829
- type Any$p = any;
2942
+ type Any$t = any;
2830
2943
  declare class ZPP_CbType {
2831
2944
  static __name__: string[];
2832
- static _zpp: Any$p;
2833
- outer: Any$p;
2834
- userData: Any$p;
2945
+ static _zpp: Any$t;
2946
+ outer: Any$t;
2947
+ userData: Any$t;
2835
2948
  id: number;
2836
- cbsets: Any$p;
2837
- interactors: Any$p;
2838
- wrap_interactors: Any$p;
2839
- constraints: Any$p;
2840
- wrap_constraints: Any$p;
2841
- listeners: Any$p;
2842
- bodylisteners: Any$p;
2843
- conlisteners: Any$p;
2844
- __class__: Any$p;
2949
+ cbsets: Any$t;
2950
+ interactors: Any$t;
2951
+ wrap_interactors: Any$t;
2952
+ constraints: Any$t;
2953
+ wrap_constraints: Any$t;
2954
+ listeners: Any$t;
2955
+ bodylisteners: Any$t;
2956
+ conlisteners: Any$t;
2957
+ __class__: Any$t;
2845
2958
  constructor();
2846
2959
  /** Sort comparator by id. */
2847
2960
  static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
2848
- addInteractor(intx: Any$p): void;
2849
- remInteractor(intx: Any$p): void;
2850
- addConstraint(con: Any$p): void;
2851
- remConstraint(con: Any$p): void;
2852
- addint(x: Any$p): void;
2853
- removeint(x: Any$p): void;
2961
+ addInteractor(intx: Any$t): void;
2962
+ remInteractor(intx: Any$t): void;
2963
+ addConstraint(con: Any$t): void;
2964
+ remConstraint(con: Any$t): void;
2965
+ addint(x: Any$t): void;
2966
+ removeint(x: Any$t): void;
2854
2967
  invalidateint(): void;
2855
- addbody(x: Any$p): void;
2856
- removebody(x: Any$p): void;
2968
+ addbody(x: Any$t): void;
2969
+ removebody(x: Any$t): void;
2857
2970
  invalidatebody(): void;
2858
- addconstraint(x: Any$p): void;
2859
- removeconstraint(x: Any$p): void;
2971
+ addconstraint(x: Any$t): void;
2972
+ removeconstraint(x: Any$t): void;
2860
2973
  invalidateconstraint(): void;
2861
2974
  }
2862
2975
 
2863
- type Any$o = any;
2976
+ type Any$s = any;
2864
2977
  /**
2865
2978
  * Callback type — used to tag interactors so that listeners
2866
2979
  * can filter which interactions they respond to.
@@ -2881,11 +2994,11 @@ declare class CbType {
2881
2994
  static get_ANY_SHAPE(): CbType;
2882
2995
  static get_ANY_COMPOUND(): CbType;
2883
2996
  get id(): number;
2884
- get userData(): Any$o;
2885
- get interactors(): Any$o;
2886
- get constraints(): Any$o;
2887
- including(includes: Any$o): Any$o;
2888
- excluding(excludes: Any$o): Any$o;
2997
+ get userData(): Any$s;
2998
+ get interactors(): Any$s;
2999
+ get constraints(): Any$s;
3000
+ including(includes: Any$s): Any$s;
3001
+ excluding(excludes: Any$s): Any$s;
2889
3002
  toString(): string;
2890
3003
  static _wrap(inner: any): CbType;
2891
3004
  }
@@ -2946,37 +3059,37 @@ declare class PreFlag {
2946
3059
  *
2947
3060
  * Converted from nape-compiled.js lines 51337–51655.
2948
3061
  */
2949
- type Any$n = any;
3062
+ type Any$r = any;
2950
3063
  declare class ZPP_OptionType {
2951
3064
  static __name__: string[];
2952
- static _nape: Any$n;
2953
- static _zpp: Any$n;
2954
- outer: Any$n;
2955
- handler: ((val: Any$n, included: boolean, added: boolean) => void) | null;
2956
- includes: Any$n;
2957
- excludes: Any$n;
2958
- wrap_includes: Any$n;
2959
- wrap_excludes: Any$n;
2960
- __class__: Any$n;
3065
+ static _nape: Any$r;
3066
+ static _zpp: Any$r;
3067
+ outer: Any$r;
3068
+ handler: ((val: Any$r, included: boolean, added: boolean) => void) | null;
3069
+ includes: Any$r;
3070
+ excludes: Any$r;
3071
+ wrap_includes: Any$r;
3072
+ wrap_excludes: Any$r;
3073
+ __class__: Any$r;
2961
3074
  constructor();
2962
3075
  /** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
2963
- static argument(val: Any$n): Any$n;
3076
+ static argument(val: Any$r): Any$r;
2964
3077
  setup_includes(): void;
2965
3078
  setup_excludes(): void;
2966
- excluded(xs: Any$n): boolean;
2967
- included(xs: Any$n): boolean;
2968
- compatible(xs: Any$n): boolean;
3079
+ excluded(xs: Any$r): boolean;
3080
+ included(xs: Any$r): boolean;
3081
+ compatible(xs: Any$r): boolean;
2969
3082
  /** Check whether two sorted-by-id lists share any element. */
2970
- nonemptyintersection(xs: Any$n, ys: Any$n): boolean;
3083
+ nonemptyintersection(xs: Any$r, ys: Any$r): boolean;
2971
3084
  /** Insert into the ordered include or exclude list, using pool nodes. */
2972
3085
  private insertOrdered;
2973
- effect_change(val: Any$n, included: boolean, added: boolean): void;
2974
- append_type(list: Any$n, val: Any$n): void;
3086
+ effect_change(val: Any$r, included: boolean, added: boolean): void;
3087
+ append_type(list: Any$r, val: Any$r): void;
2975
3088
  set(options: ZPP_OptionType): this;
2976
- append(list: Any$n, val: Any$n): void;
3089
+ append(list: Any$r, val: Any$r): void;
2977
3090
  }
2978
3091
 
2979
- type Any$m = any;
3092
+ type Any$q = any;
2980
3093
  /**
2981
3094
  * Composite callback option type — allows including and excluding CbTypes.
2982
3095
  *
@@ -2986,13 +3099,13 @@ declare class OptionType {
2986
3099
  static __name__: string[];
2987
3100
  zpp_inner: ZPP_OptionType;
2988
3101
  get _inner(): NapeInner;
2989
- constructor(includes?: Any$m, excludes?: Any$m);
2990
- get includes(): Any$m;
2991
- get excludes(): Any$m;
2992
- get_includes(): Any$m;
2993
- get_excludes(): Any$m;
2994
- including(includes: Any$m): this;
2995
- excluding(excludes: Any$m): this;
3102
+ constructor(includes?: Any$q, excludes?: Any$q);
3103
+ get includes(): Any$q;
3104
+ get excludes(): Any$q;
3105
+ get_includes(): Any$q;
3106
+ get_excludes(): Any$q;
3107
+ including(includes: Any$q): this;
3108
+ excluding(excludes: Any$q): this;
2996
3109
  toString(): string;
2997
3110
  static _wrap(inner: any): OptionType;
2998
3111
  }
@@ -3006,18 +3119,18 @@ declare class OptionType {
3006
3119
  * Converted from nape-compiled.js lines 27305–27497.
3007
3120
  */
3008
3121
 
3009
- type Any$l = any;
3122
+ type Any$p = any;
3010
3123
  declare class ZPP_BodyListener extends ZPP_Listener {
3011
3124
  static __name__: string[];
3012
- handler: Any$l;
3013
- options: Any$l;
3014
- outer_zn: Any$l;
3015
- __class__: Any$l;
3016
- constructor(options: Any$l, event: number, handler: Any$l);
3125
+ handler: Any$p;
3126
+ options: Any$p;
3127
+ outer_zn: Any$p;
3128
+ __class__: Any$p;
3129
+ constructor(options: Any$p, event: number, handler: Any$p);
3017
3130
  immutable_options(): void;
3018
3131
  addedToSpace(): void;
3019
3132
  removedFromSpace(): void;
3020
- cbtype_change(cb: Any$l, included: boolean, added: boolean): void;
3133
+ cbtype_change(cb: Any$p, included: boolean, added: boolean): void;
3021
3134
  invalidate_precedence(): void;
3022
3135
  swapEvent(newev: number): void;
3023
3136
  }
@@ -3028,15 +3141,15 @@ declare class ZPP_BodyListener extends ZPP_Listener {
3028
3141
  * Fully modernized from nape-compiled.js lines 434–515.
3029
3142
  */
3030
3143
 
3031
- type Any$k = any;
3144
+ type Any$o = any;
3032
3145
  declare class BodyListener extends Listener {
3033
3146
  static __name__: string[];
3034
3147
  zpp_inner_zn: ZPP_BodyListener;
3035
- constructor(event: CbEvent, options: Any$k, handler: (cb: Any$k) => void, precedence?: number);
3036
- get options(): Any$k;
3037
- set options(options: Any$k);
3038
- get handler(): (cb: Any$k) => void;
3039
- set handler(handler: (cb: Any$k) => void);
3148
+ constructor(event: CbEvent, options: Any$o, handler: (cb: Any$o) => void, precedence?: number);
3149
+ get options(): Any$o;
3150
+ set options(options: Any$o);
3151
+ get handler(): (cb: Any$o) => void;
3152
+ set handler(handler: (cb: Any$o) => void);
3040
3153
  }
3041
3154
 
3042
3155
  /**
@@ -3049,38 +3162,38 @@ declare class BodyListener extends Listener {
3049
3162
  * Converted from nape-compiled.js lines 28138–30352, 112140–112151.
3050
3163
  */
3051
3164
 
3052
- type Any$j = any;
3165
+ type Any$n = any;
3053
3166
  declare class ZPP_InteractionListener extends ZPP_Listener {
3054
3167
  static __name__: string[];
3055
- static UCbSet: Any$j;
3056
- static VCbSet: Any$j;
3057
- static WCbSet: Any$j;
3058
- static UCbType: Any$j;
3059
- static VCbType: Any$j;
3060
- static WCbType: Any$j;
3061
- outer_zni: Any$j;
3062
- outer_znp: Any$j;
3168
+ static UCbSet: Any$n;
3169
+ static VCbSet: Any$n;
3170
+ static WCbSet: Any$n;
3171
+ static UCbType: Any$n;
3172
+ static VCbType: Any$n;
3173
+ static WCbType: Any$n;
3174
+ outer_zni: Any$n;
3175
+ outer_znp: Any$n;
3063
3176
  itype: number;
3064
- options1: Any$j;
3065
- options2: Any$j;
3066
- handleri: Any$j;
3177
+ options1: Any$n;
3178
+ options2: Any$n;
3179
+ handleri: Any$n;
3067
3180
  allowSleepingCallbacks: boolean;
3068
3181
  pure: boolean;
3069
- handlerp: Any$j;
3070
- __class__: Any$j;
3071
- constructor(options1: Any$j, options2: Any$j, event: number, type: number);
3182
+ handlerp: Any$n;
3183
+ __class__: Any$n;
3184
+ constructor(options1: Any$n, options2: Any$n, event: number, type: number);
3072
3185
  setInteractionType(itype: number): void;
3073
3186
  wake(): void;
3074
- CbSetset(A: Any$j, B: Any$j, lambda: (a: Any$j, b: Any$j) => void): void;
3075
- CbTypeset(A: Any$j, B: Any$j, lambda: (a: Any$j, b: Any$j) => void): void;
3187
+ CbSetset(A: Any$n, B: Any$n, lambda: (a: Any$n, b: Any$n) => void): void;
3188
+ CbTypeset(A: Any$n, B: Any$n, lambda: (a: Any$n, b: Any$n) => void): void;
3076
3189
  with_uniquesets(fresh: boolean): void;
3077
- with_union(lambda: (cb: Any$j) => void): void;
3190
+ with_union(lambda: (cb: Any$n) => void): void;
3078
3191
  addedToSpace(): void;
3079
3192
  removedFromSpace(): void;
3080
3193
  invalidate_precedence(): void;
3081
- cbtype_change1(cb: Any$j, included: boolean, added: boolean): void;
3082
- cbtype_change2(cb: Any$j, included: boolean, added: boolean): void;
3083
- cbtype_change(options: Any$j, cb: Any$j, included: boolean, added: boolean): void;
3194
+ cbtype_change1(cb: Any$n, included: boolean, added: boolean): void;
3195
+ cbtype_change2(cb: Any$n, included: boolean, added: boolean): void;
3196
+ cbtype_change(options: Any$n, cb: Any$n, included: boolean, added: boolean): void;
3084
3197
  swapEvent(newev: number): void;
3085
3198
  private _allocCbSetNode;
3086
3199
  private _allocCbTypeNode;
@@ -3092,17 +3205,17 @@ declare class ZPP_InteractionListener extends ZPP_Listener {
3092
3205
  * Fully modernized from nape-compiled.js lines 659–1091.
3093
3206
  */
3094
3207
 
3095
- type Any$i = any;
3208
+ type Any$m = any;
3096
3209
  declare class InteractionListener extends Listener {
3097
3210
  static __name__: string[];
3098
3211
  zpp_inner_zn: ZPP_InteractionListener;
3099
- constructor(event: CbEvent, interactionType: InteractionType, options1: Any$i, options2: Any$i, handler: (cb: Any$i) => void, precedence?: number);
3100
- get options1(): Any$i;
3101
- set options1(options1: Any$i);
3102
- get options2(): Any$i;
3103
- set options2(options2: Any$i);
3104
- get handler(): (cb: Any$i) => void;
3105
- set handler(handler: (cb: Any$i) => void);
3212
+ constructor(event: CbEvent, interactionType: InteractionType, options1: Any$m, options2: Any$m, handler: (cb: Any$m) => void, precedence?: number);
3213
+ get options1(): Any$m;
3214
+ set options1(options1: Any$m);
3215
+ get options2(): Any$m;
3216
+ set options2(options2: Any$m);
3217
+ get handler(): (cb: Any$m) => void;
3218
+ set handler(handler: (cb: Any$m) => void);
3106
3219
  get interactionType(): InteractionType | null;
3107
3220
  set interactionType(interactionType: InteractionType | null);
3108
3221
  get allowSleepingCallbacks(): boolean;
@@ -3118,18 +3231,18 @@ declare class InteractionListener extends Listener {
3118
3231
  * Converted from nape-compiled.js lines 27498–27694.
3119
3232
  */
3120
3233
 
3121
- type Any$h = any;
3234
+ type Any$l = any;
3122
3235
  declare class ZPP_ConstraintListener extends ZPP_Listener {
3123
3236
  static __name__: string[];
3124
- handler: Any$h;
3125
- options: Any$h;
3126
- outer_zn: Any$h;
3127
- __class__: Any$h;
3128
- constructor(options: Any$h, event: number, handler: Any$h);
3237
+ handler: Any$l;
3238
+ options: Any$l;
3239
+ outer_zn: Any$l;
3240
+ __class__: Any$l;
3241
+ constructor(options: Any$l, event: number, handler: Any$l);
3129
3242
  immutable_options(): void;
3130
3243
  addedToSpace(): void;
3131
3244
  removedFromSpace(): void;
3132
- cbtype_change(cb: Any$h, included: boolean, added: boolean): void;
3245
+ cbtype_change(cb: Any$l, included: boolean, added: boolean): void;
3133
3246
  invalidate_precedence(): void;
3134
3247
  swapEvent(newev: number): void;
3135
3248
  }
@@ -3140,15 +3253,15 @@ declare class ZPP_ConstraintListener extends ZPP_Listener {
3140
3253
  * Fully modernized from nape-compiled.js lines 546–649.
3141
3254
  */
3142
3255
 
3143
- type Any$g = any;
3256
+ type Any$k = any;
3144
3257
  declare class ConstraintListener extends Listener {
3145
3258
  static __name__: string[];
3146
3259
  zpp_inner_zn: ZPP_ConstraintListener;
3147
- constructor(event: CbEvent, options: Any$g, handler: (cb: Any$g) => void, precedence?: number);
3148
- get options(): Any$g;
3149
- set options(options: Any$g);
3150
- get handler(): (cb: Any$g) => void;
3151
- set handler(handler: (cb: Any$g) => void);
3260
+ constructor(event: CbEvent, options: Any$k, handler: (cb: Any$k) => void, precedence?: number);
3261
+ get options(): Any$k;
3262
+ set options(options: Any$k);
3263
+ get handler(): (cb: Any$k) => void;
3264
+ set handler(handler: (cb: Any$k) => void);
3152
3265
  }
3153
3266
 
3154
3267
  /**
@@ -3159,17 +3272,17 @@ declare class ConstraintListener extends Listener {
3159
3272
  * Fully modernized from nape-compiled.js lines 1142–1338.
3160
3273
  */
3161
3274
 
3162
- type Any$f = any;
3275
+ type Any$j = any;
3163
3276
  declare class PreListener extends Listener {
3164
3277
  static __name__: string[];
3165
3278
  zpp_inner_zn: ZPP_InteractionListener;
3166
- constructor(interactionType: InteractionType, options1: Any$f, options2: Any$f, handler: (cb: Any$f) => Any$f, precedence?: number, pure?: boolean);
3167
- get options1(): Any$f;
3168
- set options1(options1: Any$f);
3169
- get options2(): Any$f;
3170
- set options2(options2: Any$f);
3171
- get handler(): (cb: Any$f) => Any$f;
3172
- set handler(handler: (cb: Any$f) => Any$f);
3279
+ constructor(interactionType: InteractionType, options1: Any$j, options2: Any$j, handler: (cb: Any$j) => Any$j, precedence?: number, pure?: boolean);
3280
+ get options1(): Any$j;
3281
+ set options1(options1: Any$j);
3282
+ get options2(): Any$j;
3283
+ set options2(options2: Any$j);
3284
+ get handler(): (cb: Any$j) => Any$j;
3285
+ set handler(handler: (cb: Any$j) => Any$j);
3173
3286
  get pure(): boolean;
3174
3287
  set pure(pure: boolean);
3175
3288
  get interactionType(): InteractionType | null;
@@ -3184,35 +3297,35 @@ declare class PreListener extends Listener {
3184
3297
  *
3185
3298
  * Converted from nape-compiled.js lines 44587–44794, 133299–133300.
3186
3299
  */
3187
- type Any$e = any;
3300
+ type Any$i = any;
3188
3301
  declare class ZPP_Callback {
3189
3302
  static __name__: string[];
3190
- static _nape: Any$e;
3191
- static _zpp: Any$e;
3303
+ static _nape: Any$i;
3304
+ static _zpp: Any$i;
3192
3305
  static internal: boolean;
3193
3306
  static zpp_pool: ZPP_Callback | null;
3194
- outer_body: Any$e;
3195
- outer_con: Any$e;
3196
- outer_int: Any$e;
3307
+ outer_body: Any$i;
3308
+ outer_con: Any$i;
3309
+ outer_int: Any$i;
3197
3310
  event: number;
3198
- listener: Any$e;
3199
- space: Any$e;
3311
+ listener: Any$i;
3312
+ space: Any$i;
3200
3313
  index: number;
3201
3314
  next: ZPP_Callback | null;
3202
3315
  prev: ZPP_Callback | null;
3203
3316
  length: number;
3204
- int1: Any$e;
3205
- int2: Any$e;
3206
- set: Any$e;
3207
- wrap_arbiters: Any$e;
3208
- pre_arbiter: Any$e;
3317
+ int1: Any$i;
3318
+ int2: Any$i;
3319
+ set: Any$i;
3320
+ wrap_arbiters: Any$i;
3321
+ pre_arbiter: Any$i;
3209
3322
  pre_swapped: boolean;
3210
- body: Any$e;
3211
- constraint: Any$e;
3212
- __class__: Any$e;
3213
- wrapper_body(): Any$e;
3214
- wrapper_con(): Any$e;
3215
- wrapper_int(): Any$e;
3323
+ body: Any$i;
3324
+ constraint: Any$i;
3325
+ __class__: Any$i;
3326
+ wrapper_body(): Any$i;
3327
+ wrapper_con(): Any$i;
3328
+ wrapper_int(): Any$i;
3216
3329
  push(obj: ZPP_Callback): void;
3217
3330
  push_rev(obj: ZPP_Callback): void;
3218
3331
  pop(): ZPP_Callback;
@@ -3231,7 +3344,7 @@ declare class ZPP_Callback {
3231
3344
  genarbs(): void;
3232
3345
  }
3233
3346
 
3234
- type Any$d = any;
3347
+ type Any$h = any;
3235
3348
  /**
3236
3349
  * Base class for all physics engine callbacks.
3237
3350
  *
@@ -3244,12 +3357,12 @@ declare class Callback {
3244
3357
  static __name__: string[];
3245
3358
  zpp_inner: ZPP_Callback | null;
3246
3359
  constructor();
3247
- get event(): Any$d;
3248
- get listener(): Any$d;
3360
+ get event(): Any$h;
3361
+ get listener(): Any$h;
3249
3362
  toString(): string;
3250
3363
  }
3251
3364
 
3252
- type Any$c = any;
3365
+ type Any$g = any;
3253
3366
  /**
3254
3367
  * Callback for body events (WAKE/SLEEP).
3255
3368
  *
@@ -3259,11 +3372,11 @@ type Any$c = any;
3259
3372
  */
3260
3373
  declare class BodyCallback extends Callback {
3261
3374
  static __name__: string[];
3262
- get body(): Any$c;
3375
+ get body(): Any$g;
3263
3376
  toString(): string;
3264
3377
  }
3265
3378
 
3266
- type Any$b = any;
3379
+ type Any$f = any;
3267
3380
  /**
3268
3381
  * Callback for constraint events (WAKE/SLEEP/BREAK).
3269
3382
  *
@@ -3273,11 +3386,11 @@ type Any$b = any;
3273
3386
  */
3274
3387
  declare class ConstraintCallback extends Callback {
3275
3388
  static __name__: string[];
3276
- get constraint(): Any$b;
3389
+ get constraint(): Any$f;
3277
3390
  toString(): string;
3278
3391
  }
3279
3392
 
3280
- type Any$a = any;
3393
+ type Any$e = any;
3281
3394
  /**
3282
3395
  * Callback for interaction events (BEGIN/END/ONGOING).
3283
3396
  *
@@ -3287,13 +3400,13 @@ type Any$a = any;
3287
3400
  */
3288
3401
  declare class InteractionCallback extends Callback {
3289
3402
  static __name__: string[];
3290
- get int1(): Any$a;
3291
- get int2(): Any$a;
3292
- get arbiters(): Any$a;
3403
+ get int1(): Any$e;
3404
+ get int2(): Any$e;
3405
+ get arbiters(): Any$e;
3293
3406
  toString(): string;
3294
3407
  }
3295
3408
 
3296
- type Any$9 = any;
3409
+ type Any$d = any;
3297
3410
  /**
3298
3411
  * Callback for pre-interaction events.
3299
3412
  *
@@ -3303,43 +3416,208 @@ type Any$9 = any;
3303
3416
  */
3304
3417
  declare class PreCallback extends Callback {
3305
3418
  static __name__: string[];
3306
- get arbiter(): Any$9;
3307
- get int1(): Any$9;
3308
- get int2(): Any$9;
3419
+ get arbiter(): Any$d;
3420
+ get int1(): Any$d;
3421
+ get int2(): Any$d;
3309
3422
  get swapped(): boolean;
3310
3423
  toString(): string;
3311
3424
  }
3312
3425
 
3313
- type Any$8 = any;
3426
+ /**
3427
+ * ZPP_PivotJoint — Internal 2-body, 2-DOF point-to-point constraint.
3428
+ *
3429
+ * Constrains two anchor points (a1 on b1, a2 on b2) to coincide.
3430
+ * Uses a 2×2 mass matrix (kMassa, kMassb, kMassc) for the symmetric
3431
+ * positive-semi-definite effective-mass inverse.
3432
+ *
3433
+ * Converted from nape-compiled.js lines 24611–25474.
3434
+ */
3435
+
3436
+ type Any$c = any;
3437
+ declare class ZPP_PivotJoint extends ZPP_Constraint {
3438
+ static __name__: string[];
3439
+ static __super__: typeof ZPP_Constraint;
3440
+ static _wrapFn: ((zpp: ZPP_PivotJoint) => Any$c) | null;
3441
+ outer_zn: Any$c;
3442
+ b1: Any$c;
3443
+ b2: Any$c;
3444
+ a1localx: number;
3445
+ a1localy: number;
3446
+ a1relx: number;
3447
+ a1rely: number;
3448
+ wrap_a1: Any$c;
3449
+ a2localx: number;
3450
+ a2localy: number;
3451
+ a2relx: number;
3452
+ a2rely: number;
3453
+ wrap_a2: Any$c;
3454
+ kMassa: number;
3455
+ kMassb: number;
3456
+ kMassc: number;
3457
+ jAccx: number;
3458
+ jAccy: number;
3459
+ jMax: number;
3460
+ gamma: number;
3461
+ biasx: number;
3462
+ biasy: number;
3463
+ stepped: boolean;
3464
+ __class__: Any$c;
3465
+ constructor();
3466
+ bodyImpulse(b: Any$c): Any$c;
3467
+ activeBodies(): void;
3468
+ inactiveBodies(): void;
3469
+ validate_a1(): void;
3470
+ invalidate_a1(x: Any$c): void;
3471
+ setup_a1(): void;
3472
+ validate_a2(): void;
3473
+ invalidate_a2(x: Any$c): void;
3474
+ setup_a2(): void;
3475
+ copy(dict: Any$c, todo: Any$c): Any$c;
3476
+ validate(): void;
3477
+ wake_connected(): void;
3478
+ forest(): void;
3479
+ pair_exists(id: number, di: number): boolean;
3480
+ clearcache(): void;
3481
+ preStep(dt: number): boolean;
3482
+ warmStart(): void;
3483
+ applyImpulseVel(): boolean;
3484
+ applyImpulsePos(): boolean;
3485
+ draw(_g: Any$c): void;
3486
+ }
3487
+
3488
+ type Any$b = any;
3314
3489
  /**
3315
3490
  * A pivot (pin) joint that constrains two bodies to share an anchor point.
3491
+ *
3492
+ * Fully modernized — uses ZPP_PivotJoint directly (extracted to TypeScript).
3316
3493
  */
3317
3494
  declare class PivotJoint extends Constraint {
3495
+ zpp_inner: ZPP_PivotJoint;
3318
3496
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2);
3319
3497
  /** @internal */
3320
- static _wrap(inner: Any$8): PivotJoint;
3498
+ static _wrap(inner: Any$b): PivotJoint;
3321
3499
  get body1(): Body;
3322
3500
  set body1(value: Body | null);
3501
+ /** @internal */
3502
+ private _setBody1;
3323
3503
  get body2(): Body;
3324
3504
  set body2(value: Body | null);
3505
+ /** @internal */
3506
+ private _setBody2;
3325
3507
  get anchor1(): Vec2;
3326
3508
  set anchor1(value: Vec2);
3327
3509
  get anchor2(): Vec2;
3328
3510
  set anchor2(value: Vec2);
3511
+ impulse(): Any$b;
3512
+ bodyImpulse(body: Body): Any$b;
3513
+ visitBodies(lambda: (body: Body) => void): void;
3514
+ /** @internal */ get_body1(): Any$b;
3515
+ /** @internal */ set_body1(v: Any$b): Any$b;
3516
+ /** @internal */ get_body2(): Any$b;
3517
+ /** @internal */ set_body2(v: Any$b): Any$b;
3518
+ /** @internal */ get_anchor1(): Any$b;
3519
+ /** @internal */ set_anchor1(v: Any$b): Any$b;
3520
+ /** @internal */ get_anchor2(): Any$b;
3521
+ /** @internal */ set_anchor2(v: Any$b): Any$b;
3522
+ /** @internal backward compat alias for zpp_inner */
3523
+ get zpp_inner_zn(): ZPP_PivotJoint;
3524
+ set zpp_inner_zn(v: ZPP_PivotJoint);
3329
3525
  }
3330
3526
 
3331
- type Any$7 = any;
3527
+ /**
3528
+ * ZPP_DistanceJoint — Internal 2-body, 1-DOF distance constraint.
3529
+ *
3530
+ * Constrains the distance between two anchor points (a1 on b1, a2 on b2)
3531
+ * to lie within [jointMin, jointMax]. Supports equal (exact) mode, slack
3532
+ * detection, soft (spring) and stiff modes, and position correction.
3533
+ *
3534
+ * Converted from nape-compiled.js lines 22329–23204.
3535
+ */
3536
+
3537
+ type Any$a = any;
3538
+ declare class ZPP_DistanceJoint extends ZPP_Constraint {
3539
+ static __name__: string[];
3540
+ static __super__: typeof ZPP_Constraint;
3541
+ static _wrapFn: ((zpp: ZPP_DistanceJoint) => Any$a) | null;
3542
+ outer_zn: Any$a;
3543
+ jointMin: number;
3544
+ jointMax: number;
3545
+ slack: boolean;
3546
+ equal: boolean;
3547
+ nx: number;
3548
+ ny: number;
3549
+ cx1: number;
3550
+ cx2: number;
3551
+ b1: Any$a;
3552
+ b2: Any$a;
3553
+ a1localx: number;
3554
+ a1localy: number;
3555
+ a1relx: number;
3556
+ a1rely: number;
3557
+ a2localx: number;
3558
+ a2localy: number;
3559
+ a2relx: number;
3560
+ a2rely: number;
3561
+ wrap_a1: Any$a;
3562
+ wrap_a2: Any$a;
3563
+ kMass: number;
3564
+ jAcc: number;
3565
+ jMax: number;
3566
+ gamma: number;
3567
+ bias: number;
3568
+ stepped: boolean;
3569
+ __class__: Any$a;
3570
+ constructor();
3571
+ is_slack(): boolean;
3572
+ bodyImpulse(b: Any$a): Any$a;
3573
+ activeBodies(): void;
3574
+ inactiveBodies(): void;
3575
+ validate_a1(): void;
3576
+ invalidate_a1(x: Any$a): void;
3577
+ setup_a1(): void;
3578
+ validate_a2(): void;
3579
+ invalidate_a2(x: Any$a): void;
3580
+ setup_a2(): void;
3581
+ copy(dict: Any$a, todo: Any$a): Any$a;
3582
+ validate(): void;
3583
+ wake_connected(): void;
3584
+ forest(): void;
3585
+ pair_exists(id: number, di: number): boolean;
3586
+ clearcache(): void;
3587
+ preStep(dt: number): boolean;
3588
+ warmStart(): void;
3589
+ applyImpulseVel(): boolean;
3590
+ applyImpulsePos(): boolean;
3591
+ draw(_g: Any$a): void;
3592
+ /**
3593
+ * Creates (or reuses from pool) a public Vec2 wrapper for a constraint anchor
3594
+ * point stored as (localx, localy). Installs the given validate and invalidate
3595
+ * callbacks so that the Vec2 stays in sync with the internal coordinate fields.
3596
+ *
3597
+ * Shared by all anchor-based joints (DistanceJoint, PivotJoint, LineJoint, etc.)
3598
+ */
3599
+ static _setupAnchorVec2(localx: number, localy: number, validateFn: (() => void) | null, invalidateFn: ((vec: Any$a) => void) | null): Any$a;
3600
+ }
3601
+
3602
+ type Any$9 = any;
3332
3603
  /**
3333
3604
  * Constrains the distance between two anchor points on two bodies.
3605
+ *
3606
+ * Fully modernized — uses ZPP_DistanceJoint directly (extracted to TypeScript).
3334
3607
  */
3335
3608
  declare class DistanceJoint extends Constraint {
3609
+ zpp_inner: ZPP_DistanceJoint;
3336
3610
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, jointMin: number, jointMax: number);
3337
3611
  /** @internal */
3338
- static _wrap(inner: Any$7): DistanceJoint;
3612
+ static _wrap(inner: Any$9): DistanceJoint;
3339
3613
  get body1(): Body;
3340
3614
  set body1(value: Body | null);
3615
+ /** @internal */
3616
+ private _setBody1;
3341
3617
  get body2(): Body;
3342
3618
  set body2(value: Body | null);
3619
+ /** @internal */
3620
+ private _setBody2;
3343
3621
  get anchor1(): Vec2;
3344
3622
  set anchor1(value: Vec2);
3345
3623
  get anchor2(): Vec2;
@@ -3348,6 +3626,25 @@ declare class DistanceJoint extends Constraint {
3348
3626
  set jointMin(value: number);
3349
3627
  get jointMax(): number;
3350
3628
  set jointMax(value: number);
3629
+ isSlack(): boolean;
3630
+ impulse(): Any$9;
3631
+ bodyImpulse(body: Body): Any$9;
3632
+ visitBodies(lambda: (body: Body) => void): void;
3633
+ /** @internal */ get_body1(): Any$9;
3634
+ /** @internal */ set_body1(v: Any$9): Any$9;
3635
+ /** @internal */ get_body2(): Any$9;
3636
+ /** @internal */ set_body2(v: Any$9): Any$9;
3637
+ /** @internal */ get_anchor1(): Any$9;
3638
+ /** @internal */ set_anchor1(v: Any$9): Any$9;
3639
+ /** @internal */ get_anchor2(): Any$9;
3640
+ /** @internal */ set_anchor2(v: Any$9): Any$9;
3641
+ /** @internal */ get_jointMin(): number;
3642
+ /** @internal */ set_jointMin(v: number): number;
3643
+ /** @internal */ get_jointMax(): number;
3644
+ /** @internal */ set_jointMax(v: number): number;
3645
+ /** @internal backward compat alias for zpp_inner */
3646
+ get zpp_inner_zn(): ZPP_DistanceJoint;
3647
+ set zpp_inner_zn(v: ZPP_DistanceJoint);
3351
3648
  }
3352
3649
 
3353
3650
  /**
@@ -3359,53 +3656,53 @@ declare class DistanceJoint extends Constraint {
3359
3656
  * Converted from nape-compiled.js lines 21441–21912.
3360
3657
  */
3361
3658
 
3362
- type Any$6 = any;
3659
+ type Any$8 = any;
3363
3660
  declare class ZPP_AngleJoint extends ZPP_Constraint {
3364
3661
  static __name__: string[];
3365
- static _wrapFn: ((zpp: ZPP_AngleJoint) => Any$6) | null;
3366
- outer_zn: Any$6;
3662
+ static _wrapFn: ((zpp: ZPP_AngleJoint) => Any$8) | null;
3663
+ outer_zn: Any$8;
3367
3664
  ratio: number;
3368
3665
  jointMin: number;
3369
3666
  jointMax: number;
3370
3667
  slack: boolean;
3371
3668
  equal: boolean;
3372
3669
  scale: number;
3373
- b1: Any$6;
3374
- b2: Any$6;
3670
+ b1: Any$8;
3671
+ b2: Any$8;
3375
3672
  kMass: number;
3376
3673
  jAcc: number;
3377
3674
  jMax: number;
3378
3675
  gamma: number;
3379
3676
  bias: number;
3380
3677
  stepped: boolean;
3381
- __class__: Any$6;
3678
+ __class__: Any$8;
3382
3679
  constructor();
3383
3680
  is_slack(): boolean;
3384
- bodyImpulse(b: Any$6): Any$6;
3681
+ bodyImpulse(b: Any$8): Any$8;
3385
3682
  activeBodies(): void;
3386
3683
  inactiveBodies(): void;
3387
- copy(dict?: Any$6, todo?: Any$6): Any$6;
3684
+ copy(dict?: Any$8, todo?: Any$8): Any$8;
3388
3685
  validate(): void;
3389
3686
  wake_connected(): void;
3390
3687
  forest(): void;
3391
- pair_exists(id: Any$6, di: Any$6): boolean;
3688
+ pair_exists(id: Any$8, di: Any$8): boolean;
3392
3689
  clearcache(): void;
3393
3690
  preStep(dt: number): boolean;
3394
3691
  warmStart(): void;
3395
3692
  applyImpulseVel(): boolean;
3396
3693
  applyImpulsePos(): boolean;
3397
- draw(_g: Any$6): void;
3694
+ draw(_g: Any$8): void;
3398
3695
  /**
3399
3696
  * Small-angle-optimized body rotation. Used by all joints' applyImpulsePos.
3400
3697
  */
3401
- static _rotateBody(body: Any$6, dr: number): void;
3698
+ static _rotateBody(body: Any$8, dr: number): void;
3402
3699
  /**
3403
3700
  * Dict-lookup / deferred-todo body copying. Used by all joints' copy().
3404
3701
  */
3405
- static _copyBody(dict: Any$6, todo: Any$6, srcBody: Any$6, ret: Any$6, field: string): void;
3702
+ static _copyBody(dict: Any$8, todo: Any$8, srcBody: Any$8, ret: Any$8, field: string): void;
3406
3703
  }
3407
3704
 
3408
- type Any$5 = any;
3705
+ type Any$7 = any;
3409
3706
  /**
3410
3707
  * Constrains the relative angle between two bodies.
3411
3708
  *
@@ -3415,7 +3712,7 @@ declare class AngleJoint extends Constraint {
3415
3712
  zpp_inner: ZPP_AngleJoint;
3416
3713
  constructor(body1: Body | null, body2: Body | null, jointMin: number, jointMax: number, ratio?: number);
3417
3714
  /** @internal */
3418
- static _wrap(inner: Any$5): AngleJoint;
3715
+ static _wrap(inner: Any$7): AngleJoint;
3419
3716
  get body1(): Body;
3420
3717
  set body1(value: Body | null);
3421
3718
  /** @internal */
@@ -3431,13 +3728,13 @@ declare class AngleJoint extends Constraint {
3431
3728
  get ratio(): number;
3432
3729
  set ratio(value: number);
3433
3730
  isSlack(): boolean;
3434
- impulse(): Any$5;
3435
- bodyImpulse(body: Body): Any$5;
3731
+ impulse(): Any$7;
3732
+ bodyImpulse(body: Body): Any$7;
3436
3733
  visitBodies(lambda: (body: Body) => void): void;
3437
- /** @internal */ get_body1(): Any$5;
3438
- /** @internal */ set_body1(v: Any$5): Any$5;
3439
- /** @internal */ get_body2(): Any$5;
3440
- /** @internal */ set_body2(v: Any$5): Any$5;
3734
+ /** @internal */ get_body1(): Any$7;
3735
+ /** @internal */ set_body1(v: Any$7): Any$7;
3736
+ /** @internal */ get_body2(): Any$7;
3737
+ /** @internal */ set_body2(v: Any$7): Any$7;
3441
3738
  /** @internal */ get_jointMin(): number;
3442
3739
  /** @internal */ set_jointMin(v: number): number;
3443
3740
  /** @internal */ get_jointMax(): number;
@@ -3449,25 +3746,116 @@ declare class AngleJoint extends Constraint {
3449
3746
  set zpp_inner_zn(v: ZPP_AngleJoint);
3450
3747
  }
3451
3748
 
3452
- type Any$4 = any;
3749
+ /**
3750
+ * ZPP_WeldJoint — Internal weld constraint between two bodies.
3751
+ *
3752
+ * A 3-DOF constraint that locks relative position (x, y) and angle
3753
+ * between two bodies, with an optional phase (target angle offset).
3754
+ * Uses a 3×3 effective-mass matrix (stored as upper triangular a/b/c/d/e/f).
3755
+ *
3756
+ * Converted from nape-compiled.js lines 28055–29046.
3757
+ */
3758
+
3759
+ type Any$6 = any;
3760
+ declare class ZPP_WeldJoint extends ZPP_Constraint {
3761
+ static __name__: string[];
3762
+ static __super__: typeof ZPP_Constraint;
3763
+ static _wrapFn: ((zpp: ZPP_WeldJoint) => Any$6) | null;
3764
+ outer_zn: Any$6;
3765
+ b1: Any$6;
3766
+ b2: Any$6;
3767
+ a1localx: number;
3768
+ a1localy: number;
3769
+ a1relx: number;
3770
+ a1rely: number;
3771
+ wrap_a1: Any$6;
3772
+ a2localx: number;
3773
+ a2localy: number;
3774
+ a2relx: number;
3775
+ a2rely: number;
3776
+ wrap_a2: Any$6;
3777
+ phase: number;
3778
+ kMassa: number;
3779
+ kMassb: number;
3780
+ kMassc: number;
3781
+ kMassd: number;
3782
+ kMasse: number;
3783
+ kMassf: number;
3784
+ jAccx: number;
3785
+ jAccy: number;
3786
+ jAccz: number;
3787
+ jMax: number;
3788
+ gamma: number;
3789
+ biasx: number;
3790
+ biasy: number;
3791
+ biasz: number;
3792
+ stepped: boolean;
3793
+ __class__: Any$6;
3794
+ constructor();
3795
+ bodyImpulse(b: Any$6): Any$6;
3796
+ activeBodies(): void;
3797
+ inactiveBodies(): void;
3798
+ validate_a1(): void;
3799
+ invalidate_a1(x: Any$6): void;
3800
+ setup_a1(): void;
3801
+ validate_a2(): void;
3802
+ invalidate_a2(x: Any$6): void;
3803
+ setup_a2(): void;
3804
+ copy(dict: Any$6, todo: Any$6): Any$6;
3805
+ validate(): void;
3806
+ wake_connected(): void;
3807
+ forest(): void;
3808
+ pair_exists(id: number, di: number): boolean;
3809
+ clearcache(): void;
3810
+ preStep(dt: number): boolean;
3811
+ warmStart(): void;
3812
+ applyImpulseVel(): boolean;
3813
+ applyImpulsePos(): boolean;
3814
+ draw(_g: Any$6): void;
3815
+ }
3816
+
3817
+ type Any$5 = any;
3453
3818
  /**
3454
3819
  * Weld joint — constrains two bodies to maintain a fixed relative
3455
3820
  * position and angle (like gluing them together).
3821
+ *
3822
+ * Fully modernized — uses ZPP_WeldJoint directly (extracted to TypeScript).
3456
3823
  */
3457
3824
  declare class WeldJoint extends Constraint {
3825
+ zpp_inner: ZPP_WeldJoint;
3458
3826
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, phase?: number);
3459
3827
  /** @internal */
3460
- static _wrap(inner: Any$4): WeldJoint;
3828
+ static _wrap(inner: Any$5): WeldJoint;
3461
3829
  get body1(): Body;
3462
3830
  set body1(value: Body | null);
3831
+ /** @internal */
3832
+ private _setBody1;
3463
3833
  get body2(): Body;
3464
3834
  set body2(value: Body | null);
3835
+ /** @internal */
3836
+ private _setBody2;
3465
3837
  get anchor1(): Vec2;
3466
3838
  set anchor1(value: Vec2);
3467
3839
  get anchor2(): Vec2;
3468
3840
  set anchor2(value: Vec2);
3469
3841
  get phase(): number;
3470
3842
  set phase(value: number);
3843
+ impulse(): Any$5;
3844
+ bodyImpulse(body: Body): Any$5;
3845
+ visitBodies(lambda: (body: Body) => void): void;
3846
+ /** @internal */ get_body1(): Any$5;
3847
+ /** @internal */ set_body1(v: Any$5): Any$5;
3848
+ /** @internal */ get_body2(): Any$5;
3849
+ /** @internal */ set_body2(v: Any$5): Any$5;
3850
+ /** @internal */ get_anchor1(): Any$5;
3851
+ /** @internal */ set_anchor1(v: Any$5): Any$5;
3852
+ /** @internal */ get_anchor2(): Any$5;
3853
+ /** @internal */ set_anchor2(v: Any$5): Any$5;
3854
+ /** @internal */ get_phase(): number;
3855
+ /** @internal */ set_phase(v: number): number;
3856
+ /** @internal backward compat alias for zpp_inner */
3857
+ get zpp_inner_zn(): ZPP_WeldJoint;
3858
+ set zpp_inner_zn(v: ZPP_WeldJoint);
3471
3859
  }
3472
3860
 
3473
3861
  /**
@@ -3479,29 +3867,29 @@ declare class WeldJoint extends Constraint {
3479
3867
  * Converted from nape-compiled.js lines 23892–24197.
3480
3868
  */
3481
3869
 
3482
- type Any$3 = any;
3870
+ type Any$4 = any;
3483
3871
  declare class ZPP_MotorJoint extends ZPP_Constraint {
3484
3872
  static __name__: string[];
3485
- static _wrapFn: ((zpp: ZPP_MotorJoint) => Any$3) | null;
3486
- outer_zn: Any$3;
3873
+ static _wrapFn: ((zpp: ZPP_MotorJoint) => Any$4) | null;
3874
+ outer_zn: Any$4;
3487
3875
  ratio: number;
3488
3876
  rate: number;
3489
- b1: Any$3;
3490
- b2: Any$3;
3877
+ b1: Any$4;
3878
+ b2: Any$4;
3491
3879
  kMass: number;
3492
3880
  jAcc: number;
3493
3881
  jMax: number;
3494
3882
  stepped: boolean;
3495
- __class__: Any$3;
3883
+ __class__: Any$4;
3496
3884
  constructor();
3497
- bodyImpulse(b: Any$3): Any$3;
3885
+ bodyImpulse(b: Any$4): Any$4;
3498
3886
  activeBodies(): void;
3499
3887
  inactiveBodies(): void;
3500
- copy(dict?: Any$3, todo?: Any$3): Any$3;
3888
+ copy(dict?: Any$4, todo?: Any$4): Any$4;
3501
3889
  validate(): void;
3502
3890
  wake_connected(): void;
3503
3891
  forest(): void;
3504
- pair_exists(id: Any$3, di: Any$3): boolean;
3892
+ pair_exists(id: Any$4, di: Any$4): boolean;
3505
3893
  clearcache(): void;
3506
3894
  preStep(dt: number): boolean;
3507
3895
  warmStart(): void;
@@ -3509,7 +3897,7 @@ declare class ZPP_MotorJoint extends ZPP_Constraint {
3509
3897
  applyImpulsePos(): boolean;
3510
3898
  }
3511
3899
 
3512
- type Any$2 = any;
3900
+ type Any$3 = any;
3513
3901
  /**
3514
3902
  * Motor joint — applies angular velocity to rotate bodies relative to each other.
3515
3903
  *
@@ -3519,7 +3907,7 @@ declare class MotorJoint extends Constraint {
3519
3907
  zpp_inner: ZPP_MotorJoint;
3520
3908
  constructor(body1: Body | null, body2: Body | null, rate?: number, ratio?: number);
3521
3909
  /** @internal */
3522
- static _wrap(inner: Any$2): MotorJoint;
3910
+ static _wrap(inner: Any$3): MotorJoint;
3523
3911
  get body1(): Body;
3524
3912
  set body1(value: Body | null);
3525
3913
  /** @internal */
@@ -3532,13 +3920,13 @@ declare class MotorJoint extends Constraint {
3532
3920
  set rate(value: number);
3533
3921
  get ratio(): number;
3534
3922
  set ratio(value: number);
3535
- impulse(): Any$2;
3536
- bodyImpulse(body: Body): Any$2;
3923
+ impulse(): Any$3;
3924
+ bodyImpulse(body: Body): Any$3;
3537
3925
  visitBodies(lambda: (body: Body) => void): void;
3538
- /** @internal */ get_body1(): Any$2;
3539
- /** @internal */ set_body1(v: Any$2): Any$2;
3540
- /** @internal */ get_body2(): Any$2;
3541
- /** @internal */ set_body2(v: Any$2): Any$2;
3926
+ /** @internal */ get_body1(): Any$3;
3927
+ /** @internal */ set_body1(v: Any$3): Any$3;
3928
+ /** @internal */ get_body2(): Any$3;
3929
+ /** @internal */ set_body2(v: Any$3): Any$3;
3542
3930
  /** @internal */ get_rate(): number;
3543
3931
  /** @internal */ set_rate(v: number): number;
3544
3932
  /** @internal */ get_ratio(): number;
@@ -3548,19 +3936,112 @@ declare class MotorJoint extends Constraint {
3548
3936
  set zpp_inner_zn(v: ZPP_MotorJoint);
3549
3937
  }
3550
3938
 
3939
+ /**
3940
+ * ZPP_LineJoint — Internal 2-body, 2-DOF line (sliding) constraint.
3941
+ *
3942
+ * Constrains body2's anchor (a2) to slide along the line defined by
3943
+ * body1's anchor (a1) and direction vector (n). The distance along
3944
+ * the line is bounded by [jointMin, jointMax].
3945
+ *
3946
+ * Converted from nape-compiled.js lines 23205–23304.
3947
+ */
3948
+
3949
+ type Any$2 = any;
3950
+ declare class ZPP_LineJoint extends ZPP_Constraint {
3951
+ static __name__: string[];
3952
+ static __super__: typeof ZPP_Constraint;
3953
+ static _wrapFn: ((zpp: ZPP_LineJoint) => Any$2) | null;
3954
+ outer_zn: Any$2;
3955
+ scale: number;
3956
+ jointMin: number;
3957
+ jointMax: number;
3958
+ equal: boolean;
3959
+ dot1: number;
3960
+ dot2: number;
3961
+ cx1: number;
3962
+ cx2: number;
3963
+ b1: Any$2;
3964
+ a1localx: number;
3965
+ a1localy: number;
3966
+ a1relx: number;
3967
+ a1rely: number;
3968
+ wrap_a1: Any$2;
3969
+ b2: Any$2;
3970
+ a2localx: number;
3971
+ a2localy: number;
3972
+ a2relx: number;
3973
+ a2rely: number;
3974
+ wrap_a2: Any$2;
3975
+ zip_n: Any$2;
3976
+ nlocalx: number;
3977
+ nlocaly: number;
3978
+ nrelx: number;
3979
+ nrely: number;
3980
+ wrap_n: Any$2;
3981
+ kMassa: number;
3982
+ kMassb: number;
3983
+ kMassc: number;
3984
+ jAccx: number;
3985
+ jAccy: number;
3986
+ jMax: Any$2;
3987
+ gamma: Any$2;
3988
+ biasx: number;
3989
+ biasy: number;
3990
+ stepped: boolean;
3991
+ __class__: Any$2;
3992
+ constructor();
3993
+ /**
3994
+ * Creates or recycles a Vec2 from the public pool, sets its x/y,
3995
+ * wires up _validate/_invalidate callbacks, and stores it in the given
3996
+ * wrapper field. Used by setup_a1, setup_a2, and setup_n.
3997
+ */
3998
+ private _setupVec2;
3999
+ validate_a1(): void;
4000
+ invalidate_a1(x: Any$2): void;
4001
+ setup_a1(): void;
4002
+ validate_a2(): void;
4003
+ invalidate_a2(x: Any$2): void;
4004
+ setup_a2(): void;
4005
+ validate_n(): void;
4006
+ invalidate_n(x: Any$2): void;
4007
+ setup_n(): void;
4008
+ validate_norm(): void;
4009
+ bodyImpulse(b: Any$2): Any$2;
4010
+ activeBodies(): void;
4011
+ inactiveBodies(): void;
4012
+ copy(dict: Any$2, todo: Any$2): Any$2;
4013
+ validate(): void;
4014
+ wake_connected(): void;
4015
+ forest(): void;
4016
+ pair_exists(id: number, di: number): boolean;
4017
+ clearcache(): void;
4018
+ preStep(dt: number): boolean;
4019
+ warmStart(): void;
4020
+ applyImpulseVel(): boolean;
4021
+ applyImpulsePos(): boolean;
4022
+ draw(_g: Any$2): void;
4023
+ }
4024
+
3551
4025
  type Any$1 = any;
3552
4026
  /**
3553
4027
  * Line joint — constrains body2's anchor to slide along a line
3554
4028
  * defined by body1's anchor and direction.
4029
+ *
4030
+ * Fully modernized — uses ZPP_LineJoint directly (extracted to TypeScript).
3555
4031
  */
3556
4032
  declare class LineJoint extends Constraint {
4033
+ zpp_inner: ZPP_LineJoint;
3557
4034
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, direction: Vec2, jointMin: number, jointMax: number);
3558
4035
  /** @internal */
3559
4036
  static _wrap(inner: Any$1): LineJoint;
3560
4037
  get body1(): Body;
3561
4038
  set body1(value: Body | null);
4039
+ /** @internal */
4040
+ private _setBody1;
3562
4041
  get body2(): Body;
3563
4042
  set body2(value: Body | null);
4043
+ /** @internal */
4044
+ private _setBody2;
3564
4045
  get anchor1(): Vec2;
3565
4046
  set anchor1(value: Vec2);
3566
4047
  get anchor2(): Vec2;
@@ -3571,6 +4052,26 @@ declare class LineJoint extends Constraint {
3571
4052
  set jointMin(value: number);
3572
4053
  get jointMax(): number;
3573
4054
  set jointMax(value: number);
4055
+ impulse(): Any$1;
4056
+ bodyImpulse(body: Body): Any$1;
4057
+ visitBodies(lambda: (body: Body) => void): void;
4058
+ /** @internal */ get_body1(): Any$1;
4059
+ /** @internal */ set_body1(v: Any$1): Any$1;
4060
+ /** @internal */ get_body2(): Any$1;
4061
+ /** @internal */ set_body2(v: Any$1): Any$1;
4062
+ /** @internal */ get_anchor1(): Any$1;
4063
+ /** @internal */ set_anchor1(v: Any$1): Any$1;
4064
+ /** @internal */ get_anchor2(): Any$1;
4065
+ /** @internal */ set_anchor2(v: Any$1): Any$1;
4066
+ /** @internal */ get_direction(): Any$1;
4067
+ /** @internal */ set_direction(v: Any$1): Any$1;
4068
+ /** @internal */ get_jointMin(): number;
4069
+ /** @internal */ set_jointMin(v: number): number;
4070
+ /** @internal */ get_jointMax(): number;
4071
+ /** @internal */ set_jointMax(v: number): number;
4072
+ /** @internal backward compat alias for zpp_inner */
4073
+ get zpp_inner_zn(): ZPP_LineJoint;
4074
+ set zpp_inner_zn(v: ZPP_LineJoint);
3574
4075
  }
3575
4076
 
3576
4077
  type Any = any;
@@ -3608,4 +4109,4 @@ declare class PulleyJoint extends Constraint {
3608
4109
 
3609
4110
  declare const VERSION: string;
3610
4111
 
3611
- 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 };
4112
+ 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 };