@newkrok/nape-js 3.3.4 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -25,13 +25,13 @@ declare function getNape(): any;
25
25
  *
26
26
  * Converted from nape-compiled.js lines 83820–84273, 134996.
27
27
  */
28
- type Any$6 = any;
28
+ type Any$d = any;
29
29
  declare class ZPP_Vec2 {
30
30
  static zpp_pool: ZPP_Vec2 | null;
31
31
  static __name__: string[];
32
- static _nape: Any$6;
33
- static _zpp: Any$6;
34
- static _wrapFn: ((zpp: ZPP_Vec2) => Any$6) | null;
32
+ static _nape: Any$d;
33
+ static _zpp: Any$d;
34
+ static _wrapFn: ((zpp: ZPP_Vec2) => Any$d) | null;
35
35
  x: number;
36
36
  y: number;
37
37
  next: ZPP_Vec2 | null;
@@ -40,18 +40,18 @@ declare class ZPP_Vec2 {
40
40
  pushmod: boolean;
41
41
  _inuse: boolean;
42
42
  weak: boolean;
43
- outer: Any$6;
43
+ outer: Any$d;
44
44
  _immutable: boolean;
45
45
  _isimmutable: (() => void) | null;
46
46
  _validate: (() => void) | null;
47
47
  _invalidate: ((self: ZPP_Vec2) => void) | null;
48
- __class__: Any$6;
48
+ __class__: Any$d;
49
49
  /** Static factory with optional pooling and immutability. */
50
50
  static get(x: number, y: number, immutable?: boolean): ZPP_Vec2;
51
51
  validate(): void;
52
52
  invalidate(): void;
53
53
  immutable(): void;
54
- wrapper(): Any$6;
54
+ wrapper(): Any$d;
55
55
  free(): void;
56
56
  alloc(): void;
57
57
  elem(): ZPP_Vec2;
@@ -203,20 +203,20 @@ type NapeInner = any;
203
203
  *
204
204
  * Converted from nape-compiled.js lines 83412–83434.
205
205
  */
206
- type Any$5 = any;
206
+ type Any$c = any;
207
207
  declare class ZPP_Vec3 {
208
208
  static __name__: string[];
209
- static _zpp: Any$5;
210
- static _wrapFn: ((zpp: ZPP_Vec3) => Any$5) | null;
211
- outer: Any$5;
209
+ static _zpp: Any$c;
210
+ static _wrapFn: ((zpp: ZPP_Vec3) => Any$c) | null;
211
+ outer: Any$c;
212
212
  x: number;
213
213
  y: number;
214
214
  z: number;
215
215
  immutable: boolean;
216
216
  _validate: (() => void) | null;
217
- __class__: Any$5;
217
+ __class__: Any$c;
218
218
  validate(): void;
219
- wrapper(): Any$5;
219
+ wrapper(): Any$c;
220
220
  }
221
221
 
222
222
  /**
@@ -272,6 +272,188 @@ declare class Vec3 {
272
272
  toString(): string;
273
273
  }
274
274
 
275
+ /**
276
+ * ZPP_Mat23 — Internal 2×3 transformation matrix for the nape physics engine.
277
+ *
278
+ * Represents affine transforms with components [a, b, c, d, tx, ty].
279
+ * Supports object pooling and lazy wrapper creation.
280
+ *
281
+ * Converted from nape-compiled.js lines 73495–73561, 133826.
282
+ */
283
+ type Any$b = any;
284
+ declare class ZPP_Mat23 {
285
+ static __name__: string[];
286
+ static _nape: Any$b;
287
+ static _wrapFn: ((zpp: ZPP_Mat23) => Any$b) | null;
288
+ static zpp_pool: ZPP_Mat23 | null;
289
+ outer: Any$b;
290
+ a: number;
291
+ b: number;
292
+ c: number;
293
+ d: number;
294
+ tx: number;
295
+ ty: number;
296
+ _invalidate: (() => void) | null;
297
+ next: ZPP_Mat23 | null;
298
+ __class__: Any$b;
299
+ /** Static factory with pooling. */
300
+ static get(): ZPP_Mat23;
301
+ /** Create an identity matrix from pool. */
302
+ static identity(): ZPP_Mat23;
303
+ /** Create a public wrapper, recycling any existing inner. */
304
+ wrapper(): Any$b;
305
+ invalidate(): void;
306
+ set(m: ZPP_Mat23): void;
307
+ setas(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
308
+ free(): void;
309
+ alloc(): void;
310
+ }
311
+
312
+ /**
313
+ * 2x3 affine transformation matrix [a b tx; c d ty].
314
+ *
315
+ * Converted from nape-compiled.js lines 20507–21760.
316
+ */
317
+ declare class Mat23 {
318
+ static __name__: string[];
319
+ zpp_inner: ZPP_Mat23;
320
+ get _inner(): NapeInner;
321
+ constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
322
+ static rotation(angle: number): Mat23;
323
+ static translation(tx: number, ty: number): Mat23;
324
+ static scale(sx: number, sy: number): Mat23;
325
+ static _wrap(inner: any): Mat23;
326
+ private _setProp;
327
+ get a(): number;
328
+ set a(v: number);
329
+ get b(): number;
330
+ set b(v: number);
331
+ get c(): number;
332
+ set c(v: number);
333
+ get d(): number;
334
+ set d(v: number);
335
+ get tx(): number;
336
+ set tx(v: number);
337
+ get ty(): number;
338
+ set ty(v: number);
339
+ get determinant(): number;
340
+ copy(): Mat23;
341
+ set(matrix: Mat23): this;
342
+ setAs(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): this;
343
+ reset(): this;
344
+ singular(): boolean;
345
+ inverse(): Mat23;
346
+ transpose(): Mat23;
347
+ concat(matrix: Mat23): Mat23;
348
+ transform(point: Vec2, noTranslation?: boolean, weak?: boolean): Vec2;
349
+ inverseTransform(point: Vec2, noTranslation?: boolean, weak?: boolean): Vec2;
350
+ equiorthogonal(): boolean;
351
+ orthogonal(): boolean;
352
+ private _orthogonaliseImpl;
353
+ equiorthogonalise(): this;
354
+ orthogonalise(): this;
355
+ toString(): string;
356
+ }
357
+
358
+ /**
359
+ * ZPP_GeomPoly — Internal polygon geometry holder for the nape physics engine.
360
+ *
361
+ * Simple data container linking a public GeomPoly wrapper to its vertex list.
362
+ *
363
+ * Converted from nape-compiled.js lines 69554–69563.
364
+ */
365
+ type Any$a = any;
366
+ declare class ZPP_GeomPoly {
367
+ static __name__: string[];
368
+ outer: Any$a;
369
+ vertices: Any$a;
370
+ __class__: Any$a;
371
+ constructor(outer?: Any$a);
372
+ }
373
+
374
+ type Any$9 = any;
375
+ /**
376
+ * A polygon represented as a circular doubly-linked list of vertices.
377
+ *
378
+ * Supports construction from Array<Vec2>, Vec2List, or another GeomPoly.
379
+ * Provides geometric queries (area, winding, containment, convexity)
380
+ * and decomposition algorithms (simple, monotone, convex, triangular).
381
+ *
382
+ * Converted from nape-compiled.js lines 16271–19420.
383
+ */
384
+ declare class GeomPoly {
385
+ static __name__: string[];
386
+ zpp_inner: ZPP_GeomPoly;
387
+ zpp_pool: GeomPoly | null;
388
+ zpp_disp: boolean;
389
+ get _inner(): Any$9;
390
+ constructor(vertices?: Any$9);
391
+ private _checkDisposed;
392
+ /** @internal Get compiled ZPP_GeomVert class */
393
+ private static _gvClass;
394
+ /** @internal Create a ZPP_GeomVert from pool or new */
395
+ private static _createVert;
396
+ /** @internal Insert vertex after current head (push pattern) */
397
+ private static _pushVert;
398
+ /** @internal Insert vertex before current head (unshift pattern) */
399
+ private static _unshiftVert;
400
+ /** @internal Free a vertex: cleanup wrap + return to pool */
401
+ private static _freeVert;
402
+ /** @internal Remove head, new head = prev (pop direction) */
403
+ private _popHead;
404
+ /** @internal Remove head, new head = next (shift direction) */
405
+ private _shiftHead;
406
+ /** @internal Check if polygon is degenerate (< 3 vertices) */
407
+ private _isDegenRing;
408
+ /** @internal Iterate all vertices, calling fn for each */
409
+ private _forEachVert;
410
+ /** @internal Find extremal vertex (min/max of x or y) */
411
+ private _extremalVert;
412
+ /** @internal Add vertices from constructor/get argument */
413
+ private static _addVertices;
414
+ /** @internal After copying, dispose weak Vec2 inputs */
415
+ private static _disposeWeakInputs;
416
+ static get(vertices?: Any$9): GeomPoly;
417
+ empty(): boolean;
418
+ size(): number;
419
+ iterator(): Any$9;
420
+ forwardIterator(): Any$9;
421
+ backwardsIterator(): Any$9;
422
+ current(): Vec2;
423
+ push(vertex: Vec2): this;
424
+ pop(): this;
425
+ unshift(vertex: Vec2): this;
426
+ shift(): this;
427
+ skipForward(times: number): this;
428
+ skipBackwards(times: number): this;
429
+ erase(count: number): this;
430
+ clear(): this;
431
+ copy(): GeomPoly;
432
+ dispose(): void;
433
+ area(): number;
434
+ winding(): Any$9;
435
+ contains(point: Vec2): boolean;
436
+ isClockwise(): boolean;
437
+ isConvex(): boolean;
438
+ isSimple(): boolean;
439
+ isMonotone(): boolean;
440
+ isDegenerate(): boolean;
441
+ simplify(epsilon: number): GeomPoly;
442
+ simpleDecomposition(output?: Any$9): Any$9;
443
+ monotoneDecomposition(output?: Any$9): Any$9;
444
+ convexDecomposition(delaunay?: boolean, output?: Any$9): Any$9;
445
+ triangularDecomposition(delaunay?: boolean, output?: Any$9): Any$9;
446
+ inflate(inflation: number): GeomPoly;
447
+ cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$9): Any$9;
448
+ transform(matrix: Any$9): this;
449
+ bounds(): Any$9;
450
+ top(): Vec2;
451
+ bottom(): Vec2;
452
+ left(): Vec2;
453
+ right(): Vec2;
454
+ toString(): string;
455
+ }
456
+
275
457
  /**
276
458
  * ZPP_AABB — Internal axis-aligned bounding box for the nape physics engine.
277
459
  *
@@ -280,30 +462,30 @@ declare class Vec3 {
280
462
  *
281
463
  * Converted from nape-compiled.js lines 63546–63965, 134951.
282
464
  */
283
- type Any$4 = any;
465
+ type Any$8 = any;
284
466
  declare class ZPP_AABB {
285
467
  static zpp_pool: ZPP_AABB | null;
286
468
  static __name__: string[];
287
- static _nape: Any$4;
288
- static _zpp: Any$4;
289
- static _wrapFn: ((zpp: ZPP_AABB) => Any$4) | null;
469
+ static _nape: Any$8;
470
+ static _zpp: Any$8;
471
+ static _wrapFn: ((zpp: ZPP_AABB) => Any$8) | null;
290
472
  _invalidate: ((self: ZPP_AABB) => void) | null;
291
473
  _validate: (() => void) | null;
292
474
  _immutable: boolean;
293
- outer: Any$4;
475
+ outer: Any$8;
294
476
  next: ZPP_AABB | null;
295
477
  minx: number;
296
478
  miny: number;
297
479
  maxx: number;
298
480
  maxy: number;
299
- wrap_min: Any$4;
300
- wrap_max: Any$4;
301
- __class__: Any$4;
481
+ wrap_min: Any$8;
482
+ wrap_max: Any$8;
483
+ __class__: Any$8;
302
484
  /** Static factory with pooling. */
303
485
  static get(minx: number, miny: number, maxx: number, maxy: number): ZPP_AABB;
304
486
  validate(): void;
305
487
  invalidate(): void;
306
- wrapper(): Any$4;
488
+ wrapper(): Any$8;
307
489
  alloc(): void;
308
490
  free(): void;
309
491
  copy(): ZPP_AABB;
@@ -314,10 +496,10 @@ declare class ZPP_AABB {
314
496
  private static _makeVec2Wrapper;
315
497
  getmin(): void;
316
498
  dom_min(): void;
317
- mod_min(min: Any$4): void;
499
+ mod_min(min: Any$8): void;
318
500
  getmax(): void;
319
501
  dom_max(): void;
320
- mod_max(max: Any$4): void;
502
+ mod_max(max: Any$8): void;
321
503
  intersectX(x: ZPP_AABB): boolean;
322
504
  intersectY(x: ZPP_AABB): boolean;
323
505
  intersect(x: ZPP_AABB): boolean;
@@ -435,7 +617,7 @@ declare class NapeList<T> implements Iterable<T> {
435
617
  *
436
618
  * Converted from nape-compiled.js lines 87523–87601, 135477–135481.
437
619
  */
438
- type Any$3 = any;
620
+ type Any$7 = any;
439
621
  declare class ZPP_Material {
440
622
  static zpp_pool: ZPP_Material | null;
441
623
  static WAKE: number;
@@ -448,27 +630,27 @@ declare class ZPP_Material {
448
630
  * _nape = the `nape` public namespace (for wrapper creation)
449
631
  * _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
450
632
  */
451
- static _nape: Any$3;
452
- static _zpp: Any$3;
633
+ static _nape: Any$7;
634
+ static _zpp: Any$7;
453
635
  /**
454
636
  * Wrapper factory callback, registered by the modernized Material class.
455
637
  * When set, wrapper() uses this instead of creating a compiled Material.
456
638
  */
457
- static _wrapFn: ((zpp: ZPP_Material) => Any$3) | null;
639
+ static _wrapFn: ((zpp: ZPP_Material) => Any$7) | null;
458
640
  elasticity: number;
459
641
  dynamicFriction: number;
460
642
  staticFriction: number;
461
643
  density: number;
462
644
  rollingFriction: number;
463
- shapes: Any$3;
464
- wrap_shapes: Any$3;
465
- outer: Any$3;
466
- userData: Any$3;
645
+ shapes: Any$7;
646
+ wrap_shapes: Any$7;
647
+ outer: Any$7;
648
+ userData: Any$7;
467
649
  next: ZPP_Material | null;
468
- __class__: Any$3;
650
+ __class__: Any$7;
469
651
  constructor();
470
652
  /** Create/return the public nape.phys.Material wrapper for this internal object. */
471
- wrapper(): Any$3;
653
+ wrapper(): Any$7;
472
654
  /** Called when this object is returned to the pool. */
473
655
  free(): void;
474
656
  /** Called when this object is taken from the pool. */
@@ -476,9 +658,9 @@ declare class ZPP_Material {
476
658
  /** Initialize the shapes list (called during feature construction). */
477
659
  feature_cons(): void;
478
660
  /** Register a shape that uses this material. */
479
- addShape(shape: Any$3): void;
661
+ addShape(shape: Any$7): void;
480
662
  /** Unregister a shape that no longer uses this material. */
481
- remShape(shape: Any$3): void;
663
+ remShape(shape: Any$7): void;
482
664
  /** Create a copy with the same property values. */
483
665
  copy(): ZPP_Material;
484
666
  /** Copy all property values from another ZPP_Material. */
@@ -538,36 +720,36 @@ declare class Material {
538
720
  *
539
721
  * Converted from nape-compiled.js lines 87335–87523, 135403.
540
722
  */
541
- type Any$2 = any;
723
+ type Any$6 = any;
542
724
  declare class ZPP_FluidProperties {
543
725
  static zpp_pool: ZPP_FluidProperties | null;
544
726
  static __name__: string[];
545
- static _nape: Any$2;
546
- static _zpp: Any$2;
547
- static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$2) | null;
727
+ static _nape: Any$6;
728
+ static _zpp: Any$6;
729
+ static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$6) | null;
548
730
  viscosity: number;
549
731
  density: number;
550
732
  gravityx: number;
551
733
  gravityy: number;
552
- wrap_gravity: Any$2;
553
- shapes: Any$2;
554
- wrap_shapes: Any$2;
555
- outer: Any$2;
556
- userData: Any$2;
734
+ wrap_gravity: Any$6;
735
+ shapes: Any$6;
736
+ wrap_shapes: Any$6;
737
+ outer: Any$6;
738
+ userData: Any$6;
557
739
  next: ZPP_FluidProperties | null;
558
- __class__: Any$2;
740
+ __class__: Any$6;
559
741
  constructor();
560
742
  /** Create/return the public nape.phys.FluidProperties wrapper. */
561
- wrapper(): Any$2;
743
+ wrapper(): Any$6;
562
744
  free(): void;
563
745
  alloc(): void;
564
746
  feature_cons(): void;
565
- addShape(shape: Any$2): void;
566
- remShape(shape: Any$2): void;
747
+ addShape(shape: Any$6): void;
748
+ remShape(shape: Any$6): void;
567
749
  /** Copy with object pooling. */
568
750
  copy(): ZPP_FluidProperties;
569
751
  /** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
570
- gravity_invalidate(x: Any$2): void;
752
+ gravity_invalidate(x: Any$6): void;
571
753
  /** Sync the gravity Vec2 wrapper with internal values. */
572
754
  gravity_validate(): void;
573
755
  /** Lazily create and return the gravity Vec2 wrapper. */
@@ -618,33 +800,33 @@ declare class FluidProperties {
618
800
  *
619
801
  * Converted from nape-compiled.js lines 63255–63366, 135329.
620
802
  */
621
- type Any$1 = any;
803
+ type Any$5 = any;
622
804
  declare class ZPP_InteractionFilter {
623
805
  static zpp_pool: ZPP_InteractionFilter | null;
624
806
  static __name__: string[];
625
- static _nape: Any$1;
626
- static _zpp: Any$1;
627
- static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$1) | null;
807
+ static _nape: Any$5;
808
+ static _zpp: Any$5;
809
+ static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$5) | null;
628
810
  collisionGroup: number;
629
811
  collisionMask: number;
630
812
  sensorGroup: number;
631
813
  sensorMask: number;
632
814
  fluidGroup: number;
633
815
  fluidMask: number;
634
- shapes: Any$1;
635
- wrap_shapes: Any$1;
636
- outer: Any$1;
637
- userData: Any$1;
816
+ shapes: Any$5;
817
+ wrap_shapes: Any$5;
818
+ outer: Any$5;
819
+ userData: Any$5;
638
820
  next: ZPP_InteractionFilter | null;
639
- __class__: Any$1;
821
+ __class__: Any$5;
640
822
  constructor();
641
823
  /** Create/return the public nape.dynamics.InteractionFilter wrapper. */
642
- wrapper(): Any$1;
824
+ wrapper(): Any$5;
643
825
  free(): void;
644
826
  alloc(): void;
645
827
  feature_cons(): void;
646
- addShape(shape: Any$1): void;
647
- remShape(shape: Any$1): void;
828
+ addShape(shape: Any$5): void;
829
+ remShape(shape: Any$5): void;
648
830
  /** Create a copy with object pooling. */
649
831
  copy(): ZPP_InteractionFilter;
650
832
  /** Test whether two filters allow collision between their shapes. */
@@ -1026,22 +1208,22 @@ declare class Polygon extends Shape {
1026
1208
  *
1027
1209
  * Converted from nape-compiled.js lines 63367–63463, 135330–135331.
1028
1210
  */
1029
- type Any = any;
1211
+ type Any$4 = any;
1030
1212
  declare class ZPP_InteractionGroup {
1031
1213
  static SHAPE: number;
1032
1214
  static BODY: number;
1033
1215
  static __name__: string[];
1034
- static _zpp: Any;
1035
- static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any) | null;
1036
- outer: Any;
1216
+ static _zpp: Any$4;
1217
+ static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$4) | null;
1218
+ outer: Any$4;
1037
1219
  ignore: boolean;
1038
1220
  group: ZPP_InteractionGroup | null;
1039
- groups: Any;
1040
- wrap_groups: Any;
1041
- interactors: Any;
1042
- wrap_interactors: Any;
1221
+ groups: Any$4;
1222
+ wrap_groups: Any$4;
1223
+ interactors: Any$4;
1224
+ wrap_interactors: Any$4;
1043
1225
  depth: number;
1044
- __class__: Any;
1226
+ __class__: Any$4;
1045
1227
  constructor();
1046
1228
  /** Set or change the parent group. */
1047
1229
  setGroup(group: ZPP_InteractionGroup | null): void;
@@ -1052,9 +1234,9 @@ declare class ZPP_InteractionGroup {
1052
1234
  /** Remove a child group. */
1053
1235
  remGroup(group: ZPP_InteractionGroup): void;
1054
1236
  /** Register an interactor in this group. */
1055
- addInteractor(intx: Any): void;
1237
+ addInteractor(intx: Any$4): void;
1056
1238
  /** Unregister an interactor from this group. */
1057
- remInteractor(intx: Any, flag?: number): void;
1239
+ remInteractor(intx: Any$4, flag?: number): void;
1058
1240
  }
1059
1241
 
1060
1242
  /**
@@ -1101,24 +1283,77 @@ declare enum CbEvent {
1101
1283
  PRE = "PRE"
1102
1284
  }
1103
1285
 
1286
+ /**
1287
+ * ZPP_CbType — Internal callback type for the nape physics engine.
1288
+ *
1289
+ * Manages three types of listener lists (interaction, body, constraint)
1290
+ * with priority-ordered insertion. Tracks interactors and constraints
1291
+ * that use this callback type, and invalidates callback sets on change.
1292
+ *
1293
+ * Converted from nape-compiled.js lines 48256–48482.
1294
+ */
1295
+ type Any$3 = any;
1296
+ declare class ZPP_CbType {
1297
+ static __name__: string[];
1298
+ static _zpp: Any$3;
1299
+ outer: Any$3;
1300
+ userData: Any$3;
1301
+ id: number;
1302
+ cbsets: Any$3;
1303
+ interactors: Any$3;
1304
+ wrap_interactors: Any$3;
1305
+ constraints: Any$3;
1306
+ wrap_constraints: Any$3;
1307
+ listeners: Any$3;
1308
+ bodylisteners: Any$3;
1309
+ conlisteners: Any$3;
1310
+ __class__: Any$3;
1311
+ constructor();
1312
+ /** Sort comparator by id. */
1313
+ static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
1314
+ addInteractor(intx: Any$3): void;
1315
+ remInteractor(intx: Any$3): void;
1316
+ addConstraint(con: Any$3): void;
1317
+ remConstraint(con: Any$3): void;
1318
+ addint(x: Any$3): void;
1319
+ removeint(x: Any$3): void;
1320
+ invalidateint(): void;
1321
+ addbody(x: Any$3): void;
1322
+ removebody(x: Any$3): void;
1323
+ invalidatebody(): void;
1324
+ addconstraint(x: Any$3): void;
1325
+ removeconstraint(x: Any$3): void;
1326
+ invalidateconstraint(): void;
1327
+ }
1328
+
1329
+ type Any$2 = any;
1104
1330
  /**
1105
1331
  * Callback type — used to tag interactors so that listeners
1106
1332
  * can filter which interactions they respond to.
1333
+ *
1334
+ * Converted from nape-compiled.js lines 689–770.
1107
1335
  */
1108
1336
  declare class CbType {
1109
- /** @internal */
1110
- readonly _inner: NapeInner;
1337
+ static __name__: string[];
1338
+ zpp_inner: ZPP_CbType;
1339
+ get _inner(): NapeInner;
1111
1340
  constructor();
1112
- /** @internal */
1113
- static _wrap(inner: NapeInner): CbType;
1114
- /** Built-in type matching any body. */
1115
1341
  static get ANY_BODY(): CbType;
1116
- /** Built-in type matching any constraint. */
1117
1342
  static get ANY_CONSTRAINT(): CbType;
1118
- /** Built-in type matching any shape. */
1119
1343
  static get ANY_SHAPE(): CbType;
1120
- /** Built-in type matching any compound. */
1121
1344
  static get ANY_COMPOUND(): CbType;
1345
+ static get_ANY_BODY(): CbType;
1346
+ static get_ANY_CONSTRAINT(): CbType;
1347
+ static get_ANY_SHAPE(): CbType;
1348
+ static get_ANY_COMPOUND(): CbType;
1349
+ get id(): number;
1350
+ get userData(): Any$2;
1351
+ get interactors(): Any$2;
1352
+ get constraints(): Any$2;
1353
+ including(includes: Any$2): Any$2;
1354
+ excluding(excludes: Any$2): Any$2;
1355
+ toString(): string;
1356
+ static _wrap(inner: any): CbType;
1122
1357
  }
1123
1358
 
1124
1359
  /**
@@ -1142,14 +1377,62 @@ declare enum PreFlag {
1142
1377
  }
1143
1378
 
1144
1379
  /**
1145
- * Composite callback type option allows including and excluding CbTypes.
1380
+ * ZPP_OptionType — Internal callback option type for the nape physics engine.
1381
+ *
1382
+ * Manages include/exclude lists of callback types with ordered insertion,
1383
+ * set intersection tests, and handler delegation for live changes.
1384
+ *
1385
+ * Converted from nape-compiled.js lines 51337–51655.
1386
+ */
1387
+ type Any$1 = any;
1388
+ declare class ZPP_OptionType {
1389
+ static __name__: string[];
1390
+ static _nape: Any$1;
1391
+ static _zpp: Any$1;
1392
+ outer: Any$1;
1393
+ handler: ((val: Any$1, included: boolean, added: boolean) => void) | null;
1394
+ includes: Any$1;
1395
+ excludes: Any$1;
1396
+ wrap_includes: Any$1;
1397
+ wrap_excludes: Any$1;
1398
+ __class__: Any$1;
1399
+ constructor();
1400
+ /** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
1401
+ static argument(val: Any$1): Any$1;
1402
+ setup_includes(): void;
1403
+ setup_excludes(): void;
1404
+ excluded(xs: Any$1): boolean;
1405
+ included(xs: Any$1): boolean;
1406
+ compatible(xs: Any$1): boolean;
1407
+ /** Check whether two sorted-by-id lists share any element. */
1408
+ nonemptyintersection(xs: Any$1, ys: Any$1): boolean;
1409
+ /** Insert into the ordered include or exclude list, using pool nodes. */
1410
+ private insertOrdered;
1411
+ effect_change(val: Any$1, included: boolean, added: boolean): void;
1412
+ append_type(list: Any$1, val: Any$1): void;
1413
+ set(options: ZPP_OptionType): this;
1414
+ append(list: Any$1, val: Any$1): void;
1415
+ }
1416
+
1417
+ type Any = any;
1418
+ /**
1419
+ * Composite callback option type — allows including and excluding CbTypes.
1420
+ *
1421
+ * Converted from nape-compiled.js lines 2647–2698.
1146
1422
  */
1147
1423
  declare class OptionType {
1148
- /** @internal */
1149
- readonly _inner: NapeInner;
1150
- constructor(cbTypes?: CbType | CbType[]);
1151
- /** @internal */
1152
- static _wrap(inner: NapeInner): OptionType;
1424
+ static __name__: string[];
1425
+ zpp_inner: ZPP_OptionType;
1426
+ get _inner(): NapeInner;
1427
+ constructor(includes?: Any, excludes?: Any);
1428
+ get includes(): Any;
1429
+ get excludes(): Any;
1430
+ get_includes(): Any;
1431
+ get_excludes(): Any;
1432
+ including(includes: Any): this;
1433
+ excluding(excludes: Any): this;
1434
+ toString(): string;
1435
+ static _wrap(inner: any): OptionType;
1153
1436
  }
1154
1437
 
1155
1438
  /**
@@ -1353,4 +1636,4 @@ declare class PulleyJoint extends Constraint {
1353
1636
  set ratio(value: number);
1354
1637
  }
1355
1638
 
1356
- export { AABB, AngleJoint, Body, BodyListener, BodyType, CbEvent, CbType, Circle, Constraint, ConstraintListener, DistanceJoint, FluidProperties, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, LineJoint, Listener, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreFlag, PreListener, PulleyJoint, Shape, ShapeType, Space, Vec2, Vec3, WeldJoint, getNape };
1639
+ export { AABB, AngleJoint, Body, BodyListener, BodyType, CbEvent, CbType, Circle, Constraint, ConstraintListener, DistanceJoint, FluidProperties, GeomPoly, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, LineJoint, Listener, Mat23, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreFlag, PreListener, PulleyJoint, Shape, ShapeType, Space, Vec2, Vec3, WeldJoint, getNape };