@newkrok/nape-js 3.3.44 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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$12 = any;
10
+ type Any$17 = 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$12;
32
+ __class__: Any$17;
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$11 = any;
76
+ type Any$16 = any;
77
77
  declare class ZPP_Contact {
78
78
  static __name__: string[];
79
- static _nape: Any$11;
80
- static _zpp: Any$11;
79
+ static _nape: Any$16;
80
+ static _zpp: Any$16;
81
81
  static zpp_pool: ZPP_Contact | null;
82
82
  static internal: boolean;
83
- static _wrapFn: ((zpp: ZPP_Contact) => Any$11) | null;
84
- outer: Any$11;
83
+ static _wrapFn: ((zpp: ZPP_Contact) => Any$16) | null;
84
+ outer: Any$16;
85
85
  px: number;
86
86
  py: number;
87
- wrap_position: Any$11;
88
- arbiter: Any$11;
87
+ wrap_position: Any$16;
88
+ arbiter: Any$16;
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$11;
102
+ __class__: Any$16;
103
103
  constructor();
104
- wrapper(): Any$11;
104
+ wrapper(): Any$16;
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$10 = any;
169
+ type Any$15 = any;
170
170
  declare class ZPP_Vec2 {
171
171
  static zpp_pool: ZPP_Vec2 | null;
172
172
  static __name__: string[];
173
- static _nape: Any$10;
174
- static _zpp: Any$10;
175
- static _wrapFn: ((zpp: ZPP_Vec2) => Any$10) | null;
173
+ static _nape: Any$15;
174
+ static _zpp: Any$15;
175
+ static _wrapFn: ((zpp: ZPP_Vec2) => Any$15) | 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$10;
184
+ outer: Any$15;
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$10;
189
+ __class__: Any$15;
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$10;
195
+ wrapper(): Any$15;
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$$ = any;
347
+ type Any$14 = any;
348
348
  declare class ZPP_Vec3 {
349
349
  static __name__: string[];
350
- static _zpp: Any$$;
351
- static _wrapFn: ((zpp: ZPP_Vec3) => Any$$) | null;
352
- outer: Any$$;
350
+ static _zpp: Any$14;
351
+ static _wrapFn: ((zpp: ZPP_Vec3) => Any$14) | null;
352
+ outer: Any$14;
353
353
  x: number;
354
354
  y: number;
355
355
  z: number;
356
356
  immutable: boolean;
357
357
  _validate: (() => void) | null;
358
- __class__: Any$$;
358
+ __class__: Any$14;
359
359
  validate(): void;
360
- wrapper(): Any$$;
360
+ wrapper(): Any$14;
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$_ = any;
424
+ type Any$13 = any;
425
425
  declare class ZPP_Mat23 {
426
426
  static __name__: string[];
427
- static _nape: Any$_;
428
- static _wrapFn: ((zpp: ZPP_Mat23) => Any$_) | null;
427
+ static _nape: Any$13;
428
+ static _wrapFn: ((zpp: ZPP_Mat23) => Any$13) | null;
429
429
  static zpp_pool: ZPP_Mat23 | null;
430
- outer: Any$_;
430
+ outer: Any$13;
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$_;
439
+ __class__: Any$13;
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$_;
445
+ wrapper(): Any$13;
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$Z = any;
506
+ type Any$12 = any;
507
507
  declare class ZPP_GeomPoly {
508
508
  static __name__: string[];
509
- outer: Any$Z;
510
- vertices: Any$Z;
511
- __class__: Any$Z;
512
- constructor(outer?: Any$Z);
509
+ outer: Any$12;
510
+ vertices: Any$12;
511
+ __class__: Any$12;
512
+ constructor(outer?: Any$12);
513
513
  }
514
514
 
515
515
  /**
@@ -533,7 +533,7 @@ declare class Winding {
533
533
  toString(): string;
534
534
  }
535
535
 
536
- type Any$Y = any;
536
+ type Any$11 = 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$Y;
552
- constructor(vertices?: Any$Y);
551
+ get _inner(): Any$11;
552
+ constructor(vertices?: Any$11);
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$Y): GeomPoly;
578
+ static get(vertices?: Any$11): GeomPoly;
579
579
  empty(): boolean;
580
580
  size(): number;
581
- iterator(): Any$Y;
582
- forwardIterator(): Any$Y;
583
- backwardsIterator(): Any$Y;
581
+ iterator(): Any$11;
582
+ forwardIterator(): Any$11;
583
+ backwardsIterator(): Any$11;
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$Y;
596
+ winding(): Any$11;
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$Y): Any$Y;
605
- monotoneDecomposition(output?: Any$Y): Any$Y;
606
- convexDecomposition(delaunay?: boolean, output?: Any$Y): Any$Y;
607
- triangularDecomposition(delaunay?: boolean, output?: Any$Y): Any$Y;
604
+ simpleDecomposition(output?: Any$11): Any$11;
605
+ monotoneDecomposition(output?: Any$11): Any$11;
606
+ convexDecomposition(delaunay?: boolean, output?: Any$11): Any$11;
607
+ triangularDecomposition(delaunay?: boolean, output?: Any$11): Any$11;
608
608
  inflate(inflation: number): GeomPoly;
609
- cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$Y): Any$Y;
610
- transform(matrix: Any$Y): this;
611
- bounds(): Any$Y;
609
+ cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$11): Any$11;
610
+ transform(matrix: Any$11): this;
611
+ bounds(): Any$11;
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$X = any;
627
+ type Any$10 = any;
628
628
  declare class ZPP_AABB {
629
629
  static zpp_pool: ZPP_AABB | null;
630
630
  static __name__: string[];
631
- static _nape: Any$X;
632
- static _zpp: Any$X;
633
- static _wrapFn: ((zpp: ZPP_AABB) => Any$X) | null;
631
+ static _nape: Any$10;
632
+ static _zpp: Any$10;
633
+ static _wrapFn: ((zpp: ZPP_AABB) => Any$10) | null;
634
634
  _invalidate: ((self: ZPP_AABB) => void) | null;
635
635
  _validate: (() => void) | null;
636
636
  _immutable: boolean;
637
- outer: Any$X;
637
+ outer: Any$10;
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$X;
644
- wrap_max: Any$X;
645
- __class__: Any$X;
643
+ wrap_min: Any$10;
644
+ wrap_max: Any$10;
645
+ __class__: Any$10;
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$X;
650
+ wrapper(): Any$10;
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$X): void;
661
+ mod_min(min: Any$10): void;
662
662
  getmax(): void;
663
663
  dom_max(): void;
664
- mod_max(max: Any$X): void;
664
+ mod_max(max: Any$10): 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$W = any;
728
+ type Any$$ = any;
729
729
  declare class ZPP_MatMN {
730
730
  static __name__: string[];
731
- outer: Any$W;
731
+ outer: Any$$;
732
732
  m: number;
733
733
  n: number;
734
734
  x: number[];
735
- __class__: Any$W;
735
+ __class__: Any$$;
736
736
  constructor(m: number, n: number);
737
737
  }
738
738
 
739
- type Any$V = any;
739
+ type Any$_ = 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$V): MatMN;
750
+ static _wrap(inner: Any$_): 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$U = any;
760
+ type Any$Z = 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$U): Any$U;
783
+ static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$Z): Any$Z;
784
784
  }
785
785
 
786
786
  /**
@@ -792,7 +792,7 @@ declare class MarchingSquares {
792
792
  * Converted from nape-compiled.js lines 31239–33172, 65896.
793
793
  */
794
794
 
795
- type Any$T = any;
795
+ type Any$Y = any;
796
796
  declare class ZPP_Ray {
797
797
  static __name__: string[];
798
798
  static internal: boolean;
@@ -807,30 +807,30 @@ declare class ZPP_Ray {
807
807
  dirx: number;
808
808
  originy: number;
809
809
  originx: number;
810
- userData: Any$T;
810
+ userData: Any$Y;
811
811
  maxdist: number;
812
- direction: Any$T;
813
- origin: Any$T;
814
- __class__: Any$T;
812
+ direction: Any$Y;
813
+ origin: Any$Y;
814
+ __class__: Any$Y;
815
815
  constructor();
816
- origin_invalidate(x: Any$T): void;
817
- direction_invalidate(x: Any$T): void;
816
+ origin_invalidate(x: Any$Y): void;
817
+ direction_invalidate(x: Any$Y): void;
818
818
  invalidate_dir(): void;
819
819
  validate_dir(): void;
820
820
  rayAABB(): ZPP_AABB;
821
- aabbtest(a: Any$T): boolean;
822
- aabbsect(a: Any$T): number;
821
+ aabbtest(a: Any$Y): boolean;
822
+ aabbsect(a: Any$Y): number;
823
823
  private static _allocVec2;
824
824
  private static _validateWorldCOM;
825
825
  private _circleNormal;
826
826
  private static _insertSorted;
827
- circlesect(c: Any$T, inner: boolean, mint: number): Any$T;
828
- circlesect2(c: Any$T, inner: boolean, list: Any$T): void;
829
- polysect(p: Any$T, inner: boolean, mint: number): Any$T;
830
- polysect2(p: Any$T, inner: boolean, list: Any$T): void;
827
+ circlesect(c: Any$Y, inner: boolean, mint: number): Any$Y;
828
+ circlesect2(c: Any$Y, inner: boolean, list: Any$Y): void;
829
+ polysect(p: Any$Y, inner: boolean, mint: number): Any$Y;
830
+ polysect2(p: Any$Y, inner: boolean, list: Any$Y): void;
831
831
  }
832
832
 
833
- type Any$S = any;
833
+ type Any$X = any;
834
834
  /**
835
835
  * A ray for raycasting queries.
836
836
  *
@@ -844,7 +844,7 @@ declare class Ray {
844
844
  get _inner(): this;
845
845
  constructor(origin: Vec2, direction: Vec2);
846
846
  /** @internal */
847
- static _wrap(inner: Any$S): Ray;
847
+ static _wrap(inner: Any$X): Ray;
848
848
  static fromSegment(start: Vec2, end: Vec2): Ray;
849
849
  get origin(): Vec2;
850
850
  set origin(value: Vec2);
@@ -862,7 +862,7 @@ declare class Ray {
862
862
  /** @internal */ set_direction(v: Vec2): Vec2;
863
863
  /** @internal */ get_maxDistance(): number;
864
864
  /** @internal */ set_maxDistance(v: number): number;
865
- /** @internal */ get_userData(): Any$S;
865
+ /** @internal */ get_userData(): Any$X;
866
866
  }
867
867
 
868
868
  /**
@@ -873,31 +873,31 @@ declare class Ray {
873
873
  *
874
874
  * Converted from nape-compiled.js lines 38897–39076, 86860–86862.
875
875
  */
876
- type Any$R = any;
876
+ type Any$W = any;
877
877
  declare class ZPP_ConvexRayResult {
878
878
  static __name__: string[];
879
879
  static rayPool: ZPP_ConvexRayResult | null;
880
880
  static convexPool: ZPP_ConvexRayResult | null;
881
881
  static internal: boolean;
882
- static _createRayResult: (() => Any$R) | null;
883
- static _createConvexResult: (() => Any$R) | null;
884
- normal: Any$R;
885
- shape: Any$R;
886
- convex: Any$R;
887
- position: Any$R;
888
- ray: Any$R;
882
+ static _createRayResult: (() => Any$W) | null;
883
+ static _createConvexResult: (() => Any$W) | null;
884
+ normal: Any$W;
885
+ shape: Any$W;
886
+ convex: Any$W;
887
+ position: Any$W;
888
+ ray: Any$W;
889
889
  inner: boolean;
890
890
  next: ZPP_ConvexRayResult | null;
891
891
  toiDistance: number;
892
- __class__: Any$R;
893
- static getRay(normal: Any$R, time: number, inner: boolean, shape: Any$R): Any$R;
894
- static getConvex(normal: Any$R, position: Any$R, toiDistance: number, shape: Any$R): Any$R;
892
+ __class__: Any$W;
893
+ static getRay(normal: Any$W, time: number, inner: boolean, shape: Any$W): Any$W;
894
+ static getConvex(normal: Any$W, position: Any$W, toiDistance: number, shape: Any$W): Any$W;
895
895
  disposed(): void;
896
896
  free(): void;
897
897
  private static _disposeVec2;
898
898
  }
899
899
 
900
- type Any$Q = any;
900
+ type Any$V = any;
901
901
  /**
902
902
  * Result from a convex-cast query.
903
903
  *
@@ -912,18 +912,18 @@ declare class ConvexResult {
912
912
  get _inner(): NapeInner;
913
913
  constructor();
914
914
  /** @internal */
915
- static _wrap(inner: Any$Q): ConvexResult;
915
+ static _wrap(inner: Any$V): ConvexResult;
916
916
  get normal(): Vec2;
917
917
  get position(): Vec2;
918
918
  get toi(): number;
919
- get shape(): Any$Q;
919
+ get shape(): Any$V;
920
920
  dispose(): void;
921
921
  toString(): string;
922
922
  /** @internal */
923
923
  private _disposed;
924
924
  }
925
925
 
926
- type Any$P = any;
926
+ type Any$U = any;
927
927
  /**
928
928
  * Result from a raycast query.
929
929
  *
@@ -938,11 +938,11 @@ declare class RayResult {
938
938
  get _inner(): NapeInner;
939
939
  constructor();
940
940
  /** @internal */
941
- static _wrap(inner: Any$P): RayResult;
941
+ static _wrap(inner: Any$U): RayResult;
942
942
  get normal(): Vec2;
943
943
  get distance(): number;
944
944
  get inner(): boolean;
945
- get shape(): Any$P;
945
+ get shape(): Any$U;
946
946
  dispose(): void;
947
947
  toString(): string;
948
948
  /** @internal */
@@ -1010,7 +1010,7 @@ declare class NapeList<T> implements Iterable<T> {
1010
1010
  *
1011
1011
  * Converted from nape-compiled.js lines 21424–21827.
1012
1012
  */
1013
- type Any$O = any;
1013
+ type Any$T = any;
1014
1014
  declare class ZPP_Constraint {
1015
1015
  static __name__: string[];
1016
1016
  /**
@@ -1018,13 +1018,13 @@ declare class ZPP_Constraint {
1018
1018
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
1019
1019
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
1020
1020
  */
1021
- static _nape: Any$O;
1022
- static _zpp: Any$O;
1023
- outer: Any$O;
1021
+ static _nape: Any$T;
1022
+ static _zpp: Any$T;
1023
+ outer: Any$T;
1024
1024
  id: number;
1025
- userData: Any$O;
1026
- compound: Any$O;
1027
- space: Any$O;
1025
+ userData: Any$T;
1026
+ compound: Any$T;
1027
+ space: Any$T;
1028
1028
  active: boolean;
1029
1029
  stiff: boolean;
1030
1030
  frequency: number;
@@ -1034,14 +1034,14 @@ declare class ZPP_Constraint {
1034
1034
  breakUnderForce: boolean;
1035
1035
  breakUnderError: boolean;
1036
1036
  removeOnBreak: boolean;
1037
- component: Any$O;
1037
+ component: Any$T;
1038
1038
  ignore: boolean;
1039
1039
  __velocity: boolean;
1040
- cbTypes: Any$O;
1041
- cbSet: Any$O;
1042
- wrap_cbTypes: Any$O;
1040
+ cbTypes: Any$T;
1041
+ cbSet: Any$T;
1042
+ wrap_cbTypes: Any$T;
1043
1043
  pre_dt: number;
1044
- __class__: Any$O;
1044
+ __class__: Any$T;
1045
1045
  constructor();
1046
1046
  /**
1047
1047
  * Initialise base constraint fields.
@@ -1059,18 +1059,18 @@ declare class ZPP_Constraint {
1059
1059
  forest(): void;
1060
1060
  broken(): void;
1061
1061
  warmStart(): void;
1062
- draw(_g: Any$O): void;
1063
- pair_exists(_id: Any$O, _di: Any$O): boolean;
1062
+ draw(_g: Any$T): void;
1063
+ pair_exists(_id: Any$T, _di: Any$T): boolean;
1064
1064
  preStep(_dt: number): boolean;
1065
1065
  applyImpulseVel(): boolean;
1066
1066
  applyImpulsePos(): boolean;
1067
- copy(_dict?: Any$O, _todo?: Any$O): Any$O;
1067
+ copy(_dict?: Any$T, _todo?: Any$T): Any$T;
1068
1068
  immutable_midstep(name: string): void;
1069
1069
  setupcbTypes(): void;
1070
1070
  immutable_cbTypes(): void;
1071
- wrap_cbTypes_subber(pcb: Any$O): void;
1072
- wrap_cbTypes_adder(cb: Any$O): boolean;
1073
- insert_cbtype(cb: Any$O): void;
1071
+ wrap_cbTypes_subber(pcb: Any$T): void;
1072
+ wrap_cbTypes_adder(cb: Any$T): boolean;
1073
+ insert_cbtype(cb: Any$T): void;
1074
1074
  alloc_cbSet(): void;
1075
1075
  dealloc_cbSet(): void;
1076
1076
  activate(): void;
@@ -1080,12 +1080,12 @@ declare class ZPP_Constraint {
1080
1080
  activeInSpace(): void;
1081
1081
  inactiveOrOutSpace(): void;
1082
1082
  wake(): void;
1083
- copyto(ret: Any$O): void;
1084
- static _findRoot(comp: Any$O): Any$O;
1085
- static _unionComponents(a: Any$O, b: Any$O): void;
1083
+ copyto(ret: Any$T): void;
1084
+ static _findRoot(comp: Any$T): Any$T;
1085
+ static _unionComponents(a: Any$T, b: Any$T): void;
1086
1086
  }
1087
1087
 
1088
- type Any$N = any;
1088
+ type Any$S = any;
1089
1089
  /**
1090
1090
  * Base class for all constraints / joints.
1091
1091
  *
@@ -1094,6 +1094,7 @@ type Any$N = any;
1094
1094
  */
1095
1095
  declare class Constraint {
1096
1096
  static __name__: string[];
1097
+ static zpp_internalAlloc: boolean;
1097
1098
  /** Direct access to the extracted internal ZPP_Constraint. */
1098
1099
  zpp_inner: ZPP_Constraint;
1099
1100
  /**
@@ -1102,16 +1103,16 @@ declare class Constraint {
1102
1103
  * are fully modernized. Also serves as backward compat for compiled code.
1103
1104
  * @internal
1104
1105
  */
1105
- _inner: Any$N;
1106
+ _inner: Any$S;
1106
1107
  debugDraw: boolean;
1107
1108
  /** @internal */
1108
1109
  protected constructor();
1109
1110
  /** @internal */
1110
- static _wrap(inner: Any$N): Constraint;
1111
+ static _wrap(inner: Any$S): Constraint;
1111
1112
  get space(): Space | null;
1112
1113
  set space(value: Space | null);
1113
- get compound(): Any$N;
1114
- set compound(value: Any$N);
1114
+ get compound(): Any$S;
1115
+ set compound(value: Any$S);
1115
1116
  get active(): boolean;
1116
1117
  set active(value: boolean);
1117
1118
  get ignore(): boolean;
@@ -1134,17 +1135,17 @@ declare class Constraint {
1134
1135
  set removeOnBreak(value: boolean);
1135
1136
  get isSleeping(): boolean;
1136
1137
  get userData(): Record<string, unknown>;
1137
- get cbTypes(): Any$N;
1138
- impulse(): Any$N;
1139
- bodyImpulse(_body: Body): Any$N;
1138
+ get cbTypes(): Any$S;
1139
+ impulse(): Any$S;
1140
+ bodyImpulse(_body: Body): Any$S;
1140
1141
  visitBodies(_fn: (body: Body) => void): void;
1141
1142
  copy(): Constraint;
1142
1143
  toString(): string;
1143
- /** @internal */ get_userData(): Any$N;
1144
- /** @internal */ get_compound(): Any$N;
1145
- /** @internal */ set_compound(v: Any$N): Any$N;
1146
- /** @internal */ get_space(): Any$N;
1147
- /** @internal */ set_space(v: Any$N): Any$N;
1144
+ /** @internal */ get_userData(): Any$S;
1145
+ /** @internal */ get_compound(): Any$S;
1146
+ /** @internal */ set_compound(v: Any$S): Any$S;
1147
+ /** @internal */ get_space(): Any$S;
1148
+ /** @internal */ set_space(v: Any$S): Any$S;
1148
1149
  /** @internal */ get_isSleeping(): boolean;
1149
1150
  /** @internal */ get_active(): boolean;
1150
1151
  /** @internal */ set_active(v: boolean): boolean;
@@ -1166,179 +1167,369 @@ declare class Constraint {
1166
1167
  /** @internal */ set_breakUnderError(v: boolean): boolean;
1167
1168
  /** @internal */ get_removeOnBreak(): boolean;
1168
1169
  /** @internal */ set_removeOnBreak(v: boolean): boolean;
1169
- /** @internal */ get_cbTypes(): Any$N;
1170
+ /** @internal */ get_cbTypes(): Any$S;
1170
1171
  }
1171
1172
 
1172
1173
  /**
1173
- * ZPP_Listener — Internal listener base class for the nape physics engine.
1174
+ * ZPP_InteractionFilter — Internal interaction filter for the nape physics engine.
1174
1175
  *
1175
- * Base class for ZPP_BodyListener, ZPP_ConstraintListener, and
1176
- * ZPP_InteractionListener. Holds common properties (space, precedence,
1177
- * event type, listener type) and provides stub methods for subclass override.
1176
+ * Stores collision/sensor/fluid group and mask bitmasks that determine
1177
+ * which shapes interact with each other.
1178
1178
  *
1179
- * Converted from nape-compiled.js lines 2725927304, 112053–112139.
1179
+ * Converted from nape-compiled.js lines 6325563366, 135329.
1180
1180
  */
1181
- type Any$M = any;
1182
- declare class ZPP_Listener {
1181
+ type Any$R = any;
1182
+ declare class ZPP_InteractionFilter {
1183
+ static zpp_pool: ZPP_InteractionFilter | null;
1183
1184
  static __name__: string[];
1184
- static _nape: Any$M;
1185
- static _zpp: Any$M;
1186
- static internal: boolean;
1187
- static types: Any$M[];
1188
- static events: Any$M[];
1189
- space: Any$M;
1190
- interaction: Any$M;
1191
- constraint: Any$M;
1192
- body: Any$M;
1193
- precedence: number;
1194
- event: number;
1195
- type: number;
1196
- id: number;
1197
- outer: Any$M;
1198
- __class__: Any$M;
1185
+ static _nape: Any$R;
1186
+ static _zpp: Any$R;
1187
+ static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$R) | null;
1188
+ collisionGroup: number;
1189
+ collisionMask: number;
1190
+ sensorGroup: number;
1191
+ sensorMask: number;
1192
+ fluidGroup: number;
1193
+ fluidMask: number;
1194
+ shapes: Any$R;
1195
+ wrap_shapes: Any$R;
1196
+ outer: Any$R;
1197
+ userData: Any$R;
1198
+ next: ZPP_InteractionFilter | null;
1199
+ __class__: Any$R;
1199
1200
  constructor();
1200
- /** Sort comparator: higher precedence first, then by id descending. */
1201
- static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
1202
- swapEvent(_event?: number): void;
1203
- invalidate_precedence(): void;
1204
- addedToSpace(): void;
1205
- removedFromSpace(): void;
1201
+ /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
1202
+ wrapper(): Any$R;
1203
+ free(): void;
1204
+ alloc(): void;
1205
+ feature_cons(): void;
1206
+ addShape(shape: Any$R): void;
1207
+ remShape(shape: Any$R): void;
1208
+ /** Create a copy with object pooling. */
1209
+ copy(): ZPP_InteractionFilter;
1210
+ /** Test whether two filters allow collision between their shapes. */
1211
+ shouldCollide(x: ZPP_InteractionFilter): boolean;
1212
+ /** Test whether two filters allow sensor interaction. */
1213
+ shouldSense(x: ZPP_InteractionFilter): boolean;
1214
+ /** Test whether two filters allow fluid interaction. */
1215
+ shouldFlow(x: ZPP_InteractionFilter): boolean;
1216
+ /** Notify all shapes that the filter changed. */
1217
+ invalidate(): void;
1206
1218
  }
1207
1219
 
1208
1220
  /**
1209
- * Callback event types.
1221
+ * Bit-mask based interaction filter for controlling which shapes
1222
+ * collide, sense, or interact as fluids.
1210
1223
  *
1211
- * - `BEGIN` — interaction just started
1212
- * - `ONGOING` interaction continues
1213
- * - `END` — interaction just ended
1214
- * - `WAKE` — body/constraint woke up
1215
- * - `SLEEP` — body/constraint went to sleep
1216
- * - `BREAK` — constraint was broken
1217
- * - `PRE` — pre-interaction callback
1224
+ * Internally wraps a ZPP_InteractionFilter and is registered as
1225
+ * the public `nape.dynamics.InteractionFilter` class in the compiled namespace.
1218
1226
  *
1219
- * Converted from nape-compiled.js lines 516657.
1227
+ * Converted from nape-compiled.js lines 1436114640.
1220
1228
  */
1221
- declare class CbEvent {
1229
+ declare class InteractionFilter {
1222
1230
  static __name__: string[];
1223
- constructor();
1224
- static get BEGIN(): CbEvent;
1225
- static get ONGOING(): CbEvent;
1226
- static get END(): CbEvent;
1227
- static get WAKE(): CbEvent;
1228
- static get SLEEP(): CbEvent;
1229
- static get BREAK(): CbEvent;
1230
- static get PRE(): CbEvent;
1231
- static get_BEGIN(): CbEvent;
1232
- static get_ONGOING(): CbEvent;
1233
- static get_END(): CbEvent;
1234
- static get_WAKE(): CbEvent;
1235
- static get_SLEEP(): CbEvent;
1236
- static get_BREAK(): CbEvent;
1237
- static get_PRE(): CbEvent;
1231
+ /** @internal The internal ZPP_InteractionFilter this wrapper owns. */
1232
+ zpp_inner: ZPP_InteractionFilter;
1233
+ /**
1234
+ * Backward-compatible accessor — returns `this` so that compiled engine
1235
+ * code that receives `filter._inner` can still access `zpp_inner`.
1236
+ * @internal
1237
+ */
1238
+ get _inner(): NapeInner;
1239
+ constructor(collisionGroup?: number, collisionMask?: number, sensorGroup?: number, sensorMask?: number, fluidGroup?: number, fluidMask?: number);
1240
+ /** @internal Wrap a ZPP_InteractionFilter (or legacy compiled InteractionFilter) with caching. */
1241
+ static _wrap(inner: any): InteractionFilter;
1242
+ get collisionGroup(): number;
1243
+ set collisionGroup(value: number);
1244
+ get collisionMask(): number;
1245
+ set collisionMask(value: number);
1246
+ get sensorGroup(): number;
1247
+ set sensorGroup(value: number);
1248
+ get sensorMask(): number;
1249
+ set sensorMask(value: number);
1250
+ get fluidGroup(): number;
1251
+ set fluidGroup(value: number);
1252
+ get fluidMask(): number;
1253
+ set fluidMask(value: number);
1254
+ get userData(): Record<string, unknown>;
1255
+ get shapes(): any;
1256
+ shouldCollide(filter: InteractionFilter): boolean;
1257
+ shouldSense(filter: InteractionFilter): boolean;
1258
+ shouldFlow(filter: InteractionFilter): boolean;
1259
+ copy(): InteractionFilter;
1238
1260
  toString(): string;
1239
1261
  }
1240
1262
 
1241
1263
  /**
1242
- * Listener type classification.
1264
+ * ZPP_Callback Internal callback data holder for the nape physics engine.
1243
1265
  *
1244
- * - `BODY` — body event listener
1245
- * - `CONSTRAINT` — constraint event listener
1246
- * - `INTERACTION` — interaction event listener
1247
- * - `PRE` — pre-interaction listener
1266
+ * Stores callback event information (listener, event type, interactors, etc.)
1267
+ * and forms a doubly-linked list for callback queue management.
1248
1268
  *
1249
- * Converted from nape-compiled.js lines 25542646.
1269
+ * Converted from nape-compiled.js lines 4458744794, 133299–133300.
1250
1270
  */
1251
- declare class ListenerType {
1271
+ type Any$Q = any;
1272
+ declare class ZPP_Callback {
1252
1273
  static __name__: string[];
1253
- static BODY: ListenerType | null;
1254
- static CONSTRAINT: ListenerType | null;
1255
- static INTERACTION: ListenerType | null;
1256
- static PRE: ListenerType | null;
1257
- constructor();
1258
- static get_BODY(): ListenerType;
1259
- static get_CONSTRAINT(): ListenerType;
1260
- static get_INTERACTION(): ListenerType;
1261
- static get_PRE(): ListenerType;
1262
- toString(): string;
1274
+ static _nape: Any$Q;
1275
+ static _zpp: Any$Q;
1276
+ static internal: boolean;
1277
+ static zpp_pool: ZPP_Callback | null;
1278
+ outer_body: Any$Q;
1279
+ outer_con: Any$Q;
1280
+ outer_int: Any$Q;
1281
+ event: number;
1282
+ listener: Any$Q;
1283
+ space: Any$Q;
1284
+ index: number;
1285
+ next: ZPP_Callback | null;
1286
+ prev: ZPP_Callback | null;
1287
+ length: number;
1288
+ int1: Any$Q;
1289
+ int2: Any$Q;
1290
+ set: Any$Q;
1291
+ wrap_arbiters: Any$Q;
1292
+ pre_arbiter: Any$Q;
1293
+ pre_swapped: boolean;
1294
+ body: Any$Q;
1295
+ constraint: Any$Q;
1296
+ __class__: Any$Q;
1297
+ wrapper_body(): Any$Q;
1298
+ wrapper_con(): Any$Q;
1299
+ wrapper_int(): Any$Q;
1300
+ push(obj: ZPP_Callback): void;
1301
+ push_rev(obj: ZPP_Callback): void;
1302
+ pop(): ZPP_Callback;
1303
+ pop_rev(): ZPP_Callback;
1304
+ empty(): boolean;
1305
+ clear(): void;
1306
+ splice(o: ZPP_Callback): ZPP_Callback | null;
1307
+ rotateL(): void;
1308
+ rotateR(): void;
1309
+ cycleNext(o: ZPP_Callback): ZPP_Callback | null;
1310
+ cyclePrev(o: ZPP_Callback): ZPP_Callback | null;
1311
+ at(i: number): ZPP_Callback;
1312
+ rev_at(i: number): ZPP_Callback;
1313
+ free(): void;
1314
+ alloc(): void;
1315
+ genarbs(): void;
1263
1316
  }
1264
1317
 
1265
1318
  /**
1266
- * Listener Base class for all physics event listeners.
1267
- *
1268
- * Provides common properties (type, event, precedence, space) and
1269
- * toString() for all listener subclasses.
1319
+ * ZPP_Space -- Internal space implementation (core simulation loop).
1320
+ * Converted from nape-compiled.js lines 30236-43690.
1270
1321
  *
1271
- * Fully modernized from nape-compiled.js lines 231–433.
1322
+ * This is the largest and most complex class in the engine (~13,450 lines).
1323
+ * It handles integration, constraint solving, broadphase management,
1324
+ * sleeping/waking, and callback dispatch.
1272
1325
  */
1273
1326
 
1274
- type Any$L = any;
1275
- declare class Listener {
1327
+ type Any$P = any;
1328
+ declare class ZPP_Space {
1276
1329
  static __name__: string[];
1277
- zpp_inner: ZPP_Listener;
1278
- get _inner(): Any$L;
1279
- constructor();
1280
- static _wrap(inner: Any$L): Listener;
1281
- get type(): ListenerType;
1282
- get event(): CbEvent;
1283
- set event(event: CbEvent);
1284
- get precedence(): number;
1285
- set precedence(precedence: number);
1286
- get space(): Space | null;
1287
- set space(space: Space | Any$L | null);
1288
- toString(): string;
1330
+ static _zpp: Any$P;
1331
+ static _nape: Any$P;
1332
+ outer: Any$P;
1333
+ userData: Any$P;
1334
+ gravityx: Any$P;
1335
+ gravityy: Any$P;
1336
+ wrap_gravity: Any$P;
1337
+ bodies: Any$P;
1338
+ wrap_bodies: Any$P;
1339
+ compounds: Any$P;
1340
+ wrap_compounds: Any$P;
1341
+ constraints: Any$P;
1342
+ wrap_constraints: Any$P;
1343
+ kinematics: Any$P;
1344
+ bphase: Any$P;
1345
+ __static: Any$P;
1346
+ global_lin_drag: Any$P;
1347
+ global_ang_drag: Any$P;
1348
+ stamp: Any$P;
1349
+ midstep: Any$P;
1350
+ time: Any$P;
1351
+ sortcontacts: Any$P;
1352
+ c_arbiters_true: Any$P;
1353
+ c_arbiters_false: Any$P;
1354
+ f_arbiters: Any$P;
1355
+ s_arbiters: Any$P;
1356
+ wrap_arbiters: Any$P;
1357
+ live: Any$P;
1358
+ wrap_live: Any$P;
1359
+ live_constraints: Any$P;
1360
+ wrap_livecon: Any$P;
1361
+ staticsleep: Any$P;
1362
+ islands: Any$P;
1363
+ listeners: Any$P;
1364
+ wrap_listeners: Any$P;
1365
+ callbacks: Any$P;
1366
+ callbackset_list: Any$P;
1367
+ cbsets: Any$P;
1368
+ convexShapeList: Any$P;
1369
+ pre_dt: Any$P;
1370
+ toiEvents: Any$P;
1371
+ continuous: Any$P;
1372
+ precb: Any$P;
1373
+ prelisteners: Any$P;
1374
+ mrca1: Any$P;
1375
+ mrca2: Any$P;
1376
+ __class__: Any$P;
1377
+ constructor(gravity?: Any$P, broadphase?: Any$P);
1378
+ getgravity(): void;
1379
+ gravity_invalidate(x: Any$P): void;
1380
+ gravity_validate(): void;
1381
+ clear(): void;
1382
+ bodies_adder(x: Any$P): boolean;
1383
+ bodies_subber(x: Any$P): void;
1384
+ bodies_modifiable(): void;
1385
+ compounds_adder(x: Any$P): boolean;
1386
+ compounds_subber(x: Any$P): void;
1387
+ compounds_modifiable(): void;
1388
+ constraints_adder(x: Any$P): boolean;
1389
+ constraints_subber(x: Any$P): void;
1390
+ constraints_modifiable(): void;
1391
+ listeners_adder(x: Any$P): boolean;
1392
+ listeners_subber(x: Any$P): void;
1393
+ listeners_modifiable(): void;
1394
+ revoke_listener(x: Any$P): void;
1395
+ unrevoke_listener(x: Any$P): void;
1396
+ addListener(x: Any$P): void;
1397
+ remListener(x: Any$P): void;
1398
+ add_callbackset(cb: Any$P): void;
1399
+ remove_callbackset(cb: Any$P): void;
1400
+ transmitType(p: Any$P, new_type: Any$P): void;
1401
+ added_shape(s: Any$P, dontwake: Any$P): void;
1402
+ removed_shape(s: Any$P, deleting: Any$P): void;
1403
+ addConstraint(con: Any$P): void;
1404
+ remConstraint(con: Any$P): void;
1405
+ addCompound(x: Any$P): void;
1406
+ remCompound(x: Any$P): void;
1407
+ addBody(body: Any$P, flag?: Any$P): void;
1408
+ remBody(body: Any$P, flag?: Any$P): void;
1409
+ shapesUnderPoint(x: Any$P, y: Any$P, filter: Any$P, output: Any$P): any;
1410
+ bodiesUnderPoint(x: Any$P, y: Any$P, filter: Any$P, output: Any$P): any;
1411
+ shapesInAABB(aabb: Any$P, strict: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1412
+ bodiesInAABB(aabb: Any$P, strict: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1413
+ shapesInCircle(pos: Any$P, rad: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1414
+ bodiesInCircle(pos: Any$P, rad: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1415
+ shapesInShape(shape: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1416
+ bodiesInShape(shape: Any$P, cont: Any$P, filter: Any$P, output: Any$P): any;
1417
+ rayCast(ray: Any$P, inner: Any$P, filter: Any$P): any;
1418
+ rayMultiCast(ray: Any$P, inner: Any$P, filter: Any$P, output: Any$P): any;
1419
+ convexCast(shape: Any$P, deltaTime: Any$P, filter: Any$P, dynamics: Any$P): any;
1420
+ prepareCast(s: Any$P): void;
1421
+ convexMultiCast(shape: Any$P, deltaTime: Any$P, filter: Any$P, dynamics: Any$P, output: Any$P): any;
1422
+ push_callback(i: Any$P): ZPP_Callback;
1423
+ step(deltaTime: Any$P, velocityIterations: Any$P, positionIterations: Any$P): void;
1424
+ continuousCollisions(deltaTime: Any$P): void;
1425
+ continuousEvent(s1: Any$P, s2: Any$P, stat: Any$P, in_arb: Any$P, _: Any$P): any;
1426
+ bodyCbWake(b: Any$P): void;
1427
+ bodyCbSleep(b: Any$P): void;
1428
+ constraintCbWake(con: Any$P): void;
1429
+ constraintCbSleep(con: Any$P): void;
1430
+ constraintCbBreak(con: Any$P): void;
1431
+ nullListenerType(cb1: Any$P, cb2: Any$P): void;
1432
+ nullInteractorType(intx: Any$P, me: Any$P): void;
1433
+ freshListenerType(cb1: Any$P, cb2: Any$P): void;
1434
+ freshInteractorType(intx: Any$P, me: Any$P): void;
1435
+ wakeCompound(x: Any$P): void;
1436
+ wakeIsland(i: Any$P): void;
1437
+ non_inlined_wake(o: Any$P, fst?: Any$P): void;
1438
+ really_wake(o: Any$P, fst?: Any$P): void;
1439
+ wake_constraint(con: Any$P, fst?: Any$P): boolean;
1440
+ doForests(dt: Any$P): void;
1441
+ sleepArbiters(): void;
1442
+ static_validation(body: Any$P): void;
1443
+ validation(): void;
1444
+ updateVel(dt: Any$P): void;
1445
+ updatePos(dt: Any$P): void;
1446
+ presteparb(arb: Any$P, dt: Any$P, cont?: Any$P): boolean;
1447
+ prestep(dt: Any$P): void;
1448
+ warmStart(): void;
1449
+ iterateVel(times: Any$P): void;
1450
+ iteratePos(times: Any$P): void;
1451
+ group_ignore(s1: Any$P, s2: Any$P): boolean;
1452
+ interactionType(s1: Any$P, s2: Any$P, b1: Any$P, b2: Any$P): 2 | 0 | 1 | -1;
1453
+ narrowPhase(s1: Any$P, s2: Any$P, stat: Any$P, in_arb: Any$P, continuous: Any$P): any;
1454
+ MRCA_chains(s1: Any$P, s2: Any$P): void;
1455
+ inlined_MRCA_chains(s1: Any$P, s2: Any$P): void;
1289
1456
  }
1290
1457
 
1458
+ type Any$O = any;
1291
1459
  /**
1292
1460
  * The physics world. Add bodies and constraints, then call `step()` each frame.
1461
+ *
1462
+ * Fully modernized — uses ZPP_Space directly (extracted to TypeScript).
1293
1463
  */
1294
1464
  declare class Space {
1465
+ zpp_inner: ZPP_Space;
1466
+ constructor(gravity?: Vec2, broadphase?: Any$O);
1295
1467
  /** @internal */
1296
- readonly _inner: NapeInner;
1297
- constructor(gravity?: Vec2);
1468
+ get _inner(): Any$O;
1298
1469
  /** @internal */
1299
1470
  static _wrap(inner: NapeInner): Space;
1471
+ get userData(): Record<string, unknown>;
1300
1472
  get gravity(): Vec2;
1301
1473
  set gravity(value: Vec2);
1302
- get worldLinearDrag(): number;
1303
- set worldLinearDrag(value: number);
1304
- get worldAngularDrag(): number;
1305
- set worldAngularDrag(value: number);
1474
+ get broadphase(): Any$O;
1306
1475
  get sortContacts(): boolean;
1307
1476
  set sortContacts(value: boolean);
1308
- get bodies(): NapeList<Body>;
1309
- get liveBodies(): NapeList<Body>;
1310
- get constraints(): NapeList<Constraint>;
1311
- get liveConstraints(): NapeList<Constraint>;
1312
- get arbiters(): NapeInner;
1313
- get listeners(): NapeList<Listener>;
1314
- get compounds(): NapeInner;
1315
- /** The static world body (always present, immovable). */
1477
+ get worldAngularDrag(): number;
1478
+ set worldAngularDrag(value: number);
1479
+ get worldLinearDrag(): number;
1480
+ set worldLinearDrag(value: number);
1481
+ get compounds(): Any$O;
1482
+ get bodies(): Any$O;
1483
+ get liveBodies(): Any$O;
1484
+ get constraints(): Any$O;
1485
+ get liveConstraints(): Any$O;
1316
1486
  get world(): Body;
1487
+ get arbiters(): Any$O;
1488
+ get listeners(): Any$O;
1317
1489
  get timeStamp(): number;
1318
1490
  get elapsedTime(): number;
1319
- get broadphase(): NapeInner;
1320
- get userData(): Record<string, unknown>;
1321
1491
  step(deltaTime: number, velocityIterations?: number, positionIterations?: number): void;
1322
1492
  clear(): void;
1323
- visitBodies(fn: (body: Body) => void): void;
1324
- visitConstraints(fn: (constraint: Constraint) => void): void;
1325
- visitCompounds(fn: (compound: NapeInner) => void): void;
1326
- shapesUnderPoint(point: Vec2, filter?: InteractionFilterLike, output?: NapeInner): NapeInner;
1327
- bodiesUnderPoint(point: Vec2, filter?: InteractionFilterLike, output?: NapeInner): NapeInner;
1328
- shapesInAABB(aabb: AABB, containment?: boolean, strict?: boolean, filter?: InteractionFilterLike, output?: NapeInner): NapeInner;
1329
- bodiesInAABB(aabb: AABB, containment?: boolean, strict?: boolean, filter?: InteractionFilterLike, output?: NapeInner): NapeInner;
1330
- rayCast(ray: {
1331
- _inner: NapeInner;
1332
- } | NapeInner, inner?: boolean, filter?: InteractionFilterLike): NapeInner;
1333
- rayMultiCast(ray: {
1334
- _inner: NapeInner;
1335
- } | NapeInner, inner?: boolean, filter?: InteractionFilterLike, output?: NapeInner): NapeInner;
1493
+ visitBodies(lambda: (body: Body) => void): void;
1494
+ visitConstraints(lambda: (constraint: Constraint) => void): void;
1495
+ visitCompounds(lambda: (compound: Any$O) => void): void;
1496
+ interactionType(shape1: Shape, shape2: Shape): Any$O;
1497
+ shapesUnderPoint(point: Vec2, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1498
+ bodiesUnderPoint(point: Vec2, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1499
+ shapesInAABB(aabb: AABB, containment?: boolean, strict?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1500
+ bodiesInAABB(aabb: AABB, containment?: boolean, strict?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1501
+ shapesInCircle(position: Vec2, radius: number, containment?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1502
+ bodiesInCircle(position: Vec2, radius: number, containment?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1503
+ shapesInShape(shape: Shape, containment?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1504
+ bodiesInShape(shape: Shape, containment?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1505
+ shapesInBody(body: Body, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1506
+ bodiesInBody(body: Body, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1507
+ convexCast(shape: Shape, deltaTime: number, liveSweep?: boolean, filter?: InteractionFilter | Any$O): Any$O;
1508
+ convexMultiCast(shape: Shape, deltaTime: number, liveSweep?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1509
+ rayCast(ray: Ray | Any$O, inner?: boolean, filter?: InteractionFilter | Any$O): Any$O;
1510
+ rayMultiCast(ray: Ray | Any$O, inner?: boolean, filter?: InteractionFilter | Any$O, output?: Any$O): Any$O;
1336
1511
  toString(): string;
1512
+ /** @internal */ get_userData(): Any$O;
1513
+ /** @internal */ get_gravity(): Any$O;
1514
+ /** @internal */ set_gravity(v: Any$O): Any$O;
1515
+ /** @internal */ get_broadphase(): Any$O;
1516
+ /** @internal */ get_sortContacts(): boolean;
1517
+ /** @internal */ set_sortContacts(v: boolean): boolean;
1518
+ /** @internal */ get_worldAngularDrag(): number;
1519
+ /** @internal */ set_worldAngularDrag(v: number): number;
1520
+ /** @internal */ get_worldLinearDrag(): number;
1521
+ /** @internal */ set_worldLinearDrag(v: number): number;
1522
+ /** @internal */ get_compounds(): Any$O;
1523
+ /** @internal */ get_bodies(): Any$O;
1524
+ /** @internal */ get_liveBodies(): Any$O;
1525
+ /** @internal */ get_constraints(): Any$O;
1526
+ /** @internal */ get_liveConstraints(): Any$O;
1527
+ /** @internal */ get_world(): Any$O;
1528
+ /** @internal */ get_arbiters(): Any$O;
1529
+ /** @internal */ get_listeners(): Any$O;
1530
+ /** @internal */ get_timeStamp(): number;
1531
+ /** @internal */ get_elapsedTime(): number;
1337
1532
  }
1338
- /** @internal Helper type for filter-like parameters. */
1339
- type InteractionFilterLike = {
1340
- _inner: NapeInner;
1341
- } | NapeInner | undefined;
1342
1533
 
1343
1534
  /**
1344
1535
  * Body type enumeration.
@@ -1369,22 +1560,22 @@ declare class BodyType {
1369
1560
  *
1370
1561
  * Converted from nape-compiled.js lines 63367–63463, 135330–135331.
1371
1562
  */
1372
- type Any$K = any;
1563
+ type Any$N = any;
1373
1564
  declare class ZPP_InteractionGroup {
1374
1565
  static SHAPE: number;
1375
1566
  static BODY: number;
1376
1567
  static __name__: string[];
1377
- static _zpp: Any$K;
1378
- static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$K) | null;
1379
- outer: Any$K;
1568
+ static _zpp: Any$N;
1569
+ static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$N) | null;
1570
+ outer: Any$N;
1380
1571
  ignore: boolean;
1381
1572
  group: ZPP_InteractionGroup | null;
1382
- groups: Any$K;
1383
- wrap_groups: Any$K;
1384
- interactors: Any$K;
1385
- wrap_interactors: Any$K;
1573
+ groups: Any$N;
1574
+ wrap_groups: Any$N;
1575
+ interactors: Any$N;
1576
+ wrap_interactors: Any$N;
1386
1577
  depth: number;
1387
- __class__: Any$K;
1578
+ __class__: Any$N;
1388
1579
  constructor();
1389
1580
  /** Set or change the parent group. */
1390
1581
  setGroup(group: ZPP_InteractionGroup | null): void;
@@ -1395,9 +1586,9 @@ declare class ZPP_InteractionGroup {
1395
1586
  /** Remove a child group. */
1396
1587
  remGroup(group: ZPP_InteractionGroup): void;
1397
1588
  /** Register an interactor in this group. */
1398
- addInteractor(intx: Any$K): void;
1589
+ addInteractor(intx: Any$N): void;
1399
1590
  /** Unregister an interactor from this group. */
1400
- remInteractor(intx: Any$K, flag?: number): void;
1591
+ remInteractor(intx: Any$N, flag?: number): void;
1401
1592
  }
1402
1593
 
1403
1594
  /**
@@ -1492,46 +1683,46 @@ declare class Interactor {
1492
1683
  * Converted from nape-compiled.js lines 52431–54547.
1493
1684
  */
1494
1685
 
1495
- type Any$J = any;
1686
+ type Any$M = any;
1496
1687
  declare class ZPP_Body {
1497
1688
  static __name__: string[];
1498
- static __super__: Any$J;
1689
+ static __super__: Any$M;
1499
1690
  /**
1500
1691
  * Namespace references, set by the compiled module after import.
1501
1692
  * _nape = the `nape` public namespace
1502
1693
  * _zpp = the `zpp_nape` internal namespace
1503
1694
  */
1504
- static _nape: Any$J;
1505
- static _zpp: Any$J;
1506
- static types: Any$J[];
1507
- static bodystack: Any$J;
1508
- static bodyset: Any$J;
1695
+ static _nape: Any$M;
1696
+ static _zpp: Any$M;
1697
+ static types: Any$M[];
1698
+ static bodystack: Any$M;
1699
+ static bodyset: Any$M;
1509
1700
  static cur_graph_depth: number;
1510
- static bodysetlt(a: Any$J, b: Any$J): boolean;
1511
- static __static(): Any$J;
1512
- outer_i: Any$J;
1701
+ static bodysetlt(a: Any$M, b: Any$M): boolean;
1702
+ static __static(): Any$M;
1703
+ outer_i: Any$M;
1513
1704
  id: number;
1514
- userData: Any$J;
1515
- ishape: Any$J;
1516
- ibody: Any$J;
1517
- icompound: Any$J;
1518
- wrap_cbTypes: Any$J;
1519
- cbSet: Any$J;
1520
- cbTypes: Any$J;
1521
- group: Any$J;
1522
- cbsets: Any$J;
1523
- outer: Any$J;
1705
+ userData: Any$M;
1706
+ ishape: Any$M;
1707
+ ibody: Any$M;
1708
+ icompound: Any$M;
1709
+ wrap_cbTypes: Any$M;
1710
+ cbSet: Any$M;
1711
+ cbTypes: Any$M;
1712
+ group: Any$M;
1713
+ cbsets: Any$M;
1714
+ outer: Any$M;
1524
1715
  world: boolean;
1525
1716
  type: number;
1526
- compound: Any$J;
1527
- shapes: Any$J;
1528
- wrap_shapes: Any$J;
1529
- space: Any$J;
1530
- arbiters: Any$J;
1531
- wrap_arbiters: Any$J;
1532
- constraints: Any$J;
1533
- wrap_constraints: Any$J;
1534
- component: Any$J;
1717
+ compound: Any$M;
1718
+ shapes: Any$M;
1719
+ wrap_shapes: Any$M;
1720
+ space: Any$M;
1721
+ arbiters: Any$M;
1722
+ wrap_arbiters: Any$M;
1723
+ constraints: Any$M;
1724
+ wrap_constraints: Any$M;
1725
+ component: Any$M;
1535
1726
  graph_depth: number;
1536
1727
  sweepTime: number;
1537
1728
  sweep_angvel: number;
@@ -1544,20 +1735,20 @@ declare class ZPP_Body {
1544
1735
  pre_posy: number;
1545
1736
  posx: number;
1546
1737
  posy: number;
1547
- wrap_pos: Any$J;
1738
+ wrap_pos: Any$M;
1548
1739
  velx: number;
1549
1740
  vely: number;
1550
- wrap_vel: Any$J;
1741
+ wrap_vel: Any$M;
1551
1742
  forcex: number;
1552
1743
  forcey: number;
1553
- wrap_force: Any$J;
1744
+ wrap_force: Any$M;
1554
1745
  kinvelx: number;
1555
1746
  kinvely: number;
1556
- wrap_kinvel: Any$J;
1747
+ wrap_kinvel: Any$M;
1557
1748
  svelx: number;
1558
1749
  svely: number;
1559
- wrap_svel: Any$J;
1560
- wrapcvel: Any$J;
1750
+ wrap_svel: Any$M;
1751
+ wrapcvel: Any$M;
1561
1752
  angvel: number;
1562
1753
  torque: number;
1563
1754
  kinangvel: number;
@@ -1594,9 +1785,9 @@ declare class ZPP_Body {
1594
1785
  worldCOMx: number;
1595
1786
  worldCOMy: number;
1596
1787
  zip_worldCOM: boolean;
1597
- wrap_localCOM: Any$J;
1598
- wrap_worldCOM: Any$J;
1599
- __class__: Any$J;
1788
+ wrap_localCOM: Any$M;
1789
+ wrap_worldCOM: Any$M;
1790
+ __class__: Any$M;
1600
1791
  constructor();
1601
1792
  isStatic(): boolean;
1602
1793
  isDynamic(): boolean;
@@ -1604,23 +1795,23 @@ declare class ZPP_Body {
1604
1795
  invalidate_type(): void;
1605
1796
  invalidate_shapes(): void;
1606
1797
  init_bodysetlist(): void;
1607
- connectedBodies_cont(b: Any$J): void;
1608
- connectedBodies(depth: number, output: Any$J): Any$J;
1609
- interactingBodies(type: number, output: Any$J): Any$J;
1798
+ connectedBodies_cont(b: Any$M): void;
1799
+ connectedBodies(depth: number, output: Any$M): Any$M;
1800
+ interactingBodies(type: number, output: Any$M): Any$M;
1610
1801
  atRest(dt: number): boolean;
1611
1802
  refreshArbiters(): void;
1612
1803
  sweepIntegrate(dt: number): void;
1613
- sweepValidate(s: Any$J): void;
1804
+ sweepValidate(s: Any$M): void;
1614
1805
  invalidate_pos(): void;
1615
- pos_invalidate(pos: Any$J): void;
1806
+ pos_invalidate(pos: Any$M): void;
1616
1807
  pos_validate(): void;
1617
- vel_invalidate(vel: Any$J): void;
1808
+ vel_invalidate(vel: Any$M): void;
1618
1809
  vel_validate(): void;
1619
- kinvel_invalidate(vel: Any$J): void;
1810
+ kinvel_invalidate(vel: Any$M): void;
1620
1811
  kinvel_validate(): void;
1621
- svel_invalidate(vel: Any$J): void;
1812
+ svel_invalidate(vel: Any$M): void;
1622
1813
  svel_validate(): void;
1623
- force_invalidate(force: Any$J): void;
1814
+ force_invalidate(force: Any$M): void;
1624
1815
  force_validate(): void;
1625
1816
  private _setupVec2Wrapper;
1626
1817
  setupPosition(): void;
@@ -1657,37 +1848,37 @@ declare class ZPP_Body {
1657
1848
  getworldCOM(): void;
1658
1849
  __immutable_midstep(): void;
1659
1850
  clear(): void;
1660
- shapes_adder(s: Any$J): boolean;
1661
- shapes_subber(s: Any$J): void;
1662
- shapes_invalidate(_param: Any$J): void;
1851
+ shapes_adder(s: Any$M): boolean;
1852
+ shapes_subber(s: Any$M): void;
1853
+ shapes_invalidate(_param: Any$M): void;
1663
1854
  shapes_modifiable(): void;
1664
1855
  addedToSpace(): void;
1665
1856
  removedFromSpace(): void;
1666
1857
  private _removeArbiterFromList;
1667
- copy(): Any$J;
1858
+ copy(): Any$M;
1668
1859
  wake: () => void;
1669
1860
  __iaddedToSpace: () => void;
1670
1861
  __iremovedFromSpace: () => void;
1671
1862
  immutable_midstep: (name: string) => void;
1672
- copyto: (ret: Any$J) => void;
1673
- insert_cbtype: (cb: Any$J) => void;
1863
+ copyto: (ret: Any$M) => void;
1864
+ insert_cbtype: (cb: Any$M) => void;
1674
1865
  alloc_cbSet: () => void;
1675
1866
  dealloc_cbSet: () => void;
1676
1867
  setupcbTypes: () => void;
1677
1868
  immutable_cbTypes: () => void;
1678
- wrap_cbTypes_subber: (pcb: Any$J) => void;
1679
- wrap_cbTypes_adder: (cb: Any$J) => void;
1680
- setGroup: (group: Any$J) => void;
1681
- lookup_group: () => Any$J;
1682
- getSpace: () => Any$J;
1869
+ wrap_cbTypes_subber: (pcb: Any$M) => void;
1870
+ wrap_cbTypes_adder: (cb: Any$M) => void;
1871
+ setGroup: (group: Any$M) => void;
1872
+ lookup_group: () => Any$M;
1873
+ getSpace: () => Any$M;
1683
1874
  isShape: () => boolean;
1684
1875
  isBody: () => boolean;
1685
1876
  isCompound: () => boolean;
1686
1877
  static _initialized: boolean;
1687
- static _init(zpp: Any$J, nape: Any$J): void;
1878
+ static _init(zpp: Any$M, nape: Any$M): void;
1688
1879
  }
1689
1880
 
1690
- type Any$I = any;
1881
+ type Any$L = any;
1691
1882
  /**
1692
1883
  * A rigid body in the physics simulation.
1693
1884
  *
@@ -1695,7 +1886,7 @@ type Any$I = any;
1695
1886
  */
1696
1887
  declare class Body extends Interactor {
1697
1888
  static __name__: string[];
1698
- static __super__: Any$I;
1889
+ static __super__: Any$L;
1699
1890
  /** Direct access to the extracted internal ZPP_Body. */
1700
1891
  zpp_inner: ZPP_Body;
1701
1892
  debugDraw: boolean;
@@ -1747,47 +1938,47 @@ declare class Body extends Interactor {
1747
1938
  get shapes(): NapeList<Shape>;
1748
1939
  get space(): Space;
1749
1940
  set space(value: Space | null);
1750
- get compound(): Any$I;
1751
- set compound(value: Any$I);
1941
+ get compound(): Any$L;
1942
+ set compound(value: Any$L);
1752
1943
  get bounds(): AABB;
1753
1944
  get constraintVelocity(): Vec2;
1754
1945
  get localCOM(): Vec2;
1755
1946
  get worldCOM(): Vec2;
1756
- get massMode(): Any$I;
1757
- set massMode(value: Any$I);
1758
- get inertiaMode(): Any$I;
1759
- set inertiaMode(value: Any$I);
1760
- get gravMassMode(): Any$I;
1761
- set gravMassMode(value: Any$I);
1947
+ get massMode(): Any$L;
1948
+ set massMode(value: Any$L);
1949
+ get inertiaMode(): Any$L;
1950
+ set inertiaMode(value: Any$L);
1951
+ get gravMassMode(): Any$L;
1952
+ set gravMassMode(value: Any$L);
1762
1953
  copy(): Body;
1763
1954
  toString(): string;
1764
- get_type(): Any$I;
1765
- set_type(type: Any$I): Any$I;
1766
- get_shapes(): Any$I;
1955
+ get_type(): Any$L;
1956
+ set_type(type: Any$L): Any$L;
1957
+ get_shapes(): Any$L;
1767
1958
  get_isBullet(): boolean;
1768
1959
  set_isBullet(v: boolean): boolean;
1769
1960
  get_disableCCD(): boolean;
1770
1961
  set_disableCCD(v: boolean): boolean;
1771
- get_position(): Any$I;
1772
- set_position(position: Any$I): Any$I;
1773
- get_velocity(): Any$I;
1774
- set_velocity(velocity: Any$I): Any$I;
1962
+ get_position(): Any$L;
1963
+ set_position(position: Any$L): Any$L;
1964
+ get_velocity(): Any$L;
1965
+ set_velocity(velocity: Any$L): Any$L;
1775
1966
  get_rotation(): number;
1776
1967
  set_rotation(rotation: number): number;
1777
1968
  get_angularVel(): number;
1778
1969
  set_angularVel(angularVel: number): number;
1779
- get_kinematicVel(): Any$I;
1780
- set_kinematicVel(kinematicVel: Any$I): Any$I;
1970
+ get_kinematicVel(): Any$L;
1971
+ set_kinematicVel(kinematicVel: Any$L): Any$L;
1781
1972
  get_kinAngVel(): number;
1782
1973
  set_kinAngVel(kinAngVel: number): number;
1783
- get_surfaceVel(): Any$I;
1784
- set_surfaceVel(surfaceVel: Any$I): Any$I;
1785
- get_force(): Any$I;
1786
- set_force(force: Any$I): Any$I;
1974
+ get_surfaceVel(): Any$L;
1975
+ set_surfaceVel(surfaceVel: Any$L): Any$L;
1976
+ get_force(): Any$L;
1977
+ set_force(force: Any$L): Any$L;
1787
1978
  get_torque(): number;
1788
1979
  set_torque(torque: number): number;
1789
- get_bounds(): Any$I;
1790
- get_constraintVelocity(): Any$I;
1980
+ get_bounds(): Any$L;
1981
+ get_constraintVelocity(): Any$L;
1791
1982
  get_constraintMass(): number;
1792
1983
  get_constraintInertia(): number;
1793
1984
  get_allowMovement(): boolean;
@@ -1795,28 +1986,28 @@ declare class Body extends Interactor {
1795
1986
  get_allowRotation(): boolean;
1796
1987
  set_allowRotation(allowRotation: boolean): boolean;
1797
1988
  get_isSleeping(): boolean;
1798
- get_compound(): Any$I;
1799
- set_compound(compound: Any$I): Any$I;
1800
- get_space(): Any$I;
1801
- set_space(space: Any$I): Any$I;
1802
- get_arbiters(): Any$I;
1803
- get_constraints(): Any$I;
1804
- get_massMode(): Any$I;
1805
- set_massMode(massMode: Any$I): Any$I;
1989
+ get_compound(): Any$L;
1990
+ set_compound(compound: Any$L): Any$L;
1991
+ get_space(): Any$L;
1992
+ set_space(space: Any$L): Any$L;
1993
+ get_arbiters(): Any$L;
1994
+ get_constraints(): Any$L;
1995
+ get_massMode(): Any$L;
1996
+ set_massMode(massMode: Any$L): Any$L;
1806
1997
  get_mass(): number;
1807
1998
  set_mass(mass: number): number;
1808
- get_gravMassMode(): Any$I;
1809
- set_gravMassMode(gravMassMode: Any$I): Any$I;
1999
+ get_gravMassMode(): Any$L;
2000
+ set_gravMassMode(gravMassMode: Any$L): Any$L;
1810
2001
  get_gravMass(): number;
1811
2002
  set_gravMass(gravMass: number): number;
1812
2003
  get_gravMassScale(): number;
1813
2004
  set_gravMassScale(gravMassScale: number): number;
1814
- get_inertiaMode(): Any$I;
1815
- set_inertiaMode(inertiaMode: Any$I): Any$I;
2005
+ get_inertiaMode(): Any$L;
2006
+ set_inertiaMode(inertiaMode: Any$L): Any$L;
1816
2007
  get_inertia(): number;
1817
2008
  set_inertia(inertia: number): number;
1818
- get_localCOM(): Any$I;
1819
- get_worldCOM(): Any$I;
2009
+ get_localCOM(): Any$L;
2010
+ get_worldCOM(): Any$L;
1820
2011
  integrate(deltaTime: number): Body;
1821
2012
  localPointToWorld(point: Vec2, weak?: boolean): Vec2;
1822
2013
  worldPointToLocal(point: Vec2, weak?: boolean): Vec2;
@@ -1828,24 +2019,24 @@ declare class Body extends Interactor {
1828
2019
  translateShapes(translation: Vec2): Body;
1829
2020
  rotateShapes(angle: number): Body;
1830
2021
  scaleShapes(scaleX: number, scaleY: number): Body;
1831
- transformShapes(matrix: Any$I): Body;
2022
+ transformShapes(matrix: Any$L): Body;
1832
2023
  align(): Body;
1833
2024
  rotate(centre: Vec2, angle: number): Body;
1834
- setShapeMaterials(material: Any$I): Body;
1835
- setShapeFilters(filter: Any$I): Body;
1836
- setShapeFluidProperties(fluidProperties: Any$I): Body;
2025
+ setShapeMaterials(material: Any$L): Body;
2026
+ setShapeFilters(filter: Any$L): Body;
2027
+ setShapeFluidProperties(fluidProperties: Any$L): Body;
1837
2028
  contains(point: Vec2): boolean;
1838
- connectedBodies(depth?: number, output?: Any$I): Any$I;
1839
- interactingBodies(type?: Any$I, depth?: number, output?: Any$I): Any$I;
1840
- normalImpulse(body?: Any$I, freshOnly?: boolean): Vec3;
1841
- tangentImpulse(body?: Any$I, freshOnly?: boolean): Vec3;
1842
- totalContactsImpulse(body?: Any$I, freshOnly?: boolean): Vec3;
1843
- rollingImpulse(body?: Any$I, freshOnly?: boolean): number;
1844
- buoyancyImpulse(body?: Any$I): Vec3;
1845
- dragImpulse(body?: Any$I): Vec3;
1846
- totalFluidImpulse(body?: Any$I): Vec3;
2029
+ connectedBodies(depth?: number, output?: Any$L): Any$L;
2030
+ interactingBodies(type?: Any$L, depth?: number, output?: Any$L): Any$L;
2031
+ normalImpulse(body?: Any$L, freshOnly?: boolean): Vec3;
2032
+ tangentImpulse(body?: Any$L, freshOnly?: boolean): Vec3;
2033
+ totalContactsImpulse(body?: Any$L, freshOnly?: boolean): Vec3;
2034
+ rollingImpulse(body?: Any$L, freshOnly?: boolean): number;
2035
+ buoyancyImpulse(body?: Any$L): Vec3;
2036
+ dragImpulse(body?: Any$L): Vec3;
2037
+ totalFluidImpulse(body?: Any$L): Vec3;
1847
2038
  constraintsImpulse(): Vec3;
1848
- totalImpulse(body?: Any$I, freshOnly?: boolean): Vec3;
2039
+ totalImpulse(body?: Any$L, freshOnly?: boolean): Vec3;
1849
2040
  crushFactor(): number;
1850
2041
  private _arbiterImpulseQuery;
1851
2042
  }
@@ -1858,7 +2049,7 @@ declare class Body extends Interactor {
1858
2049
  *
1859
2050
  * Converted from nape-compiled.js lines 87523–87601, 135477–135481.
1860
2051
  */
1861
- type Any$H = any;
2052
+ type Any$K = any;
1862
2053
  declare class ZPP_Material {
1863
2054
  static zpp_pool: ZPP_Material | null;
1864
2055
  static WAKE: number;
@@ -1871,27 +2062,27 @@ declare class ZPP_Material {
1871
2062
  * _nape = the `nape` public namespace (for wrapper creation)
1872
2063
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
1873
2064
  */
1874
- static _nape: Any$H;
1875
- static _zpp: Any$H;
2065
+ static _nape: Any$K;
2066
+ static _zpp: Any$K;
1876
2067
  /**
1877
2068
  * Wrapper factory callback, registered by the modernized Material class.
1878
2069
  * When set, wrapper() uses this instead of creating a compiled Material.
1879
2070
  */
1880
- static _wrapFn: ((zpp: ZPP_Material) => Any$H) | null;
2071
+ static _wrapFn: ((zpp: ZPP_Material) => Any$K) | null;
1881
2072
  elasticity: number;
1882
2073
  dynamicFriction: number;
1883
2074
  staticFriction: number;
1884
2075
  density: number;
1885
2076
  rollingFriction: number;
1886
- shapes: Any$H;
1887
- wrap_shapes: Any$H;
1888
- outer: Any$H;
1889
- userData: Any$H;
2077
+ shapes: Any$K;
2078
+ wrap_shapes: Any$K;
2079
+ outer: Any$K;
2080
+ userData: Any$K;
1890
2081
  next: ZPP_Material | null;
1891
- __class__: Any$H;
2082
+ __class__: Any$K;
1892
2083
  constructor();
1893
2084
  /** Create/return the public nape.phys.Material wrapper for this internal object. */
1894
- wrapper(): Any$H;
2085
+ wrapper(): Any$K;
1895
2086
  /** Called when this object is returned to the pool. */
1896
2087
  free(): void;
1897
2088
  /** Called when this object is taken from the pool. */
@@ -1899,9 +2090,9 @@ declare class ZPP_Material {
1899
2090
  /** Initialize the shapes list (called during feature construction). */
1900
2091
  feature_cons(): void;
1901
2092
  /** Register a shape that uses this material. */
1902
- addShape(shape: Any$H): void;
2093
+ addShape(shape: Any$K): void;
1903
2094
  /** Unregister a shape that no longer uses this material. */
1904
- remShape(shape: Any$H): void;
2095
+ remShape(shape: Any$K): void;
1905
2096
  /** Create a copy with the same property values. */
1906
2097
  copy(): ZPP_Material;
1907
2098
  /** Copy all property values from another ZPP_Material. */
@@ -1961,36 +2152,36 @@ declare class Material {
1961
2152
  *
1962
2153
  * Converted from nape-compiled.js lines 87335–87523, 135403.
1963
2154
  */
1964
- type Any$G = any;
2155
+ type Any$J = any;
1965
2156
  declare class ZPP_FluidProperties {
1966
2157
  static zpp_pool: ZPP_FluidProperties | null;
1967
2158
  static __name__: string[];
1968
- static _nape: Any$G;
1969
- static _zpp: Any$G;
1970
- static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$G) | null;
2159
+ static _nape: Any$J;
2160
+ static _zpp: Any$J;
2161
+ static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$J) | null;
1971
2162
  viscosity: number;
1972
2163
  density: number;
1973
2164
  gravityx: number;
1974
2165
  gravityy: number;
1975
- wrap_gravity: Any$G;
1976
- shapes: Any$G;
1977
- wrap_shapes: Any$G;
1978
- outer: Any$G;
1979
- userData: Any$G;
2166
+ wrap_gravity: Any$J;
2167
+ shapes: Any$J;
2168
+ wrap_shapes: Any$J;
2169
+ outer: Any$J;
2170
+ userData: Any$J;
1980
2171
  next: ZPP_FluidProperties | null;
1981
- __class__: Any$G;
2172
+ __class__: Any$J;
1982
2173
  constructor();
1983
2174
  /** Create/return the public nape.phys.FluidProperties wrapper. */
1984
- wrapper(): Any$G;
2175
+ wrapper(): Any$J;
1985
2176
  free(): void;
1986
2177
  alloc(): void;
1987
2178
  feature_cons(): void;
1988
- addShape(shape: Any$G): void;
1989
- remShape(shape: Any$G): void;
2179
+ addShape(shape: Any$J): void;
2180
+ remShape(shape: Any$J): void;
1990
2181
  /** Copy with object pooling. */
1991
2182
  copy(): ZPP_FluidProperties;
1992
2183
  /** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
1993
- gravity_invalidate(x: Any$G): void;
2184
+ gravity_invalidate(x: Any$J): void;
1994
2185
  /** Sync the gravity Vec2 wrapper with internal values. */
1995
2186
  gravity_validate(): void;
1996
2187
  /** Lazily create and return the gravity Vec2 wrapper. */
@@ -2033,96 +2224,6 @@ declare class FluidProperties {
2033
2224
  toString(): string;
2034
2225
  }
2035
2226
 
2036
- /**
2037
- * ZPP_InteractionFilter — Internal interaction filter for the nape physics engine.
2038
- *
2039
- * Stores collision/sensor/fluid group and mask bitmasks that determine
2040
- * which shapes interact with each other.
2041
- *
2042
- * Converted from nape-compiled.js lines 63255–63366, 135329.
2043
- */
2044
- type Any$F = any;
2045
- declare class ZPP_InteractionFilter {
2046
- static zpp_pool: ZPP_InteractionFilter | null;
2047
- static __name__: string[];
2048
- static _nape: Any$F;
2049
- static _zpp: Any$F;
2050
- static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$F) | null;
2051
- collisionGroup: number;
2052
- collisionMask: number;
2053
- sensorGroup: number;
2054
- sensorMask: number;
2055
- fluidGroup: number;
2056
- fluidMask: number;
2057
- shapes: Any$F;
2058
- wrap_shapes: Any$F;
2059
- outer: Any$F;
2060
- userData: Any$F;
2061
- next: ZPP_InteractionFilter | null;
2062
- __class__: Any$F;
2063
- constructor();
2064
- /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
2065
- wrapper(): Any$F;
2066
- free(): void;
2067
- alloc(): void;
2068
- feature_cons(): void;
2069
- addShape(shape: Any$F): void;
2070
- remShape(shape: Any$F): void;
2071
- /** Create a copy with object pooling. */
2072
- copy(): ZPP_InteractionFilter;
2073
- /** Test whether two filters allow collision between their shapes. */
2074
- shouldCollide(x: ZPP_InteractionFilter): boolean;
2075
- /** Test whether two filters allow sensor interaction. */
2076
- shouldSense(x: ZPP_InteractionFilter): boolean;
2077
- /** Test whether two filters allow fluid interaction. */
2078
- shouldFlow(x: ZPP_InteractionFilter): boolean;
2079
- /** Notify all shapes that the filter changed. */
2080
- invalidate(): void;
2081
- }
2082
-
2083
- /**
2084
- * Bit-mask based interaction filter for controlling which shapes
2085
- * collide, sense, or interact as fluids.
2086
- *
2087
- * Internally wraps a ZPP_InteractionFilter and is registered as
2088
- * the public `nape.dynamics.InteractionFilter` class in the compiled namespace.
2089
- *
2090
- * Converted from nape-compiled.js lines 14361–14640.
2091
- */
2092
- declare class InteractionFilter {
2093
- static __name__: string[];
2094
- /** @internal The internal ZPP_InteractionFilter this wrapper owns. */
2095
- zpp_inner: ZPP_InteractionFilter;
2096
- /**
2097
- * Backward-compatible accessor — returns `this` so that compiled engine
2098
- * code that receives `filter._inner` can still access `zpp_inner`.
2099
- * @internal
2100
- */
2101
- get _inner(): NapeInner;
2102
- constructor(collisionGroup?: number, collisionMask?: number, sensorGroup?: number, sensorMask?: number, fluidGroup?: number, fluidMask?: number);
2103
- /** @internal Wrap a ZPP_InteractionFilter (or legacy compiled InteractionFilter) with caching. */
2104
- static _wrap(inner: any): InteractionFilter;
2105
- get collisionGroup(): number;
2106
- set collisionGroup(value: number);
2107
- get collisionMask(): number;
2108
- set collisionMask(value: number);
2109
- get sensorGroup(): number;
2110
- set sensorGroup(value: number);
2111
- get sensorMask(): number;
2112
- set sensorMask(value: number);
2113
- get fluidGroup(): number;
2114
- set fluidGroup(value: number);
2115
- get fluidMask(): number;
2116
- set fluidMask(value: number);
2117
- get userData(): Record<string, unknown>;
2118
- get shapes(): any;
2119
- shouldCollide(filter: InteractionFilter): boolean;
2120
- shouldSense(filter: InteractionFilter): boolean;
2121
- shouldFlow(filter: InteractionFilter): boolean;
2122
- copy(): InteractionFilter;
2123
- toString(): string;
2124
- }
2125
-
2126
2227
  /**
2127
2228
  * Shape type classification.
2128
2229
  *
@@ -2264,77 +2365,77 @@ declare class Geom {
2264
2365
  *
2265
2366
  * Converted from nape-compiled.js lines 55195–55521.
2266
2367
  */
2267
- type Any$E = any;
2368
+ type Any$I = any;
2268
2369
  declare class ZPP_Compound {
2269
2370
  static __name__: string[];
2270
- static __super__: Any$E;
2371
+ static __super__: Any$I;
2271
2372
  /**
2272
2373
  * Namespace references, set by the compiled module after import.
2273
2374
  * _nape = the `nape` public namespace (for wrapper creation in copy())
2274
2375
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
2275
2376
  */
2276
- static _nape: Any$E;
2277
- static _zpp: Any$E;
2377
+ static _nape: Any$I;
2378
+ static _zpp: Any$I;
2278
2379
  /**
2279
2380
  * Wrapper factory callback, registered by the modernized Compound class.
2280
2381
  * When set, wrapper() uses this instead of the compiled Compound constructor.
2281
2382
  */
2282
- static _wrapFn: ((zpp: ZPP_Compound) => Any$E) | null;
2283
- outer_i: Any$E;
2383
+ static _wrapFn: ((zpp: ZPP_Compound) => Any$I) | null;
2384
+ outer_i: Any$I;
2284
2385
  id: number;
2285
- userData: Any$E;
2286
- ishape: Any$E;
2287
- ibody: Any$E;
2288
- icompound: Any$E;
2289
- wrap_cbTypes: Any$E;
2290
- cbSet: Any$E;
2291
- cbTypes: Any$E;
2292
- group: Any$E;
2293
- cbsets: Any$E;
2294
- outer: Any$E;
2295
- bodies: Any$E;
2296
- constraints: Any$E;
2297
- compounds: Any$E;
2298
- wrap_bodies: Any$E;
2299
- wrap_constraints: Any$E;
2300
- wrap_compounds: Any$E;
2386
+ userData: Any$I;
2387
+ ishape: Any$I;
2388
+ ibody: Any$I;
2389
+ icompound: Any$I;
2390
+ wrap_cbTypes: Any$I;
2391
+ cbSet: Any$I;
2392
+ cbTypes: Any$I;
2393
+ group: Any$I;
2394
+ cbsets: Any$I;
2395
+ outer: Any$I;
2396
+ bodies: Any$I;
2397
+ constraints: Any$I;
2398
+ compounds: Any$I;
2399
+ wrap_bodies: Any$I;
2400
+ wrap_constraints: Any$I;
2401
+ wrap_compounds: Any$I;
2301
2402
  depth: number;
2302
- compound: Any$E;
2303
- space: Any$E;
2304
- __class__: Any$E;
2403
+ compound: Any$I;
2404
+ space: Any$I;
2405
+ __class__: Any$I;
2305
2406
  constructor();
2306
2407
  __imutable_midstep(name: string): void;
2307
2408
  addedToSpace(): void;
2308
2409
  removedFromSpace(): void;
2309
2410
  breakApart(): void;
2310
2411
  private static _zppOf;
2311
- bodies_adder(x: Any$E): boolean;
2312
- bodies_subber(x: Any$E): void;
2412
+ bodies_adder(x: Any$I): boolean;
2413
+ bodies_subber(x: Any$I): void;
2313
2414
  bodies_modifiable(): void;
2314
- constraints_adder(x: Any$E): boolean;
2315
- constraints_subber(x: Any$E): void;
2415
+ constraints_adder(x: Any$I): boolean;
2416
+ constraints_subber(x: Any$I): void;
2316
2417
  constraints_modifiable(): void;
2317
- compounds_adder(x: Any$E): boolean;
2318
- compounds_subber(x: Any$E): void;
2418
+ compounds_adder(x: Any$I): boolean;
2419
+ compounds_subber(x: Any$I): void;
2319
2420
  compounds_modifiable(): void;
2320
- copy(dict?: Any$E[], todo?: Any$E[]): Any$E;
2421
+ copy(dict?: Any$I[], todo?: Any$I[]): Any$I;
2321
2422
  isShape: () => boolean;
2322
2423
  isBody: () => boolean;
2323
2424
  isCompound: () => boolean;
2324
2425
  __iaddedToSpace: () => void;
2325
2426
  __iremovedFromSpace: () => void;
2326
2427
  wake: () => void;
2327
- getSpace: () => Any$E;
2428
+ getSpace: () => Any$I;
2328
2429
  setupcbTypes: () => void;
2329
2430
  immutable_cbTypes: () => void;
2330
- wrap_cbTypes_subber: (pcb: Any$E) => void;
2331
- wrap_cbTypes_adder: (cb: Any$E) => boolean;
2332
- insert_cbtype: (cb: Any$E) => void;
2431
+ wrap_cbTypes_subber: (pcb: Any$I) => void;
2432
+ wrap_cbTypes_adder: (cb: Any$I) => boolean;
2433
+ insert_cbtype: (cb: Any$I) => void;
2333
2434
  alloc_cbSet: () => void;
2334
2435
  dealloc_cbSet: () => void;
2335
2436
  immutable_midstep: (name: string) => void;
2336
- copyto: (ret: Any$E) => void;
2337
- lookup_group: () => Any$E;
2437
+ copyto: (ret: Any$I) => void;
2438
+ lookup_group: () => Any$I;
2338
2439
  /**
2339
2440
  * Initialize prototype by copying ZPP_Interactor methods.
2340
2441
  * Must be called after _zpp is set (during compiled module init).
@@ -2342,7 +2443,7 @@ declare class ZPP_Compound {
2342
2443
  static _init(): void;
2343
2444
  }
2344
2445
 
2345
- type Any$D = any;
2446
+ type Any$H = any;
2346
2447
  /**
2347
2448
  * A compound physics object — a hierarchical grouping of Bodies, Constraints,
2348
2449
  * and other Compounds.
@@ -2351,18 +2452,18 @@ type Any$D = any;
2351
2452
  */
2352
2453
  declare class Compound extends Interactor {
2353
2454
  static __name__: string[];
2354
- static __super__: Any$D;
2455
+ static __super__: Any$H;
2355
2456
  /** Direct access to the extracted internal ZPP_Compound. */
2356
2457
  zpp_inner: ZPP_Compound;
2357
2458
  constructor();
2358
2459
  /** @internal */
2359
2460
  static _wrap(inner: NapeInner): Compound;
2360
2461
  /** Bodies in this compound. */
2361
- get bodies(): Any$D;
2462
+ get bodies(): Any$H;
2362
2463
  /** Constraints in this compound. */
2363
- get constraints(): Any$D;
2464
+ get constraints(): Any$H;
2364
2465
  /** Child compounds in this compound. */
2365
- get compounds(): Any$D;
2466
+ get compounds(): Any$H;
2366
2467
  /** Parent compound, or null if this is a root compound. */
2367
2468
  get compound(): Compound | null;
2368
2469
  set compound(value: Compound | null);
@@ -2376,7 +2477,7 @@ declare class Compound extends Interactor {
2376
2477
  /** Recursively visit all bodies in this compound and its sub-compounds. */
2377
2478
  visitBodies(lambda: (body: Body) => void): void;
2378
2479
  /** Recursively visit all constraints in this compound and its sub-compounds. */
2379
- visitConstraints(lambda: (constraint: Any$D) => void): void;
2480
+ visitConstraints(lambda: (constraint: Any$H) => void): void;
2380
2481
  /** Recursively visit all sub-compounds in this compound. */
2381
2482
  visitCompounds(lambda: (compound: Compound) => void): void;
2382
2483
  /** Calculate the center of mass of all bodies in this compound. */
@@ -2386,13 +2487,13 @@ declare class Compound extends Interactor {
2386
2487
  /** Rotate all bodies in this compound around the given centre point. */
2387
2488
  rotate(centre: Vec2, angle: number): Compound;
2388
2489
  toString(): string;
2389
- get_bodies(): Any$D;
2390
- get_constraints(): Any$D;
2391
- get_compounds(): Any$D;
2392
- get_compound(): Any$D;
2393
- set_compound(compound: Any$D): Any$D;
2394
- get_space(): Any$D;
2395
- set_space(space: Any$D): Any$D;
2490
+ get_bodies(): Any$H;
2491
+ get_constraints(): Any$H;
2492
+ get_compounds(): Any$H;
2493
+ get_compound(): Any$H;
2494
+ set_compound(compound: Any$H): Any$H;
2495
+ get_space(): Any$H;
2496
+ set_space(space: Any$H): Any$H;
2396
2497
  }
2397
2498
 
2398
2499
  /**
@@ -2460,21 +2561,21 @@ declare class MassMode {
2460
2561
  *
2461
2562
  * Converted from nape-compiled.js lines 41496–41827.
2462
2563
  */
2463
- type Any$C = any;
2564
+ type Any$G = any;
2464
2565
  declare class ZPP_Circle {
2465
2566
  static __name__: string[];
2466
- static __super__: Any$C;
2467
- static _nape: Any$C;
2468
- static _zpp: Any$C;
2567
+ static __super__: Any$G;
2568
+ static _nape: Any$G;
2569
+ static _zpp: Any$G;
2469
2570
  static _initialized: boolean;
2470
2571
  radius: number;
2471
- outer_zn: Any$C;
2472
- __class__: Any$C;
2473
- body: Any$C;
2572
+ outer_zn: Any$G;
2573
+ __class__: Any$G;
2574
+ body: Any$G;
2474
2575
  type: number;
2475
- circle: Any$C;
2476
- polygon: Any$C;
2477
- aabb: Any$C;
2576
+ circle: Any$G;
2577
+ polygon: Any$G;
2578
+ aabb: Any$G;
2478
2579
  localCOMx: number;
2479
2580
  localCOMy: number;
2480
2581
  worldCOMx: number;
@@ -2488,25 +2589,25 @@ declare class ZPP_Circle {
2488
2589
  angDrag: number;
2489
2590
  sweepCoef: number;
2490
2591
  sweepRadius: number;
2491
- material: Any$C;
2492
- filter: Any$C;
2493
- wrap_localCOM: Any$C;
2494
- outer: Any$C;
2495
- outer_i: Any$C;
2496
- space: Any$C;
2592
+ material: Any$G;
2593
+ filter: Any$G;
2594
+ wrap_localCOM: Any$G;
2595
+ outer: Any$G;
2596
+ outer_i: Any$G;
2597
+ space: Any$G;
2497
2598
  invalidate_area_inertia: () => void;
2498
2599
  invalidate_angDrag: () => void;
2499
2600
  invalidate_localCOM: () => void;
2500
2601
  immutable_midstep: (name: string) => void;
2501
- setMaterial: (mat: Any$C) => void;
2502
- setFilter: (filt: Any$C) => void;
2503
- insert_cbtype: (cb: Any$C) => void;
2602
+ setMaterial: (mat: Any$G) => void;
2603
+ setFilter: (filt: Any$G) => void;
2604
+ insert_cbtype: (cb: Any$G) => void;
2504
2605
  constructor();
2505
2606
  static _init(): void;
2506
2607
  __clear(): void;
2507
2608
  invalidate_radius(): void;
2508
2609
  localCOM_validate(): void;
2509
- localCOM_invalidate(x: Any$C): void;
2610
+ localCOM_invalidate(x: Any$G): void;
2510
2611
  localCOM_immutable(): void;
2511
2612
  setupLocalCOM(): void;
2512
2613
  __validate_aabb(): void;
@@ -2517,11 +2618,11 @@ declare class ZPP_Circle {
2517
2618
  __scale(sx: number, sy: number): void;
2518
2619
  __translate(x: number, y: number): void;
2519
2620
  __rotate(x: number, y: number): void;
2520
- __transform(m: Any$C): void;
2521
- __copy(): Any$C;
2621
+ __transform(m: Any$G): void;
2622
+ __copy(): Any$G;
2522
2623
  }
2523
2624
 
2524
- type Any$B = any;
2625
+ type Any$F = any;
2525
2626
  /**
2526
2627
  * A circular physics shape.
2527
2628
  *
@@ -2531,7 +2632,7 @@ type Any$B = any;
2531
2632
  */
2532
2633
  declare class Circle extends Shape {
2533
2634
  static __name__: string[];
2534
- static __super__: Any$B;
2635
+ static __super__: Any$F;
2535
2636
  /** Direct access to the extracted internal ZPP_Circle. */
2536
2637
  zpp_inner_zn: ZPP_Circle;
2537
2638
  constructor(radius?: number, localCOM?: Vec2, material?: Material, filter?: InteractionFilter);
@@ -2541,26 +2642,152 @@ declare class Circle extends Shape {
2541
2642
  set radius(value: number);
2542
2643
  }
2543
2644
 
2645
+ /**
2646
+ * ZPP_Polygon — Internal polygon shape for the nape physics engine.
2647
+ *
2648
+ * Extends ZPP_Shape (type=1). Manages vertex rings (local/world),
2649
+ * edge lists, validation, and polygon-specific physics calculations.
2650
+ *
2651
+ * Converted from nape-compiled.js lines 42176–43786.
2652
+ */
2653
+ type Any$E = any;
2654
+ declare class ZPP_Polygon {
2655
+ static __name__: string[];
2656
+ static __super__: Any$E;
2657
+ static _nape: Any$E;
2658
+ static _zpp: Any$E;
2659
+ static _initialized: boolean;
2660
+ outer_zn: Any$E;
2661
+ lverts: Any$E;
2662
+ wrap_lverts: Any$E;
2663
+ gverts: Any$E;
2664
+ wrap_gverts: Any$E;
2665
+ edges: Any$E;
2666
+ wrap_edges: Any$E;
2667
+ edgeCnt: number;
2668
+ reverse_flag: boolean;
2669
+ zip_lverts: boolean;
2670
+ zip_laxi: boolean;
2671
+ zip_gverts: boolean;
2672
+ zip_gaxi: boolean;
2673
+ zip_valid: boolean;
2674
+ zip_sanitation: boolean;
2675
+ validation: Any$E;
2676
+ __class__: Any$E;
2677
+ body: Any$E;
2678
+ type: number;
2679
+ circle: Any$E;
2680
+ polygon: Any$E;
2681
+ aabb: Any$E;
2682
+ localCOMx: number;
2683
+ localCOMy: number;
2684
+ worldCOMx: number;
2685
+ worldCOMy: number;
2686
+ zip_localCOM: boolean;
2687
+ zip_worldCOM: boolean;
2688
+ zip_aabb: boolean;
2689
+ zip_sweepRadius: boolean;
2690
+ zip_area_inertia: boolean;
2691
+ zip_angDrag: boolean;
2692
+ area: number;
2693
+ inertia: number;
2694
+ angDrag: number;
2695
+ sweepCoef: number;
2696
+ sweepRadius: number;
2697
+ material: Any$E;
2698
+ filter: Any$E;
2699
+ wrap_localCOM: Any$E;
2700
+ outer: Any$E;
2701
+ outer_i: Any$E;
2702
+ invalidate_area_inertia: () => void;
2703
+ invalidate_angDrag: () => void;
2704
+ invalidate_localCOM: () => void;
2705
+ invalidate_worldCOM: () => void;
2706
+ validate_area_inertia: () => void;
2707
+ validate_localCOM: () => void;
2708
+ immutable_midstep: (name: string) => void;
2709
+ wake: () => void;
2710
+ setMaterial: (m: Any$E) => void;
2711
+ setFilter: (f: Any$E) => void;
2712
+ insert_cbtype: (cb: Any$E) => void;
2713
+ constructor();
2714
+ static _init(): void;
2715
+ __clear(): void;
2716
+ lverts_pa_invalidate(_x: Any$E): void;
2717
+ lverts_pa_immutable(): void;
2718
+ gverts_pa_validate(): void;
2719
+ lverts_post_adder(x: Any$E): void;
2720
+ lverts_subber(x: Any$E): void;
2721
+ lverts_invalidate(_: Any$E): void;
2722
+ lverts_validate(): void;
2723
+ lverts_modifiable(): void;
2724
+ gverts_validate(): void;
2725
+ edges_validate(): void;
2726
+ getlverts(): void;
2727
+ getgverts(): void;
2728
+ getedges(): void;
2729
+ invalidate_lverts(): void;
2730
+ invalidate_laxi(): void;
2731
+ invalidate_gverts(): void;
2732
+ invalidate_gaxi(): void;
2733
+ validate_lverts(): void;
2734
+ validate_laxi(): void;
2735
+ validate_gverts(): void;
2736
+ validate_gaxi(): void;
2737
+ /** Internal helper: recompute world vertex positions from local verts + body transform */
2738
+ private _validateGverts;
2739
+ cleanup_lvert(x: Any$E): void;
2740
+ splice_collinear(): void;
2741
+ splice_collinear_real(): void;
2742
+ reverse_vertices(): void;
2743
+ valid(): Any$E;
2744
+ /** Helper: check if two edges (u1→v1) and (a→b) do NOT intersect */
2745
+ private _checkNoIntersection;
2746
+ __validate_aabb(): void;
2747
+ _force_validate_aabb(): void;
2748
+ __validate_sweepRadius(): void;
2749
+ __validate_area_inertia(): void;
2750
+ __validate_angDrag(): void;
2751
+ __validate_localCOM(): void;
2752
+ localCOM_validate(): void;
2753
+ localCOM_invalidate(x: Any$E): void;
2754
+ setupLocalCOM(): void;
2755
+ __translate(dx: number, dy: number): void;
2756
+ __scale(sx: number, sy: number): void;
2757
+ __rotate(ax: number, ay: number): void;
2758
+ __transform(mat: Any$E): void;
2759
+ __copy(): Any$E;
2760
+ }
2761
+
2762
+ type Any$D = any;
2544
2763
  /**
2545
2764
  * A convex polygon physics shape.
2546
2765
  *
2766
+ * Fully modernized — uses ZPP_Polygon directly (extracted to TypeScript).
2547
2767
  * Use the static helper methods (`box`, `rect`, `regular`) for common shapes.
2548
2768
  */
2549
2769
  declare class Polygon extends Shape {
2550
- constructor(vertices?: Vec2[] | NapeInner, material?: Material, filter?: InteractionFilter);
2770
+ static __name__: string[];
2771
+ static __super__: Any$D;
2772
+ /** Direct access to the extracted internal ZPP_Polygon. */
2773
+ zpp_inner_zn: ZPP_Polygon;
2774
+ constructor(localVerts?: Vec2[] | Any$D, material?: Material, filter?: InteractionFilter);
2551
2775
  /** @internal */
2552
2776
  static _wrap(inner: NapeInner): Polygon;
2553
- static box(width: number, height: number, weak?: boolean): NapeInner;
2554
- static rect(x: number, y: number, width: number, height: number, weak?: boolean): NapeInner;
2555
- static regular(xRadius: number, yRadius: number, sides: number, angle?: number, weak?: boolean): NapeInner;
2777
+ static rect(x: number, y: number, width: number, height: number, weak?: boolean): Vec2[];
2778
+ static box(width: number, height?: number, weak?: boolean): Vec2[];
2779
+ static regular(xRadius: number, yRadius: number, edgeCount: number, angleOffset?: number, weak?: boolean): Vec2[];
2556
2780
  /** Read-only list of local-space vertices. */
2557
- get localVerts(): NapeInner;
2781
+ get localVerts(): Any$D;
2558
2782
  /** Read-only list of world-space vertices (computed after stepping). */
2559
- get worldVerts(): NapeInner;
2783
+ get worldVerts(): Any$D;
2560
2784
  /** Read-only edge list. */
2561
- get edges(): NapeInner;
2785
+ get edges(): Any$D;
2562
2786
  /** Validate the polygon geometry. */
2563
- validity(): NapeInner;
2787
+ validity(): Any$D;
2788
+ /** @internal */ get_localVerts(): Any$D;
2789
+ /** @internal */ get_worldVerts(): Any$D;
2790
+ /** @internal */ get_edges(): Any$D;
2564
2791
  }
2565
2792
 
2566
2793
  /**
@@ -2571,44 +2798,44 @@ declare class Polygon extends Shape {
2571
2798
  *
2572
2799
  * Converted from nape-compiled.js lines 41828–42175.
2573
2800
  */
2574
- type Any$A = any;
2801
+ type Any$C = any;
2575
2802
  declare class ZPP_Edge {
2576
2803
  static __name__: string[];
2577
2804
  static zpp_pool: ZPP_Edge | null;
2578
2805
  static internal: boolean;
2579
- static _nape: Any$A;
2580
- static _zpp: Any$A;
2581
- static _wrapFn: ((zpp: ZPP_Edge) => Any$A) | null;
2806
+ static _nape: Any$C;
2807
+ static _zpp: Any$C;
2808
+ static _wrapFn: ((zpp: ZPP_Edge) => Any$C) | null;
2582
2809
  next: ZPP_Edge | null;
2583
- polygon: Any$A;
2584
- outer: Any$A;
2810
+ polygon: Any$C;
2811
+ outer: Any$C;
2585
2812
  lnormx: number;
2586
2813
  lnormy: number;
2587
- wrap_lnorm: Any$A;
2814
+ wrap_lnorm: Any$C;
2588
2815
  gnormx: number;
2589
2816
  gnormy: number;
2590
- wrap_gnorm: Any$A;
2817
+ wrap_gnorm: Any$C;
2591
2818
  length: number;
2592
2819
  lprojection: number;
2593
2820
  gprojection: number;
2594
- lp0: Any$A;
2595
- gp0: Any$A;
2596
- lp1: Any$A;
2597
- gp1: Any$A;
2821
+ lp0: Any$C;
2822
+ gp0: Any$C;
2823
+ lp1: Any$C;
2824
+ gp1: Any$C;
2598
2825
  tp0: number;
2599
2826
  tp1: number;
2600
- __class__: Any$A;
2827
+ __class__: Any$C;
2601
2828
  constructor();
2602
2829
  free(): void;
2603
2830
  alloc(): void;
2604
- wrapper(): Any$A;
2831
+ wrapper(): Any$C;
2605
2832
  lnorm_validate(): void;
2606
2833
  gnorm_validate(): void;
2607
2834
  getlnorm(): void;
2608
2835
  getgnorm(): void;
2609
2836
  }
2610
2837
 
2611
- type Any$z = any;
2838
+ type Any$B = any;
2612
2839
  /**
2613
2840
  * An edge of a polygon shape.
2614
2841
  *
@@ -2623,9 +2850,9 @@ declare class Edge {
2623
2850
  zpp_inner: ZPP_Edge;
2624
2851
  constructor();
2625
2852
  /** @internal */
2626
- static _wrap(inner: Any$z): Edge;
2853
+ static _wrap(inner: Any$B): Edge;
2627
2854
  /** Parent polygon (as compiled Polygon wrapper). */
2628
- get polygon(): Any$z;
2855
+ get polygon(): Any$B;
2629
2856
  /** Local-space normal vector (immutable Vec2). */
2630
2857
  get localNormal(): Vec2;
2631
2858
  /** World-space normal vector (immutable Vec2). Requires polygon in a body. */
@@ -2724,17 +2951,17 @@ declare class ArbiterType {
2724
2951
  *
2725
2952
  * Converted from nape-compiled.js lines 29044–29362, 80738–80766.
2726
2953
  */
2727
- type Any$y = any;
2954
+ type Any$A = any;
2728
2955
  declare class ZPP_Arbiter {
2729
2956
  static __name__: string[];
2730
- static _nape: Any$y;
2731
- static _zpp: Any$y;
2957
+ static _nape: Any$A;
2958
+ static _zpp: Any$A;
2732
2959
  static internal: boolean;
2733
2960
  static COL: number;
2734
2961
  static FLUID: number;
2735
2962
  static SENSOR: number;
2736
- static types: Any$y[];
2737
- outer: Any$y;
2963
+ static types: Any$A[];
2964
+ outer: Any$A;
2738
2965
  hnext: ZPP_Arbiter | null;
2739
2966
  id: number;
2740
2967
  di: number;
@@ -2752,31 +2979,31 @@ declare class ZPP_Arbiter {
2752
2979
  fresh: boolean;
2753
2980
  immState: number;
2754
2981
  invalidated: boolean;
2755
- b1: Any$y;
2756
- b2: Any$y;
2757
- ws1: Any$y;
2758
- ws2: Any$y;
2759
- pair: Any$y;
2982
+ b1: Any$A;
2983
+ b2: Any$A;
2984
+ ws1: Any$A;
2985
+ ws2: Any$A;
2986
+ pair: Any$A;
2760
2987
  type: number;
2761
- colarb: Any$y;
2762
- fluidarb: Any$y;
2763
- sensorarb: Any$y;
2764
- __class__: Any$y;
2988
+ colarb: Any$A;
2989
+ fluidarb: Any$A;
2990
+ sensorarb: Any$A;
2991
+ __class__: Any$A;
2765
2992
  constructor();
2766
- wrapper(): Any$y;
2993
+ wrapper(): Any$A;
2767
2994
  inactiveme(): boolean;
2768
2995
  acting(): boolean;
2769
2996
  swap_features(): void;
2770
- lazyRetire(s: Any$y, b: Any$y): void;
2771
- sup_assign(s1: Any$y, s2: Any$y, id: number, di: number): void;
2997
+ lazyRetire(s: Any$A, b: Any$A): void;
2998
+ sup_assign(s1: Any$A, s2: Any$A, id: number, di: number): void;
2772
2999
  sup_retire(): void;
2773
3000
  /** Remove this arbiter from a ZNPList_ZPP_Arbiter */
2774
- static _removeFromArbiterList(list: Any$y, arb: ZPP_Arbiter, zpp: Any$y): void;
3001
+ static _removeFromArbiterList(list: Any$A, arb: ZPP_Arbiter, zpp: Any$A): void;
2775
3002
  /** Add this arbiter to a ZNPList_ZPP_Arbiter */
2776
- static _addToArbiterList(list: Any$y, arb: ZPP_Arbiter, zpp: Any$y): void;
3003
+ static _addToArbiterList(list: Any$A, arb: ZPP_Arbiter, zpp: Any$A): void;
2777
3004
  }
2778
3005
 
2779
- type Any$x = any;
3006
+ type Any$z = any;
2780
3007
  /**
2781
3008
  * Represents an interaction arbiter between two shapes.
2782
3009
  *
@@ -2795,21 +3022,21 @@ declare class Arbiter {
2795
3022
  /** Whether this arbiter is currently sleeping. */
2796
3023
  get isSleeping(): boolean;
2797
3024
  /** The type of this arbiter (COLLISION, SENSOR, or FLUID). */
2798
- get type(): Any$x;
3025
+ get type(): Any$z;
2799
3026
  /** Cast to CollisionArbiter if this is a collision, else null. */
2800
- get collisionArbiter(): Any$x;
3027
+ get collisionArbiter(): Any$z;
2801
3028
  /** Cast to FluidArbiter if this is a fluid interaction, else null. */
2802
- get fluidArbiter(): Any$x;
3029
+ get fluidArbiter(): Any$z;
2803
3030
  /** First shape (lower id). */
2804
- get shape1(): Any$x;
3031
+ get shape1(): Any$z;
2805
3032
  /** Second shape (higher id). */
2806
- get shape2(): Any$x;
3033
+ get shape2(): Any$z;
2807
3034
  /** Body of shape1. */
2808
- get body1(): Any$x;
3035
+ get body1(): Any$z;
2809
3036
  /** Body of shape2. */
2810
- get body2(): Any$x;
3037
+ get body2(): Any$z;
2811
3038
  /** The pre-handler state of this arbiter. */
2812
- get state(): Any$x;
3039
+ get state(): Any$z;
2813
3040
  /** Whether this is a collision arbiter. */
2814
3041
  isCollisionArbiter(): boolean;
2815
3042
  /** Whether this is a fluid arbiter. */
@@ -2820,15 +3047,15 @@ declare class Arbiter {
2820
3047
  * Total impulse of this arbiter. Base implementation returns Vec3(0,0,0).
2821
3048
  * Overridden by CollisionArbiter and FluidArbiter.
2822
3049
  */
2823
- totalImpulse(body?: Any$x, _freshOnly?: boolean): Vec3;
3050
+ totalImpulse(body?: Any$z, _freshOnly?: boolean): Vec3;
2824
3051
  toString(): string;
2825
3052
  /** @internal */
2826
3053
  protected _activeCheck(): void;
2827
3054
  /** @internal */
2828
- protected _checkBody(body: Any$x): void;
3055
+ protected _checkBody(body: Any$z): void;
2829
3056
  }
2830
3057
 
2831
- type Any$w = any;
3058
+ type Any$y = any;
2832
3059
  /**
2833
3060
  * A collision arbiter between two shapes in contact.
2834
3061
  *
@@ -2842,15 +3069,15 @@ declare class CollisionArbiter extends Arbiter {
2842
3069
  static __super__: typeof Arbiter;
2843
3070
  constructor();
2844
3071
  /** Contact points for this collision. */
2845
- get contacts(): Any$w;
3072
+ get contacts(): Any$y;
2846
3073
  /** Collision normal vector. */
2847
- get normal(): Any$w;
3074
+ get normal(): Any$y;
2848
3075
  /** Sum of the radii of the two shapes at the collision point. */
2849
3076
  get radius(): number;
2850
3077
  /** Reference edge of shape1 (if polygon), or null. */
2851
- get referenceEdge1(): Any$w;
3078
+ get referenceEdge1(): Any$y;
2852
3079
  /** Reference edge of shape2 (if polygon), or null. */
2853
- get referenceEdge2(): Any$w;
3080
+ get referenceEdge2(): Any$y;
2854
3081
  /** Coefficient of restitution (elasticity). Mutable in pre-handler only. */
2855
3082
  get elasticity(): number;
2856
3083
  set elasticity(value: number);
@@ -2868,20 +3095,20 @@ declare class CollisionArbiter extends Arbiter {
2868
3095
  /** Whether the second contact point lies on a polygon vertex (poly-circle only). */
2869
3096
  secondVertex(): boolean;
2870
3097
  /** Normal impulse accumulated across all contacts. */
2871
- normalImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
3098
+ normalImpulse(body?: Any$y, freshOnly?: boolean): Vec3;
2872
3099
  /** Tangent (friction) impulse accumulated across all contacts. */
2873
- tangentImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
3100
+ tangentImpulse(body?: Any$y, freshOnly?: boolean): Vec3;
2874
3101
  /** Total impulse (normal + tangent + rolling) accumulated across all contacts. */
2875
- totalImpulse(body?: Any$w, freshOnly?: boolean): Vec3;
3102
+ totalImpulse(body?: Any$y, freshOnly?: boolean): Vec3;
2876
3103
  /** Rolling impulse for this collision. */
2877
- rollingImpulse(body?: Any$w, freshOnly?: boolean): number;
3104
+ rollingImpulse(body?: Any$y, freshOnly?: boolean): number;
2878
3105
  /** @internal Throw if not in pre-handler mutable window. */
2879
3106
  private _mutableCheck;
2880
3107
  /** @internal Accumulate impulse from contacts. */
2881
3108
  private _accumulateImpulse;
2882
3109
  }
2883
3110
 
2884
- type Any$v = any;
3111
+ type Any$x = any;
2885
3112
  /**
2886
3113
  * A fluid arbiter between two shapes with fluid interaction.
2887
3114
  *
@@ -2901,14 +3128,14 @@ declare class FluidArbiter extends Arbiter {
2901
3128
  get overlap(): number;
2902
3129
  set overlap(value: number);
2903
3130
  /** Buoyancy impulse applied by this fluid arbiter. */
2904
- buoyancyImpulse(body?: Any$v): Vec3;
3131
+ buoyancyImpulse(body?: Any$x): Vec3;
2905
3132
  /** Drag impulse applied by this fluid arbiter. */
2906
- dragImpulse(body?: Any$v): Vec3;
3133
+ dragImpulse(body?: Any$x): Vec3;
2907
3134
  /** Total impulse (buoyancy + drag). */
2908
- totalImpulse(body?: Any$v, _freshOnly?: boolean): Vec3;
3135
+ totalImpulse(body?: Any$x, _freshOnly?: boolean): Vec3;
2909
3136
  }
2910
3137
 
2911
- type Any$u = any;
3138
+ type Any$w = any;
2912
3139
  /**
2913
3140
  * Represents a contact point between two colliding shapes.
2914
3141
  *
@@ -2925,7 +3152,7 @@ declare class Contact {
2925
3152
  get _inner(): NapeInner;
2926
3153
  constructor();
2927
3154
  /** The collision arbiter this contact belongs to, or null. */
2928
- get arbiter(): Any$u;
3155
+ get arbiter(): Any$w;
2929
3156
  /** Penetration depth of this contact (positive = overlapping). */
2930
3157
  get penetration(): number;
2931
3158
  /** World-space position of this contact point. */
@@ -2939,25 +3166,25 @@ declare class Contact {
2939
3166
  * @param body - If null, returns world-frame impulse. Otherwise returns
2940
3167
  * impulse on the given body (must be one of the two in contact).
2941
3168
  */
2942
- normalImpulse(body?: Any$u): Vec3;
3169
+ normalImpulse(body?: Any$w): Vec3;
2943
3170
  /**
2944
3171
  * Tangent impulse at this contact point.
2945
3172
  * @param body - If null, returns world-frame impulse. Otherwise returns
2946
3173
  * impulse on the given body.
2947
3174
  */
2948
- tangentImpulse(body?: Any$u): Vec3;
3175
+ tangentImpulse(body?: Any$w): Vec3;
2949
3176
  /**
2950
3177
  * Rolling impulse at this contact point.
2951
3178
  * @param body - If null, returns total rolling impulse. Otherwise returns
2952
3179
  * rolling impulse on the given body.
2953
3180
  */
2954
- rollingImpulse(body?: Any$u): number;
3181
+ rollingImpulse(body?: Any$w): number;
2955
3182
  /**
2956
3183
  * Total impulse (normal + tangent + rolling) at this contact point.
2957
3184
  * @param body - If null, returns world-frame impulse. Otherwise returns
2958
3185
  * impulse on the given body.
2959
3186
  */
2960
- totalImpulse(body?: Any$u): Vec3;
3187
+ totalImpulse(body?: Any$w): Vec3;
2961
3188
  toString(): string;
2962
3189
  /** @internal */
2963
3190
  private _inactiveCheck;
@@ -2965,6 +3192,39 @@ declare class Contact {
2965
3192
  private _checkBody;
2966
3193
  }
2967
3194
 
3195
+ /**
3196
+ * Callback event types.
3197
+ *
3198
+ * - `BEGIN` — interaction just started
3199
+ * - `ONGOING` — interaction continues
3200
+ * - `END` — interaction just ended
3201
+ * - `WAKE` — body/constraint woke up
3202
+ * - `SLEEP` — body/constraint went to sleep
3203
+ * - `BREAK` — constraint was broken
3204
+ * - `PRE` — pre-interaction callback
3205
+ *
3206
+ * Converted from nape-compiled.js lines 516–657.
3207
+ */
3208
+ declare class CbEvent {
3209
+ static __name__: string[];
3210
+ constructor();
3211
+ static get BEGIN(): CbEvent;
3212
+ static get ONGOING(): CbEvent;
3213
+ static get END(): CbEvent;
3214
+ static get WAKE(): CbEvent;
3215
+ static get SLEEP(): CbEvent;
3216
+ static get BREAK(): CbEvent;
3217
+ static get PRE(): CbEvent;
3218
+ static get_BEGIN(): CbEvent;
3219
+ static get_ONGOING(): CbEvent;
3220
+ static get_END(): CbEvent;
3221
+ static get_WAKE(): CbEvent;
3222
+ static get_SLEEP(): CbEvent;
3223
+ static get_BREAK(): CbEvent;
3224
+ static get_PRE(): CbEvent;
3225
+ toString(): string;
3226
+ }
3227
+
2968
3228
  /**
2969
3229
  * ZPP_CbType — Internal callback type for the nape physics engine.
2970
3230
  *
@@ -2974,41 +3234,41 @@ declare class Contact {
2974
3234
  *
2975
3235
  * Converted from nape-compiled.js lines 48256–48482.
2976
3236
  */
2977
- type Any$t = any;
3237
+ type Any$v = any;
2978
3238
  declare class ZPP_CbType {
2979
3239
  static __name__: string[];
2980
- static _zpp: Any$t;
2981
- outer: Any$t;
2982
- userData: Any$t;
3240
+ static _zpp: Any$v;
3241
+ outer: Any$v;
3242
+ userData: Any$v;
2983
3243
  id: number;
2984
- cbsets: Any$t;
2985
- interactors: Any$t;
2986
- wrap_interactors: Any$t;
2987
- constraints: Any$t;
2988
- wrap_constraints: Any$t;
2989
- listeners: Any$t;
2990
- bodylisteners: Any$t;
2991
- conlisteners: Any$t;
2992
- __class__: Any$t;
3244
+ cbsets: Any$v;
3245
+ interactors: Any$v;
3246
+ wrap_interactors: Any$v;
3247
+ constraints: Any$v;
3248
+ wrap_constraints: Any$v;
3249
+ listeners: Any$v;
3250
+ bodylisteners: Any$v;
3251
+ conlisteners: Any$v;
3252
+ __class__: Any$v;
2993
3253
  constructor();
2994
3254
  /** Sort comparator by id. */
2995
3255
  static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
2996
- addInteractor(intx: Any$t): void;
2997
- remInteractor(intx: Any$t): void;
2998
- addConstraint(con: Any$t): void;
2999
- remConstraint(con: Any$t): void;
3000
- addint(x: Any$t): void;
3001
- removeint(x: Any$t): void;
3256
+ addInteractor(intx: Any$v): void;
3257
+ remInteractor(intx: Any$v): void;
3258
+ addConstraint(con: Any$v): void;
3259
+ remConstraint(con: Any$v): void;
3260
+ addint(x: Any$v): void;
3261
+ removeint(x: Any$v): void;
3002
3262
  invalidateint(): void;
3003
- addbody(x: Any$t): void;
3004
- removebody(x: Any$t): void;
3263
+ addbody(x: Any$v): void;
3264
+ removebody(x: Any$v): void;
3005
3265
  invalidatebody(): void;
3006
- addconstraint(x: Any$t): void;
3007
- removeconstraint(x: Any$t): void;
3266
+ addconstraint(x: Any$v): void;
3267
+ removeconstraint(x: Any$v): void;
3008
3268
  invalidateconstraint(): void;
3009
3269
  }
3010
3270
 
3011
- type Any$s = any;
3271
+ type Any$u = any;
3012
3272
  /**
3013
3273
  * Callback type — used to tag interactors so that listeners
3014
3274
  * can filter which interactions they respond to.
@@ -3029,11 +3289,11 @@ declare class CbType {
3029
3289
  static get_ANY_SHAPE(): CbType;
3030
3290
  static get_ANY_COMPOUND(): CbType;
3031
3291
  get id(): number;
3032
- get userData(): Any$s;
3033
- get interactors(): Any$s;
3034
- get constraints(): Any$s;
3035
- including(includes: Any$s): Any$s;
3036
- excluding(excludes: Any$s): Any$s;
3292
+ get userData(): Any$u;
3293
+ get interactors(): Any$u;
3294
+ get constraints(): Any$u;
3295
+ including(includes: Any$u): Any$u;
3296
+ excluding(excludes: Any$u): Any$u;
3037
3297
  toString(): string;
3038
3298
  static _wrap(inner: any): CbType;
3039
3299
  }
@@ -3094,37 +3354,37 @@ declare class PreFlag {
3094
3354
  *
3095
3355
  * Converted from nape-compiled.js lines 51337–51655.
3096
3356
  */
3097
- type Any$r = any;
3357
+ type Any$t = any;
3098
3358
  declare class ZPP_OptionType {
3099
3359
  static __name__: string[];
3100
- static _nape: Any$r;
3101
- static _zpp: Any$r;
3102
- outer: Any$r;
3103
- handler: ((val: Any$r, included: boolean, added: boolean) => void) | null;
3104
- includes: Any$r;
3105
- excludes: Any$r;
3106
- wrap_includes: Any$r;
3107
- wrap_excludes: Any$r;
3108
- __class__: Any$r;
3360
+ static _nape: Any$t;
3361
+ static _zpp: Any$t;
3362
+ outer: Any$t;
3363
+ handler: ((val: Any$t, included: boolean, added: boolean) => void) | null;
3364
+ includes: Any$t;
3365
+ excludes: Any$t;
3366
+ wrap_includes: Any$t;
3367
+ wrap_excludes: Any$t;
3368
+ __class__: Any$t;
3109
3369
  constructor();
3110
3370
  /** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
3111
- static argument(val: Any$r): Any$r;
3371
+ static argument(val: Any$t): Any$t;
3112
3372
  setup_includes(): void;
3113
3373
  setup_excludes(): void;
3114
- excluded(xs: Any$r): boolean;
3115
- included(xs: Any$r): boolean;
3116
- compatible(xs: Any$r): boolean;
3374
+ excluded(xs: Any$t): boolean;
3375
+ included(xs: Any$t): boolean;
3376
+ compatible(xs: Any$t): boolean;
3117
3377
  /** Check whether two sorted-by-id lists share any element. */
3118
- nonemptyintersection(xs: Any$r, ys: Any$r): boolean;
3378
+ nonemptyintersection(xs: Any$t, ys: Any$t): boolean;
3119
3379
  /** Insert into the ordered include or exclude list, using pool nodes. */
3120
3380
  private insertOrdered;
3121
- effect_change(val: Any$r, included: boolean, added: boolean): void;
3122
- append_type(list: Any$r, val: Any$r): void;
3381
+ effect_change(val: Any$t, included: boolean, added: boolean): void;
3382
+ append_type(list: Any$t, val: Any$t): void;
3123
3383
  set(options: ZPP_OptionType): this;
3124
- append(list: Any$r, val: Any$r): void;
3384
+ append(list: Any$t, val: Any$t): void;
3125
3385
  }
3126
3386
 
3127
- type Any$q = any;
3387
+ type Any$s = any;
3128
3388
  /**
3129
3389
  * Composite callback option type — allows including and excluding CbTypes.
3130
3390
  *
@@ -3134,17 +3394,103 @@ declare class OptionType {
3134
3394
  static __name__: string[];
3135
3395
  zpp_inner: ZPP_OptionType;
3136
3396
  get _inner(): NapeInner;
3137
- constructor(includes?: Any$q, excludes?: Any$q);
3138
- get includes(): Any$q;
3139
- get excludes(): Any$q;
3140
- get_includes(): Any$q;
3141
- get_excludes(): Any$q;
3142
- including(includes: Any$q): this;
3143
- excluding(excludes: Any$q): this;
3397
+ constructor(includes?: Any$s, excludes?: Any$s);
3398
+ get includes(): Any$s;
3399
+ get excludes(): Any$s;
3400
+ get_includes(): Any$s;
3401
+ get_excludes(): Any$s;
3402
+ including(includes: Any$s): this;
3403
+ excluding(excludes: Any$s): this;
3144
3404
  toString(): string;
3145
3405
  static _wrap(inner: any): OptionType;
3146
3406
  }
3147
3407
 
3408
+ /**
3409
+ * ZPP_Listener — Internal listener base class for the nape physics engine.
3410
+ *
3411
+ * Base class for ZPP_BodyListener, ZPP_ConstraintListener, and
3412
+ * ZPP_InteractionListener. Holds common properties (space, precedence,
3413
+ * event type, listener type) and provides stub methods for subclass override.
3414
+ *
3415
+ * Converted from nape-compiled.js lines 27259–27304, 112053–112139.
3416
+ */
3417
+ type Any$r = any;
3418
+ declare class ZPP_Listener {
3419
+ static __name__: string[];
3420
+ static _nape: Any$r;
3421
+ static _zpp: Any$r;
3422
+ static internal: boolean;
3423
+ static types: Any$r[];
3424
+ static events: Any$r[];
3425
+ space: Any$r;
3426
+ interaction: Any$r;
3427
+ constraint: Any$r;
3428
+ body: Any$r;
3429
+ precedence: number;
3430
+ event: number;
3431
+ type: number;
3432
+ id: number;
3433
+ outer: Any$r;
3434
+ __class__: Any$r;
3435
+ constructor();
3436
+ /** Sort comparator: higher precedence first, then by id descending. */
3437
+ static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
3438
+ swapEvent(_event?: number): void;
3439
+ invalidate_precedence(): void;
3440
+ addedToSpace(): void;
3441
+ removedFromSpace(): void;
3442
+ }
3443
+
3444
+ /**
3445
+ * Listener type classification.
3446
+ *
3447
+ * - `BODY` — body event listener
3448
+ * - `CONSTRAINT` — constraint event listener
3449
+ * - `INTERACTION` — interaction event listener
3450
+ * - `PRE` — pre-interaction listener
3451
+ *
3452
+ * Converted from nape-compiled.js lines 2554–2646.
3453
+ */
3454
+ declare class ListenerType {
3455
+ static __name__: string[];
3456
+ static BODY: ListenerType | null;
3457
+ static CONSTRAINT: ListenerType | null;
3458
+ static INTERACTION: ListenerType | null;
3459
+ static PRE: ListenerType | null;
3460
+ constructor();
3461
+ static get_BODY(): ListenerType;
3462
+ static get_CONSTRAINT(): ListenerType;
3463
+ static get_INTERACTION(): ListenerType;
3464
+ static get_PRE(): ListenerType;
3465
+ toString(): string;
3466
+ }
3467
+
3468
+ /**
3469
+ * Listener — Base class for all physics event listeners.
3470
+ *
3471
+ * Provides common properties (type, event, precedence, space) and
3472
+ * toString() for all listener subclasses.
3473
+ *
3474
+ * Fully modernized from nape-compiled.js lines 231–433.
3475
+ */
3476
+
3477
+ type Any$q = any;
3478
+ declare class Listener {
3479
+ static __name__: string[];
3480
+ zpp_inner: ZPP_Listener;
3481
+ get _inner(): Any$q;
3482
+ constructor();
3483
+ static _wrap(inner: Any$q): Listener;
3484
+ get type(): ListenerType;
3485
+ get event(): CbEvent;
3486
+ set event(event: CbEvent);
3487
+ get precedence(): number;
3488
+ set precedence(precedence: number);
3489
+ get space(): Space | null;
3490
+ set space(space: Space | Any$q | null);
3491
+ toString(): string;
3492
+ }
3493
+
3148
3494
  /**
3149
3495
  * ZPP_BodyListener — Internal body listener for the nape physics engine.
3150
3496
  *
@@ -3324,62 +3670,7 @@ declare class PreListener extends Listener {
3324
3670
  set interactionType(interactionType: InteractionType | null);
3325
3671
  }
3326
3672
 
3327
- /**
3328
- * ZPP_Callback — Internal callback data holder for the nape physics engine.
3329
- *
3330
- * Stores callback event information (listener, event type, interactors, etc.)
3331
- * and forms a doubly-linked list for callback queue management.
3332
- *
3333
- * Converted from nape-compiled.js lines 44587–44794, 133299–133300.
3334
- */
3335
3673
  type Any$i = any;
3336
- declare class ZPP_Callback {
3337
- static __name__: string[];
3338
- static _nape: Any$i;
3339
- static _zpp: Any$i;
3340
- static internal: boolean;
3341
- static zpp_pool: ZPP_Callback | null;
3342
- outer_body: Any$i;
3343
- outer_con: Any$i;
3344
- outer_int: Any$i;
3345
- event: number;
3346
- listener: Any$i;
3347
- space: Any$i;
3348
- index: number;
3349
- next: ZPP_Callback | null;
3350
- prev: ZPP_Callback | null;
3351
- length: number;
3352
- int1: Any$i;
3353
- int2: Any$i;
3354
- set: Any$i;
3355
- wrap_arbiters: Any$i;
3356
- pre_arbiter: Any$i;
3357
- pre_swapped: boolean;
3358
- body: Any$i;
3359
- constraint: Any$i;
3360
- __class__: Any$i;
3361
- wrapper_body(): Any$i;
3362
- wrapper_con(): Any$i;
3363
- wrapper_int(): Any$i;
3364
- push(obj: ZPP_Callback): void;
3365
- push_rev(obj: ZPP_Callback): void;
3366
- pop(): ZPP_Callback;
3367
- pop_rev(): ZPP_Callback;
3368
- empty(): boolean;
3369
- clear(): void;
3370
- splice(o: ZPP_Callback): ZPP_Callback | null;
3371
- rotateL(): void;
3372
- rotateR(): void;
3373
- cycleNext(o: ZPP_Callback): ZPP_Callback | null;
3374
- cyclePrev(o: ZPP_Callback): ZPP_Callback | null;
3375
- at(i: number): ZPP_Callback;
3376
- rev_at(i: number): ZPP_Callback;
3377
- free(): void;
3378
- alloc(): void;
3379
- genarbs(): void;
3380
- }
3381
-
3382
- type Any$h = any;
3383
3674
  /**
3384
3675
  * Base class for all physics engine callbacks.
3385
3676
  *
@@ -3392,12 +3683,12 @@ declare class Callback {
3392
3683
  static __name__: string[];
3393
3684
  zpp_inner: ZPP_Callback | null;
3394
3685
  constructor();
3395
- get event(): Any$h;
3396
- get listener(): Any$h;
3686
+ get event(): Any$i;
3687
+ get listener(): Any$i;
3397
3688
  toString(): string;
3398
3689
  }
3399
3690
 
3400
- type Any$g = any;
3691
+ type Any$h = any;
3401
3692
  /**
3402
3693
  * Callback for body events (WAKE/SLEEP).
3403
3694
  *
@@ -3407,11 +3698,11 @@ type Any$g = any;
3407
3698
  */
3408
3699
  declare class BodyCallback extends Callback {
3409
3700
  static __name__: string[];
3410
- get body(): Any$g;
3701
+ get body(): Any$h;
3411
3702
  toString(): string;
3412
3703
  }
3413
3704
 
3414
- type Any$f = any;
3705
+ type Any$g = any;
3415
3706
  /**
3416
3707
  * Callback for constraint events (WAKE/SLEEP/BREAK).
3417
3708
  *
@@ -3421,11 +3712,11 @@ type Any$f = any;
3421
3712
  */
3422
3713
  declare class ConstraintCallback extends Callback {
3423
3714
  static __name__: string[];
3424
- get constraint(): Any$f;
3715
+ get constraint(): Any$g;
3425
3716
  toString(): string;
3426
3717
  }
3427
3718
 
3428
- type Any$e = any;
3719
+ type Any$f = any;
3429
3720
  /**
3430
3721
  * Callback for interaction events (BEGIN/END/ONGOING).
3431
3722
  *
@@ -3435,13 +3726,13 @@ type Any$e = any;
3435
3726
  */
3436
3727
  declare class InteractionCallback extends Callback {
3437
3728
  static __name__: string[];
3438
- get int1(): Any$e;
3439
- get int2(): Any$e;
3440
- get arbiters(): Any$e;
3729
+ get int1(): Any$f;
3730
+ get int2(): Any$f;
3731
+ get arbiters(): Any$f;
3441
3732
  toString(): string;
3442
3733
  }
3443
3734
 
3444
- type Any$d = any;
3735
+ type Any$e = any;
3445
3736
  /**
3446
3737
  * Callback for pre-interaction events.
3447
3738
  *
@@ -3451,9 +3742,9 @@ type Any$d = any;
3451
3742
  */
3452
3743
  declare class PreCallback extends Callback {
3453
3744
  static __name__: string[];
3454
- get arbiter(): Any$d;
3455
- get int1(): Any$d;
3456
- get int2(): Any$d;
3745
+ get arbiter(): Any$e;
3746
+ get int1(): Any$e;
3747
+ get int2(): Any$e;
3457
3748
  get swapped(): boolean;
3458
3749
  toString(): string;
3459
3750
  }
@@ -3468,24 +3759,24 @@ declare class PreCallback extends Callback {
3468
3759
  * Converted from nape-compiled.js lines 24611–25474.
3469
3760
  */
3470
3761
 
3471
- type Any$c = any;
3762
+ type Any$d = any;
3472
3763
  declare class ZPP_PivotJoint extends ZPP_Constraint {
3473
3764
  static __name__: string[];
3474
3765
  static __super__: typeof ZPP_Constraint;
3475
- static _wrapFn: ((zpp: ZPP_PivotJoint) => Any$c) | null;
3476
- outer_zn: Any$c;
3477
- b1: Any$c;
3478
- b2: Any$c;
3766
+ static _wrapFn: ((zpp: ZPP_PivotJoint) => Any$d) | null;
3767
+ outer_zn: Any$d;
3768
+ b1: Any$d;
3769
+ b2: Any$d;
3479
3770
  a1localx: number;
3480
3771
  a1localy: number;
3481
3772
  a1relx: number;
3482
3773
  a1rely: number;
3483
- wrap_a1: Any$c;
3774
+ wrap_a1: Any$d;
3484
3775
  a2localx: number;
3485
3776
  a2localy: number;
3486
3777
  a2relx: number;
3487
3778
  a2rely: number;
3488
- wrap_a2: Any$c;
3779
+ wrap_a2: Any$d;
3489
3780
  kMassa: number;
3490
3781
  kMassb: number;
3491
3782
  kMassc: number;
@@ -3496,18 +3787,18 @@ declare class ZPP_PivotJoint extends ZPP_Constraint {
3496
3787
  biasx: number;
3497
3788
  biasy: number;
3498
3789
  stepped: boolean;
3499
- __class__: Any$c;
3790
+ __class__: Any$d;
3500
3791
  constructor();
3501
- bodyImpulse(b: Any$c): Any$c;
3792
+ bodyImpulse(b: Any$d): Any$d;
3502
3793
  activeBodies(): void;
3503
3794
  inactiveBodies(): void;
3504
3795
  validate_a1(): void;
3505
- invalidate_a1(x: Any$c): void;
3796
+ invalidate_a1(x: Any$d): void;
3506
3797
  setup_a1(): void;
3507
3798
  validate_a2(): void;
3508
- invalidate_a2(x: Any$c): void;
3799
+ invalidate_a2(x: Any$d): void;
3509
3800
  setup_a2(): void;
3510
- copy(dict: Any$c, todo: Any$c): Any$c;
3801
+ copy(dict: Any$d, todo: Any$d): Any$d;
3511
3802
  validate(): void;
3512
3803
  wake_connected(): void;
3513
3804
  forest(): void;
@@ -3517,10 +3808,10 @@ declare class ZPP_PivotJoint extends ZPP_Constraint {
3517
3808
  warmStart(): void;
3518
3809
  applyImpulseVel(): boolean;
3519
3810
  applyImpulsePos(): boolean;
3520
- draw(_g: Any$c): void;
3811
+ draw(_g: Any$d): void;
3521
3812
  }
3522
3813
 
3523
- type Any$b = any;
3814
+ type Any$c = any;
3524
3815
  /**
3525
3816
  * A pivot (pin) joint that constrains two bodies to share an anchor point.
3526
3817
  *
@@ -3530,7 +3821,7 @@ declare class PivotJoint extends Constraint {
3530
3821
  zpp_inner: ZPP_PivotJoint;
3531
3822
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2);
3532
3823
  /** @internal */
3533
- static _wrap(inner: Any$b): PivotJoint;
3824
+ static _wrap(inner: Any$c): PivotJoint;
3534
3825
  get body1(): Body;
3535
3826
  set body1(value: Body | null);
3536
3827
  /** @internal */
@@ -3543,17 +3834,17 @@ declare class PivotJoint extends Constraint {
3543
3834
  set anchor1(value: Vec2);
3544
3835
  get anchor2(): Vec2;
3545
3836
  set anchor2(value: Vec2);
3546
- impulse(): Any$b;
3547
- bodyImpulse(body: Body): Any$b;
3837
+ impulse(): Any$c;
3838
+ bodyImpulse(body: Body): Any$c;
3548
3839
  visitBodies(lambda: (body: Body) => void): void;
3549
- /** @internal */ get_body1(): Any$b;
3550
- /** @internal */ set_body1(v: Any$b): Any$b;
3551
- /** @internal */ get_body2(): Any$b;
3552
- /** @internal */ set_body2(v: Any$b): Any$b;
3553
- /** @internal */ get_anchor1(): Any$b;
3554
- /** @internal */ set_anchor1(v: Any$b): Any$b;
3555
- /** @internal */ get_anchor2(): Any$b;
3556
- /** @internal */ set_anchor2(v: Any$b): Any$b;
3840
+ /** @internal */ get_body1(): Any$c;
3841
+ /** @internal */ set_body1(v: Any$c): Any$c;
3842
+ /** @internal */ get_body2(): Any$c;
3843
+ /** @internal */ set_body2(v: Any$c): Any$c;
3844
+ /** @internal */ get_anchor1(): Any$c;
3845
+ /** @internal */ set_anchor1(v: Any$c): Any$c;
3846
+ /** @internal */ get_anchor2(): Any$c;
3847
+ /** @internal */ set_anchor2(v: Any$c): Any$c;
3557
3848
  /** @internal backward compat alias for zpp_inner */
3558
3849
  get zpp_inner_zn(): ZPP_PivotJoint;
3559
3850
  set zpp_inner_zn(v: ZPP_PivotJoint);
@@ -3569,12 +3860,12 @@ declare class PivotJoint extends Constraint {
3569
3860
  * Converted from nape-compiled.js lines 22329–23204.
3570
3861
  */
3571
3862
 
3572
- type Any$a = any;
3863
+ type Any$b = any;
3573
3864
  declare class ZPP_DistanceJoint extends ZPP_Constraint {
3574
3865
  static __name__: string[];
3575
3866
  static __super__: typeof ZPP_Constraint;
3576
- static _wrapFn: ((zpp: ZPP_DistanceJoint) => Any$a) | null;
3577
- outer_zn: Any$a;
3867
+ static _wrapFn: ((zpp: ZPP_DistanceJoint) => Any$b) | null;
3868
+ outer_zn: Any$b;
3578
3869
  jointMin: number;
3579
3870
  jointMax: number;
3580
3871
  slack: boolean;
@@ -3583,8 +3874,8 @@ declare class ZPP_DistanceJoint extends ZPP_Constraint {
3583
3874
  ny: number;
3584
3875
  cx1: number;
3585
3876
  cx2: number;
3586
- b1: Any$a;
3587
- b2: Any$a;
3877
+ b1: Any$b;
3878
+ b2: Any$b;
3588
3879
  a1localx: number;
3589
3880
  a1localy: number;
3590
3881
  a1relx: number;
@@ -3593,27 +3884,27 @@ declare class ZPP_DistanceJoint extends ZPP_Constraint {
3593
3884
  a2localy: number;
3594
3885
  a2relx: number;
3595
3886
  a2rely: number;
3596
- wrap_a1: Any$a;
3597
- wrap_a2: Any$a;
3887
+ wrap_a1: Any$b;
3888
+ wrap_a2: Any$b;
3598
3889
  kMass: number;
3599
3890
  jAcc: number;
3600
3891
  jMax: number;
3601
3892
  gamma: number;
3602
3893
  bias: number;
3603
3894
  stepped: boolean;
3604
- __class__: Any$a;
3895
+ __class__: Any$b;
3605
3896
  constructor();
3606
3897
  is_slack(): boolean;
3607
- bodyImpulse(b: Any$a): Any$a;
3898
+ bodyImpulse(b: Any$b): Any$b;
3608
3899
  activeBodies(): void;
3609
3900
  inactiveBodies(): void;
3610
3901
  validate_a1(): void;
3611
- invalidate_a1(x: Any$a): void;
3902
+ invalidate_a1(x: Any$b): void;
3612
3903
  setup_a1(): void;
3613
3904
  validate_a2(): void;
3614
- invalidate_a2(x: Any$a): void;
3905
+ invalidate_a2(x: Any$b): void;
3615
3906
  setup_a2(): void;
3616
- copy(dict: Any$a, todo: Any$a): Any$a;
3907
+ copy(dict: Any$b, todo: Any$b): Any$b;
3617
3908
  validate(): void;
3618
3909
  wake_connected(): void;
3619
3910
  forest(): void;
@@ -3623,7 +3914,7 @@ declare class ZPP_DistanceJoint extends ZPP_Constraint {
3623
3914
  warmStart(): void;
3624
3915
  applyImpulseVel(): boolean;
3625
3916
  applyImpulsePos(): boolean;
3626
- draw(_g: Any$a): void;
3917
+ draw(_g: Any$b): void;
3627
3918
  /**
3628
3919
  * Creates (or reuses from pool) a public Vec2 wrapper for a constraint anchor
3629
3920
  * point stored as (localx, localy). Installs the given validate and invalidate
@@ -3631,10 +3922,10 @@ declare class ZPP_DistanceJoint extends ZPP_Constraint {
3631
3922
  *
3632
3923
  * Shared by all anchor-based joints (DistanceJoint, PivotJoint, LineJoint, etc.)
3633
3924
  */
3634
- static _setupAnchorVec2(localx: number, localy: number, validateFn: (() => void) | null, invalidateFn: ((vec: Any$a) => void) | null): Any$a;
3925
+ static _setupAnchorVec2(localx: number, localy: number, validateFn: (() => void) | null, invalidateFn: ((vec: Any$b) => void) | null): Any$b;
3635
3926
  }
3636
3927
 
3637
- type Any$9 = any;
3928
+ type Any$a = any;
3638
3929
  /**
3639
3930
  * Constrains the distance between two anchor points on two bodies.
3640
3931
  *
@@ -3644,7 +3935,7 @@ declare class DistanceJoint extends Constraint {
3644
3935
  zpp_inner: ZPP_DistanceJoint;
3645
3936
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, jointMin: number, jointMax: number);
3646
3937
  /** @internal */
3647
- static _wrap(inner: Any$9): DistanceJoint;
3938
+ static _wrap(inner: Any$a): DistanceJoint;
3648
3939
  get body1(): Body;
3649
3940
  set body1(value: Body | null);
3650
3941
  /** @internal */
@@ -3662,17 +3953,17 @@ declare class DistanceJoint extends Constraint {
3662
3953
  get jointMax(): number;
3663
3954
  set jointMax(value: number);
3664
3955
  isSlack(): boolean;
3665
- impulse(): Any$9;
3666
- bodyImpulse(body: Body): Any$9;
3956
+ impulse(): Any$a;
3957
+ bodyImpulse(body: Body): Any$a;
3667
3958
  visitBodies(lambda: (body: Body) => void): void;
3668
- /** @internal */ get_body1(): Any$9;
3669
- /** @internal */ set_body1(v: Any$9): Any$9;
3670
- /** @internal */ get_body2(): Any$9;
3671
- /** @internal */ set_body2(v: Any$9): Any$9;
3672
- /** @internal */ get_anchor1(): Any$9;
3673
- /** @internal */ set_anchor1(v: Any$9): Any$9;
3674
- /** @internal */ get_anchor2(): Any$9;
3675
- /** @internal */ set_anchor2(v: Any$9): Any$9;
3959
+ /** @internal */ get_body1(): Any$a;
3960
+ /** @internal */ set_body1(v: Any$a): Any$a;
3961
+ /** @internal */ get_body2(): Any$a;
3962
+ /** @internal */ set_body2(v: Any$a): Any$a;
3963
+ /** @internal */ get_anchor1(): Any$a;
3964
+ /** @internal */ set_anchor1(v: Any$a): Any$a;
3965
+ /** @internal */ get_anchor2(): Any$a;
3966
+ /** @internal */ set_anchor2(v: Any$a): Any$a;
3676
3967
  /** @internal */ get_jointMin(): number;
3677
3968
  /** @internal */ set_jointMin(v: number): number;
3678
3969
  /** @internal */ get_jointMax(): number;
@@ -3691,53 +3982,53 @@ declare class DistanceJoint extends Constraint {
3691
3982
  * Converted from nape-compiled.js lines 21441–21912.
3692
3983
  */
3693
3984
 
3694
- type Any$8 = any;
3985
+ type Any$9 = any;
3695
3986
  declare class ZPP_AngleJoint extends ZPP_Constraint {
3696
3987
  static __name__: string[];
3697
- static _wrapFn: ((zpp: ZPP_AngleJoint) => Any$8) | null;
3698
- outer_zn: Any$8;
3988
+ static _wrapFn: ((zpp: ZPP_AngleJoint) => Any$9) | null;
3989
+ outer_zn: Any$9;
3699
3990
  ratio: number;
3700
3991
  jointMin: number;
3701
3992
  jointMax: number;
3702
3993
  slack: boolean;
3703
3994
  equal: boolean;
3704
3995
  scale: number;
3705
- b1: Any$8;
3706
- b2: Any$8;
3996
+ b1: Any$9;
3997
+ b2: Any$9;
3707
3998
  kMass: number;
3708
3999
  jAcc: number;
3709
4000
  jMax: number;
3710
4001
  gamma: number;
3711
4002
  bias: number;
3712
4003
  stepped: boolean;
3713
- __class__: Any$8;
4004
+ __class__: Any$9;
3714
4005
  constructor();
3715
4006
  is_slack(): boolean;
3716
- bodyImpulse(b: Any$8): Any$8;
4007
+ bodyImpulse(b: Any$9): Any$9;
3717
4008
  activeBodies(): void;
3718
4009
  inactiveBodies(): void;
3719
- copy(dict?: Any$8, todo?: Any$8): Any$8;
4010
+ copy(dict?: Any$9, todo?: Any$9): Any$9;
3720
4011
  validate(): void;
3721
4012
  wake_connected(): void;
3722
4013
  forest(): void;
3723
- pair_exists(id: Any$8, di: Any$8): boolean;
4014
+ pair_exists(id: Any$9, di: Any$9): boolean;
3724
4015
  clearcache(): void;
3725
4016
  preStep(dt: number): boolean;
3726
4017
  warmStart(): void;
3727
4018
  applyImpulseVel(): boolean;
3728
4019
  applyImpulsePos(): boolean;
3729
- draw(_g: Any$8): void;
4020
+ draw(_g: Any$9): void;
3730
4021
  /**
3731
4022
  * Small-angle-optimized body rotation. Used by all joints' applyImpulsePos.
3732
4023
  */
3733
- static _rotateBody(body: Any$8, dr: number): void;
4024
+ static _rotateBody(body: Any$9, dr: number): void;
3734
4025
  /**
3735
4026
  * Dict-lookup / deferred-todo body copying. Used by all joints' copy().
3736
4027
  */
3737
- static _copyBody(dict: Any$8, todo: Any$8, srcBody: Any$8, ret: Any$8, field: string): void;
4028
+ static _copyBody(dict: Any$9, todo: Any$9, srcBody: Any$9, ret: Any$9, field: string): void;
3738
4029
  }
3739
4030
 
3740
- type Any$7 = any;
4031
+ type Any$8 = any;
3741
4032
  /**
3742
4033
  * Constrains the relative angle between two bodies.
3743
4034
  *
@@ -3747,7 +4038,7 @@ declare class AngleJoint extends Constraint {
3747
4038
  zpp_inner: ZPP_AngleJoint;
3748
4039
  constructor(body1: Body | null, body2: Body | null, jointMin: number, jointMax: number, ratio?: number);
3749
4040
  /** @internal */
3750
- static _wrap(inner: Any$7): AngleJoint;
4041
+ static _wrap(inner: Any$8): AngleJoint;
3751
4042
  get body1(): Body;
3752
4043
  set body1(value: Body | null);
3753
4044
  /** @internal */
@@ -3763,13 +4054,13 @@ declare class AngleJoint extends Constraint {
3763
4054
  get ratio(): number;
3764
4055
  set ratio(value: number);
3765
4056
  isSlack(): boolean;
3766
- impulse(): Any$7;
3767
- bodyImpulse(body: Body): Any$7;
4057
+ impulse(): Any$8;
4058
+ bodyImpulse(body: Body): Any$8;
3768
4059
  visitBodies(lambda: (body: Body) => void): void;
3769
- /** @internal */ get_body1(): Any$7;
3770
- /** @internal */ set_body1(v: Any$7): Any$7;
3771
- /** @internal */ get_body2(): Any$7;
3772
- /** @internal */ set_body2(v: Any$7): Any$7;
4060
+ /** @internal */ get_body1(): Any$8;
4061
+ /** @internal */ set_body1(v: Any$8): Any$8;
4062
+ /** @internal */ get_body2(): Any$8;
4063
+ /** @internal */ set_body2(v: Any$8): Any$8;
3773
4064
  /** @internal */ get_jointMin(): number;
3774
4065
  /** @internal */ set_jointMin(v: number): number;
3775
4066
  /** @internal */ get_jointMax(): number;
@@ -3791,24 +4082,24 @@ declare class AngleJoint extends Constraint {
3791
4082
  * Converted from nape-compiled.js lines 28055–29046.
3792
4083
  */
3793
4084
 
3794
- type Any$6 = any;
4085
+ type Any$7 = any;
3795
4086
  declare class ZPP_WeldJoint extends ZPP_Constraint {
3796
4087
  static __name__: string[];
3797
4088
  static __super__: typeof ZPP_Constraint;
3798
- static _wrapFn: ((zpp: ZPP_WeldJoint) => Any$6) | null;
3799
- outer_zn: Any$6;
3800
- b1: Any$6;
3801
- b2: Any$6;
4089
+ static _wrapFn: ((zpp: ZPP_WeldJoint) => Any$7) | null;
4090
+ outer_zn: Any$7;
4091
+ b1: Any$7;
4092
+ b2: Any$7;
3802
4093
  a1localx: number;
3803
4094
  a1localy: number;
3804
4095
  a1relx: number;
3805
4096
  a1rely: number;
3806
- wrap_a1: Any$6;
4097
+ wrap_a1: Any$7;
3807
4098
  a2localx: number;
3808
4099
  a2localy: number;
3809
4100
  a2relx: number;
3810
4101
  a2rely: number;
3811
- wrap_a2: Any$6;
4102
+ wrap_a2: Any$7;
3812
4103
  phase: number;
3813
4104
  kMassa: number;
3814
4105
  kMassb: number;
@@ -3825,18 +4116,18 @@ declare class ZPP_WeldJoint extends ZPP_Constraint {
3825
4116
  biasy: number;
3826
4117
  biasz: number;
3827
4118
  stepped: boolean;
3828
- __class__: Any$6;
4119
+ __class__: Any$7;
3829
4120
  constructor();
3830
- bodyImpulse(b: Any$6): Any$6;
4121
+ bodyImpulse(b: Any$7): Any$7;
3831
4122
  activeBodies(): void;
3832
4123
  inactiveBodies(): void;
3833
4124
  validate_a1(): void;
3834
- invalidate_a1(x: Any$6): void;
4125
+ invalidate_a1(x: Any$7): void;
3835
4126
  setup_a1(): void;
3836
4127
  validate_a2(): void;
3837
- invalidate_a2(x: Any$6): void;
4128
+ invalidate_a2(x: Any$7): void;
3838
4129
  setup_a2(): void;
3839
- copy(dict: Any$6, todo: Any$6): Any$6;
4130
+ copy(dict: Any$7, todo: Any$7): Any$7;
3840
4131
  validate(): void;
3841
4132
  wake_connected(): void;
3842
4133
  forest(): void;
@@ -3846,10 +4137,10 @@ declare class ZPP_WeldJoint extends ZPP_Constraint {
3846
4137
  warmStart(): void;
3847
4138
  applyImpulseVel(): boolean;
3848
4139
  applyImpulsePos(): boolean;
3849
- draw(_g: Any$6): void;
4140
+ draw(_g: Any$7): void;
3850
4141
  }
3851
4142
 
3852
- type Any$5 = any;
4143
+ type Any$6 = any;
3853
4144
  /**
3854
4145
  * Weld joint — constrains two bodies to maintain a fixed relative
3855
4146
  * position and angle (like gluing them together).
@@ -3860,7 +4151,7 @@ declare class WeldJoint extends Constraint {
3860
4151
  zpp_inner: ZPP_WeldJoint;
3861
4152
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, phase?: number);
3862
4153
  /** @internal */
3863
- static _wrap(inner: Any$5): WeldJoint;
4154
+ static _wrap(inner: Any$6): WeldJoint;
3864
4155
  get body1(): Body;
3865
4156
  set body1(value: Body | null);
3866
4157
  /** @internal */
@@ -3875,17 +4166,17 @@ declare class WeldJoint extends Constraint {
3875
4166
  set anchor2(value: Vec2);
3876
4167
  get phase(): number;
3877
4168
  set phase(value: number);
3878
- impulse(): Any$5;
3879
- bodyImpulse(body: Body): Any$5;
4169
+ impulse(): Any$6;
4170
+ bodyImpulse(body: Body): Any$6;
3880
4171
  visitBodies(lambda: (body: Body) => void): void;
3881
- /** @internal */ get_body1(): Any$5;
3882
- /** @internal */ set_body1(v: Any$5): Any$5;
3883
- /** @internal */ get_body2(): Any$5;
3884
- /** @internal */ set_body2(v: Any$5): Any$5;
3885
- /** @internal */ get_anchor1(): Any$5;
3886
- /** @internal */ set_anchor1(v: Any$5): Any$5;
3887
- /** @internal */ get_anchor2(): Any$5;
3888
- /** @internal */ set_anchor2(v: Any$5): Any$5;
4172
+ /** @internal */ get_body1(): Any$6;
4173
+ /** @internal */ set_body1(v: Any$6): Any$6;
4174
+ /** @internal */ get_body2(): Any$6;
4175
+ /** @internal */ set_body2(v: Any$6): Any$6;
4176
+ /** @internal */ get_anchor1(): Any$6;
4177
+ /** @internal */ set_anchor1(v: Any$6): Any$6;
4178
+ /** @internal */ get_anchor2(): Any$6;
4179
+ /** @internal */ set_anchor2(v: Any$6): Any$6;
3889
4180
  /** @internal */ get_phase(): number;
3890
4181
  /** @internal */ set_phase(v: number): number;
3891
4182
  /** @internal backward compat alias for zpp_inner */
@@ -3902,29 +4193,29 @@ declare class WeldJoint extends Constraint {
3902
4193
  * Converted from nape-compiled.js lines 23892–24197.
3903
4194
  */
3904
4195
 
3905
- type Any$4 = any;
4196
+ type Any$5 = any;
3906
4197
  declare class ZPP_MotorJoint extends ZPP_Constraint {
3907
4198
  static __name__: string[];
3908
- static _wrapFn: ((zpp: ZPP_MotorJoint) => Any$4) | null;
3909
- outer_zn: Any$4;
4199
+ static _wrapFn: ((zpp: ZPP_MotorJoint) => Any$5) | null;
4200
+ outer_zn: Any$5;
3910
4201
  ratio: number;
3911
4202
  rate: number;
3912
- b1: Any$4;
3913
- b2: Any$4;
4203
+ b1: Any$5;
4204
+ b2: Any$5;
3914
4205
  kMass: number;
3915
4206
  jAcc: number;
3916
4207
  jMax: number;
3917
4208
  stepped: boolean;
3918
- __class__: Any$4;
4209
+ __class__: Any$5;
3919
4210
  constructor();
3920
- bodyImpulse(b: Any$4): Any$4;
4211
+ bodyImpulse(b: Any$5): Any$5;
3921
4212
  activeBodies(): void;
3922
4213
  inactiveBodies(): void;
3923
- copy(dict?: Any$4, todo?: Any$4): Any$4;
4214
+ copy(dict?: Any$5, todo?: Any$5): Any$5;
3924
4215
  validate(): void;
3925
4216
  wake_connected(): void;
3926
4217
  forest(): void;
3927
- pair_exists(id: Any$4, di: Any$4): boolean;
4218
+ pair_exists(id: Any$5, di: Any$5): boolean;
3928
4219
  clearcache(): void;
3929
4220
  preStep(dt: number): boolean;
3930
4221
  warmStart(): void;
@@ -3932,7 +4223,7 @@ declare class ZPP_MotorJoint extends ZPP_Constraint {
3932
4223
  applyImpulsePos(): boolean;
3933
4224
  }
3934
4225
 
3935
- type Any$3 = any;
4226
+ type Any$4 = any;
3936
4227
  /**
3937
4228
  * Motor joint — applies angular velocity to rotate bodies relative to each other.
3938
4229
  *
@@ -3942,7 +4233,7 @@ declare class MotorJoint extends Constraint {
3942
4233
  zpp_inner: ZPP_MotorJoint;
3943
4234
  constructor(body1: Body | null, body2: Body | null, rate?: number, ratio?: number);
3944
4235
  /** @internal */
3945
- static _wrap(inner: Any$3): MotorJoint;
4236
+ static _wrap(inner: Any$4): MotorJoint;
3946
4237
  get body1(): Body;
3947
4238
  set body1(value: Body | null);
3948
4239
  /** @internal */
@@ -3955,13 +4246,13 @@ declare class MotorJoint extends Constraint {
3955
4246
  set rate(value: number);
3956
4247
  get ratio(): number;
3957
4248
  set ratio(value: number);
3958
- impulse(): Any$3;
3959
- bodyImpulse(body: Body): Any$3;
4249
+ impulse(): Any$4;
4250
+ bodyImpulse(body: Body): Any$4;
3960
4251
  visitBodies(lambda: (body: Body) => void): void;
3961
- /** @internal */ get_body1(): Any$3;
3962
- /** @internal */ set_body1(v: Any$3): Any$3;
3963
- /** @internal */ get_body2(): Any$3;
3964
- /** @internal */ set_body2(v: Any$3): Any$3;
4252
+ /** @internal */ get_body1(): Any$4;
4253
+ /** @internal */ set_body1(v: Any$4): Any$4;
4254
+ /** @internal */ get_body2(): Any$4;
4255
+ /** @internal */ set_body2(v: Any$4): Any$4;
3965
4256
  /** @internal */ get_rate(): number;
3966
4257
  /** @internal */ set_rate(v: number): number;
3967
4258
  /** @internal */ get_ratio(): number;
@@ -3981,12 +4272,12 @@ declare class MotorJoint extends Constraint {
3981
4272
  * Converted from nape-compiled.js lines 23205–23304.
3982
4273
  */
3983
4274
 
3984
- type Any$2 = any;
4275
+ type Any$3 = any;
3985
4276
  declare class ZPP_LineJoint extends ZPP_Constraint {
3986
4277
  static __name__: string[];
3987
4278
  static __super__: typeof ZPP_Constraint;
3988
- static _wrapFn: ((zpp: ZPP_LineJoint) => Any$2) | null;
3989
- outer_zn: Any$2;
4279
+ static _wrapFn: ((zpp: ZPP_LineJoint) => Any$3) | null;
4280
+ outer_zn: Any$3;
3990
4281
  scale: number;
3991
4282
  jointMin: number;
3992
4283
  jointMax: number;
@@ -3995,35 +4286,35 @@ declare class ZPP_LineJoint extends ZPP_Constraint {
3995
4286
  dot2: number;
3996
4287
  cx1: number;
3997
4288
  cx2: number;
3998
- b1: Any$2;
4289
+ b1: Any$3;
3999
4290
  a1localx: number;
4000
4291
  a1localy: number;
4001
4292
  a1relx: number;
4002
4293
  a1rely: number;
4003
- wrap_a1: Any$2;
4004
- b2: Any$2;
4294
+ wrap_a1: Any$3;
4295
+ b2: Any$3;
4005
4296
  a2localx: number;
4006
4297
  a2localy: number;
4007
4298
  a2relx: number;
4008
4299
  a2rely: number;
4009
- wrap_a2: Any$2;
4010
- zip_n: Any$2;
4300
+ wrap_a2: Any$3;
4301
+ zip_n: Any$3;
4011
4302
  nlocalx: number;
4012
4303
  nlocaly: number;
4013
4304
  nrelx: number;
4014
4305
  nrely: number;
4015
- wrap_n: Any$2;
4306
+ wrap_n: Any$3;
4016
4307
  kMassa: number;
4017
4308
  kMassb: number;
4018
4309
  kMassc: number;
4019
4310
  jAccx: number;
4020
4311
  jAccy: number;
4021
- jMax: Any$2;
4022
- gamma: Any$2;
4312
+ jMax: Any$3;
4313
+ gamma: Any$3;
4023
4314
  biasx: number;
4024
4315
  biasy: number;
4025
4316
  stepped: boolean;
4026
- __class__: Any$2;
4317
+ __class__: Any$3;
4027
4318
  constructor();
4028
4319
  /**
4029
4320
  * Creates or recycles a Vec2 from the public pool, sets its x/y,
@@ -4032,19 +4323,19 @@ declare class ZPP_LineJoint extends ZPP_Constraint {
4032
4323
  */
4033
4324
  private _setupVec2;
4034
4325
  validate_a1(): void;
4035
- invalidate_a1(x: Any$2): void;
4326
+ invalidate_a1(x: Any$3): void;
4036
4327
  setup_a1(): void;
4037
4328
  validate_a2(): void;
4038
- invalidate_a2(x: Any$2): void;
4329
+ invalidate_a2(x: Any$3): void;
4039
4330
  setup_a2(): void;
4040
4331
  validate_n(): void;
4041
- invalidate_n(x: Any$2): void;
4332
+ invalidate_n(x: Any$3): void;
4042
4333
  setup_n(): void;
4043
4334
  validate_norm(): void;
4044
- bodyImpulse(b: Any$2): Any$2;
4335
+ bodyImpulse(b: Any$3): Any$3;
4045
4336
  activeBodies(): void;
4046
4337
  inactiveBodies(): void;
4047
- copy(dict: Any$2, todo: Any$2): Any$2;
4338
+ copy(dict: Any$3, todo: Any$3): Any$3;
4048
4339
  validate(): void;
4049
4340
  wake_connected(): void;
4050
4341
  forest(): void;
@@ -4054,10 +4345,10 @@ declare class ZPP_LineJoint extends ZPP_Constraint {
4054
4345
  warmStart(): void;
4055
4346
  applyImpulseVel(): boolean;
4056
4347
  applyImpulsePos(): boolean;
4057
- draw(_g: Any$2): void;
4348
+ draw(_g: Any$3): void;
4058
4349
  }
4059
4350
 
4060
- type Any$1 = any;
4351
+ type Any$2 = any;
4061
4352
  /**
4062
4353
  * Line joint — constrains body2's anchor to slide along a line
4063
4354
  * defined by body1's anchor and direction.
@@ -4068,7 +4359,7 @@ declare class LineJoint extends Constraint {
4068
4359
  zpp_inner: ZPP_LineJoint;
4069
4360
  constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, direction: Vec2, jointMin: number, jointMax: number);
4070
4361
  /** @internal */
4071
- static _wrap(inner: Any$1): LineJoint;
4362
+ static _wrap(inner: Any$2): LineJoint;
4072
4363
  get body1(): Body;
4073
4364
  set body1(value: Body | null);
4074
4365
  /** @internal */
@@ -4087,19 +4378,19 @@ declare class LineJoint extends Constraint {
4087
4378
  set jointMin(value: number);
4088
4379
  get jointMax(): number;
4089
4380
  set jointMax(value: number);
4090
- impulse(): Any$1;
4091
- bodyImpulse(body: Body): Any$1;
4381
+ impulse(): Any$2;
4382
+ bodyImpulse(body: Body): Any$2;
4092
4383
  visitBodies(lambda: (body: Body) => void): void;
4093
- /** @internal */ get_body1(): Any$1;
4094
- /** @internal */ set_body1(v: Any$1): Any$1;
4095
- /** @internal */ get_body2(): Any$1;
4096
- /** @internal */ set_body2(v: Any$1): Any$1;
4097
- /** @internal */ get_anchor1(): Any$1;
4098
- /** @internal */ set_anchor1(v: Any$1): Any$1;
4099
- /** @internal */ get_anchor2(): Any$1;
4100
- /** @internal */ set_anchor2(v: Any$1): Any$1;
4101
- /** @internal */ get_direction(): Any$1;
4102
- /** @internal */ set_direction(v: Any$1): Any$1;
4384
+ /** @internal */ get_body1(): Any$2;
4385
+ /** @internal */ set_body1(v: Any$2): Any$2;
4386
+ /** @internal */ get_body2(): Any$2;
4387
+ /** @internal */ set_body2(v: Any$2): Any$2;
4388
+ /** @internal */ get_anchor1(): Any$2;
4389
+ /** @internal */ set_anchor1(v: Any$2): Any$2;
4390
+ /** @internal */ get_anchor2(): Any$2;
4391
+ /** @internal */ set_anchor2(v: Any$2): Any$2;
4392
+ /** @internal */ get_direction(): Any$2;
4393
+ /** @internal */ set_direction(v: Any$2): Any$2;
4103
4394
  /** @internal */ get_jointMin(): number;
4104
4395
  /** @internal */ set_jointMin(v: number): number;
4105
4396
  /** @internal */ get_jointMax(): number;
@@ -4109,13 +4400,108 @@ declare class LineJoint extends Constraint {
4109
4400
  set zpp_inner_zn(v: ZPP_LineJoint);
4110
4401
  }
4111
4402
 
4403
+ /**
4404
+ * ZPP_PulleyJoint — Internal 4-body, 1-DOF pulley constraint.
4405
+ *
4406
+ * Constrains (dist(b1,b2) + ratio * dist(b3,b4)) to [jointMin, jointMax].
4407
+ * Supports mechanical advantage ratio, slack detection, stiffness/damping,
4408
+ * and large-error pre-correction in applyImpulsePos.
4409
+ *
4410
+ * Converted from nape-compiled.js lines 25475–25367.
4411
+ */
4412
+
4413
+ type Any$1 = any;
4414
+ declare class ZPP_PulleyJoint extends ZPP_Constraint {
4415
+ static __name__: string[];
4416
+ static __super__: typeof ZPP_Constraint;
4417
+ static _wrapFn: ((zpp: ZPP_PulleyJoint) => Any$1) | null;
4418
+ outer_zn: Any$1;
4419
+ ratio: number;
4420
+ jointMin: number;
4421
+ jointMax: number;
4422
+ slack: boolean;
4423
+ equal: boolean;
4424
+ n12x: number;
4425
+ n12y: number;
4426
+ n34x: number;
4427
+ n34y: number;
4428
+ cx1: number;
4429
+ cx2: number;
4430
+ cx3: number;
4431
+ cx4: number;
4432
+ b1: Any$1;
4433
+ a1localx: number;
4434
+ a1localy: number;
4435
+ a1relx: number;
4436
+ a1rely: number;
4437
+ wrap_a1: Any$1;
4438
+ b2: Any$1;
4439
+ a2localx: number;
4440
+ a2localy: number;
4441
+ a2relx: number;
4442
+ a2rely: number;
4443
+ wrap_a2: Any$1;
4444
+ b3: Any$1;
4445
+ a3localx: number;
4446
+ a3localy: number;
4447
+ a3relx: number;
4448
+ a3rely: number;
4449
+ wrap_a3: Any$1;
4450
+ b4: Any$1;
4451
+ a4localx: number;
4452
+ a4localy: number;
4453
+ a4relx: number;
4454
+ a4rely: number;
4455
+ wrap_a4: Any$1;
4456
+ kMass: number;
4457
+ jAcc: number;
4458
+ jMax: number;
4459
+ gamma: number;
4460
+ bias: number;
4461
+ stepped: boolean;
4462
+ __class__: Any$1;
4463
+ constructor();
4464
+ is_slack(): boolean;
4465
+ bodyImpulse(b: Any$1): Any$1;
4466
+ activeBodies(): void;
4467
+ inactiveBodies(): void;
4468
+ validate_a1(): void;
4469
+ invalidate_a1(x: Any$1): void;
4470
+ setup_a1(): void;
4471
+ validate_a2(): void;
4472
+ invalidate_a2(x: Any$1): void;
4473
+ setup_a2(): void;
4474
+ validate_a3(): void;
4475
+ invalidate_a3(x: Any$1): void;
4476
+ setup_a3(): void;
4477
+ validate_a4(): void;
4478
+ invalidate_a4(x: Any$1): void;
4479
+ setup_a4(): void;
4480
+ copy(dict: Any$1, todo: Any$1): Any$1;
4481
+ validate(): void;
4482
+ wake_connected(): void;
4483
+ forest(): void;
4484
+ pair_exists(id: number, di: number): boolean;
4485
+ clearcache(): void;
4486
+ preStep(dt: number): boolean;
4487
+ warmStart(): void;
4488
+ applyImpulseVel(): boolean;
4489
+ applyImpulsePos(): boolean;
4490
+ draw(_g: Any$1): void;
4491
+ }
4492
+
4112
4493
  type Any = any;
4113
4494
  /**
4114
- * Pulley joint — constrains the sum of distances between four anchor points
4115
- * on four bodies.
4495
+ * Pulley joint — constrains the weighted sum of distances between
4496
+ * four anchor points on four bodies.
4497
+ *
4498
+ * Fully modernized — uses ZPP_PulleyJoint directly (extracted to TypeScript).
4116
4499
  */
4117
4500
  declare class PulleyJoint extends Constraint {
4501
+ zpp_inner: ZPP_PulleyJoint;
4118
4502
  constructor(body1: Body | null, body2: Body | null, body3: Body | null, body4: Body | null, anchor1: Vec2, anchor2: Vec2, anchor3: Vec2, anchor4: Vec2, jointMin: number, jointMax: number, ratio?: number);
4503
+ /** @internal Helper to set an anchor during construction. */
4504
+ private _setAnchorInit;
4119
4505
  /** @internal */
4120
4506
  static _wrap(inner: Any): PulleyJoint;
4121
4507
  get body1(): Body;
@@ -4126,6 +4512,14 @@ declare class PulleyJoint extends Constraint {
4126
4512
  set body3(value: Body | null);
4127
4513
  get body4(): Body;
4128
4514
  set body4(value: Body | null);
4515
+ /** @internal */
4516
+ private _setBody1;
4517
+ /** @internal */
4518
+ private _setBody2;
4519
+ /** @internal */
4520
+ private _setBody3;
4521
+ /** @internal */
4522
+ private _setBody4;
4129
4523
  get anchor1(): Vec2;
4130
4524
  set anchor1(value: Vec2);
4131
4525
  get anchor2(): Vec2;
@@ -4140,6 +4534,35 @@ declare class PulleyJoint extends Constraint {
4140
4534
  set jointMax(value: number);
4141
4535
  get ratio(): number;
4142
4536
  set ratio(value: number);
4537
+ isSlack(): boolean;
4538
+ impulse(): Any;
4539
+ bodyImpulse(body: Body): Any;
4540
+ visitBodies(lambda: (body: Body) => void): void;
4541
+ /** @internal */ get_body1(): Any;
4542
+ /** @internal */ set_body1(v: Any): Any;
4543
+ /** @internal */ get_body2(): Any;
4544
+ /** @internal */ set_body2(v: Any): Any;
4545
+ /** @internal */ get_body3(): Any;
4546
+ /** @internal */ set_body3(v: Any): Any;
4547
+ /** @internal */ get_body4(): Any;
4548
+ /** @internal */ set_body4(v: Any): Any;
4549
+ /** @internal */ get_anchor1(): Any;
4550
+ /** @internal */ set_anchor1(v: Any): Any;
4551
+ /** @internal */ get_anchor2(): Any;
4552
+ /** @internal */ set_anchor2(v: Any): Any;
4553
+ /** @internal */ get_anchor3(): Any;
4554
+ /** @internal */ set_anchor3(v: Any): Any;
4555
+ /** @internal */ get_anchor4(): Any;
4556
+ /** @internal */ set_anchor4(v: Any): Any;
4557
+ /** @internal */ get_jointMin(): number;
4558
+ /** @internal */ set_jointMin(v: number): number;
4559
+ /** @internal */ get_jointMax(): number;
4560
+ /** @internal */ set_jointMax(v: number): number;
4561
+ /** @internal */ get_ratio(): number;
4562
+ /** @internal */ set_ratio(v: number): number;
4563
+ /** @internal backward compat alias for zpp_inner */
4564
+ get zpp_inner_zn(): ZPP_PulleyJoint;
4565
+ set zpp_inner_zn(v: ZPP_PulleyJoint);
4143
4566
  }
4144
4567
 
4145
4568
  declare const VERSION: string;