@newkrok/nape-js 3.3.11 → 3.3.13
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.cjs +19672 -42811
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +535 -332
- package/dist/index.d.ts +535 -332
- package/dist/index.js +19671 -42811
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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$
|
|
28
|
+
type Any$x = any;
|
|
29
29
|
declare class ZPP_Vec2 {
|
|
30
30
|
static zpp_pool: ZPP_Vec2 | null;
|
|
31
31
|
static __name__: string[];
|
|
32
|
-
static _nape: Any$
|
|
33
|
-
static _zpp: Any$
|
|
34
|
-
static _wrapFn: ((zpp: ZPP_Vec2) => Any$
|
|
32
|
+
static _nape: Any$x;
|
|
33
|
+
static _zpp: Any$x;
|
|
34
|
+
static _wrapFn: ((zpp: ZPP_Vec2) => Any$x) | 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$
|
|
43
|
+
outer: Any$x;
|
|
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$
|
|
48
|
+
__class__: Any$x;
|
|
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$
|
|
54
|
+
wrapper(): Any$x;
|
|
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$
|
|
206
|
+
type Any$w = any;
|
|
207
207
|
declare class ZPP_Vec3 {
|
|
208
208
|
static __name__: string[];
|
|
209
|
-
static _zpp: Any$
|
|
210
|
-
static _wrapFn: ((zpp: ZPP_Vec3) => Any$
|
|
211
|
-
outer: Any$
|
|
209
|
+
static _zpp: Any$w;
|
|
210
|
+
static _wrapFn: ((zpp: ZPP_Vec3) => Any$w) | null;
|
|
211
|
+
outer: Any$w;
|
|
212
212
|
x: number;
|
|
213
213
|
y: number;
|
|
214
214
|
z: number;
|
|
215
215
|
immutable: boolean;
|
|
216
216
|
_validate: (() => void) | null;
|
|
217
|
-
__class__: Any$
|
|
217
|
+
__class__: Any$w;
|
|
218
218
|
validate(): void;
|
|
219
|
-
wrapper(): Any$
|
|
219
|
+
wrapper(): Any$w;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/**
|
|
@@ -280,13 +280,13 @@ declare class Vec3 {
|
|
|
280
280
|
*
|
|
281
281
|
* Converted from nape-compiled.js lines 73495–73561, 133826.
|
|
282
282
|
*/
|
|
283
|
-
type Any$
|
|
283
|
+
type Any$v = any;
|
|
284
284
|
declare class ZPP_Mat23 {
|
|
285
285
|
static __name__: string[];
|
|
286
|
-
static _nape: Any$
|
|
287
|
-
static _wrapFn: ((zpp: ZPP_Mat23) => Any$
|
|
286
|
+
static _nape: Any$v;
|
|
287
|
+
static _wrapFn: ((zpp: ZPP_Mat23) => Any$v) | null;
|
|
288
288
|
static zpp_pool: ZPP_Mat23 | null;
|
|
289
|
-
outer: Any$
|
|
289
|
+
outer: Any$v;
|
|
290
290
|
a: number;
|
|
291
291
|
b: number;
|
|
292
292
|
c: number;
|
|
@@ -295,13 +295,13 @@ declare class ZPP_Mat23 {
|
|
|
295
295
|
ty: number;
|
|
296
296
|
_invalidate: (() => void) | null;
|
|
297
297
|
next: ZPP_Mat23 | null;
|
|
298
|
-
__class__: Any$
|
|
298
|
+
__class__: Any$v;
|
|
299
299
|
/** Static factory with pooling. */
|
|
300
300
|
static get(): ZPP_Mat23;
|
|
301
301
|
/** Create an identity matrix from pool. */
|
|
302
302
|
static identity(): ZPP_Mat23;
|
|
303
303
|
/** Create a public wrapper, recycling any existing inner. */
|
|
304
|
-
wrapper(): Any$
|
|
304
|
+
wrapper(): Any$v;
|
|
305
305
|
invalidate(): void;
|
|
306
306
|
set(m: ZPP_Mat23): void;
|
|
307
307
|
setas(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
|
|
@@ -362,13 +362,13 @@ declare class Mat23 {
|
|
|
362
362
|
*
|
|
363
363
|
* Converted from nape-compiled.js lines 69554–69563.
|
|
364
364
|
*/
|
|
365
|
-
type Any$
|
|
365
|
+
type Any$u = any;
|
|
366
366
|
declare class ZPP_GeomPoly {
|
|
367
367
|
static __name__: string[];
|
|
368
|
-
outer: Any$
|
|
369
|
-
vertices: Any$
|
|
370
|
-
__class__: Any$
|
|
371
|
-
constructor(outer?: Any$
|
|
368
|
+
outer: Any$u;
|
|
369
|
+
vertices: Any$u;
|
|
370
|
+
__class__: Any$u;
|
|
371
|
+
constructor(outer?: Any$u);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
/**
|
|
@@ -392,7 +392,7 @@ declare class Winding {
|
|
|
392
392
|
toString(): string;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
type Any$
|
|
395
|
+
type Any$t = any;
|
|
396
396
|
/**
|
|
397
397
|
* A polygon represented as a circular doubly-linked list of vertices.
|
|
398
398
|
*
|
|
@@ -407,8 +407,8 @@ declare class GeomPoly {
|
|
|
407
407
|
zpp_inner: ZPP_GeomPoly;
|
|
408
408
|
zpp_pool: GeomPoly | null;
|
|
409
409
|
zpp_disp: boolean;
|
|
410
|
-
get _inner(): Any$
|
|
411
|
-
constructor(vertices?: Any$
|
|
410
|
+
get _inner(): Any$t;
|
|
411
|
+
constructor(vertices?: Any$t);
|
|
412
412
|
private _checkDisposed;
|
|
413
413
|
/** @internal Get compiled ZPP_GeomVert class */
|
|
414
414
|
private static _gvClass;
|
|
@@ -434,12 +434,12 @@ declare class GeomPoly {
|
|
|
434
434
|
private static _addVertices;
|
|
435
435
|
/** @internal After copying, dispose weak Vec2 inputs */
|
|
436
436
|
private static _disposeWeakInputs;
|
|
437
|
-
static get(vertices?: Any$
|
|
437
|
+
static get(vertices?: Any$t): GeomPoly;
|
|
438
438
|
empty(): boolean;
|
|
439
439
|
size(): number;
|
|
440
|
-
iterator(): Any$
|
|
441
|
-
forwardIterator(): Any$
|
|
442
|
-
backwardsIterator(): Any$
|
|
440
|
+
iterator(): Any$t;
|
|
441
|
+
forwardIterator(): Any$t;
|
|
442
|
+
backwardsIterator(): Any$t;
|
|
443
443
|
current(): Vec2;
|
|
444
444
|
push(vertex: Vec2): this;
|
|
445
445
|
pop(): this;
|
|
@@ -452,7 +452,7 @@ declare class GeomPoly {
|
|
|
452
452
|
copy(): GeomPoly;
|
|
453
453
|
dispose(): void;
|
|
454
454
|
area(): number;
|
|
455
|
-
winding(): Any$
|
|
455
|
+
winding(): Any$t;
|
|
456
456
|
contains(point: Vec2): boolean;
|
|
457
457
|
isClockwise(): boolean;
|
|
458
458
|
isConvex(): boolean;
|
|
@@ -460,14 +460,14 @@ declare class GeomPoly {
|
|
|
460
460
|
isMonotone(): boolean;
|
|
461
461
|
isDegenerate(): boolean;
|
|
462
462
|
simplify(epsilon: number): GeomPoly;
|
|
463
|
-
simpleDecomposition(output?: Any$
|
|
464
|
-
monotoneDecomposition(output?: Any$
|
|
465
|
-
convexDecomposition(delaunay?: boolean, output?: Any$
|
|
466
|
-
triangularDecomposition(delaunay?: boolean, output?: Any$
|
|
463
|
+
simpleDecomposition(output?: Any$t): Any$t;
|
|
464
|
+
monotoneDecomposition(output?: Any$t): Any$t;
|
|
465
|
+
convexDecomposition(delaunay?: boolean, output?: Any$t): Any$t;
|
|
466
|
+
triangularDecomposition(delaunay?: boolean, output?: Any$t): Any$t;
|
|
467
467
|
inflate(inflation: number): GeomPoly;
|
|
468
|
-
cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$
|
|
469
|
-
transform(matrix: Any$
|
|
470
|
-
bounds(): Any$
|
|
468
|
+
cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$t): Any$t;
|
|
469
|
+
transform(matrix: Any$t): this;
|
|
470
|
+
bounds(): Any$t;
|
|
471
471
|
top(): Vec2;
|
|
472
472
|
bottom(): Vec2;
|
|
473
473
|
left(): Vec2;
|
|
@@ -483,30 +483,30 @@ declare class GeomPoly {
|
|
|
483
483
|
*
|
|
484
484
|
* Converted from nape-compiled.js lines 63546–63965, 134951.
|
|
485
485
|
*/
|
|
486
|
-
type Any$
|
|
486
|
+
type Any$s = any;
|
|
487
487
|
declare class ZPP_AABB {
|
|
488
488
|
static zpp_pool: ZPP_AABB | null;
|
|
489
489
|
static __name__: string[];
|
|
490
|
-
static _nape: Any$
|
|
491
|
-
static _zpp: Any$
|
|
492
|
-
static _wrapFn: ((zpp: ZPP_AABB) => Any$
|
|
490
|
+
static _nape: Any$s;
|
|
491
|
+
static _zpp: Any$s;
|
|
492
|
+
static _wrapFn: ((zpp: ZPP_AABB) => Any$s) | null;
|
|
493
493
|
_invalidate: ((self: ZPP_AABB) => void) | null;
|
|
494
494
|
_validate: (() => void) | null;
|
|
495
495
|
_immutable: boolean;
|
|
496
|
-
outer: Any$
|
|
496
|
+
outer: Any$s;
|
|
497
497
|
next: ZPP_AABB | null;
|
|
498
498
|
minx: number;
|
|
499
499
|
miny: number;
|
|
500
500
|
maxx: number;
|
|
501
501
|
maxy: number;
|
|
502
|
-
wrap_min: Any$
|
|
503
|
-
wrap_max: Any$
|
|
504
|
-
__class__: Any$
|
|
502
|
+
wrap_min: Any$s;
|
|
503
|
+
wrap_max: Any$s;
|
|
504
|
+
__class__: Any$s;
|
|
505
505
|
/** Static factory with pooling. */
|
|
506
506
|
static get(minx: number, miny: number, maxx: number, maxy: number): ZPP_AABB;
|
|
507
507
|
validate(): void;
|
|
508
508
|
invalidate(): void;
|
|
509
|
-
wrapper(): Any$
|
|
509
|
+
wrapper(): Any$s;
|
|
510
510
|
alloc(): void;
|
|
511
511
|
free(): void;
|
|
512
512
|
copy(): ZPP_AABB;
|
|
@@ -517,10 +517,10 @@ declare class ZPP_AABB {
|
|
|
517
517
|
private static _makeVec2Wrapper;
|
|
518
518
|
getmin(): void;
|
|
519
519
|
dom_min(): void;
|
|
520
|
-
mod_min(min: Any$
|
|
520
|
+
mod_min(min: Any$s): void;
|
|
521
521
|
getmax(): void;
|
|
522
522
|
dom_max(): void;
|
|
523
|
-
mod_max(max: Any$
|
|
523
|
+
mod_max(max: Any$s): void;
|
|
524
524
|
intersectX(x: ZPP_AABB): boolean;
|
|
525
525
|
intersectY(x: ZPP_AABB): boolean;
|
|
526
526
|
intersect(x: ZPP_AABB): boolean;
|
|
@@ -584,18 +584,18 @@ declare class AABB {
|
|
|
584
584
|
*
|
|
585
585
|
* Converted from nape-compiled.js lines 72949–72972.
|
|
586
586
|
*/
|
|
587
|
-
type Any$
|
|
587
|
+
type Any$r = any;
|
|
588
588
|
declare class ZPP_MatMN {
|
|
589
589
|
static __name__: string[];
|
|
590
|
-
outer: Any$
|
|
590
|
+
outer: Any$r;
|
|
591
591
|
m: number;
|
|
592
592
|
n: number;
|
|
593
593
|
x: number[];
|
|
594
|
-
__class__: Any$
|
|
594
|
+
__class__: Any$r;
|
|
595
595
|
constructor(m: number, n: number);
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
type Any$
|
|
598
|
+
type Any$q = any;
|
|
599
599
|
/**
|
|
600
600
|
* Variable-sized M×N matrix.
|
|
601
601
|
*
|
|
@@ -606,7 +606,7 @@ declare class MatMN {
|
|
|
606
606
|
zpp_inner: ZPP_MatMN;
|
|
607
607
|
get _inner(): NapeInner;
|
|
608
608
|
constructor(rows: number, cols: number);
|
|
609
|
-
static _wrap(inner: Any$
|
|
609
|
+
static _wrap(inner: Any$q): MatMN;
|
|
610
610
|
get rows(): number;
|
|
611
611
|
get cols(): number;
|
|
612
612
|
x(row: number, col: number): number;
|
|
@@ -616,7 +616,7 @@ declare class MatMN {
|
|
|
616
616
|
mul(matrix: MatMN): MatMN;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
type Any$
|
|
619
|
+
type Any$p = any;
|
|
620
620
|
/**
|
|
621
621
|
* Isosurface extraction using the marching squares algorithm.
|
|
622
622
|
*
|
|
@@ -639,7 +639,7 @@ declare class MarchingSquares {
|
|
|
639
639
|
* @param output - Optional GeomPolyList to populate. If null, a new one is created.
|
|
640
640
|
* @returns The populated GeomPolyList.
|
|
641
641
|
*/
|
|
642
|
-
static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$
|
|
642
|
+
static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$p): Any$p;
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
/**
|
|
@@ -667,7 +667,7 @@ declare class Ray {
|
|
|
667
667
|
copy(): Ray;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
type Any$
|
|
670
|
+
type Any$o = any;
|
|
671
671
|
/**
|
|
672
672
|
* Result from a convex-cast query.
|
|
673
673
|
*
|
|
@@ -676,23 +676,23 @@ type Any$f = any;
|
|
|
676
676
|
declare class ConvexResult {
|
|
677
677
|
static __name__: string[];
|
|
678
678
|
/** @internal */
|
|
679
|
-
zpp_inner: Any$
|
|
679
|
+
zpp_inner: Any$o;
|
|
680
680
|
/** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
|
|
681
681
|
get _inner(): NapeInner;
|
|
682
682
|
constructor();
|
|
683
683
|
/** @internal */
|
|
684
|
-
static _wrap(inner: Any$
|
|
684
|
+
static _wrap(inner: Any$o): ConvexResult;
|
|
685
685
|
get normal(): Vec2;
|
|
686
686
|
get position(): Vec2;
|
|
687
687
|
get toi(): number;
|
|
688
|
-
get shape(): Any$
|
|
688
|
+
get shape(): Any$o;
|
|
689
689
|
dispose(): void;
|
|
690
690
|
toString(): string;
|
|
691
691
|
/** @internal */
|
|
692
692
|
private _disposed;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
type Any$
|
|
695
|
+
type Any$n = any;
|
|
696
696
|
/**
|
|
697
697
|
* Result from a raycast query.
|
|
698
698
|
*
|
|
@@ -701,16 +701,16 @@ type Any$e = any;
|
|
|
701
701
|
declare class RayResult {
|
|
702
702
|
static __name__: string[];
|
|
703
703
|
/** @internal */
|
|
704
|
-
zpp_inner: Any$
|
|
704
|
+
zpp_inner: Any$n;
|
|
705
705
|
/** @internal Backward-compat: compiled code accesses `obj.zpp_inner`. */
|
|
706
706
|
get _inner(): NapeInner;
|
|
707
707
|
constructor();
|
|
708
708
|
/** @internal */
|
|
709
|
-
static _wrap(inner: Any$
|
|
709
|
+
static _wrap(inner: Any$n): RayResult;
|
|
710
710
|
get normal(): Vec2;
|
|
711
711
|
get distance(): number;
|
|
712
712
|
get inner(): boolean;
|
|
713
|
-
get shape(): Any$
|
|
713
|
+
get shape(): Any$n;
|
|
714
714
|
dispose(): void;
|
|
715
715
|
toString(): string;
|
|
716
716
|
/** @internal */
|
|
@@ -778,7 +778,7 @@ declare class NapeList<T> implements Iterable<T> {
|
|
|
778
778
|
*
|
|
779
779
|
* Converted from nape-compiled.js lines 87523–87601, 135477–135481.
|
|
780
780
|
*/
|
|
781
|
-
type Any$
|
|
781
|
+
type Any$m = any;
|
|
782
782
|
declare class ZPP_Material {
|
|
783
783
|
static zpp_pool: ZPP_Material | null;
|
|
784
784
|
static WAKE: number;
|
|
@@ -791,27 +791,27 @@ declare class ZPP_Material {
|
|
|
791
791
|
* _nape = the `nape` public namespace (for wrapper creation)
|
|
792
792
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
|
|
793
793
|
*/
|
|
794
|
-
static _nape: Any$
|
|
795
|
-
static _zpp: Any$
|
|
794
|
+
static _nape: Any$m;
|
|
795
|
+
static _zpp: Any$m;
|
|
796
796
|
/**
|
|
797
797
|
* Wrapper factory callback, registered by the modernized Material class.
|
|
798
798
|
* When set, wrapper() uses this instead of creating a compiled Material.
|
|
799
799
|
*/
|
|
800
|
-
static _wrapFn: ((zpp: ZPP_Material) => Any$
|
|
800
|
+
static _wrapFn: ((zpp: ZPP_Material) => Any$m) | null;
|
|
801
801
|
elasticity: number;
|
|
802
802
|
dynamicFriction: number;
|
|
803
803
|
staticFriction: number;
|
|
804
804
|
density: number;
|
|
805
805
|
rollingFriction: number;
|
|
806
|
-
shapes: Any$
|
|
807
|
-
wrap_shapes: Any$
|
|
808
|
-
outer: Any$
|
|
809
|
-
userData: Any$
|
|
806
|
+
shapes: Any$m;
|
|
807
|
+
wrap_shapes: Any$m;
|
|
808
|
+
outer: Any$m;
|
|
809
|
+
userData: Any$m;
|
|
810
810
|
next: ZPP_Material | null;
|
|
811
|
-
__class__: Any$
|
|
811
|
+
__class__: Any$m;
|
|
812
812
|
constructor();
|
|
813
813
|
/** Create/return the public nape.phys.Material wrapper for this internal object. */
|
|
814
|
-
wrapper(): Any$
|
|
814
|
+
wrapper(): Any$m;
|
|
815
815
|
/** Called when this object is returned to the pool. */
|
|
816
816
|
free(): void;
|
|
817
817
|
/** Called when this object is taken from the pool. */
|
|
@@ -819,9 +819,9 @@ declare class ZPP_Material {
|
|
|
819
819
|
/** Initialize the shapes list (called during feature construction). */
|
|
820
820
|
feature_cons(): void;
|
|
821
821
|
/** Register a shape that uses this material. */
|
|
822
|
-
addShape(shape: Any$
|
|
822
|
+
addShape(shape: Any$m): void;
|
|
823
823
|
/** Unregister a shape that no longer uses this material. */
|
|
824
|
-
remShape(shape: Any$
|
|
824
|
+
remShape(shape: Any$m): void;
|
|
825
825
|
/** Create a copy with the same property values. */
|
|
826
826
|
copy(): ZPP_Material;
|
|
827
827
|
/** Copy all property values from another ZPP_Material. */
|
|
@@ -881,36 +881,36 @@ declare class Material {
|
|
|
881
881
|
*
|
|
882
882
|
* Converted from nape-compiled.js lines 87335–87523, 135403.
|
|
883
883
|
*/
|
|
884
|
-
type Any$
|
|
884
|
+
type Any$l = any;
|
|
885
885
|
declare class ZPP_FluidProperties {
|
|
886
886
|
static zpp_pool: ZPP_FluidProperties | null;
|
|
887
887
|
static __name__: string[];
|
|
888
|
-
static _nape: Any$
|
|
889
|
-
static _zpp: Any$
|
|
890
|
-
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$
|
|
888
|
+
static _nape: Any$l;
|
|
889
|
+
static _zpp: Any$l;
|
|
890
|
+
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$l) | null;
|
|
891
891
|
viscosity: number;
|
|
892
892
|
density: number;
|
|
893
893
|
gravityx: number;
|
|
894
894
|
gravityy: number;
|
|
895
|
-
wrap_gravity: Any$
|
|
896
|
-
shapes: Any$
|
|
897
|
-
wrap_shapes: Any$
|
|
898
|
-
outer: Any$
|
|
899
|
-
userData: Any$
|
|
895
|
+
wrap_gravity: Any$l;
|
|
896
|
+
shapes: Any$l;
|
|
897
|
+
wrap_shapes: Any$l;
|
|
898
|
+
outer: Any$l;
|
|
899
|
+
userData: Any$l;
|
|
900
900
|
next: ZPP_FluidProperties | null;
|
|
901
|
-
__class__: Any$
|
|
901
|
+
__class__: Any$l;
|
|
902
902
|
constructor();
|
|
903
903
|
/** Create/return the public nape.phys.FluidProperties wrapper. */
|
|
904
|
-
wrapper(): Any$
|
|
904
|
+
wrapper(): Any$l;
|
|
905
905
|
free(): void;
|
|
906
906
|
alloc(): void;
|
|
907
907
|
feature_cons(): void;
|
|
908
|
-
addShape(shape: Any$
|
|
909
|
-
remShape(shape: Any$
|
|
908
|
+
addShape(shape: Any$l): void;
|
|
909
|
+
remShape(shape: Any$l): void;
|
|
910
910
|
/** Copy with object pooling. */
|
|
911
911
|
copy(): ZPP_FluidProperties;
|
|
912
912
|
/** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
|
|
913
|
-
gravity_invalidate(x: Any$
|
|
913
|
+
gravity_invalidate(x: Any$l): void;
|
|
914
914
|
/** Sync the gravity Vec2 wrapper with internal values. */
|
|
915
915
|
gravity_validate(): void;
|
|
916
916
|
/** Lazily create and return the gravity Vec2 wrapper. */
|
|
@@ -961,33 +961,33 @@ declare class FluidProperties {
|
|
|
961
961
|
*
|
|
962
962
|
* Converted from nape-compiled.js lines 63255–63366, 135329.
|
|
963
963
|
*/
|
|
964
|
-
type Any$
|
|
964
|
+
type Any$k = any;
|
|
965
965
|
declare class ZPP_InteractionFilter {
|
|
966
966
|
static zpp_pool: ZPP_InteractionFilter | null;
|
|
967
967
|
static __name__: string[];
|
|
968
|
-
static _nape: Any$
|
|
969
|
-
static _zpp: Any$
|
|
970
|
-
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$
|
|
968
|
+
static _nape: Any$k;
|
|
969
|
+
static _zpp: Any$k;
|
|
970
|
+
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$k) | null;
|
|
971
971
|
collisionGroup: number;
|
|
972
972
|
collisionMask: number;
|
|
973
973
|
sensorGroup: number;
|
|
974
974
|
sensorMask: number;
|
|
975
975
|
fluidGroup: number;
|
|
976
976
|
fluidMask: number;
|
|
977
|
-
shapes: Any$
|
|
978
|
-
wrap_shapes: Any$
|
|
979
|
-
outer: Any$
|
|
980
|
-
userData: Any$
|
|
977
|
+
shapes: Any$k;
|
|
978
|
+
wrap_shapes: Any$k;
|
|
979
|
+
outer: Any$k;
|
|
980
|
+
userData: Any$k;
|
|
981
981
|
next: ZPP_InteractionFilter | null;
|
|
982
|
-
__class__: Any$
|
|
982
|
+
__class__: Any$k;
|
|
983
983
|
constructor();
|
|
984
984
|
/** Create/return the public nape.dynamics.InteractionFilter wrapper. */
|
|
985
|
-
wrapper(): Any$
|
|
985
|
+
wrapper(): Any$k;
|
|
986
986
|
free(): void;
|
|
987
987
|
alloc(): void;
|
|
988
988
|
feature_cons(): void;
|
|
989
|
-
addShape(shape: Any$
|
|
990
|
-
remShape(shape: Any$
|
|
989
|
+
addShape(shape: Any$k): void;
|
|
990
|
+
remShape(shape: Any$k): void;
|
|
991
991
|
/** Create a copy with object pooling. */
|
|
992
992
|
copy(): ZPP_InteractionFilter;
|
|
993
993
|
/** Test whether two filters allow collision between their shapes. */
|
|
@@ -1043,6 +1043,114 @@ declare class InteractionFilter {
|
|
|
1043
1043
|
toString(): string;
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
|
+
/**
|
|
1047
|
+
* ZPP_InteractionGroup — Internal interaction group for the nape physics engine.
|
|
1048
|
+
*
|
|
1049
|
+
* Hierarchical groups that can override interaction filters. When two shapes
|
|
1050
|
+
* share a common group with `ignore = true`, their interaction is suppressed.
|
|
1051
|
+
*
|
|
1052
|
+
* Converted from nape-compiled.js lines 63367–63463, 135330–135331.
|
|
1053
|
+
*/
|
|
1054
|
+
type Any$j = any;
|
|
1055
|
+
declare class ZPP_InteractionGroup {
|
|
1056
|
+
static SHAPE: number;
|
|
1057
|
+
static BODY: number;
|
|
1058
|
+
static __name__: string[];
|
|
1059
|
+
static _zpp: Any$j;
|
|
1060
|
+
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$j) | null;
|
|
1061
|
+
outer: Any$j;
|
|
1062
|
+
ignore: boolean;
|
|
1063
|
+
group: ZPP_InteractionGroup | null;
|
|
1064
|
+
groups: Any$j;
|
|
1065
|
+
wrap_groups: Any$j;
|
|
1066
|
+
interactors: Any$j;
|
|
1067
|
+
wrap_interactors: Any$j;
|
|
1068
|
+
depth: number;
|
|
1069
|
+
__class__: Any$j;
|
|
1070
|
+
constructor();
|
|
1071
|
+
/** Set or change the parent group. */
|
|
1072
|
+
setGroup(group: ZPP_InteractionGroup | null): void;
|
|
1073
|
+
/** Wake all interactors and propagate to child groups. */
|
|
1074
|
+
invalidate(force?: boolean): void;
|
|
1075
|
+
/** Add a child group. */
|
|
1076
|
+
addGroup(group: ZPP_InteractionGroup): void;
|
|
1077
|
+
/** Remove a child group. */
|
|
1078
|
+
remGroup(group: ZPP_InteractionGroup): void;
|
|
1079
|
+
/** Register an interactor in this group. */
|
|
1080
|
+
addInteractor(intx: Any$j): void;
|
|
1081
|
+
/** Unregister an interactor from this group. */
|
|
1082
|
+
remInteractor(intx: Any$j, flag?: number): void;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Hierarchical interaction group for controlling interactions
|
|
1087
|
+
* between sets of interactors.
|
|
1088
|
+
*
|
|
1089
|
+
* Internally wraps a ZPP_InteractionGroup and is registered as
|
|
1090
|
+
* the public `nape.dynamics.InteractionGroup` class in the compiled namespace.
|
|
1091
|
+
*
|
|
1092
|
+
* Converted from nape-compiled.js lines 14641–14733.
|
|
1093
|
+
*/
|
|
1094
|
+
declare class InteractionGroup {
|
|
1095
|
+
static __name__: string[];
|
|
1096
|
+
/** @internal The internal ZPP_InteractionGroup this wrapper owns. */
|
|
1097
|
+
zpp_inner: ZPP_InteractionGroup;
|
|
1098
|
+
/**
|
|
1099
|
+
* Backward-compatible accessor — returns `this` so that compiled engine
|
|
1100
|
+
* code that receives `group._inner` can still access `zpp_inner`.
|
|
1101
|
+
* @internal
|
|
1102
|
+
*/
|
|
1103
|
+
get _inner(): NapeInner;
|
|
1104
|
+
constructor(ignore?: boolean);
|
|
1105
|
+
/** @internal Wrap a ZPP_InteractionGroup (or legacy compiled InteractionGroup) with caching. */
|
|
1106
|
+
static _wrap(inner: any): InteractionGroup;
|
|
1107
|
+
get group(): InteractionGroup | null;
|
|
1108
|
+
set group(value: InteractionGroup | null);
|
|
1109
|
+
get ignore(): boolean;
|
|
1110
|
+
set ignore(value: boolean);
|
|
1111
|
+
get interactors(): any;
|
|
1112
|
+
get groups(): any;
|
|
1113
|
+
toString(): string;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Base class for all interactable physics objects (Body, Shape, Compound).
|
|
1118
|
+
*
|
|
1119
|
+
* Cannot be instantiated directly — only via Body, Shape, or Compound.
|
|
1120
|
+
* Provides shared properties: id, userData, group, cbTypes, and type
|
|
1121
|
+
* casting methods (castBody, castShape, castCompound).
|
|
1122
|
+
*/
|
|
1123
|
+
declare class Interactor {
|
|
1124
|
+
/** @internal */
|
|
1125
|
+
readonly _inner: NapeInner;
|
|
1126
|
+
/** @internal – only subclasses may construct. */
|
|
1127
|
+
protected constructor();
|
|
1128
|
+
/** @internal Wrap a compiled Interactor (Body/Shape/Compound) instance. */
|
|
1129
|
+
static _wrap(inner: NapeInner): Interactor;
|
|
1130
|
+
/** Unique numeric identifier for this interactor. */
|
|
1131
|
+
get id(): number;
|
|
1132
|
+
/** User-defined data storage object. */
|
|
1133
|
+
get userData(): Record<string, unknown>;
|
|
1134
|
+
/** The interaction group this interactor belongs to. */
|
|
1135
|
+
get group(): InteractionGroup | null;
|
|
1136
|
+
set group(value: InteractionGroup | null);
|
|
1137
|
+
/** Callback types assigned to this interactor. */
|
|
1138
|
+
get cbTypes(): NapeInner;
|
|
1139
|
+
/** Cast to Body — returns the Body wrapper if this is a Body, else null. */
|
|
1140
|
+
get castBody(): any;
|
|
1141
|
+
/** Cast to Shape — returns the Shape wrapper if this is a Shape, else null. */
|
|
1142
|
+
get castShape(): any;
|
|
1143
|
+
/** Cast to Compound — returns the Compound wrapper if this is a Compound, else null. */
|
|
1144
|
+
get castCompound(): any;
|
|
1145
|
+
/** Returns true if this interactor is a Shape. */
|
|
1146
|
+
isShape(): boolean;
|
|
1147
|
+
/** Returns true if this interactor is a Body. */
|
|
1148
|
+
isBody(): boolean;
|
|
1149
|
+
/** Returns true if this interactor is a Compound. */
|
|
1150
|
+
isCompound(): boolean;
|
|
1151
|
+
toString(): string;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1046
1154
|
/**
|
|
1047
1155
|
* Shape type classification.
|
|
1048
1156
|
*
|
|
@@ -1064,9 +1172,7 @@ declare class ShapeType {
|
|
|
1064
1172
|
/**
|
|
1065
1173
|
* Base class for physics shapes (Circle, Polygon).
|
|
1066
1174
|
*/
|
|
1067
|
-
declare class Shape {
|
|
1068
|
-
/** @internal */
|
|
1069
|
-
readonly _inner: NapeInner;
|
|
1175
|
+
declare class Shape extends Interactor {
|
|
1070
1176
|
/** @internal – shapes are created via Circle or Polygon constructors. */
|
|
1071
1177
|
protected constructor();
|
|
1072
1178
|
/** @internal */
|
|
@@ -1172,22 +1278,121 @@ declare class Constraint {
|
|
|
1172
1278
|
}
|
|
1173
1279
|
|
|
1174
1280
|
/**
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1281
|
+
* ZPP_Listener — Internal listener base class for the nape physics engine.
|
|
1282
|
+
*
|
|
1283
|
+
* Base class for ZPP_BodyListener, ZPP_ConstraintListener, and
|
|
1284
|
+
* ZPP_InteractionListener. Holds common properties (space, precedence,
|
|
1285
|
+
* event type, listener type) and provides stub methods for subclass override.
|
|
1286
|
+
*
|
|
1287
|
+
* Converted from nape-compiled.js lines 27259–27304, 112053–112139.
|
|
1288
|
+
*/
|
|
1289
|
+
type Any$i = any;
|
|
1290
|
+
declare class ZPP_Listener {
|
|
1291
|
+
static __name__: string[];
|
|
1292
|
+
static _nape: Any$i;
|
|
1293
|
+
static _zpp: Any$i;
|
|
1294
|
+
static internal: boolean;
|
|
1295
|
+
static types: Any$i[];
|
|
1296
|
+
static events: Any$i[];
|
|
1297
|
+
space: Any$i;
|
|
1298
|
+
interaction: Any$i;
|
|
1299
|
+
constraint: Any$i;
|
|
1300
|
+
body: Any$i;
|
|
1301
|
+
precedence: number;
|
|
1302
|
+
event: number;
|
|
1303
|
+
type: number;
|
|
1304
|
+
id: number;
|
|
1305
|
+
outer: Any$i;
|
|
1306
|
+
__class__: Any$i;
|
|
1307
|
+
constructor();
|
|
1308
|
+
/** Sort comparator: higher precedence first, then by id descending. */
|
|
1309
|
+
static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
|
|
1310
|
+
swapEvent(_event: number): void;
|
|
1311
|
+
invalidate_precedence(): void;
|
|
1312
|
+
addedToSpace(): void;
|
|
1313
|
+
removedFromSpace(): void;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Callback event types.
|
|
1318
|
+
*
|
|
1319
|
+
* - `BEGIN` — interaction just started
|
|
1320
|
+
* - `ONGOING` — interaction continues
|
|
1321
|
+
* - `END` — interaction just ended
|
|
1322
|
+
* - `WAKE` — body/constraint woke up
|
|
1323
|
+
* - `SLEEP` — body/constraint went to sleep
|
|
1324
|
+
* - `BREAK` — constraint was broken
|
|
1325
|
+
* - `PRE` — pre-interaction callback
|
|
1326
|
+
*
|
|
1327
|
+
* Converted from nape-compiled.js lines 516–657.
|
|
1328
|
+
*/
|
|
1329
|
+
declare class CbEvent {
|
|
1330
|
+
static __name__: string[];
|
|
1331
|
+
constructor();
|
|
1332
|
+
static get BEGIN(): CbEvent;
|
|
1333
|
+
static get ONGOING(): CbEvent;
|
|
1334
|
+
static get END(): CbEvent;
|
|
1335
|
+
static get WAKE(): CbEvent;
|
|
1336
|
+
static get SLEEP(): CbEvent;
|
|
1337
|
+
static get BREAK(): CbEvent;
|
|
1338
|
+
static get PRE(): CbEvent;
|
|
1339
|
+
static get_BEGIN(): CbEvent;
|
|
1340
|
+
static get_ONGOING(): CbEvent;
|
|
1341
|
+
static get_END(): CbEvent;
|
|
1342
|
+
static get_WAKE(): CbEvent;
|
|
1343
|
+
static get_SLEEP(): CbEvent;
|
|
1344
|
+
static get_BREAK(): CbEvent;
|
|
1345
|
+
static get_PRE(): CbEvent;
|
|
1346
|
+
toString(): string;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Listener type classification.
|
|
1351
|
+
*
|
|
1352
|
+
* - `BODY` — body event listener
|
|
1353
|
+
* - `CONSTRAINT` — constraint event listener
|
|
1354
|
+
* - `INTERACTION` — interaction event listener
|
|
1355
|
+
* - `PRE` — pre-interaction listener
|
|
1356
|
+
*
|
|
1357
|
+
* Converted from nape-compiled.js lines 2554–2646.
|
|
1358
|
+
*/
|
|
1359
|
+
declare class ListenerType {
|
|
1360
|
+
static __name__: string[];
|
|
1361
|
+
static BODY: ListenerType | null;
|
|
1362
|
+
static CONSTRAINT: ListenerType | null;
|
|
1363
|
+
static INTERACTION: ListenerType | null;
|
|
1364
|
+
static PRE: ListenerType | null;
|
|
1365
|
+
constructor();
|
|
1366
|
+
static get_BODY(): ListenerType;
|
|
1367
|
+
static get_CONSTRAINT(): ListenerType;
|
|
1368
|
+
static get_INTERACTION(): ListenerType;
|
|
1369
|
+
static get_PRE(): ListenerType;
|
|
1370
|
+
toString(): string;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
/**
|
|
1374
|
+
* Listener — Base class for all physics event listeners.
|
|
1375
|
+
*
|
|
1376
|
+
* Provides common properties (type, event, precedence, space) and
|
|
1377
|
+
* toString() for all listener subclasses.
|
|
1378
|
+
*
|
|
1379
|
+
* Fully modernized from nape-compiled.js lines 231–433.
|
|
1177
1380
|
*/
|
|
1381
|
+
|
|
1382
|
+
type Any$h = any;
|
|
1178
1383
|
declare class Listener {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
get
|
|
1186
|
-
set
|
|
1384
|
+
static __name__: string[];
|
|
1385
|
+
zpp_inner: ZPP_Listener;
|
|
1386
|
+
get _inner(): Any$h;
|
|
1387
|
+
constructor();
|
|
1388
|
+
static _wrap(inner: Any$h): Listener;
|
|
1389
|
+
get type(): ListenerType;
|
|
1390
|
+
get event(): CbEvent;
|
|
1391
|
+
set event(event: CbEvent);
|
|
1187
1392
|
get precedence(): number;
|
|
1188
|
-
set precedence(
|
|
1189
|
-
get
|
|
1190
|
-
set
|
|
1393
|
+
set precedence(precedence: number);
|
|
1394
|
+
get space(): Space | null;
|
|
1395
|
+
set space(space: Space | Any$h | null);
|
|
1191
1396
|
toString(): string;
|
|
1192
1397
|
}
|
|
1193
1398
|
|
|
@@ -1267,9 +1472,7 @@ declare class BodyType {
|
|
|
1267
1472
|
/**
|
|
1268
1473
|
* A rigid body in the physics simulation.
|
|
1269
1474
|
*/
|
|
1270
|
-
declare class Body {
|
|
1271
|
-
/** @internal */
|
|
1272
|
-
readonly _inner: NapeInner;
|
|
1475
|
+
declare class Body extends Interactor {
|
|
1273
1476
|
constructor(type?: BodyType, position?: Vec2);
|
|
1274
1477
|
/** @internal */
|
|
1275
1478
|
static _wrap(inner: NapeInner): Body;
|
|
@@ -1326,7 +1529,6 @@ declare class Body {
|
|
|
1326
1529
|
get constraintVelocity(): Vec2;
|
|
1327
1530
|
get localCOM(): Vec2;
|
|
1328
1531
|
get worldCOM(): Vec2;
|
|
1329
|
-
get userData(): Record<string, unknown>;
|
|
1330
1532
|
integrate(deltaTime: number): void;
|
|
1331
1533
|
applyImpulse(impulse: Vec2, pos?: Vec2, sleepable?: boolean): void;
|
|
1332
1534
|
applyAngularImpulse(impulse: number, sleepable?: boolean): void;
|
|
@@ -1481,76 +1683,6 @@ declare class Broadphase {
|
|
|
1481
1683
|
toString(): string;
|
|
1482
1684
|
}
|
|
1483
1685
|
|
|
1484
|
-
/**
|
|
1485
|
-
* ZPP_InteractionGroup — Internal interaction group for the nape physics engine.
|
|
1486
|
-
*
|
|
1487
|
-
* Hierarchical groups that can override interaction filters. When two shapes
|
|
1488
|
-
* share a common group with `ignore = true`, their interaction is suppressed.
|
|
1489
|
-
*
|
|
1490
|
-
* Converted from nape-compiled.js lines 63367–63463, 135330–135331.
|
|
1491
|
-
*/
|
|
1492
|
-
type Any$a = any;
|
|
1493
|
-
declare class ZPP_InteractionGroup {
|
|
1494
|
-
static SHAPE: number;
|
|
1495
|
-
static BODY: number;
|
|
1496
|
-
static __name__: string[];
|
|
1497
|
-
static _zpp: Any$a;
|
|
1498
|
-
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$a) | null;
|
|
1499
|
-
outer: Any$a;
|
|
1500
|
-
ignore: boolean;
|
|
1501
|
-
group: ZPP_InteractionGroup | null;
|
|
1502
|
-
groups: Any$a;
|
|
1503
|
-
wrap_groups: Any$a;
|
|
1504
|
-
interactors: Any$a;
|
|
1505
|
-
wrap_interactors: Any$a;
|
|
1506
|
-
depth: number;
|
|
1507
|
-
__class__: Any$a;
|
|
1508
|
-
constructor();
|
|
1509
|
-
/** Set or change the parent group. */
|
|
1510
|
-
setGroup(group: ZPP_InteractionGroup | null): void;
|
|
1511
|
-
/** Wake all interactors and propagate to child groups. */
|
|
1512
|
-
invalidate(force?: boolean): void;
|
|
1513
|
-
/** Add a child group. */
|
|
1514
|
-
addGroup(group: ZPP_InteractionGroup): void;
|
|
1515
|
-
/** Remove a child group. */
|
|
1516
|
-
remGroup(group: ZPP_InteractionGroup): void;
|
|
1517
|
-
/** Register an interactor in this group. */
|
|
1518
|
-
addInteractor(intx: Any$a): void;
|
|
1519
|
-
/** Unregister an interactor from this group. */
|
|
1520
|
-
remInteractor(intx: Any$a, flag?: number): void;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* Hierarchical interaction group for controlling interactions
|
|
1525
|
-
* between sets of interactors.
|
|
1526
|
-
*
|
|
1527
|
-
* Internally wraps a ZPP_InteractionGroup and is registered as
|
|
1528
|
-
* the public `nape.dynamics.InteractionGroup` class in the compiled namespace.
|
|
1529
|
-
*
|
|
1530
|
-
* Converted from nape-compiled.js lines 14641–14733.
|
|
1531
|
-
*/
|
|
1532
|
-
declare class InteractionGroup {
|
|
1533
|
-
static __name__: string[];
|
|
1534
|
-
/** @internal The internal ZPP_InteractionGroup this wrapper owns. */
|
|
1535
|
-
zpp_inner: ZPP_InteractionGroup;
|
|
1536
|
-
/**
|
|
1537
|
-
* Backward-compatible accessor — returns `this` so that compiled engine
|
|
1538
|
-
* code that receives `group._inner` can still access `zpp_inner`.
|
|
1539
|
-
* @internal
|
|
1540
|
-
*/
|
|
1541
|
-
get _inner(): NapeInner;
|
|
1542
|
-
constructor(ignore?: boolean);
|
|
1543
|
-
/** @internal Wrap a ZPP_InteractionGroup (or legacy compiled InteractionGroup) with caching. */
|
|
1544
|
-
static _wrap(inner: any): InteractionGroup;
|
|
1545
|
-
get group(): InteractionGroup | null;
|
|
1546
|
-
set group(value: InteractionGroup | null);
|
|
1547
|
-
get ignore(): boolean;
|
|
1548
|
-
set ignore(value: boolean);
|
|
1549
|
-
get interactors(): any;
|
|
1550
|
-
get groups(): any;
|
|
1551
|
-
toString(): string;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
1686
|
/**
|
|
1555
1687
|
* Arbiter type classification.
|
|
1556
1688
|
*
|
|
@@ -1572,39 +1704,6 @@ declare class ArbiterType {
|
|
|
1572
1704
|
toString(): string;
|
|
1573
1705
|
}
|
|
1574
1706
|
|
|
1575
|
-
/**
|
|
1576
|
-
* Callback event types.
|
|
1577
|
-
*
|
|
1578
|
-
* - `BEGIN` — interaction just started
|
|
1579
|
-
* - `ONGOING` — interaction continues
|
|
1580
|
-
* - `END` — interaction just ended
|
|
1581
|
-
* - `WAKE` — body/constraint woke up
|
|
1582
|
-
* - `SLEEP` — body/constraint went to sleep
|
|
1583
|
-
* - `BREAK` — constraint was broken
|
|
1584
|
-
* - `PRE` — pre-interaction callback
|
|
1585
|
-
*
|
|
1586
|
-
* Converted from nape-compiled.js lines 516–657.
|
|
1587
|
-
*/
|
|
1588
|
-
declare class CbEvent {
|
|
1589
|
-
static __name__: string[];
|
|
1590
|
-
constructor();
|
|
1591
|
-
static get BEGIN(): CbEvent;
|
|
1592
|
-
static get ONGOING(): CbEvent;
|
|
1593
|
-
static get END(): CbEvent;
|
|
1594
|
-
static get WAKE(): CbEvent;
|
|
1595
|
-
static get SLEEP(): CbEvent;
|
|
1596
|
-
static get BREAK(): CbEvent;
|
|
1597
|
-
static get PRE(): CbEvent;
|
|
1598
|
-
static get_BEGIN(): CbEvent;
|
|
1599
|
-
static get_ONGOING(): CbEvent;
|
|
1600
|
-
static get_END(): CbEvent;
|
|
1601
|
-
static get_WAKE(): CbEvent;
|
|
1602
|
-
static get_SLEEP(): CbEvent;
|
|
1603
|
-
static get_BREAK(): CbEvent;
|
|
1604
|
-
static get_PRE(): CbEvent;
|
|
1605
|
-
toString(): string;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
1707
|
/**
|
|
1609
1708
|
* ZPP_CbType — Internal callback type for the nape physics engine.
|
|
1610
1709
|
*
|
|
@@ -1614,41 +1713,41 @@ declare class CbEvent {
|
|
|
1614
1713
|
*
|
|
1615
1714
|
* Converted from nape-compiled.js lines 48256–48482.
|
|
1616
1715
|
*/
|
|
1617
|
-
type Any$
|
|
1716
|
+
type Any$g = any;
|
|
1618
1717
|
declare class ZPP_CbType {
|
|
1619
1718
|
static __name__: string[];
|
|
1620
|
-
static _zpp: Any$
|
|
1621
|
-
outer: Any$
|
|
1622
|
-
userData: Any$
|
|
1719
|
+
static _zpp: Any$g;
|
|
1720
|
+
outer: Any$g;
|
|
1721
|
+
userData: Any$g;
|
|
1623
1722
|
id: number;
|
|
1624
|
-
cbsets: Any$
|
|
1625
|
-
interactors: Any$
|
|
1626
|
-
wrap_interactors: Any$
|
|
1627
|
-
constraints: Any$
|
|
1628
|
-
wrap_constraints: Any$
|
|
1629
|
-
listeners: Any$
|
|
1630
|
-
bodylisteners: Any$
|
|
1631
|
-
conlisteners: Any$
|
|
1632
|
-
__class__: Any$
|
|
1723
|
+
cbsets: Any$g;
|
|
1724
|
+
interactors: Any$g;
|
|
1725
|
+
wrap_interactors: Any$g;
|
|
1726
|
+
constraints: Any$g;
|
|
1727
|
+
wrap_constraints: Any$g;
|
|
1728
|
+
listeners: Any$g;
|
|
1729
|
+
bodylisteners: Any$g;
|
|
1730
|
+
conlisteners: Any$g;
|
|
1731
|
+
__class__: Any$g;
|
|
1633
1732
|
constructor();
|
|
1634
1733
|
/** Sort comparator by id. */
|
|
1635
1734
|
static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
|
|
1636
|
-
addInteractor(intx: Any$
|
|
1637
|
-
remInteractor(intx: Any$
|
|
1638
|
-
addConstraint(con: Any$
|
|
1639
|
-
remConstraint(con: Any$
|
|
1640
|
-
addint(x: Any$
|
|
1641
|
-
removeint(x: Any$
|
|
1735
|
+
addInteractor(intx: Any$g): void;
|
|
1736
|
+
remInteractor(intx: Any$g): void;
|
|
1737
|
+
addConstraint(con: Any$g): void;
|
|
1738
|
+
remConstraint(con: Any$g): void;
|
|
1739
|
+
addint(x: Any$g): void;
|
|
1740
|
+
removeint(x: Any$g): void;
|
|
1642
1741
|
invalidateint(): void;
|
|
1643
|
-
addbody(x: Any$
|
|
1644
|
-
removebody(x: Any$
|
|
1742
|
+
addbody(x: Any$g): void;
|
|
1743
|
+
removebody(x: Any$g): void;
|
|
1645
1744
|
invalidatebody(): void;
|
|
1646
|
-
addconstraint(x: Any$
|
|
1647
|
-
removeconstraint(x: Any$
|
|
1745
|
+
addconstraint(x: Any$g): void;
|
|
1746
|
+
removeconstraint(x: Any$g): void;
|
|
1648
1747
|
invalidateconstraint(): void;
|
|
1649
1748
|
}
|
|
1650
1749
|
|
|
1651
|
-
type Any$
|
|
1750
|
+
type Any$f = any;
|
|
1652
1751
|
/**
|
|
1653
1752
|
* Callback type — used to tag interactors so that listeners
|
|
1654
1753
|
* can filter which interactions they respond to.
|
|
@@ -1669,11 +1768,11 @@ declare class CbType {
|
|
|
1669
1768
|
static get_ANY_SHAPE(): CbType;
|
|
1670
1769
|
static get_ANY_COMPOUND(): CbType;
|
|
1671
1770
|
get id(): number;
|
|
1672
|
-
get userData(): Any$
|
|
1673
|
-
get interactors(): Any$
|
|
1674
|
-
get constraints(): Any$
|
|
1675
|
-
including(includes: Any$
|
|
1676
|
-
excluding(excludes: Any$
|
|
1771
|
+
get userData(): Any$f;
|
|
1772
|
+
get interactors(): Any$f;
|
|
1773
|
+
get constraints(): Any$f;
|
|
1774
|
+
including(includes: Any$f): Any$f;
|
|
1775
|
+
excluding(excludes: Any$f): Any$f;
|
|
1677
1776
|
toString(): string;
|
|
1678
1777
|
static _wrap(inner: any): CbType;
|
|
1679
1778
|
}
|
|
@@ -1734,37 +1833,37 @@ declare class PreFlag {
|
|
|
1734
1833
|
*
|
|
1735
1834
|
* Converted from nape-compiled.js lines 51337–51655.
|
|
1736
1835
|
*/
|
|
1737
|
-
type Any$
|
|
1836
|
+
type Any$e = any;
|
|
1738
1837
|
declare class ZPP_OptionType {
|
|
1739
1838
|
static __name__: string[];
|
|
1740
|
-
static _nape: Any$
|
|
1741
|
-
static _zpp: Any$
|
|
1742
|
-
outer: Any$
|
|
1743
|
-
handler: ((val: Any$
|
|
1744
|
-
includes: Any$
|
|
1745
|
-
excludes: Any$
|
|
1746
|
-
wrap_includes: Any$
|
|
1747
|
-
wrap_excludes: Any$
|
|
1748
|
-
__class__: Any$
|
|
1839
|
+
static _nape: Any$e;
|
|
1840
|
+
static _zpp: Any$e;
|
|
1841
|
+
outer: Any$e;
|
|
1842
|
+
handler: ((val: Any$e, included: boolean, added: boolean) => void) | null;
|
|
1843
|
+
includes: Any$e;
|
|
1844
|
+
excludes: Any$e;
|
|
1845
|
+
wrap_includes: Any$e;
|
|
1846
|
+
wrap_excludes: Any$e;
|
|
1847
|
+
__class__: Any$e;
|
|
1749
1848
|
constructor();
|
|
1750
1849
|
/** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
|
|
1751
|
-
static argument(val: Any$
|
|
1850
|
+
static argument(val: Any$e): Any$e;
|
|
1752
1851
|
setup_includes(): void;
|
|
1753
1852
|
setup_excludes(): void;
|
|
1754
|
-
excluded(xs: Any$
|
|
1755
|
-
included(xs: Any$
|
|
1756
|
-
compatible(xs: Any$
|
|
1853
|
+
excluded(xs: Any$e): boolean;
|
|
1854
|
+
included(xs: Any$e): boolean;
|
|
1855
|
+
compatible(xs: Any$e): boolean;
|
|
1757
1856
|
/** Check whether two sorted-by-id lists share any element. */
|
|
1758
|
-
nonemptyintersection(xs: Any$
|
|
1857
|
+
nonemptyintersection(xs: Any$e, ys: Any$e): boolean;
|
|
1759
1858
|
/** Insert into the ordered include or exclude list, using pool nodes. */
|
|
1760
1859
|
private insertOrdered;
|
|
1761
|
-
effect_change(val: Any$
|
|
1762
|
-
append_type(list: Any$
|
|
1860
|
+
effect_change(val: Any$e, included: boolean, added: boolean): void;
|
|
1861
|
+
append_type(list: Any$e, val: Any$e): void;
|
|
1763
1862
|
set(options: ZPP_OptionType): this;
|
|
1764
|
-
append(list: Any$
|
|
1863
|
+
append(list: Any$e, val: Any$e): void;
|
|
1765
1864
|
}
|
|
1766
1865
|
|
|
1767
|
-
type Any$
|
|
1866
|
+
type Any$d = any;
|
|
1768
1867
|
/**
|
|
1769
1868
|
* Composite callback option type — allows including and excluding CbTypes.
|
|
1770
1869
|
*
|
|
@@ -1774,90 +1873,194 @@ declare class OptionType {
|
|
|
1774
1873
|
static __name__: string[];
|
|
1775
1874
|
zpp_inner: ZPP_OptionType;
|
|
1776
1875
|
get _inner(): NapeInner;
|
|
1777
|
-
constructor(includes?: Any$
|
|
1778
|
-
get includes(): Any$
|
|
1779
|
-
get excludes(): Any$
|
|
1780
|
-
get_includes(): Any$
|
|
1781
|
-
get_excludes(): Any$
|
|
1782
|
-
including(includes: Any$
|
|
1783
|
-
excluding(excludes: Any$
|
|
1876
|
+
constructor(includes?: Any$d, excludes?: Any$d);
|
|
1877
|
+
get includes(): Any$d;
|
|
1878
|
+
get excludes(): Any$d;
|
|
1879
|
+
get_includes(): Any$d;
|
|
1880
|
+
get_excludes(): Any$d;
|
|
1881
|
+
including(includes: Any$d): this;
|
|
1882
|
+
excluding(excludes: Any$d): this;
|
|
1784
1883
|
toString(): string;
|
|
1785
1884
|
static _wrap(inner: any): OptionType;
|
|
1786
1885
|
}
|
|
1787
1886
|
|
|
1788
1887
|
/**
|
|
1789
|
-
*
|
|
1888
|
+
* ZPP_BodyListener — Internal body listener for the nape physics engine.
|
|
1889
|
+
*
|
|
1890
|
+
* Manages body event listeners (WAKE/SLEEP) with priority-ordered insertion
|
|
1891
|
+
* into CbType listener lists. Handles option changes and re-registration.
|
|
1892
|
+
*
|
|
1893
|
+
* Converted from nape-compiled.js lines 27305–27497.
|
|
1894
|
+
*/
|
|
1895
|
+
|
|
1896
|
+
type Any$c = any;
|
|
1897
|
+
declare class ZPP_BodyListener extends ZPP_Listener {
|
|
1898
|
+
static __name__: string[];
|
|
1899
|
+
handler: Any$c;
|
|
1900
|
+
options: Any$c;
|
|
1901
|
+
outer_zn: Any$c;
|
|
1902
|
+
__class__: Any$c;
|
|
1903
|
+
constructor(options: Any$c, event: number, handler: Any$c);
|
|
1904
|
+
immutable_options(): void;
|
|
1905
|
+
addedToSpace(): void;
|
|
1906
|
+
removedFromSpace(): void;
|
|
1907
|
+
cbtype_change(cb: Any$c, included: boolean, added: boolean): void;
|
|
1908
|
+
invalidate_precedence(): void;
|
|
1909
|
+
swapEvent(newev: number): void;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* BodyListener — Listens for body events (WAKE/SLEEP).
|
|
1914
|
+
*
|
|
1915
|
+
* Fully modernized from nape-compiled.js lines 434–515.
|
|
1790
1916
|
*/
|
|
1917
|
+
|
|
1918
|
+
type Any$b = any;
|
|
1791
1919
|
declare class BodyListener extends Listener {
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
/** @internal */
|
|
1800
|
-
static _wrap(inner: NapeInner): BodyListener;
|
|
1920
|
+
static __name__: string[];
|
|
1921
|
+
zpp_inner_zn: ZPP_BodyListener;
|
|
1922
|
+
constructor(event: CbEvent, options: Any$b, handler: (cb: Any$b) => void, precedence?: number);
|
|
1923
|
+
get options(): Any$b;
|
|
1924
|
+
set options(options: Any$b);
|
|
1925
|
+
get handler(): (cb: Any$b) => void;
|
|
1926
|
+
set handler(handler: (cb: Any$b) => void);
|
|
1801
1927
|
}
|
|
1802
1928
|
|
|
1803
1929
|
/**
|
|
1804
|
-
*
|
|
1930
|
+
* ZPP_InteractionListener — Internal interaction/pre listener for the nape physics engine.
|
|
1931
|
+
*
|
|
1932
|
+
* Manages interaction event listeners (BEGIN/END/ONGOING/PRE) with dual handler
|
|
1933
|
+
* support (handleri for InteractionListener, handlerp for PreListener).
|
|
1934
|
+
* Contains complex set intersection logic for CbType/CbSet pair operations.
|
|
1935
|
+
*
|
|
1936
|
+
* Converted from nape-compiled.js lines 28138–30352, 112140–112151.
|
|
1805
1937
|
*/
|
|
1938
|
+
|
|
1939
|
+
type Any$a = any;
|
|
1940
|
+
declare class ZPP_InteractionListener extends ZPP_Listener {
|
|
1941
|
+
static __name__: string[];
|
|
1942
|
+
static UCbSet: Any$a;
|
|
1943
|
+
static VCbSet: Any$a;
|
|
1944
|
+
static WCbSet: Any$a;
|
|
1945
|
+
static UCbType: Any$a;
|
|
1946
|
+
static VCbType: Any$a;
|
|
1947
|
+
static WCbType: Any$a;
|
|
1948
|
+
outer_zni: Any$a;
|
|
1949
|
+
outer_znp: Any$a;
|
|
1950
|
+
itype: number;
|
|
1951
|
+
options1: Any$a;
|
|
1952
|
+
options2: Any$a;
|
|
1953
|
+
handleri: Any$a;
|
|
1954
|
+
allowSleepingCallbacks: boolean;
|
|
1955
|
+
pure: boolean;
|
|
1956
|
+
handlerp: Any$a;
|
|
1957
|
+
__class__: Any$a;
|
|
1958
|
+
constructor(options1: Any$a, options2: Any$a, event: number, type: number);
|
|
1959
|
+
setInteractionType(itype: number): void;
|
|
1960
|
+
wake(): void;
|
|
1961
|
+
CbSetset(A: Any$a, B: Any$a, lambda: (a: Any$a, b: Any$a) => void): void;
|
|
1962
|
+
CbTypeset(A: Any$a, B: Any$a, lambda: (a: Any$a, b: Any$a) => void): void;
|
|
1963
|
+
with_uniquesets(fresh: boolean): void;
|
|
1964
|
+
with_union(lambda: (cb: Any$a) => void): void;
|
|
1965
|
+
addedToSpace(): void;
|
|
1966
|
+
removedFromSpace(): void;
|
|
1967
|
+
invalidate_precedence(): void;
|
|
1968
|
+
cbtype_change1(cb: Any$a, included: boolean, added: boolean): void;
|
|
1969
|
+
cbtype_change2(cb: Any$a, included: boolean, added: boolean): void;
|
|
1970
|
+
cbtype_change(options: Any$a, cb: Any$a, included: boolean, added: boolean): void;
|
|
1971
|
+
swapEvent(newev: number): void;
|
|
1972
|
+
private _allocCbSetNode;
|
|
1973
|
+
private _allocCbTypeNode;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* InteractionListener — Listens for interaction events (BEGIN/END/ONGOING).
|
|
1978
|
+
*
|
|
1979
|
+
* Fully modernized from nape-compiled.js lines 659–1091.
|
|
1980
|
+
*/
|
|
1981
|
+
|
|
1982
|
+
type Any$9 = any;
|
|
1806
1983
|
declare class InteractionListener extends Listener {
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1984
|
+
static __name__: string[];
|
|
1985
|
+
zpp_inner_zn: ZPP_InteractionListener;
|
|
1986
|
+
constructor(event: CbEvent, interactionType: InteractionType, options1: Any$9, options2: Any$9, handler: (cb: Any$9) => void, precedence?: number);
|
|
1987
|
+
get options1(): Any$9;
|
|
1988
|
+
set options1(options1: Any$9);
|
|
1989
|
+
get options2(): Any$9;
|
|
1990
|
+
set options2(options2: Any$9);
|
|
1991
|
+
get handler(): (cb: Any$9) => void;
|
|
1992
|
+
set handler(handler: (cb: Any$9) => void);
|
|
1993
|
+
get interactionType(): InteractionType | null;
|
|
1994
|
+
set interactionType(interactionType: InteractionType | null);
|
|
1995
|
+
get allowSleepingCallbacks(): boolean;
|
|
1996
|
+
set allowSleepingCallbacks(value: boolean);
|
|
1818
1997
|
}
|
|
1819
1998
|
|
|
1820
1999
|
/**
|
|
1821
|
-
*
|
|
2000
|
+
* ZPP_ConstraintListener — Internal constraint listener for the nape physics engine.
|
|
2001
|
+
*
|
|
2002
|
+
* Manages constraint event listeners (WAKE/SLEEP/BREAK) with priority-ordered
|
|
2003
|
+
* insertion into CbType listener lists.
|
|
2004
|
+
*
|
|
2005
|
+
* Converted from nape-compiled.js lines 27498–27694.
|
|
1822
2006
|
*/
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
static
|
|
2007
|
+
|
|
2008
|
+
type Any$8 = any;
|
|
2009
|
+
declare class ZPP_ConstraintListener extends ZPP_Listener {
|
|
2010
|
+
static __name__: string[];
|
|
2011
|
+
handler: Any$8;
|
|
2012
|
+
options: Any$8;
|
|
2013
|
+
outer_zn: Any$8;
|
|
2014
|
+
__class__: Any$8;
|
|
2015
|
+
constructor(options: Any$8, event: number, handler: Any$8);
|
|
2016
|
+
immutable_options(): void;
|
|
2017
|
+
addedToSpace(): void;
|
|
2018
|
+
removedFromSpace(): void;
|
|
2019
|
+
cbtype_change(cb: Any$8, included: boolean, added: boolean): void;
|
|
2020
|
+
invalidate_precedence(): void;
|
|
2021
|
+
swapEvent(newev: number): void;
|
|
1827
2022
|
}
|
|
1828
2023
|
|
|
1829
2024
|
/**
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
2025
|
+
* ConstraintListener — Listens for constraint events (WAKE/SLEEP/BREAK).
|
|
2026
|
+
*
|
|
2027
|
+
* Fully modernized from nape-compiled.js lines 546–649.
|
|
1832
2028
|
*/
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
static
|
|
2029
|
+
|
|
2030
|
+
type Any$7 = any;
|
|
2031
|
+
declare class ConstraintListener extends Listener {
|
|
2032
|
+
static __name__: string[];
|
|
2033
|
+
zpp_inner_zn: ZPP_ConstraintListener;
|
|
2034
|
+
constructor(event: CbEvent, options: Any$7, handler: (cb: Any$7) => void, precedence?: number);
|
|
2035
|
+
get options(): Any$7;
|
|
2036
|
+
set options(options: Any$7);
|
|
2037
|
+
get handler(): (cb: Any$7) => void;
|
|
2038
|
+
set handler(handler: (cb: Any$7) => void);
|
|
1837
2039
|
}
|
|
1838
2040
|
|
|
1839
2041
|
/**
|
|
1840
|
-
*
|
|
2042
|
+
* PreListener — Listens for pre-interaction events.
|
|
1841
2043
|
*
|
|
1842
|
-
*
|
|
1843
|
-
* - `CONSTRAINT` — constraint event listener
|
|
1844
|
-
* - `INTERACTION` — interaction event listener
|
|
1845
|
-
* - `PRE` — pre-interaction listener
|
|
2044
|
+
* Allows the handler to accept/ignore interactions before collision resolution.
|
|
1846
2045
|
*
|
|
1847
|
-
*
|
|
2046
|
+
* Fully modernized from nape-compiled.js lines 1142–1338.
|
|
1848
2047
|
*/
|
|
1849
|
-
|
|
2048
|
+
|
|
2049
|
+
type Any$6 = any;
|
|
2050
|
+
declare class PreListener extends Listener {
|
|
1850
2051
|
static __name__: string[];
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
2052
|
+
zpp_inner_zn: ZPP_InteractionListener;
|
|
2053
|
+
constructor(interactionType: InteractionType, options1: Any$6, options2: Any$6, handler: (cb: Any$6) => Any$6, precedence?: number, pure?: boolean);
|
|
2054
|
+
get options1(): Any$6;
|
|
2055
|
+
set options1(options1: Any$6);
|
|
2056
|
+
get options2(): Any$6;
|
|
2057
|
+
set options2(options2: Any$6);
|
|
2058
|
+
get handler(): (cb: Any$6) => Any$6;
|
|
2059
|
+
set handler(handler: (cb: Any$6) => Any$6);
|
|
2060
|
+
get pure(): boolean;
|
|
2061
|
+
set pure(pure: boolean);
|
|
2062
|
+
get interactionType(): InteractionType | null;
|
|
2063
|
+
set interactionType(interactionType: InteractionType | null);
|
|
1861
2064
|
}
|
|
1862
2065
|
|
|
1863
2066
|
/**
|
|
@@ -2146,4 +2349,4 @@ declare class PulleyJoint extends Constraint {
|
|
|
2146
2349
|
|
|
2147
2350
|
declare const VERSION = "3.3.6";
|
|
2148
2351
|
|
|
2149
|
-
export { AABB, AngleJoint, ArbiterType, Body, BodyCallback, BodyListener, BodyType, Broadphase, Callback, CbEvent, CbType, Circle, Constraint, ConstraintCallback, ConstraintListener, ConvexResult, DistanceJoint, FluidProperties, GeomPoly, GravMassMode, InertiaMode, InteractionCallback, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, LineJoint, Listener, ListenerType, MarchingSquares, MassMode, Mat23, MatMN, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreCallback, PreFlag, PreListener, PulleyJoint, Ray, RayResult, Shape, ShapeType, Space, VERSION, ValidationResult, Vec2, Vec3, WeldJoint, Winding, getNape };
|
|
2352
|
+
export { AABB, AngleJoint, ArbiterType, Body, BodyCallback, BodyListener, BodyType, Broadphase, Callback, CbEvent, CbType, Circle, Constraint, ConstraintCallback, ConstraintListener, ConvexResult, DistanceJoint, FluidProperties, GeomPoly, GravMassMode, InertiaMode, InteractionCallback, InteractionFilter, InteractionGroup, InteractionListener, InteractionType, Interactor, LineJoint, Listener, ListenerType, MarchingSquares, MassMode, Mat23, MatMN, Material, MotorJoint, NapeList, OptionType, PivotJoint, Polygon, PreCallback, PreFlag, PreListener, PulleyJoint, Ray, RayResult, Shape, ShapeType, Space, VERSION, ValidationResult, Vec2, Vec3, WeldJoint, Winding, getNape };
|