@newkrok/nape-js 3.3.27 → 3.3.29
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 +20468 -22468
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +697 -556
- package/dist/index.d.ts +697 -556
- package/dist/index.js +20468 -22468
- 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$V = 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$V;
|
|
33
|
+
static _zpp: Any$V;
|
|
34
|
+
static _wrapFn: ((zpp: ZPP_Vec2) => Any$V) | 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$V;
|
|
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$V;
|
|
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$V;
|
|
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$U = 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$U;
|
|
210
|
+
static _wrapFn: ((zpp: ZPP_Vec3) => Any$U) | null;
|
|
211
|
+
outer: Any$U;
|
|
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$U;
|
|
218
218
|
validate(): void;
|
|
219
|
-
wrapper(): Any$
|
|
219
|
+
wrapper(): Any$U;
|
|
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$T = 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$T;
|
|
287
|
+
static _wrapFn: ((zpp: ZPP_Mat23) => Any$T) | null;
|
|
288
288
|
static zpp_pool: ZPP_Mat23 | null;
|
|
289
|
-
outer: Any$
|
|
289
|
+
outer: Any$T;
|
|
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$T;
|
|
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$T;
|
|
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$S = 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$S;
|
|
369
|
+
vertices: Any$S;
|
|
370
|
+
__class__: Any$S;
|
|
371
|
+
constructor(outer?: Any$S);
|
|
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$R = 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$R;
|
|
411
|
+
constructor(vertices?: Any$R);
|
|
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$R): GeomPoly;
|
|
438
438
|
empty(): boolean;
|
|
439
439
|
size(): number;
|
|
440
|
-
iterator(): Any$
|
|
441
|
-
forwardIterator(): Any$
|
|
442
|
-
backwardsIterator(): Any$
|
|
440
|
+
iterator(): Any$R;
|
|
441
|
+
forwardIterator(): Any$R;
|
|
442
|
+
backwardsIterator(): Any$R;
|
|
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$R;
|
|
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$R): Any$R;
|
|
464
|
+
monotoneDecomposition(output?: Any$R): Any$R;
|
|
465
|
+
convexDecomposition(delaunay?: boolean, output?: Any$R): Any$R;
|
|
466
|
+
triangularDecomposition(delaunay?: boolean, output?: Any$R): Any$R;
|
|
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$R): Any$R;
|
|
469
|
+
transform(matrix: Any$R): this;
|
|
470
|
+
bounds(): Any$R;
|
|
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$Q = 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$Q;
|
|
491
|
+
static _zpp: Any$Q;
|
|
492
|
+
static _wrapFn: ((zpp: ZPP_AABB) => Any$Q) | null;
|
|
493
493
|
_invalidate: ((self: ZPP_AABB) => void) | null;
|
|
494
494
|
_validate: (() => void) | null;
|
|
495
495
|
_immutable: boolean;
|
|
496
|
-
outer: Any$
|
|
496
|
+
outer: Any$Q;
|
|
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$Q;
|
|
503
|
+
wrap_max: Any$Q;
|
|
504
|
+
__class__: Any$Q;
|
|
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$Q;
|
|
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$Q): void;
|
|
521
521
|
getmax(): void;
|
|
522
522
|
dom_max(): void;
|
|
523
|
-
mod_max(max: Any$
|
|
523
|
+
mod_max(max: Any$Q): 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$P = any;
|
|
588
588
|
declare class ZPP_MatMN {
|
|
589
589
|
static __name__: string[];
|
|
590
|
-
outer: Any$
|
|
590
|
+
outer: Any$P;
|
|
591
591
|
m: number;
|
|
592
592
|
n: number;
|
|
593
593
|
x: number[];
|
|
594
|
-
__class__: Any$
|
|
594
|
+
__class__: Any$P;
|
|
595
595
|
constructor(m: number, n: number);
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
type Any$
|
|
598
|
+
type Any$O = 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$O): 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$N = 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$N): Any$N;
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
/**
|
|
@@ -675,31 +675,31 @@ declare class Ray {
|
|
|
675
675
|
*
|
|
676
676
|
* Converted from nape-compiled.js lines 38897–39076, 86860–86862.
|
|
677
677
|
*/
|
|
678
|
-
type Any$
|
|
678
|
+
type Any$M = any;
|
|
679
679
|
declare class ZPP_ConvexRayResult {
|
|
680
680
|
static __name__: string[];
|
|
681
681
|
static rayPool: ZPP_ConvexRayResult | null;
|
|
682
682
|
static convexPool: ZPP_ConvexRayResult | null;
|
|
683
683
|
static internal: boolean;
|
|
684
|
-
static _createRayResult: (() => Any$
|
|
685
|
-
static _createConvexResult: (() => Any$
|
|
686
|
-
normal: Any$
|
|
687
|
-
shape: Any$
|
|
688
|
-
convex: Any$
|
|
689
|
-
position: Any$
|
|
690
|
-
ray: Any$
|
|
684
|
+
static _createRayResult: (() => Any$M) | null;
|
|
685
|
+
static _createConvexResult: (() => Any$M) | null;
|
|
686
|
+
normal: Any$M;
|
|
687
|
+
shape: Any$M;
|
|
688
|
+
convex: Any$M;
|
|
689
|
+
position: Any$M;
|
|
690
|
+
ray: Any$M;
|
|
691
691
|
inner: boolean;
|
|
692
692
|
next: ZPP_ConvexRayResult | null;
|
|
693
693
|
toiDistance: number;
|
|
694
|
-
__class__: Any$
|
|
695
|
-
static getRay(normal: Any$
|
|
696
|
-
static getConvex(normal: Any$
|
|
694
|
+
__class__: Any$M;
|
|
695
|
+
static getRay(normal: Any$M, time: number, inner: boolean, shape: Any$M): Any$M;
|
|
696
|
+
static getConvex(normal: Any$M, position: Any$M, toiDistance: number, shape: Any$M): Any$M;
|
|
697
697
|
disposed(): void;
|
|
698
698
|
free(): void;
|
|
699
699
|
private static _disposeVec2;
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
-
type Any$
|
|
702
|
+
type Any$L = any;
|
|
703
703
|
/**
|
|
704
704
|
* Result from a convex-cast query.
|
|
705
705
|
*
|
|
@@ -714,18 +714,18 @@ declare class ConvexResult {
|
|
|
714
714
|
get _inner(): NapeInner;
|
|
715
715
|
constructor();
|
|
716
716
|
/** @internal */
|
|
717
|
-
static _wrap(inner: Any$
|
|
717
|
+
static _wrap(inner: Any$L): ConvexResult;
|
|
718
718
|
get normal(): Vec2;
|
|
719
719
|
get position(): Vec2;
|
|
720
720
|
get toi(): number;
|
|
721
|
-
get shape(): Any$
|
|
721
|
+
get shape(): Any$L;
|
|
722
722
|
dispose(): void;
|
|
723
723
|
toString(): string;
|
|
724
724
|
/** @internal */
|
|
725
725
|
private _disposed;
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
-
type Any$
|
|
728
|
+
type Any$K = any;
|
|
729
729
|
/**
|
|
730
730
|
* Result from a raycast query.
|
|
731
731
|
*
|
|
@@ -740,18 +740,18 @@ declare class RayResult {
|
|
|
740
740
|
get _inner(): NapeInner;
|
|
741
741
|
constructor();
|
|
742
742
|
/** @internal */
|
|
743
|
-
static _wrap(inner: Any$
|
|
743
|
+
static _wrap(inner: Any$K): RayResult;
|
|
744
744
|
get normal(): Vec2;
|
|
745
745
|
get distance(): number;
|
|
746
746
|
get inner(): boolean;
|
|
747
|
-
get shape(): Any$
|
|
747
|
+
get shape(): Any$K;
|
|
748
748
|
dispose(): void;
|
|
749
749
|
toString(): string;
|
|
750
750
|
/** @internal */
|
|
751
751
|
private _disposed;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
-
type Any$
|
|
754
|
+
type Any$J = any;
|
|
755
755
|
/**
|
|
756
756
|
* Static utility class for geometric queries between shapes and bodies.
|
|
757
757
|
*
|
|
@@ -769,7 +769,7 @@ declare class Geom {
|
|
|
769
769
|
* @param out2 - Output Vec2 for closest point on body2.
|
|
770
770
|
* @returns The distance between the two bodies.
|
|
771
771
|
*/
|
|
772
|
-
static distanceBody(body1: Any$
|
|
772
|
+
static distanceBody(body1: Any$J, body2: Any$J, out1: Vec2, out2: Vec2): number;
|
|
773
773
|
/**
|
|
774
774
|
* Calculate minimum distance between two shapes and return closest points.
|
|
775
775
|
* @param shape1 - First shape (must be part of a body).
|
|
@@ -778,28 +778,28 @@ declare class Geom {
|
|
|
778
778
|
* @param out2 - Output Vec2 for closest point on shape2.
|
|
779
779
|
* @returns The distance between the two shapes.
|
|
780
780
|
*/
|
|
781
|
-
static distance(shape1: Any$
|
|
781
|
+
static distance(shape1: Any$J, shape2: Any$J, out1: Vec2, out2: Vec2): number;
|
|
782
782
|
/**
|
|
783
783
|
* Test if two bodies intersect (any of their shapes overlap).
|
|
784
784
|
* @param body1 - First body (must have shapes).
|
|
785
785
|
* @param body2 - Second body (must have shapes).
|
|
786
786
|
* @returns True if the bodies intersect.
|
|
787
787
|
*/
|
|
788
|
-
static intersectsBody(body1: Any$
|
|
788
|
+
static intersectsBody(body1: Any$J, body2: Any$J): boolean;
|
|
789
789
|
/**
|
|
790
790
|
* Test if two shapes intersect.
|
|
791
791
|
* @param shape1 - First shape (must be part of a body).
|
|
792
792
|
* @param shape2 - Second shape (must be part of a body).
|
|
793
793
|
* @returns True if the shapes intersect.
|
|
794
794
|
*/
|
|
795
|
-
static intersects(shape1: Any$
|
|
795
|
+
static intersects(shape1: Any$J, shape2: Any$J): boolean;
|
|
796
796
|
/**
|
|
797
797
|
* Test if shape1 fully contains shape2.
|
|
798
798
|
* @param shape1 - Containing shape (must be part of a body).
|
|
799
799
|
* @param shape2 - Contained shape (must be part of a body).
|
|
800
800
|
* @returns True if shape1 contains shape2.
|
|
801
801
|
*/
|
|
802
|
-
static contains(shape1: Any$
|
|
802
|
+
static contains(shape1: Any$J, shape2: Any$J): boolean;
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
/**
|
|
@@ -863,7 +863,7 @@ declare class NapeList<T> implements Iterable<T> {
|
|
|
863
863
|
*
|
|
864
864
|
* Converted from nape-compiled.js lines 87523–87601, 135477–135481.
|
|
865
865
|
*/
|
|
866
|
-
type Any$
|
|
866
|
+
type Any$I = any;
|
|
867
867
|
declare class ZPP_Material {
|
|
868
868
|
static zpp_pool: ZPP_Material | null;
|
|
869
869
|
static WAKE: number;
|
|
@@ -876,27 +876,27 @@ declare class ZPP_Material {
|
|
|
876
876
|
* _nape = the `nape` public namespace (for wrapper creation)
|
|
877
877
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
|
|
878
878
|
*/
|
|
879
|
-
static _nape: Any$
|
|
880
|
-
static _zpp: Any$
|
|
879
|
+
static _nape: Any$I;
|
|
880
|
+
static _zpp: Any$I;
|
|
881
881
|
/**
|
|
882
882
|
* Wrapper factory callback, registered by the modernized Material class.
|
|
883
883
|
* When set, wrapper() uses this instead of creating a compiled Material.
|
|
884
884
|
*/
|
|
885
|
-
static _wrapFn: ((zpp: ZPP_Material) => Any$
|
|
885
|
+
static _wrapFn: ((zpp: ZPP_Material) => Any$I) | null;
|
|
886
886
|
elasticity: number;
|
|
887
887
|
dynamicFriction: number;
|
|
888
888
|
staticFriction: number;
|
|
889
889
|
density: number;
|
|
890
890
|
rollingFriction: number;
|
|
891
|
-
shapes: Any$
|
|
892
|
-
wrap_shapes: Any$
|
|
893
|
-
outer: Any$
|
|
894
|
-
userData: Any$
|
|
891
|
+
shapes: Any$I;
|
|
892
|
+
wrap_shapes: Any$I;
|
|
893
|
+
outer: Any$I;
|
|
894
|
+
userData: Any$I;
|
|
895
895
|
next: ZPP_Material | null;
|
|
896
|
-
__class__: Any$
|
|
896
|
+
__class__: Any$I;
|
|
897
897
|
constructor();
|
|
898
898
|
/** Create/return the public nape.phys.Material wrapper for this internal object. */
|
|
899
|
-
wrapper(): Any$
|
|
899
|
+
wrapper(): Any$I;
|
|
900
900
|
/** Called when this object is returned to the pool. */
|
|
901
901
|
free(): void;
|
|
902
902
|
/** Called when this object is taken from the pool. */
|
|
@@ -904,9 +904,9 @@ declare class ZPP_Material {
|
|
|
904
904
|
/** Initialize the shapes list (called during feature construction). */
|
|
905
905
|
feature_cons(): void;
|
|
906
906
|
/** Register a shape that uses this material. */
|
|
907
|
-
addShape(shape: Any$
|
|
907
|
+
addShape(shape: Any$I): void;
|
|
908
908
|
/** Unregister a shape that no longer uses this material. */
|
|
909
|
-
remShape(shape: Any$
|
|
909
|
+
remShape(shape: Any$I): void;
|
|
910
910
|
/** Create a copy with the same property values. */
|
|
911
911
|
copy(): ZPP_Material;
|
|
912
912
|
/** Copy all property values from another ZPP_Material. */
|
|
@@ -966,36 +966,36 @@ declare class Material {
|
|
|
966
966
|
*
|
|
967
967
|
* Converted from nape-compiled.js lines 87335–87523, 135403.
|
|
968
968
|
*/
|
|
969
|
-
type Any$
|
|
969
|
+
type Any$H = any;
|
|
970
970
|
declare class ZPP_FluidProperties {
|
|
971
971
|
static zpp_pool: ZPP_FluidProperties | null;
|
|
972
972
|
static __name__: string[];
|
|
973
|
-
static _nape: Any$
|
|
974
|
-
static _zpp: Any$
|
|
975
|
-
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$
|
|
973
|
+
static _nape: Any$H;
|
|
974
|
+
static _zpp: Any$H;
|
|
975
|
+
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$H) | null;
|
|
976
976
|
viscosity: number;
|
|
977
977
|
density: number;
|
|
978
978
|
gravityx: number;
|
|
979
979
|
gravityy: number;
|
|
980
|
-
wrap_gravity: Any$
|
|
981
|
-
shapes: Any$
|
|
982
|
-
wrap_shapes: Any$
|
|
983
|
-
outer: Any$
|
|
984
|
-
userData: Any$
|
|
980
|
+
wrap_gravity: Any$H;
|
|
981
|
+
shapes: Any$H;
|
|
982
|
+
wrap_shapes: Any$H;
|
|
983
|
+
outer: Any$H;
|
|
984
|
+
userData: Any$H;
|
|
985
985
|
next: ZPP_FluidProperties | null;
|
|
986
|
-
__class__: Any$
|
|
986
|
+
__class__: Any$H;
|
|
987
987
|
constructor();
|
|
988
988
|
/** Create/return the public nape.phys.FluidProperties wrapper. */
|
|
989
|
-
wrapper(): Any$
|
|
989
|
+
wrapper(): Any$H;
|
|
990
990
|
free(): void;
|
|
991
991
|
alloc(): void;
|
|
992
992
|
feature_cons(): void;
|
|
993
|
-
addShape(shape: Any$
|
|
994
|
-
remShape(shape: Any$
|
|
993
|
+
addShape(shape: Any$H): void;
|
|
994
|
+
remShape(shape: Any$H): void;
|
|
995
995
|
/** Copy with object pooling. */
|
|
996
996
|
copy(): ZPP_FluidProperties;
|
|
997
997
|
/** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
|
|
998
|
-
gravity_invalidate(x: Any$
|
|
998
|
+
gravity_invalidate(x: Any$H): void;
|
|
999
999
|
/** Sync the gravity Vec2 wrapper with internal values. */
|
|
1000
1000
|
gravity_validate(): void;
|
|
1001
1001
|
/** Lazily create and return the gravity Vec2 wrapper. */
|
|
@@ -1046,33 +1046,33 @@ declare class FluidProperties {
|
|
|
1046
1046
|
*
|
|
1047
1047
|
* Converted from nape-compiled.js lines 63255–63366, 135329.
|
|
1048
1048
|
*/
|
|
1049
|
-
type Any$
|
|
1049
|
+
type Any$G = any;
|
|
1050
1050
|
declare class ZPP_InteractionFilter {
|
|
1051
1051
|
static zpp_pool: ZPP_InteractionFilter | null;
|
|
1052
1052
|
static __name__: string[];
|
|
1053
|
-
static _nape: Any$
|
|
1054
|
-
static _zpp: Any$
|
|
1055
|
-
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$
|
|
1053
|
+
static _nape: Any$G;
|
|
1054
|
+
static _zpp: Any$G;
|
|
1055
|
+
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$G) | null;
|
|
1056
1056
|
collisionGroup: number;
|
|
1057
1057
|
collisionMask: number;
|
|
1058
1058
|
sensorGroup: number;
|
|
1059
1059
|
sensorMask: number;
|
|
1060
1060
|
fluidGroup: number;
|
|
1061
1061
|
fluidMask: number;
|
|
1062
|
-
shapes: Any$
|
|
1063
|
-
wrap_shapes: Any$
|
|
1064
|
-
outer: Any$
|
|
1065
|
-
userData: Any$
|
|
1062
|
+
shapes: Any$G;
|
|
1063
|
+
wrap_shapes: Any$G;
|
|
1064
|
+
outer: Any$G;
|
|
1065
|
+
userData: Any$G;
|
|
1066
1066
|
next: ZPP_InteractionFilter | null;
|
|
1067
|
-
__class__: Any$
|
|
1067
|
+
__class__: Any$G;
|
|
1068
1068
|
constructor();
|
|
1069
1069
|
/** Create/return the public nape.dynamics.InteractionFilter wrapper. */
|
|
1070
|
-
wrapper(): Any$
|
|
1070
|
+
wrapper(): Any$G;
|
|
1071
1071
|
free(): void;
|
|
1072
1072
|
alloc(): void;
|
|
1073
1073
|
feature_cons(): void;
|
|
1074
|
-
addShape(shape: Any$
|
|
1075
|
-
remShape(shape: Any$
|
|
1074
|
+
addShape(shape: Any$G): void;
|
|
1075
|
+
remShape(shape: Any$G): void;
|
|
1076
1076
|
/** Create a copy with object pooling. */
|
|
1077
1077
|
copy(): ZPP_InteractionFilter;
|
|
1078
1078
|
/** Test whether two filters allow collision between their shapes. */
|
|
@@ -1136,22 +1136,22 @@ declare class InteractionFilter {
|
|
|
1136
1136
|
*
|
|
1137
1137
|
* Converted from nape-compiled.js lines 63367–63463, 135330–135331.
|
|
1138
1138
|
*/
|
|
1139
|
-
type Any$
|
|
1139
|
+
type Any$F = any;
|
|
1140
1140
|
declare class ZPP_InteractionGroup {
|
|
1141
1141
|
static SHAPE: number;
|
|
1142
1142
|
static BODY: number;
|
|
1143
1143
|
static __name__: string[];
|
|
1144
|
-
static _zpp: Any$
|
|
1145
|
-
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$
|
|
1146
|
-
outer: Any$
|
|
1144
|
+
static _zpp: Any$F;
|
|
1145
|
+
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$F) | null;
|
|
1146
|
+
outer: Any$F;
|
|
1147
1147
|
ignore: boolean;
|
|
1148
1148
|
group: ZPP_InteractionGroup | null;
|
|
1149
|
-
groups: Any$
|
|
1150
|
-
wrap_groups: Any$
|
|
1151
|
-
interactors: Any$
|
|
1152
|
-
wrap_interactors: Any$
|
|
1149
|
+
groups: Any$F;
|
|
1150
|
+
wrap_groups: Any$F;
|
|
1151
|
+
interactors: Any$F;
|
|
1152
|
+
wrap_interactors: Any$F;
|
|
1153
1153
|
depth: number;
|
|
1154
|
-
__class__: Any$
|
|
1154
|
+
__class__: Any$F;
|
|
1155
1155
|
constructor();
|
|
1156
1156
|
/** Set or change the parent group. */
|
|
1157
1157
|
setGroup(group: ZPP_InteractionGroup | null): void;
|
|
@@ -1162,9 +1162,9 @@ declare class ZPP_InteractionGroup {
|
|
|
1162
1162
|
/** Remove a child group. */
|
|
1163
1163
|
remGroup(group: ZPP_InteractionGroup): void;
|
|
1164
1164
|
/** Register an interactor in this group. */
|
|
1165
|
-
addInteractor(intx: Any$
|
|
1165
|
+
addInteractor(intx: Any$F): void;
|
|
1166
1166
|
/** Unregister an interactor from this group. */
|
|
1167
|
-
remInteractor(intx: Any$
|
|
1167
|
+
remInteractor(intx: Any$F, flag?: number): void;
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
1170
|
/**
|
|
@@ -1324,7 +1324,7 @@ interface CbTypeSet {
|
|
|
1324
1324
|
*
|
|
1325
1325
|
* Converted from nape-compiled.js lines 21424–21827.
|
|
1326
1326
|
*/
|
|
1327
|
-
type Any$
|
|
1327
|
+
type Any$E = any;
|
|
1328
1328
|
declare class ZPP_Constraint {
|
|
1329
1329
|
static __name__: string[];
|
|
1330
1330
|
/**
|
|
@@ -1332,13 +1332,13 @@ declare class ZPP_Constraint {
|
|
|
1332
1332
|
* _nape = the `nape` public namespace (for CbTypeIterator in copyto)
|
|
1333
1333
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
|
|
1334
1334
|
*/
|
|
1335
|
-
static _nape: Any$
|
|
1336
|
-
static _zpp: Any$
|
|
1337
|
-
outer: Any$
|
|
1335
|
+
static _nape: Any$E;
|
|
1336
|
+
static _zpp: Any$E;
|
|
1337
|
+
outer: Any$E;
|
|
1338
1338
|
id: number;
|
|
1339
|
-
userData: Any$
|
|
1340
|
-
compound: Any$
|
|
1341
|
-
space: Any$
|
|
1339
|
+
userData: Any$E;
|
|
1340
|
+
compound: Any$E;
|
|
1341
|
+
space: Any$E;
|
|
1342
1342
|
active: boolean;
|
|
1343
1343
|
stiff: boolean;
|
|
1344
1344
|
frequency: number;
|
|
@@ -1348,14 +1348,14 @@ declare class ZPP_Constraint {
|
|
|
1348
1348
|
breakUnderForce: boolean;
|
|
1349
1349
|
breakUnderError: boolean;
|
|
1350
1350
|
removeOnBreak: boolean;
|
|
1351
|
-
component: Any$
|
|
1351
|
+
component: Any$E;
|
|
1352
1352
|
ignore: boolean;
|
|
1353
1353
|
__velocity: boolean;
|
|
1354
|
-
cbTypes: Any$
|
|
1355
|
-
cbSet: Any$
|
|
1356
|
-
wrap_cbTypes: Any$
|
|
1354
|
+
cbTypes: Any$E;
|
|
1355
|
+
cbSet: Any$E;
|
|
1356
|
+
wrap_cbTypes: Any$E;
|
|
1357
1357
|
pre_dt: number;
|
|
1358
|
-
__class__: Any$
|
|
1358
|
+
__class__: Any$E;
|
|
1359
1359
|
constructor();
|
|
1360
1360
|
/**
|
|
1361
1361
|
* Initialise base constraint fields.
|
|
@@ -1373,18 +1373,18 @@ declare class ZPP_Constraint {
|
|
|
1373
1373
|
forest(): void;
|
|
1374
1374
|
broken(): void;
|
|
1375
1375
|
warmStart(): void;
|
|
1376
|
-
draw(_g: Any$
|
|
1377
|
-
pair_exists(_id: Any$
|
|
1376
|
+
draw(_g: Any$E): void;
|
|
1377
|
+
pair_exists(_id: Any$E, _di: Any$E): boolean;
|
|
1378
1378
|
preStep(_dt: number): boolean;
|
|
1379
1379
|
applyImpulseVel(): boolean;
|
|
1380
1380
|
applyImpulsePos(): boolean;
|
|
1381
|
-
copy(_dict?: Any$
|
|
1381
|
+
copy(_dict?: Any$E, _todo?: Any$E): Any$E;
|
|
1382
1382
|
immutable_midstep(name: string): void;
|
|
1383
1383
|
setupcbTypes(): void;
|
|
1384
1384
|
immutable_cbTypes(): void;
|
|
1385
|
-
wrap_cbTypes_subber(pcb: Any$
|
|
1386
|
-
wrap_cbTypes_adder(cb: Any$
|
|
1387
|
-
insert_cbtype(cb: Any$
|
|
1385
|
+
wrap_cbTypes_subber(pcb: Any$E): void;
|
|
1386
|
+
wrap_cbTypes_adder(cb: Any$E): boolean;
|
|
1387
|
+
insert_cbtype(cb: Any$E): void;
|
|
1388
1388
|
alloc_cbSet(): void;
|
|
1389
1389
|
dealloc_cbSet(): void;
|
|
1390
1390
|
activate(): void;
|
|
@@ -1394,10 +1394,12 @@ declare class ZPP_Constraint {
|
|
|
1394
1394
|
activeInSpace(): void;
|
|
1395
1395
|
inactiveOrOutSpace(): void;
|
|
1396
1396
|
wake(): void;
|
|
1397
|
-
copyto(ret: Any$
|
|
1397
|
+
copyto(ret: Any$E): void;
|
|
1398
|
+
static _findRoot(comp: Any$E): Any$E;
|
|
1399
|
+
static _unionComponents(a: Any$E, b: Any$E): void;
|
|
1398
1400
|
}
|
|
1399
1401
|
|
|
1400
|
-
type Any$
|
|
1402
|
+
type Any$D = any;
|
|
1401
1403
|
/**
|
|
1402
1404
|
* Base class for all constraints / joints.
|
|
1403
1405
|
*
|
|
@@ -1414,16 +1416,16 @@ declare class Constraint {
|
|
|
1414
1416
|
* are fully modernized. Also serves as backward compat for compiled code.
|
|
1415
1417
|
* @internal
|
|
1416
1418
|
*/
|
|
1417
|
-
_inner: Any$
|
|
1419
|
+
_inner: Any$D;
|
|
1418
1420
|
debugDraw: boolean;
|
|
1419
1421
|
/** @internal */
|
|
1420
1422
|
protected constructor();
|
|
1421
1423
|
/** @internal */
|
|
1422
|
-
static _wrap(inner: Any$
|
|
1424
|
+
static _wrap(inner: Any$D): Constraint;
|
|
1423
1425
|
get space(): Space | null;
|
|
1424
1426
|
set space(value: Space | null);
|
|
1425
|
-
get compound(): Any$
|
|
1426
|
-
set compound(value: Any$
|
|
1427
|
+
get compound(): Any$D;
|
|
1428
|
+
set compound(value: Any$D);
|
|
1427
1429
|
get active(): boolean;
|
|
1428
1430
|
set active(value: boolean);
|
|
1429
1431
|
get ignore(): boolean;
|
|
@@ -1446,17 +1448,17 @@ declare class Constraint {
|
|
|
1446
1448
|
set removeOnBreak(value: boolean);
|
|
1447
1449
|
get isSleeping(): boolean;
|
|
1448
1450
|
get userData(): Record<string, unknown>;
|
|
1449
|
-
get cbTypes(): Any$
|
|
1450
|
-
impulse(): Any$
|
|
1451
|
-
bodyImpulse(_body: Body): Any$
|
|
1451
|
+
get cbTypes(): Any$D;
|
|
1452
|
+
impulse(): Any$D;
|
|
1453
|
+
bodyImpulse(_body: Body): Any$D;
|
|
1452
1454
|
visitBodies(_fn: (body: Body) => void): void;
|
|
1453
1455
|
copy(): Constraint;
|
|
1454
1456
|
toString(): string;
|
|
1455
|
-
/** @internal */ get_userData(): Any$
|
|
1456
|
-
/** @internal */ get_compound(): Any$
|
|
1457
|
-
/** @internal */ set_compound(v: Any$
|
|
1458
|
-
/** @internal */ get_space(): Any$
|
|
1459
|
-
/** @internal */ set_space(v: Any$
|
|
1457
|
+
/** @internal */ get_userData(): Any$D;
|
|
1458
|
+
/** @internal */ get_compound(): Any$D;
|
|
1459
|
+
/** @internal */ set_compound(v: Any$D): Any$D;
|
|
1460
|
+
/** @internal */ get_space(): Any$D;
|
|
1461
|
+
/** @internal */ set_space(v: Any$D): Any$D;
|
|
1460
1462
|
/** @internal */ get_isSleeping(): boolean;
|
|
1461
1463
|
/** @internal */ get_active(): boolean;
|
|
1462
1464
|
/** @internal */ set_active(v: boolean): boolean;
|
|
@@ -1478,7 +1480,7 @@ declare class Constraint {
|
|
|
1478
1480
|
/** @internal */ set_breakUnderError(v: boolean): boolean;
|
|
1479
1481
|
/** @internal */ get_removeOnBreak(): boolean;
|
|
1480
1482
|
/** @internal */ set_removeOnBreak(v: boolean): boolean;
|
|
1481
|
-
/** @internal */ get_cbTypes(): Any$
|
|
1483
|
+
/** @internal */ get_cbTypes(): Any$D;
|
|
1482
1484
|
}
|
|
1483
1485
|
|
|
1484
1486
|
/**
|
|
@@ -1490,24 +1492,24 @@ declare class Constraint {
|
|
|
1490
1492
|
*
|
|
1491
1493
|
* Converted from nape-compiled.js lines 27259–27304, 112053–112139.
|
|
1492
1494
|
*/
|
|
1493
|
-
type Any$
|
|
1495
|
+
type Any$C = any;
|
|
1494
1496
|
declare class ZPP_Listener {
|
|
1495
1497
|
static __name__: string[];
|
|
1496
|
-
static _nape: Any$
|
|
1497
|
-
static _zpp: Any$
|
|
1498
|
+
static _nape: Any$C;
|
|
1499
|
+
static _zpp: Any$C;
|
|
1498
1500
|
static internal: boolean;
|
|
1499
|
-
static types: Any$
|
|
1500
|
-
static events: Any$
|
|
1501
|
-
space: Any$
|
|
1502
|
-
interaction: Any$
|
|
1503
|
-
constraint: Any$
|
|
1504
|
-
body: Any$
|
|
1501
|
+
static types: Any$C[];
|
|
1502
|
+
static events: Any$C[];
|
|
1503
|
+
space: Any$C;
|
|
1504
|
+
interaction: Any$C;
|
|
1505
|
+
constraint: Any$C;
|
|
1506
|
+
body: Any$C;
|
|
1505
1507
|
precedence: number;
|
|
1506
1508
|
event: number;
|
|
1507
1509
|
type: number;
|
|
1508
1510
|
id: number;
|
|
1509
|
-
outer: Any$
|
|
1510
|
-
__class__: Any$
|
|
1511
|
+
outer: Any$C;
|
|
1512
|
+
__class__: Any$C;
|
|
1511
1513
|
constructor();
|
|
1512
1514
|
/** Sort comparator: higher precedence first, then by id descending. */
|
|
1513
1515
|
static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
|
|
@@ -1583,20 +1585,20 @@ declare class ListenerType {
|
|
|
1583
1585
|
* Fully modernized from nape-compiled.js lines 231–433.
|
|
1584
1586
|
*/
|
|
1585
1587
|
|
|
1586
|
-
type Any$
|
|
1588
|
+
type Any$B = any;
|
|
1587
1589
|
declare class Listener {
|
|
1588
1590
|
static __name__: string[];
|
|
1589
1591
|
zpp_inner: ZPP_Listener;
|
|
1590
|
-
get _inner(): Any$
|
|
1592
|
+
get _inner(): Any$B;
|
|
1591
1593
|
constructor();
|
|
1592
|
-
static _wrap(inner: Any$
|
|
1594
|
+
static _wrap(inner: Any$B): Listener;
|
|
1593
1595
|
get type(): ListenerType;
|
|
1594
1596
|
get event(): CbEvent;
|
|
1595
1597
|
set event(event: CbEvent);
|
|
1596
1598
|
get precedence(): number;
|
|
1597
1599
|
set precedence(precedence: number);
|
|
1598
1600
|
get space(): Space | null;
|
|
1599
|
-
set space(space: Space | Any$
|
|
1601
|
+
set space(space: Space | Any$B | null);
|
|
1600
1602
|
toString(): string;
|
|
1601
1603
|
}
|
|
1602
1604
|
|
|
@@ -1683,46 +1685,46 @@ declare class BodyType {
|
|
|
1683
1685
|
* Converted from nape-compiled.js lines 52431–54547.
|
|
1684
1686
|
*/
|
|
1685
1687
|
|
|
1686
|
-
type Any$
|
|
1688
|
+
type Any$A = any;
|
|
1687
1689
|
declare class ZPP_Body {
|
|
1688
1690
|
static __name__: string[];
|
|
1689
|
-
static __super__: Any$
|
|
1691
|
+
static __super__: Any$A;
|
|
1690
1692
|
/**
|
|
1691
1693
|
* Namespace references, set by the compiled module after import.
|
|
1692
1694
|
* _nape = the `nape` public namespace
|
|
1693
1695
|
* _zpp = the `zpp_nape` internal namespace
|
|
1694
1696
|
*/
|
|
1695
|
-
static _nape: Any$
|
|
1696
|
-
static _zpp: Any$
|
|
1697
|
-
static types: Any$
|
|
1698
|
-
static bodystack: Any$
|
|
1699
|
-
static bodyset: Any$
|
|
1697
|
+
static _nape: Any$A;
|
|
1698
|
+
static _zpp: Any$A;
|
|
1699
|
+
static types: Any$A[];
|
|
1700
|
+
static bodystack: Any$A;
|
|
1701
|
+
static bodyset: Any$A;
|
|
1700
1702
|
static cur_graph_depth: number;
|
|
1701
|
-
static bodysetlt(a: Any$
|
|
1702
|
-
static __static(): Any$
|
|
1703
|
-
outer_i: Any$
|
|
1703
|
+
static bodysetlt(a: Any$A, b: Any$A): boolean;
|
|
1704
|
+
static __static(): Any$A;
|
|
1705
|
+
outer_i: Any$A;
|
|
1704
1706
|
id: number;
|
|
1705
|
-
userData: Any$
|
|
1706
|
-
ishape: Any$
|
|
1707
|
-
ibody: Any$
|
|
1708
|
-
icompound: Any$
|
|
1709
|
-
wrap_cbTypes: Any$
|
|
1710
|
-
cbSet: Any$
|
|
1711
|
-
cbTypes: Any$
|
|
1712
|
-
group: Any$
|
|
1713
|
-
cbsets: Any$
|
|
1714
|
-
outer: Any$
|
|
1707
|
+
userData: Any$A;
|
|
1708
|
+
ishape: Any$A;
|
|
1709
|
+
ibody: Any$A;
|
|
1710
|
+
icompound: Any$A;
|
|
1711
|
+
wrap_cbTypes: Any$A;
|
|
1712
|
+
cbSet: Any$A;
|
|
1713
|
+
cbTypes: Any$A;
|
|
1714
|
+
group: Any$A;
|
|
1715
|
+
cbsets: Any$A;
|
|
1716
|
+
outer: Any$A;
|
|
1715
1717
|
world: boolean;
|
|
1716
1718
|
type: number;
|
|
1717
|
-
compound: Any$
|
|
1718
|
-
shapes: Any$
|
|
1719
|
-
wrap_shapes: Any$
|
|
1720
|
-
space: Any$
|
|
1721
|
-
arbiters: Any$
|
|
1722
|
-
wrap_arbiters: Any$
|
|
1723
|
-
constraints: Any$
|
|
1724
|
-
wrap_constraints: Any$
|
|
1725
|
-
component: Any$
|
|
1719
|
+
compound: Any$A;
|
|
1720
|
+
shapes: Any$A;
|
|
1721
|
+
wrap_shapes: Any$A;
|
|
1722
|
+
space: Any$A;
|
|
1723
|
+
arbiters: Any$A;
|
|
1724
|
+
wrap_arbiters: Any$A;
|
|
1725
|
+
constraints: Any$A;
|
|
1726
|
+
wrap_constraints: Any$A;
|
|
1727
|
+
component: Any$A;
|
|
1726
1728
|
graph_depth: number;
|
|
1727
1729
|
sweepTime: number;
|
|
1728
1730
|
sweep_angvel: number;
|
|
@@ -1735,20 +1737,20 @@ declare class ZPP_Body {
|
|
|
1735
1737
|
pre_posy: number;
|
|
1736
1738
|
posx: number;
|
|
1737
1739
|
posy: number;
|
|
1738
|
-
wrap_pos: Any$
|
|
1740
|
+
wrap_pos: Any$A;
|
|
1739
1741
|
velx: number;
|
|
1740
1742
|
vely: number;
|
|
1741
|
-
wrap_vel: Any$
|
|
1743
|
+
wrap_vel: Any$A;
|
|
1742
1744
|
forcex: number;
|
|
1743
1745
|
forcey: number;
|
|
1744
|
-
wrap_force: Any$
|
|
1746
|
+
wrap_force: Any$A;
|
|
1745
1747
|
kinvelx: number;
|
|
1746
1748
|
kinvely: number;
|
|
1747
|
-
wrap_kinvel: Any$
|
|
1749
|
+
wrap_kinvel: Any$A;
|
|
1748
1750
|
svelx: number;
|
|
1749
1751
|
svely: number;
|
|
1750
|
-
wrap_svel: Any$
|
|
1751
|
-
wrapcvel: Any$
|
|
1752
|
+
wrap_svel: Any$A;
|
|
1753
|
+
wrapcvel: Any$A;
|
|
1752
1754
|
angvel: number;
|
|
1753
1755
|
torque: number;
|
|
1754
1756
|
kinangvel: number;
|
|
@@ -1785,9 +1787,9 @@ declare class ZPP_Body {
|
|
|
1785
1787
|
worldCOMx: number;
|
|
1786
1788
|
worldCOMy: number;
|
|
1787
1789
|
zip_worldCOM: boolean;
|
|
1788
|
-
wrap_localCOM: Any$
|
|
1789
|
-
wrap_worldCOM: Any$
|
|
1790
|
-
__class__: Any$
|
|
1790
|
+
wrap_localCOM: Any$A;
|
|
1791
|
+
wrap_worldCOM: Any$A;
|
|
1792
|
+
__class__: Any$A;
|
|
1791
1793
|
constructor();
|
|
1792
1794
|
isStatic(): boolean;
|
|
1793
1795
|
isDynamic(): boolean;
|
|
@@ -1795,23 +1797,23 @@ declare class ZPP_Body {
|
|
|
1795
1797
|
invalidate_type(): void;
|
|
1796
1798
|
invalidate_shapes(): void;
|
|
1797
1799
|
init_bodysetlist(): void;
|
|
1798
|
-
connectedBodies_cont(b: Any$
|
|
1799
|
-
connectedBodies(depth: number, output: Any$
|
|
1800
|
-
interactingBodies(type: number, output: Any$
|
|
1800
|
+
connectedBodies_cont(b: Any$A): void;
|
|
1801
|
+
connectedBodies(depth: number, output: Any$A): Any$A;
|
|
1802
|
+
interactingBodies(type: number, output: Any$A): Any$A;
|
|
1801
1803
|
atRest(dt: number): boolean;
|
|
1802
1804
|
refreshArbiters(): void;
|
|
1803
1805
|
sweepIntegrate(dt: number): void;
|
|
1804
|
-
sweepValidate(s: Any$
|
|
1806
|
+
sweepValidate(s: Any$A): void;
|
|
1805
1807
|
invalidate_pos(): void;
|
|
1806
|
-
pos_invalidate(pos: Any$
|
|
1808
|
+
pos_invalidate(pos: Any$A): void;
|
|
1807
1809
|
pos_validate(): void;
|
|
1808
|
-
vel_invalidate(vel: Any$
|
|
1810
|
+
vel_invalidate(vel: Any$A): void;
|
|
1809
1811
|
vel_validate(): void;
|
|
1810
|
-
kinvel_invalidate(vel: Any$
|
|
1812
|
+
kinvel_invalidate(vel: Any$A): void;
|
|
1811
1813
|
kinvel_validate(): void;
|
|
1812
|
-
svel_invalidate(vel: Any$
|
|
1814
|
+
svel_invalidate(vel: Any$A): void;
|
|
1813
1815
|
svel_validate(): void;
|
|
1814
|
-
force_invalidate(force: Any$
|
|
1816
|
+
force_invalidate(force: Any$A): void;
|
|
1815
1817
|
force_validate(): void;
|
|
1816
1818
|
private _setupVec2Wrapper;
|
|
1817
1819
|
setupPosition(): void;
|
|
@@ -1848,37 +1850,37 @@ declare class ZPP_Body {
|
|
|
1848
1850
|
getworldCOM(): void;
|
|
1849
1851
|
__immutable_midstep(): void;
|
|
1850
1852
|
clear(): void;
|
|
1851
|
-
shapes_adder(s: Any$
|
|
1852
|
-
shapes_subber(s: Any$
|
|
1853
|
-
shapes_invalidate(_param: Any$
|
|
1853
|
+
shapes_adder(s: Any$A): boolean;
|
|
1854
|
+
shapes_subber(s: Any$A): void;
|
|
1855
|
+
shapes_invalidate(_param: Any$A): void;
|
|
1854
1856
|
shapes_modifiable(): void;
|
|
1855
1857
|
addedToSpace(): void;
|
|
1856
1858
|
removedFromSpace(): void;
|
|
1857
1859
|
private _removeArbiterFromList;
|
|
1858
|
-
copy(): Any$
|
|
1860
|
+
copy(): Any$A;
|
|
1859
1861
|
wake: () => void;
|
|
1860
1862
|
__iaddedToSpace: () => void;
|
|
1861
1863
|
__iremovedFromSpace: () => void;
|
|
1862
1864
|
immutable_midstep: (name: string) => void;
|
|
1863
|
-
copyto: (ret: Any$
|
|
1864
|
-
insert_cbtype: (cb: Any$
|
|
1865
|
+
copyto: (ret: Any$A) => void;
|
|
1866
|
+
insert_cbtype: (cb: Any$A) => void;
|
|
1865
1867
|
alloc_cbSet: () => void;
|
|
1866
1868
|
dealloc_cbSet: () => void;
|
|
1867
1869
|
setupcbTypes: () => void;
|
|
1868
1870
|
immutable_cbTypes: () => void;
|
|
1869
|
-
wrap_cbTypes_subber: (pcb: Any$
|
|
1870
|
-
wrap_cbTypes_adder: (cb: Any$
|
|
1871
|
-
setGroup: (group: Any$
|
|
1872
|
-
lookup_group: () => Any$
|
|
1873
|
-
getSpace: () => Any$
|
|
1871
|
+
wrap_cbTypes_subber: (pcb: Any$A) => void;
|
|
1872
|
+
wrap_cbTypes_adder: (cb: Any$A) => void;
|
|
1873
|
+
setGroup: (group: Any$A) => void;
|
|
1874
|
+
lookup_group: () => Any$A;
|
|
1875
|
+
getSpace: () => Any$A;
|
|
1874
1876
|
isShape: () => boolean;
|
|
1875
1877
|
isBody: () => boolean;
|
|
1876
1878
|
isCompound: () => boolean;
|
|
1877
1879
|
static _initialized: boolean;
|
|
1878
|
-
static _init(zpp: Any$
|
|
1880
|
+
static _init(zpp: Any$A, nape: Any$A): void;
|
|
1879
1881
|
}
|
|
1880
1882
|
|
|
1881
|
-
type Any$
|
|
1883
|
+
type Any$z = any;
|
|
1882
1884
|
/**
|
|
1883
1885
|
* A rigid body in the physics simulation.
|
|
1884
1886
|
*
|
|
@@ -1886,19 +1888,19 @@ type Any$x = any;
|
|
|
1886
1888
|
*/
|
|
1887
1889
|
declare class Body extends Interactor {
|
|
1888
1890
|
static __name__: string[];
|
|
1889
|
-
static __super__: Any$
|
|
1891
|
+
static __super__: Any$z;
|
|
1890
1892
|
/** Direct access to the extracted internal ZPP_Body. */
|
|
1891
1893
|
zpp_inner: ZPP_Body;
|
|
1892
1894
|
debugDraw: boolean;
|
|
1893
|
-
/** @internal */ set_type: (type: Any$
|
|
1894
|
-
/** @internal */ set_position: (position: Any$
|
|
1895
|
+
/** @internal */ set_type: (type: Any$z) => Any$z;
|
|
1896
|
+
/** @internal */ set_position: (position: Any$z) => Any$z;
|
|
1895
1897
|
/** @internal */ set_rotation: (rotation: number) => number;
|
|
1896
|
-
/** @internal */ set_velocity: (velocity: Any$
|
|
1898
|
+
/** @internal */ set_velocity: (velocity: Any$z) => Any$z;
|
|
1897
1899
|
/** @internal */ set_angularVel: (angularVel: number) => number;
|
|
1898
|
-
/** @internal */ set_kinematicVel: (kinematicVel: Any$
|
|
1900
|
+
/** @internal */ set_kinematicVel: (kinematicVel: Any$z) => Any$z;
|
|
1899
1901
|
/** @internal */ set_kinAngVel: (kinAngVel: number) => number;
|
|
1900
|
-
/** @internal */ set_surfaceVel: (surfaceVel: Any$
|
|
1901
|
-
/** @internal */ set_force: (force: Any$
|
|
1902
|
+
/** @internal */ set_surfaceVel: (surfaceVel: Any$z) => Any$z;
|
|
1903
|
+
/** @internal */ set_force: (force: Any$z) => Any$z;
|
|
1902
1904
|
/** @internal */ set_torque: (torque: number) => number;
|
|
1903
1905
|
/** @internal */ get_mass: () => number;
|
|
1904
1906
|
/** @internal */ set_mass: (mass: number) => number;
|
|
@@ -1910,36 +1912,36 @@ declare class Body extends Interactor {
|
|
|
1910
1912
|
/** @internal */ set_gravMassScale: (gravMassScale: number) => number;
|
|
1911
1913
|
/** @internal */ set_allowMovement: (v: boolean) => boolean;
|
|
1912
1914
|
/** @internal */ set_allowRotation: (v: boolean) => boolean;
|
|
1913
|
-
/** @internal */ set_space: (space: Any$
|
|
1914
|
-
/** @internal */ set_compound: (compound: Any$
|
|
1915
|
-
/** @internal */ get_localCOM: () => Any$
|
|
1916
|
-
/** @internal */ get_worldCOM: () => Any$
|
|
1917
|
-
/** @internal */ integrate: (deltaTime: number) => Any$
|
|
1918
|
-
/** @internal */ applyImpulse: (impulse: Any$
|
|
1915
|
+
/** @internal */ set_space: (space: Any$z) => Any$z;
|
|
1916
|
+
/** @internal */ set_compound: (compound: Any$z) => Any$z;
|
|
1917
|
+
/** @internal */ get_localCOM: () => Any$z;
|
|
1918
|
+
/** @internal */ get_worldCOM: () => Any$z;
|
|
1919
|
+
/** @internal */ integrate: (deltaTime: number) => Any$z;
|
|
1920
|
+
/** @internal */ applyImpulse: (impulse: Any$z, pos?: Any$z, sleepable?: boolean) => void;
|
|
1919
1921
|
/** @internal */ applyAngularImpulse: (impulse: number, sleepable?: boolean) => void;
|
|
1920
|
-
/** @internal */ setVelocityFromTarget: (targetPosition: Any$
|
|
1921
|
-
/** @internal */ localPointToWorld: (point: Any$
|
|
1922
|
-
/** @internal */ worldPointToLocal: (point: Any$
|
|
1923
|
-
/** @internal */ localVectorToWorld: (vector: Any$
|
|
1924
|
-
/** @internal */ worldVectorToLocal: (vector: Any$
|
|
1925
|
-
/** @internal */ translateShapes: (translation: Any$
|
|
1922
|
+
/** @internal */ setVelocityFromTarget: (targetPosition: Any$z, targetRotation: number, deltaTime: number) => Any$z;
|
|
1923
|
+
/** @internal */ localPointToWorld: (point: Any$z, weak?: boolean) => Any$z;
|
|
1924
|
+
/** @internal */ worldPointToLocal: (point: Any$z, weak?: boolean) => Any$z;
|
|
1925
|
+
/** @internal */ localVectorToWorld: (vector: Any$z, weak?: boolean) => Any$z;
|
|
1926
|
+
/** @internal */ worldVectorToLocal: (vector: Any$z, weak?: boolean) => Any$z;
|
|
1927
|
+
/** @internal */ translateShapes: (translation: Any$z) => void;
|
|
1926
1928
|
/** @internal */ rotateShapes: (angle: number) => void;
|
|
1927
1929
|
/** @internal */ scaleShapes: (scaleX: number, scaleY: number) => void;
|
|
1928
1930
|
/** @internal */ align: () => void;
|
|
1929
|
-
/** @internal */ rotate: (centre: Any$
|
|
1930
|
-
/** @internal */ setShapeMaterials: (material: Any$
|
|
1931
|
-
/** @internal */ setShapeFilters: (filter: Any$
|
|
1932
|
-
/** @internal */ setShapeFluidProperties: (fluidProperties: Any$
|
|
1933
|
-
/** @internal */ contains: (point: Any$
|
|
1931
|
+
/** @internal */ rotate: (centre: Any$z, angle: number) => void;
|
|
1932
|
+
/** @internal */ setShapeMaterials: (material: Any$z) => void;
|
|
1933
|
+
/** @internal */ setShapeFilters: (filter: Any$z) => void;
|
|
1934
|
+
/** @internal */ setShapeFluidProperties: (fluidProperties: Any$z) => void;
|
|
1935
|
+
/** @internal */ contains: (point: Any$z) => boolean;
|
|
1934
1936
|
/** @internal */ crushFactor: () => number;
|
|
1935
|
-
/** @internal */ connectedBodies: (depth?: number, output?: Any$
|
|
1936
|
-
/** @internal */ interactingBodies: (type?: Any$
|
|
1937
|
-
/** @internal */ get_massMode: () => Any$
|
|
1938
|
-
/** @internal */ set_massMode: (mode: Any$
|
|
1939
|
-
/** @internal */ get_inertiaMode: () => Any$
|
|
1940
|
-
/** @internal */ set_inertiaMode: (mode: Any$
|
|
1941
|
-
/** @internal */ get_gravMassMode: () => Any$
|
|
1942
|
-
/** @internal */ set_gravMassMode: (mode: Any$
|
|
1937
|
+
/** @internal */ connectedBodies: (depth?: number, output?: Any$z) => Any$z;
|
|
1938
|
+
/** @internal */ interactingBodies: (type?: Any$z, depth?: number, output?: Any$z) => Any$z;
|
|
1939
|
+
/** @internal */ get_massMode: () => Any$z;
|
|
1940
|
+
/** @internal */ set_massMode: (mode: Any$z) => Any$z;
|
|
1941
|
+
/** @internal */ get_inertiaMode: () => Any$z;
|
|
1942
|
+
/** @internal */ set_inertiaMode: (mode: Any$z) => Any$z;
|
|
1943
|
+
/** @internal */ get_gravMassMode: () => Any$z;
|
|
1944
|
+
/** @internal */ set_gravMassMode: (mode: Any$z) => Any$z;
|
|
1943
1945
|
/** @internal */ _toString: () => string;
|
|
1944
1946
|
constructor(type?: BodyType, position?: Vec2);
|
|
1945
1947
|
/** @internal */
|
|
@@ -1989,40 +1991,40 @@ declare class Body extends Interactor {
|
|
|
1989
1991
|
get shapes(): NapeList<Shape>;
|
|
1990
1992
|
get space(): Space;
|
|
1991
1993
|
set space(value: Space | null);
|
|
1992
|
-
get compound(): Any$
|
|
1993
|
-
set compound(value: Any$
|
|
1994
|
+
get compound(): Any$z;
|
|
1995
|
+
set compound(value: Any$z);
|
|
1994
1996
|
get bounds(): AABB;
|
|
1995
1997
|
get constraintVelocity(): Vec2;
|
|
1996
1998
|
get localCOM(): Vec2;
|
|
1997
1999
|
get worldCOM(): Vec2;
|
|
1998
2000
|
copy(): Body;
|
|
1999
2001
|
toString(): string;
|
|
2000
|
-
get_type(): Any$
|
|
2001
|
-
get_shapes(): Any$
|
|
2002
|
+
get_type(): Any$z;
|
|
2003
|
+
get_shapes(): Any$z;
|
|
2002
2004
|
get_isBullet(): boolean;
|
|
2003
2005
|
set_isBullet(v: boolean): boolean;
|
|
2004
2006
|
get_disableCCD(): boolean;
|
|
2005
2007
|
set_disableCCD(v: boolean): boolean;
|
|
2006
|
-
get_position(): Any$
|
|
2007
|
-
get_velocity(): Any$
|
|
2008
|
+
get_position(): Any$z;
|
|
2009
|
+
get_velocity(): Any$z;
|
|
2008
2010
|
get_rotation(): number;
|
|
2009
2011
|
get_angularVel(): number;
|
|
2010
|
-
get_kinematicVel(): Any$
|
|
2012
|
+
get_kinematicVel(): Any$z;
|
|
2011
2013
|
get_kinAngVel(): number;
|
|
2012
|
-
get_surfaceVel(): Any$
|
|
2013
|
-
get_force(): Any$
|
|
2014
|
+
get_surfaceVel(): Any$z;
|
|
2015
|
+
get_force(): Any$z;
|
|
2014
2016
|
get_torque(): number;
|
|
2015
|
-
get_bounds(): Any$
|
|
2016
|
-
get_constraintVelocity(): Any$
|
|
2017
|
+
get_bounds(): Any$z;
|
|
2018
|
+
get_constraintVelocity(): Any$z;
|
|
2017
2019
|
get_constraintMass(): number;
|
|
2018
2020
|
get_constraintInertia(): number;
|
|
2019
2021
|
get_allowMovement(): boolean;
|
|
2020
2022
|
get_allowRotation(): boolean;
|
|
2021
2023
|
get_isSleeping(): boolean;
|
|
2022
|
-
get_compound(): Any$
|
|
2023
|
-
get_space(): Any$
|
|
2024
|
-
get_arbiters(): Any$
|
|
2025
|
-
get_constraints(): Any$
|
|
2024
|
+
get_compound(): Any$z;
|
|
2025
|
+
get_space(): Any$z;
|
|
2026
|
+
get_arbiters(): Any$z;
|
|
2027
|
+
get_constraints(): Any$z;
|
|
2026
2028
|
}
|
|
2027
2029
|
|
|
2028
2030
|
/**
|
|
@@ -2033,77 +2035,77 @@ declare class Body extends Interactor {
|
|
|
2033
2035
|
*
|
|
2034
2036
|
* Converted from nape-compiled.js lines 55195–55521.
|
|
2035
2037
|
*/
|
|
2036
|
-
type Any$
|
|
2038
|
+
type Any$y = any;
|
|
2037
2039
|
declare class ZPP_Compound {
|
|
2038
2040
|
static __name__: string[];
|
|
2039
|
-
static __super__: Any$
|
|
2041
|
+
static __super__: Any$y;
|
|
2040
2042
|
/**
|
|
2041
2043
|
* Namespace references, set by the compiled module after import.
|
|
2042
2044
|
* _nape = the `nape` public namespace (for wrapper creation in copy())
|
|
2043
2045
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
|
|
2044
2046
|
*/
|
|
2045
|
-
static _nape: Any$
|
|
2046
|
-
static _zpp: Any$
|
|
2047
|
+
static _nape: Any$y;
|
|
2048
|
+
static _zpp: Any$y;
|
|
2047
2049
|
/**
|
|
2048
2050
|
* Wrapper factory callback, registered by the modernized Compound class.
|
|
2049
2051
|
* When set, wrapper() uses this instead of the compiled Compound constructor.
|
|
2050
2052
|
*/
|
|
2051
|
-
static _wrapFn: ((zpp: ZPP_Compound) => Any$
|
|
2052
|
-
outer_i: Any$
|
|
2053
|
+
static _wrapFn: ((zpp: ZPP_Compound) => Any$y) | null;
|
|
2054
|
+
outer_i: Any$y;
|
|
2053
2055
|
id: number;
|
|
2054
|
-
userData: Any$
|
|
2055
|
-
ishape: Any$
|
|
2056
|
-
ibody: Any$
|
|
2057
|
-
icompound: Any$
|
|
2058
|
-
wrap_cbTypes: Any$
|
|
2059
|
-
cbSet: Any$
|
|
2060
|
-
cbTypes: Any$
|
|
2061
|
-
group: Any$
|
|
2062
|
-
cbsets: Any$
|
|
2063
|
-
outer: Any$
|
|
2064
|
-
bodies: Any$
|
|
2065
|
-
constraints: Any$
|
|
2066
|
-
compounds: Any$
|
|
2067
|
-
wrap_bodies: Any$
|
|
2068
|
-
wrap_constraints: Any$
|
|
2069
|
-
wrap_compounds: Any$
|
|
2056
|
+
userData: Any$y;
|
|
2057
|
+
ishape: Any$y;
|
|
2058
|
+
ibody: Any$y;
|
|
2059
|
+
icompound: Any$y;
|
|
2060
|
+
wrap_cbTypes: Any$y;
|
|
2061
|
+
cbSet: Any$y;
|
|
2062
|
+
cbTypes: Any$y;
|
|
2063
|
+
group: Any$y;
|
|
2064
|
+
cbsets: Any$y;
|
|
2065
|
+
outer: Any$y;
|
|
2066
|
+
bodies: Any$y;
|
|
2067
|
+
constraints: Any$y;
|
|
2068
|
+
compounds: Any$y;
|
|
2069
|
+
wrap_bodies: Any$y;
|
|
2070
|
+
wrap_constraints: Any$y;
|
|
2071
|
+
wrap_compounds: Any$y;
|
|
2070
2072
|
depth: number;
|
|
2071
|
-
compound: Any$
|
|
2072
|
-
space: Any$
|
|
2073
|
-
__class__: Any$
|
|
2073
|
+
compound: Any$y;
|
|
2074
|
+
space: Any$y;
|
|
2075
|
+
__class__: Any$y;
|
|
2074
2076
|
constructor();
|
|
2075
2077
|
__imutable_midstep(name: string): void;
|
|
2076
2078
|
addedToSpace(): void;
|
|
2077
2079
|
removedFromSpace(): void;
|
|
2078
2080
|
breakApart(): void;
|
|
2079
2081
|
private static _zppOf;
|
|
2080
|
-
bodies_adder(x: Any$
|
|
2081
|
-
bodies_subber(x: Any$
|
|
2082
|
+
bodies_adder(x: Any$y): boolean;
|
|
2083
|
+
bodies_subber(x: Any$y): void;
|
|
2082
2084
|
bodies_modifiable(): void;
|
|
2083
|
-
constraints_adder(x: Any$
|
|
2084
|
-
constraints_subber(x: Any$
|
|
2085
|
+
constraints_adder(x: Any$y): boolean;
|
|
2086
|
+
constraints_subber(x: Any$y): void;
|
|
2085
2087
|
constraints_modifiable(): void;
|
|
2086
|
-
compounds_adder(x: Any$
|
|
2087
|
-
compounds_subber(x: Any$
|
|
2088
|
+
compounds_adder(x: Any$y): boolean;
|
|
2089
|
+
compounds_subber(x: Any$y): void;
|
|
2088
2090
|
compounds_modifiable(): void;
|
|
2089
|
-
copy(dict?: Any$
|
|
2091
|
+
copy(dict?: Any$y[], todo?: Any$y[]): Any$y;
|
|
2090
2092
|
isShape: () => boolean;
|
|
2091
2093
|
isBody: () => boolean;
|
|
2092
2094
|
isCompound: () => boolean;
|
|
2093
2095
|
__iaddedToSpace: () => void;
|
|
2094
2096
|
__iremovedFromSpace: () => void;
|
|
2095
2097
|
wake: () => void;
|
|
2096
|
-
getSpace: () => Any$
|
|
2098
|
+
getSpace: () => Any$y;
|
|
2097
2099
|
setupcbTypes: () => void;
|
|
2098
2100
|
immutable_cbTypes: () => void;
|
|
2099
|
-
wrap_cbTypes_subber: (pcb: Any$
|
|
2100
|
-
wrap_cbTypes_adder: (cb: Any$
|
|
2101
|
-
insert_cbtype: (cb: Any$
|
|
2101
|
+
wrap_cbTypes_subber: (pcb: Any$y) => void;
|
|
2102
|
+
wrap_cbTypes_adder: (cb: Any$y) => boolean;
|
|
2103
|
+
insert_cbtype: (cb: Any$y) => void;
|
|
2102
2104
|
alloc_cbSet: () => void;
|
|
2103
2105
|
dealloc_cbSet: () => void;
|
|
2104
2106
|
immutable_midstep: (name: string) => void;
|
|
2105
|
-
copyto: (ret: Any$
|
|
2106
|
-
lookup_group: () => Any$
|
|
2107
|
+
copyto: (ret: Any$y) => void;
|
|
2108
|
+
lookup_group: () => Any$y;
|
|
2107
2109
|
/**
|
|
2108
2110
|
* Initialize prototype by copying ZPP_Interactor methods.
|
|
2109
2111
|
* Must be called after _zpp is set (during compiled module init).
|
|
@@ -2111,7 +2113,7 @@ declare class ZPP_Compound {
|
|
|
2111
2113
|
static _init(): void;
|
|
2112
2114
|
}
|
|
2113
2115
|
|
|
2114
|
-
type Any$
|
|
2116
|
+
type Any$x = any;
|
|
2115
2117
|
/**
|
|
2116
2118
|
* A compound physics object — a hierarchical grouping of Bodies, Constraints,
|
|
2117
2119
|
* and other Compounds.
|
|
@@ -2120,18 +2122,18 @@ type Any$v = any;
|
|
|
2120
2122
|
*/
|
|
2121
2123
|
declare class Compound extends Interactor {
|
|
2122
2124
|
static __name__: string[];
|
|
2123
|
-
static __super__: Any$
|
|
2125
|
+
static __super__: Any$x;
|
|
2124
2126
|
/** Direct access to the extracted internal ZPP_Compound. */
|
|
2125
2127
|
zpp_inner: ZPP_Compound;
|
|
2126
2128
|
constructor();
|
|
2127
2129
|
/** @internal */
|
|
2128
2130
|
static _wrap(inner: NapeInner): Compound;
|
|
2129
2131
|
/** Bodies in this compound. */
|
|
2130
|
-
get bodies(): Any$
|
|
2132
|
+
get bodies(): Any$x;
|
|
2131
2133
|
/** Constraints in this compound. */
|
|
2132
|
-
get constraints(): Any$
|
|
2134
|
+
get constraints(): Any$x;
|
|
2133
2135
|
/** Child compounds in this compound. */
|
|
2134
|
-
get compounds(): Any$
|
|
2136
|
+
get compounds(): Any$x;
|
|
2135
2137
|
/** Parent compound, or null if this is a root compound. */
|
|
2136
2138
|
get compound(): Compound | null;
|
|
2137
2139
|
set compound(value: Compound | null);
|
|
@@ -2145,7 +2147,7 @@ declare class Compound extends Interactor {
|
|
|
2145
2147
|
/** Recursively visit all bodies in this compound and its sub-compounds. */
|
|
2146
2148
|
visitBodies(lambda: (body: Body) => void): void;
|
|
2147
2149
|
/** Recursively visit all constraints in this compound and its sub-compounds. */
|
|
2148
|
-
visitConstraints(lambda: (constraint: Any$
|
|
2150
|
+
visitConstraints(lambda: (constraint: Any$x) => void): void;
|
|
2149
2151
|
/** Recursively visit all sub-compounds in this compound. */
|
|
2150
2152
|
visitCompounds(lambda: (compound: Compound) => void): void;
|
|
2151
2153
|
/** Calculate the center of mass of all bodies in this compound. */
|
|
@@ -2155,13 +2157,13 @@ declare class Compound extends Interactor {
|
|
|
2155
2157
|
/** Rotate all bodies in this compound around the given centre point. */
|
|
2156
2158
|
rotate(centre: Vec2, angle: number): Compound;
|
|
2157
2159
|
toString(): string;
|
|
2158
|
-
get_bodies(): Any$
|
|
2159
|
-
get_constraints(): Any$
|
|
2160
|
-
get_compounds(): Any$
|
|
2161
|
-
get_compound(): Any$
|
|
2162
|
-
set_compound(compound: Any$
|
|
2163
|
-
get_space(): Any$
|
|
2164
|
-
set_space(space: Any$
|
|
2160
|
+
get_bodies(): Any$x;
|
|
2161
|
+
get_constraints(): Any$x;
|
|
2162
|
+
get_compounds(): Any$x;
|
|
2163
|
+
get_compound(): Any$x;
|
|
2164
|
+
set_compound(compound: Any$x): Any$x;
|
|
2165
|
+
get_space(): Any$x;
|
|
2166
|
+
set_space(space: Any$x): Any$x;
|
|
2165
2167
|
}
|
|
2166
2168
|
|
|
2167
2169
|
/**
|
|
@@ -2326,17 +2328,17 @@ declare class ArbiterType {
|
|
|
2326
2328
|
*
|
|
2327
2329
|
* Converted from nape-compiled.js lines 29044–29362, 80738–80766.
|
|
2328
2330
|
*/
|
|
2329
|
-
type Any$
|
|
2331
|
+
type Any$w = any;
|
|
2330
2332
|
declare class ZPP_Arbiter {
|
|
2331
2333
|
static __name__: string[];
|
|
2332
|
-
static _nape: Any$
|
|
2333
|
-
static _zpp: Any$
|
|
2334
|
+
static _nape: Any$w;
|
|
2335
|
+
static _zpp: Any$w;
|
|
2334
2336
|
static internal: boolean;
|
|
2335
2337
|
static COL: number;
|
|
2336
2338
|
static FLUID: number;
|
|
2337
2339
|
static SENSOR: number;
|
|
2338
|
-
static types: Any$
|
|
2339
|
-
outer: Any$
|
|
2340
|
+
static types: Any$w[];
|
|
2341
|
+
outer: Any$w;
|
|
2340
2342
|
hnext: ZPP_Arbiter | null;
|
|
2341
2343
|
id: number;
|
|
2342
2344
|
di: number;
|
|
@@ -2354,31 +2356,31 @@ declare class ZPP_Arbiter {
|
|
|
2354
2356
|
fresh: boolean;
|
|
2355
2357
|
immState: number;
|
|
2356
2358
|
invalidated: boolean;
|
|
2357
|
-
b1: Any$
|
|
2358
|
-
b2: Any$
|
|
2359
|
-
ws1: Any$
|
|
2360
|
-
ws2: Any$
|
|
2361
|
-
pair: Any$
|
|
2359
|
+
b1: Any$w;
|
|
2360
|
+
b2: Any$w;
|
|
2361
|
+
ws1: Any$w;
|
|
2362
|
+
ws2: Any$w;
|
|
2363
|
+
pair: Any$w;
|
|
2362
2364
|
type: number;
|
|
2363
|
-
colarb: Any$
|
|
2364
|
-
fluidarb: Any$
|
|
2365
|
-
sensorarb: Any$
|
|
2366
|
-
__class__: Any$
|
|
2365
|
+
colarb: Any$w;
|
|
2366
|
+
fluidarb: Any$w;
|
|
2367
|
+
sensorarb: Any$w;
|
|
2368
|
+
__class__: Any$w;
|
|
2367
2369
|
constructor();
|
|
2368
|
-
wrapper(): Any$
|
|
2370
|
+
wrapper(): Any$w;
|
|
2369
2371
|
inactiveme(): boolean;
|
|
2370
2372
|
acting(): boolean;
|
|
2371
2373
|
swap_features(): void;
|
|
2372
|
-
lazyRetire(s: Any$
|
|
2373
|
-
sup_assign(s1: Any$
|
|
2374
|
+
lazyRetire(s: Any$w, b: Any$w): void;
|
|
2375
|
+
sup_assign(s1: Any$w, s2: Any$w, id: number, di: number): void;
|
|
2374
2376
|
sup_retire(): void;
|
|
2375
2377
|
/** Remove this arbiter from a ZNPList_ZPP_Arbiter */
|
|
2376
|
-
static _removeFromArbiterList(list: Any$
|
|
2378
|
+
static _removeFromArbiterList(list: Any$w, arb: ZPP_Arbiter, zpp: Any$w): void;
|
|
2377
2379
|
/** Add this arbiter to a ZNPList_ZPP_Arbiter */
|
|
2378
|
-
static _addToArbiterList(list: Any$
|
|
2380
|
+
static _addToArbiterList(list: Any$w, arb: ZPP_Arbiter, zpp: Any$w): void;
|
|
2379
2381
|
}
|
|
2380
2382
|
|
|
2381
|
-
type Any$
|
|
2383
|
+
type Any$v = any;
|
|
2382
2384
|
/**
|
|
2383
2385
|
* Represents an interaction arbiter between two shapes.
|
|
2384
2386
|
*
|
|
@@ -2397,21 +2399,21 @@ declare class Arbiter {
|
|
|
2397
2399
|
/** Whether this arbiter is currently sleeping. */
|
|
2398
2400
|
get isSleeping(): boolean;
|
|
2399
2401
|
/** The type of this arbiter (COLLISION, SENSOR, or FLUID). */
|
|
2400
|
-
get type(): Any$
|
|
2402
|
+
get type(): Any$v;
|
|
2401
2403
|
/** Cast to CollisionArbiter if this is a collision, else null. */
|
|
2402
|
-
get collisionArbiter(): Any$
|
|
2404
|
+
get collisionArbiter(): Any$v;
|
|
2403
2405
|
/** Cast to FluidArbiter if this is a fluid interaction, else null. */
|
|
2404
|
-
get fluidArbiter(): Any$
|
|
2406
|
+
get fluidArbiter(): Any$v;
|
|
2405
2407
|
/** First shape (lower id). */
|
|
2406
|
-
get shape1(): Any$
|
|
2408
|
+
get shape1(): Any$v;
|
|
2407
2409
|
/** Second shape (higher id). */
|
|
2408
|
-
get shape2(): Any$
|
|
2410
|
+
get shape2(): Any$v;
|
|
2409
2411
|
/** Body of shape1. */
|
|
2410
|
-
get body1(): Any$
|
|
2412
|
+
get body1(): Any$v;
|
|
2411
2413
|
/** Body of shape2. */
|
|
2412
|
-
get body2(): Any$
|
|
2414
|
+
get body2(): Any$v;
|
|
2413
2415
|
/** The pre-handler state of this arbiter. */
|
|
2414
|
-
get state(): Any$
|
|
2416
|
+
get state(): Any$v;
|
|
2415
2417
|
/** Whether this is a collision arbiter. */
|
|
2416
2418
|
isCollisionArbiter(): boolean;
|
|
2417
2419
|
/** Whether this is a fluid arbiter. */
|
|
@@ -2422,15 +2424,15 @@ declare class Arbiter {
|
|
|
2422
2424
|
* Total impulse of this arbiter. Base implementation returns Vec3(0,0,0).
|
|
2423
2425
|
* Overridden by CollisionArbiter and FluidArbiter.
|
|
2424
2426
|
*/
|
|
2425
|
-
totalImpulse(body?: Any$
|
|
2427
|
+
totalImpulse(body?: Any$v, _freshOnly?: boolean): Vec3;
|
|
2426
2428
|
toString(): string;
|
|
2427
2429
|
/** @internal */
|
|
2428
2430
|
protected _activeCheck(): void;
|
|
2429
2431
|
/** @internal */
|
|
2430
|
-
protected _checkBody(body: Any$
|
|
2432
|
+
protected _checkBody(body: Any$v): void;
|
|
2431
2433
|
}
|
|
2432
2434
|
|
|
2433
|
-
type Any$
|
|
2435
|
+
type Any$u = any;
|
|
2434
2436
|
/**
|
|
2435
2437
|
* A collision arbiter between two shapes in contact.
|
|
2436
2438
|
*
|
|
@@ -2444,15 +2446,15 @@ declare class CollisionArbiter extends Arbiter {
|
|
|
2444
2446
|
static __super__: typeof Arbiter;
|
|
2445
2447
|
constructor();
|
|
2446
2448
|
/** Contact points for this collision. */
|
|
2447
|
-
get contacts(): Any$
|
|
2449
|
+
get contacts(): Any$u;
|
|
2448
2450
|
/** Collision normal vector. */
|
|
2449
|
-
get normal(): Any$
|
|
2451
|
+
get normal(): Any$u;
|
|
2450
2452
|
/** Sum of the radii of the two shapes at the collision point. */
|
|
2451
2453
|
get radius(): number;
|
|
2452
2454
|
/** Reference edge of shape1 (if polygon), or null. */
|
|
2453
|
-
get referenceEdge1(): Any$
|
|
2455
|
+
get referenceEdge1(): Any$u;
|
|
2454
2456
|
/** Reference edge of shape2 (if polygon), or null. */
|
|
2455
|
-
get referenceEdge2(): Any$
|
|
2457
|
+
get referenceEdge2(): Any$u;
|
|
2456
2458
|
/** Coefficient of restitution (elasticity). Mutable in pre-handler only. */
|
|
2457
2459
|
get elasticity(): number;
|
|
2458
2460
|
set elasticity(value: number);
|
|
@@ -2470,20 +2472,20 @@ declare class CollisionArbiter extends Arbiter {
|
|
|
2470
2472
|
/** Whether the second contact point lies on a polygon vertex (poly-circle only). */
|
|
2471
2473
|
secondVertex(): boolean;
|
|
2472
2474
|
/** Normal impulse accumulated across all contacts. */
|
|
2473
|
-
normalImpulse(body?: Any$
|
|
2475
|
+
normalImpulse(body?: Any$u, freshOnly?: boolean): Vec3;
|
|
2474
2476
|
/** Tangent (friction) impulse accumulated across all contacts. */
|
|
2475
|
-
tangentImpulse(body?: Any$
|
|
2477
|
+
tangentImpulse(body?: Any$u, freshOnly?: boolean): Vec3;
|
|
2476
2478
|
/** Total impulse (normal + tangent + rolling) accumulated across all contacts. */
|
|
2477
|
-
totalImpulse(body?: Any$
|
|
2479
|
+
totalImpulse(body?: Any$u, freshOnly?: boolean): Vec3;
|
|
2478
2480
|
/** Rolling impulse for this collision. */
|
|
2479
|
-
rollingImpulse(body?: Any$
|
|
2481
|
+
rollingImpulse(body?: Any$u, freshOnly?: boolean): number;
|
|
2480
2482
|
/** @internal Throw if not in pre-handler mutable window. */
|
|
2481
2483
|
private _mutableCheck;
|
|
2482
2484
|
/** @internal Accumulate impulse from contacts. */
|
|
2483
2485
|
private _accumulateImpulse;
|
|
2484
2486
|
}
|
|
2485
2487
|
|
|
2486
|
-
type Any$
|
|
2488
|
+
type Any$t = any;
|
|
2487
2489
|
/**
|
|
2488
2490
|
* A fluid arbiter between two shapes with fluid interaction.
|
|
2489
2491
|
*
|
|
@@ -2503,11 +2505,11 @@ declare class FluidArbiter extends Arbiter {
|
|
|
2503
2505
|
get overlap(): number;
|
|
2504
2506
|
set overlap(value: number);
|
|
2505
2507
|
/** Buoyancy impulse applied by this fluid arbiter. */
|
|
2506
|
-
buoyancyImpulse(body?: Any$
|
|
2508
|
+
buoyancyImpulse(body?: Any$t): Vec3;
|
|
2507
2509
|
/** Drag impulse applied by this fluid arbiter. */
|
|
2508
|
-
dragImpulse(body?: Any$
|
|
2510
|
+
dragImpulse(body?: Any$t): Vec3;
|
|
2509
2511
|
/** Total impulse (buoyancy + drag). */
|
|
2510
|
-
totalImpulse(body?: Any$
|
|
2512
|
+
totalImpulse(body?: Any$t, _freshOnly?: boolean): Vec3;
|
|
2511
2513
|
}
|
|
2512
2514
|
|
|
2513
2515
|
/**
|
|
@@ -2519,7 +2521,7 @@ declare class FluidArbiter extends Arbiter {
|
|
|
2519
2521
|
*
|
|
2520
2522
|
* Converted from nape-compiled.js lines 32346–32733.
|
|
2521
2523
|
*/
|
|
2522
|
-
type Any$
|
|
2524
|
+
type Any$s = any;
|
|
2523
2525
|
declare class ZPP_IContact {
|
|
2524
2526
|
static __name__: string[];
|
|
2525
2527
|
length: number;
|
|
@@ -2541,7 +2543,7 @@ declare class ZPP_IContact {
|
|
|
2541
2543
|
lr1y: number;
|
|
2542
2544
|
lr2x: number;
|
|
2543
2545
|
lr2y: number;
|
|
2544
|
-
__class__: Any$
|
|
2546
|
+
__class__: Any$s;
|
|
2545
2547
|
elem(): this;
|
|
2546
2548
|
begin(): ZPP_IContact | null;
|
|
2547
2549
|
setbegin(i: ZPP_IContact | null): void;
|
|
@@ -2585,19 +2587,19 @@ declare class ZPP_IContact {
|
|
|
2585
2587
|
* Converted from nape-compiled.js lines 31853–32345, 81644–81645.
|
|
2586
2588
|
*/
|
|
2587
2589
|
|
|
2588
|
-
type Any$
|
|
2590
|
+
type Any$r = any;
|
|
2589
2591
|
declare class ZPP_Contact {
|
|
2590
2592
|
static __name__: string[];
|
|
2591
|
-
static _nape: Any$
|
|
2592
|
-
static _zpp: Any$
|
|
2593
|
+
static _nape: Any$r;
|
|
2594
|
+
static _zpp: Any$r;
|
|
2593
2595
|
static zpp_pool: ZPP_Contact | null;
|
|
2594
2596
|
static internal: boolean;
|
|
2595
|
-
static _wrapFn: ((zpp: ZPP_Contact) => Any$
|
|
2596
|
-
outer: Any$
|
|
2597
|
+
static _wrapFn: ((zpp: ZPP_Contact) => Any$r) | null;
|
|
2598
|
+
outer: Any$r;
|
|
2597
2599
|
px: number;
|
|
2598
2600
|
py: number;
|
|
2599
|
-
wrap_position: Any$
|
|
2600
|
-
arbiter: Any$
|
|
2601
|
+
wrap_position: Any$r;
|
|
2602
|
+
arbiter: Any$r;
|
|
2601
2603
|
inner: ZPP_IContact;
|
|
2602
2604
|
active: boolean;
|
|
2603
2605
|
posOnly: boolean;
|
|
@@ -2611,9 +2613,9 @@ declare class ZPP_Contact {
|
|
|
2611
2613
|
modified: boolean;
|
|
2612
2614
|
_inuse: boolean;
|
|
2613
2615
|
next: ZPP_Contact | null;
|
|
2614
|
-
__class__: Any$
|
|
2616
|
+
__class__: Any$r;
|
|
2615
2617
|
constructor();
|
|
2616
|
-
wrapper(): Any$
|
|
2618
|
+
wrapper(): Any$r;
|
|
2617
2619
|
position_validate(): void;
|
|
2618
2620
|
getposition(): void;
|
|
2619
2621
|
inactiveme(): boolean;
|
|
@@ -2651,7 +2653,7 @@ declare class ZPP_Contact {
|
|
|
2651
2653
|
at(ind: number): ZPP_Contact | null;
|
|
2652
2654
|
}
|
|
2653
2655
|
|
|
2654
|
-
type Any$
|
|
2656
|
+
type Any$q = any;
|
|
2655
2657
|
/**
|
|
2656
2658
|
* Represents a contact point between two colliding shapes.
|
|
2657
2659
|
*
|
|
@@ -2668,7 +2670,7 @@ declare class Contact {
|
|
|
2668
2670
|
get _inner(): NapeInner;
|
|
2669
2671
|
constructor();
|
|
2670
2672
|
/** The collision arbiter this contact belongs to, or null. */
|
|
2671
|
-
get arbiter(): Any$
|
|
2673
|
+
get arbiter(): Any$q;
|
|
2672
2674
|
/** Penetration depth of this contact (positive = overlapping). */
|
|
2673
2675
|
get penetration(): number;
|
|
2674
2676
|
/** World-space position of this contact point. */
|
|
@@ -2682,25 +2684,25 @@ declare class Contact {
|
|
|
2682
2684
|
* @param body - If null, returns world-frame impulse. Otherwise returns
|
|
2683
2685
|
* impulse on the given body (must be one of the two in contact).
|
|
2684
2686
|
*/
|
|
2685
|
-
normalImpulse(body?: Any$
|
|
2687
|
+
normalImpulse(body?: Any$q): Vec3;
|
|
2686
2688
|
/**
|
|
2687
2689
|
* Tangent impulse at this contact point.
|
|
2688
2690
|
* @param body - If null, returns world-frame impulse. Otherwise returns
|
|
2689
2691
|
* impulse on the given body.
|
|
2690
2692
|
*/
|
|
2691
|
-
tangentImpulse(body?: Any$
|
|
2693
|
+
tangentImpulse(body?: Any$q): Vec3;
|
|
2692
2694
|
/**
|
|
2693
2695
|
* Rolling impulse at this contact point.
|
|
2694
2696
|
* @param body - If null, returns total rolling impulse. Otherwise returns
|
|
2695
2697
|
* rolling impulse on the given body.
|
|
2696
2698
|
*/
|
|
2697
|
-
rollingImpulse(body?: Any$
|
|
2699
|
+
rollingImpulse(body?: Any$q): number;
|
|
2698
2700
|
/**
|
|
2699
2701
|
* Total impulse (normal + tangent + rolling) at this contact point.
|
|
2700
2702
|
* @param body - If null, returns world-frame impulse. Otherwise returns
|
|
2701
2703
|
* impulse on the given body.
|
|
2702
2704
|
*/
|
|
2703
|
-
totalImpulse(body?: Any$
|
|
2705
|
+
totalImpulse(body?: Any$q): Vec3;
|
|
2704
2706
|
toString(): string;
|
|
2705
2707
|
/** @internal */
|
|
2706
2708
|
private _inactiveCheck;
|
|
@@ -2717,41 +2719,41 @@ declare class Contact {
|
|
|
2717
2719
|
*
|
|
2718
2720
|
* Converted from nape-compiled.js lines 48256–48482.
|
|
2719
2721
|
*/
|
|
2720
|
-
type Any$
|
|
2722
|
+
type Any$p = any;
|
|
2721
2723
|
declare class ZPP_CbType {
|
|
2722
2724
|
static __name__: string[];
|
|
2723
|
-
static _zpp: Any$
|
|
2724
|
-
outer: Any$
|
|
2725
|
-
userData: Any$
|
|
2725
|
+
static _zpp: Any$p;
|
|
2726
|
+
outer: Any$p;
|
|
2727
|
+
userData: Any$p;
|
|
2726
2728
|
id: number;
|
|
2727
|
-
cbsets: Any$
|
|
2728
|
-
interactors: Any$
|
|
2729
|
-
wrap_interactors: Any$
|
|
2730
|
-
constraints: Any$
|
|
2731
|
-
wrap_constraints: Any$
|
|
2732
|
-
listeners: Any$
|
|
2733
|
-
bodylisteners: Any$
|
|
2734
|
-
conlisteners: Any$
|
|
2735
|
-
__class__: Any$
|
|
2729
|
+
cbsets: Any$p;
|
|
2730
|
+
interactors: Any$p;
|
|
2731
|
+
wrap_interactors: Any$p;
|
|
2732
|
+
constraints: Any$p;
|
|
2733
|
+
wrap_constraints: Any$p;
|
|
2734
|
+
listeners: Any$p;
|
|
2735
|
+
bodylisteners: Any$p;
|
|
2736
|
+
conlisteners: Any$p;
|
|
2737
|
+
__class__: Any$p;
|
|
2736
2738
|
constructor();
|
|
2737
2739
|
/** Sort comparator by id. */
|
|
2738
2740
|
static setlt(a: ZPP_CbType, b: ZPP_CbType): boolean;
|
|
2739
|
-
addInteractor(intx: Any$
|
|
2740
|
-
remInteractor(intx: Any$
|
|
2741
|
-
addConstraint(con: Any$
|
|
2742
|
-
remConstraint(con: Any$
|
|
2743
|
-
addint(x: Any$
|
|
2744
|
-
removeint(x: Any$
|
|
2741
|
+
addInteractor(intx: Any$p): void;
|
|
2742
|
+
remInteractor(intx: Any$p): void;
|
|
2743
|
+
addConstraint(con: Any$p): void;
|
|
2744
|
+
remConstraint(con: Any$p): void;
|
|
2745
|
+
addint(x: Any$p): void;
|
|
2746
|
+
removeint(x: Any$p): void;
|
|
2745
2747
|
invalidateint(): void;
|
|
2746
|
-
addbody(x: Any$
|
|
2747
|
-
removebody(x: Any$
|
|
2748
|
+
addbody(x: Any$p): void;
|
|
2749
|
+
removebody(x: Any$p): void;
|
|
2748
2750
|
invalidatebody(): void;
|
|
2749
|
-
addconstraint(x: Any$
|
|
2750
|
-
removeconstraint(x: Any$
|
|
2751
|
+
addconstraint(x: Any$p): void;
|
|
2752
|
+
removeconstraint(x: Any$p): void;
|
|
2751
2753
|
invalidateconstraint(): void;
|
|
2752
2754
|
}
|
|
2753
2755
|
|
|
2754
|
-
type Any$
|
|
2756
|
+
type Any$o = any;
|
|
2755
2757
|
/**
|
|
2756
2758
|
* Callback type — used to tag interactors so that listeners
|
|
2757
2759
|
* can filter which interactions they respond to.
|
|
@@ -2772,11 +2774,11 @@ declare class CbType {
|
|
|
2772
2774
|
static get_ANY_SHAPE(): CbType;
|
|
2773
2775
|
static get_ANY_COMPOUND(): CbType;
|
|
2774
2776
|
get id(): number;
|
|
2775
|
-
get userData(): Any$
|
|
2776
|
-
get interactors(): Any$
|
|
2777
|
-
get constraints(): Any$
|
|
2778
|
-
including(includes: Any$
|
|
2779
|
-
excluding(excludes: Any$
|
|
2777
|
+
get userData(): Any$o;
|
|
2778
|
+
get interactors(): Any$o;
|
|
2779
|
+
get constraints(): Any$o;
|
|
2780
|
+
including(includes: Any$o): Any$o;
|
|
2781
|
+
excluding(excludes: Any$o): Any$o;
|
|
2780
2782
|
toString(): string;
|
|
2781
2783
|
static _wrap(inner: any): CbType;
|
|
2782
2784
|
}
|
|
@@ -2837,37 +2839,37 @@ declare class PreFlag {
|
|
|
2837
2839
|
*
|
|
2838
2840
|
* Converted from nape-compiled.js lines 51337–51655.
|
|
2839
2841
|
*/
|
|
2840
|
-
type Any$
|
|
2842
|
+
type Any$n = any;
|
|
2841
2843
|
declare class ZPP_OptionType {
|
|
2842
2844
|
static __name__: string[];
|
|
2843
|
-
static _nape: Any$
|
|
2844
|
-
static _zpp: Any$
|
|
2845
|
-
outer: Any$
|
|
2846
|
-
handler: ((val: Any$
|
|
2847
|
-
includes: Any$
|
|
2848
|
-
excludes: Any$
|
|
2849
|
-
wrap_includes: Any$
|
|
2850
|
-
wrap_excludes: Any$
|
|
2851
|
-
__class__: Any$
|
|
2845
|
+
static _nape: Any$n;
|
|
2846
|
+
static _zpp: Any$n;
|
|
2847
|
+
outer: Any$n;
|
|
2848
|
+
handler: ((val: Any$n, included: boolean, added: boolean) => void) | null;
|
|
2849
|
+
includes: Any$n;
|
|
2850
|
+
excludes: Any$n;
|
|
2851
|
+
wrap_includes: Any$n;
|
|
2852
|
+
wrap_excludes: Any$n;
|
|
2853
|
+
__class__: Any$n;
|
|
2852
2854
|
constructor();
|
|
2853
2855
|
/** Coerce a value to OptionType (null → new, OptionType → pass-through, CbType → including). */
|
|
2854
|
-
static argument(val: Any$
|
|
2856
|
+
static argument(val: Any$n): Any$n;
|
|
2855
2857
|
setup_includes(): void;
|
|
2856
2858
|
setup_excludes(): void;
|
|
2857
|
-
excluded(xs: Any$
|
|
2858
|
-
included(xs: Any$
|
|
2859
|
-
compatible(xs: Any$
|
|
2859
|
+
excluded(xs: Any$n): boolean;
|
|
2860
|
+
included(xs: Any$n): boolean;
|
|
2861
|
+
compatible(xs: Any$n): boolean;
|
|
2860
2862
|
/** Check whether two sorted-by-id lists share any element. */
|
|
2861
|
-
nonemptyintersection(xs: Any$
|
|
2863
|
+
nonemptyintersection(xs: Any$n, ys: Any$n): boolean;
|
|
2862
2864
|
/** Insert into the ordered include or exclude list, using pool nodes. */
|
|
2863
2865
|
private insertOrdered;
|
|
2864
|
-
effect_change(val: Any$
|
|
2865
|
-
append_type(list: Any$
|
|
2866
|
+
effect_change(val: Any$n, included: boolean, added: boolean): void;
|
|
2867
|
+
append_type(list: Any$n, val: Any$n): void;
|
|
2866
2868
|
set(options: ZPP_OptionType): this;
|
|
2867
|
-
append(list: Any$
|
|
2869
|
+
append(list: Any$n, val: Any$n): void;
|
|
2868
2870
|
}
|
|
2869
2871
|
|
|
2870
|
-
type Any$
|
|
2872
|
+
type Any$m = any;
|
|
2871
2873
|
/**
|
|
2872
2874
|
* Composite callback option type — allows including and excluding CbTypes.
|
|
2873
2875
|
*
|
|
@@ -2877,13 +2879,13 @@ declare class OptionType {
|
|
|
2877
2879
|
static __name__: string[];
|
|
2878
2880
|
zpp_inner: ZPP_OptionType;
|
|
2879
2881
|
get _inner(): NapeInner;
|
|
2880
|
-
constructor(includes?: Any$
|
|
2881
|
-
get includes(): Any$
|
|
2882
|
-
get excludes(): Any$
|
|
2883
|
-
get_includes(): Any$
|
|
2884
|
-
get_excludes(): Any$
|
|
2885
|
-
including(includes: Any$
|
|
2886
|
-
excluding(excludes: Any$
|
|
2882
|
+
constructor(includes?: Any$m, excludes?: Any$m);
|
|
2883
|
+
get includes(): Any$m;
|
|
2884
|
+
get excludes(): Any$m;
|
|
2885
|
+
get_includes(): Any$m;
|
|
2886
|
+
get_excludes(): Any$m;
|
|
2887
|
+
including(includes: Any$m): this;
|
|
2888
|
+
excluding(excludes: Any$m): this;
|
|
2887
2889
|
toString(): string;
|
|
2888
2890
|
static _wrap(inner: any): OptionType;
|
|
2889
2891
|
}
|
|
@@ -2897,18 +2899,18 @@ declare class OptionType {
|
|
|
2897
2899
|
* Converted from nape-compiled.js lines 27305–27497.
|
|
2898
2900
|
*/
|
|
2899
2901
|
|
|
2900
|
-
type Any$
|
|
2902
|
+
type Any$l = any;
|
|
2901
2903
|
declare class ZPP_BodyListener extends ZPP_Listener {
|
|
2902
2904
|
static __name__: string[];
|
|
2903
|
-
handler: Any$
|
|
2904
|
-
options: Any$
|
|
2905
|
-
outer_zn: Any$
|
|
2906
|
-
__class__: Any$
|
|
2907
|
-
constructor(options: Any$
|
|
2905
|
+
handler: Any$l;
|
|
2906
|
+
options: Any$l;
|
|
2907
|
+
outer_zn: Any$l;
|
|
2908
|
+
__class__: Any$l;
|
|
2909
|
+
constructor(options: Any$l, event: number, handler: Any$l);
|
|
2908
2910
|
immutable_options(): void;
|
|
2909
2911
|
addedToSpace(): void;
|
|
2910
2912
|
removedFromSpace(): void;
|
|
2911
|
-
cbtype_change(cb: Any$
|
|
2913
|
+
cbtype_change(cb: Any$l, included: boolean, added: boolean): void;
|
|
2912
2914
|
invalidate_precedence(): void;
|
|
2913
2915
|
swapEvent(newev: number): void;
|
|
2914
2916
|
}
|
|
@@ -2919,15 +2921,15 @@ declare class ZPP_BodyListener extends ZPP_Listener {
|
|
|
2919
2921
|
* Fully modernized from nape-compiled.js lines 434–515.
|
|
2920
2922
|
*/
|
|
2921
2923
|
|
|
2922
|
-
type Any$
|
|
2924
|
+
type Any$k = any;
|
|
2923
2925
|
declare class BodyListener extends Listener {
|
|
2924
2926
|
static __name__: string[];
|
|
2925
2927
|
zpp_inner_zn: ZPP_BodyListener;
|
|
2926
|
-
constructor(event: CbEvent, options: Any$
|
|
2927
|
-
get options(): Any$
|
|
2928
|
-
set options(options: Any$
|
|
2929
|
-
get handler(): (cb: Any$
|
|
2930
|
-
set handler(handler: (cb: Any$
|
|
2928
|
+
constructor(event: CbEvent, options: Any$k, handler: (cb: Any$k) => void, precedence?: number);
|
|
2929
|
+
get options(): Any$k;
|
|
2930
|
+
set options(options: Any$k);
|
|
2931
|
+
get handler(): (cb: Any$k) => void;
|
|
2932
|
+
set handler(handler: (cb: Any$k) => void);
|
|
2931
2933
|
}
|
|
2932
2934
|
|
|
2933
2935
|
/**
|
|
@@ -2940,38 +2942,38 @@ declare class BodyListener extends Listener {
|
|
|
2940
2942
|
* Converted from nape-compiled.js lines 28138–30352, 112140–112151.
|
|
2941
2943
|
*/
|
|
2942
2944
|
|
|
2943
|
-
type Any$
|
|
2945
|
+
type Any$j = any;
|
|
2944
2946
|
declare class ZPP_InteractionListener extends ZPP_Listener {
|
|
2945
2947
|
static __name__: string[];
|
|
2946
|
-
static UCbSet: Any$
|
|
2947
|
-
static VCbSet: Any$
|
|
2948
|
-
static WCbSet: Any$
|
|
2949
|
-
static UCbType: Any$
|
|
2950
|
-
static VCbType: Any$
|
|
2951
|
-
static WCbType: Any$
|
|
2952
|
-
outer_zni: Any$
|
|
2953
|
-
outer_znp: Any$
|
|
2948
|
+
static UCbSet: Any$j;
|
|
2949
|
+
static VCbSet: Any$j;
|
|
2950
|
+
static WCbSet: Any$j;
|
|
2951
|
+
static UCbType: Any$j;
|
|
2952
|
+
static VCbType: Any$j;
|
|
2953
|
+
static WCbType: Any$j;
|
|
2954
|
+
outer_zni: Any$j;
|
|
2955
|
+
outer_znp: Any$j;
|
|
2954
2956
|
itype: number;
|
|
2955
|
-
options1: Any$
|
|
2956
|
-
options2: Any$
|
|
2957
|
-
handleri: Any$
|
|
2957
|
+
options1: Any$j;
|
|
2958
|
+
options2: Any$j;
|
|
2959
|
+
handleri: Any$j;
|
|
2958
2960
|
allowSleepingCallbacks: boolean;
|
|
2959
2961
|
pure: boolean;
|
|
2960
|
-
handlerp: Any$
|
|
2961
|
-
__class__: Any$
|
|
2962
|
-
constructor(options1: Any$
|
|
2962
|
+
handlerp: Any$j;
|
|
2963
|
+
__class__: Any$j;
|
|
2964
|
+
constructor(options1: Any$j, options2: Any$j, event: number, type: number);
|
|
2963
2965
|
setInteractionType(itype: number): void;
|
|
2964
2966
|
wake(): void;
|
|
2965
|
-
CbSetset(A: Any$
|
|
2966
|
-
CbTypeset(A: Any$
|
|
2967
|
+
CbSetset(A: Any$j, B: Any$j, lambda: (a: Any$j, b: Any$j) => void): void;
|
|
2968
|
+
CbTypeset(A: Any$j, B: Any$j, lambda: (a: Any$j, b: Any$j) => void): void;
|
|
2967
2969
|
with_uniquesets(fresh: boolean): void;
|
|
2968
|
-
with_union(lambda: (cb: Any$
|
|
2970
|
+
with_union(lambda: (cb: Any$j) => void): void;
|
|
2969
2971
|
addedToSpace(): void;
|
|
2970
2972
|
removedFromSpace(): void;
|
|
2971
2973
|
invalidate_precedence(): void;
|
|
2972
|
-
cbtype_change1(cb: Any$
|
|
2973
|
-
cbtype_change2(cb: Any$
|
|
2974
|
-
cbtype_change(options: Any$
|
|
2974
|
+
cbtype_change1(cb: Any$j, included: boolean, added: boolean): void;
|
|
2975
|
+
cbtype_change2(cb: Any$j, included: boolean, added: boolean): void;
|
|
2976
|
+
cbtype_change(options: Any$j, cb: Any$j, included: boolean, added: boolean): void;
|
|
2975
2977
|
swapEvent(newev: number): void;
|
|
2976
2978
|
private _allocCbSetNode;
|
|
2977
2979
|
private _allocCbTypeNode;
|
|
@@ -2983,17 +2985,17 @@ declare class ZPP_InteractionListener extends ZPP_Listener {
|
|
|
2983
2985
|
* Fully modernized from nape-compiled.js lines 659–1091.
|
|
2984
2986
|
*/
|
|
2985
2987
|
|
|
2986
|
-
type Any$
|
|
2988
|
+
type Any$i = any;
|
|
2987
2989
|
declare class InteractionListener extends Listener {
|
|
2988
2990
|
static __name__: string[];
|
|
2989
2991
|
zpp_inner_zn: ZPP_InteractionListener;
|
|
2990
|
-
constructor(event: CbEvent, interactionType: InteractionType, options1: Any$
|
|
2991
|
-
get options1(): Any$
|
|
2992
|
-
set options1(options1: Any$
|
|
2993
|
-
get options2(): Any$
|
|
2994
|
-
set options2(options2: Any$
|
|
2995
|
-
get handler(): (cb: Any$
|
|
2996
|
-
set handler(handler: (cb: Any$
|
|
2992
|
+
constructor(event: CbEvent, interactionType: InteractionType, options1: Any$i, options2: Any$i, handler: (cb: Any$i) => void, precedence?: number);
|
|
2993
|
+
get options1(): Any$i;
|
|
2994
|
+
set options1(options1: Any$i);
|
|
2995
|
+
get options2(): Any$i;
|
|
2996
|
+
set options2(options2: Any$i);
|
|
2997
|
+
get handler(): (cb: Any$i) => void;
|
|
2998
|
+
set handler(handler: (cb: Any$i) => void);
|
|
2997
2999
|
get interactionType(): InteractionType | null;
|
|
2998
3000
|
set interactionType(interactionType: InteractionType | null);
|
|
2999
3001
|
get allowSleepingCallbacks(): boolean;
|
|
@@ -3009,18 +3011,18 @@ declare class InteractionListener extends Listener {
|
|
|
3009
3011
|
* Converted from nape-compiled.js lines 27498–27694.
|
|
3010
3012
|
*/
|
|
3011
3013
|
|
|
3012
|
-
type Any$
|
|
3014
|
+
type Any$h = any;
|
|
3013
3015
|
declare class ZPP_ConstraintListener extends ZPP_Listener {
|
|
3014
3016
|
static __name__: string[];
|
|
3015
|
-
handler: Any$
|
|
3016
|
-
options: Any$
|
|
3017
|
-
outer_zn: Any$
|
|
3018
|
-
__class__: Any$
|
|
3019
|
-
constructor(options: Any$
|
|
3017
|
+
handler: Any$h;
|
|
3018
|
+
options: Any$h;
|
|
3019
|
+
outer_zn: Any$h;
|
|
3020
|
+
__class__: Any$h;
|
|
3021
|
+
constructor(options: Any$h, event: number, handler: Any$h);
|
|
3020
3022
|
immutable_options(): void;
|
|
3021
3023
|
addedToSpace(): void;
|
|
3022
3024
|
removedFromSpace(): void;
|
|
3023
|
-
cbtype_change(cb: Any$
|
|
3025
|
+
cbtype_change(cb: Any$h, included: boolean, added: boolean): void;
|
|
3024
3026
|
invalidate_precedence(): void;
|
|
3025
3027
|
swapEvent(newev: number): void;
|
|
3026
3028
|
}
|
|
@@ -3031,15 +3033,15 @@ declare class ZPP_ConstraintListener extends ZPP_Listener {
|
|
|
3031
3033
|
* Fully modernized from nape-compiled.js lines 546–649.
|
|
3032
3034
|
*/
|
|
3033
3035
|
|
|
3034
|
-
type Any$
|
|
3036
|
+
type Any$g = any;
|
|
3035
3037
|
declare class ConstraintListener extends Listener {
|
|
3036
3038
|
static __name__: string[];
|
|
3037
3039
|
zpp_inner_zn: ZPP_ConstraintListener;
|
|
3038
|
-
constructor(event: CbEvent, options: Any$
|
|
3039
|
-
get options(): Any$
|
|
3040
|
-
set options(options: Any$
|
|
3041
|
-
get handler(): (cb: Any$
|
|
3042
|
-
set handler(handler: (cb: Any$
|
|
3040
|
+
constructor(event: CbEvent, options: Any$g, handler: (cb: Any$g) => void, precedence?: number);
|
|
3041
|
+
get options(): Any$g;
|
|
3042
|
+
set options(options: Any$g);
|
|
3043
|
+
get handler(): (cb: Any$g) => void;
|
|
3044
|
+
set handler(handler: (cb: Any$g) => void);
|
|
3043
3045
|
}
|
|
3044
3046
|
|
|
3045
3047
|
/**
|
|
@@ -3050,17 +3052,17 @@ declare class ConstraintListener extends Listener {
|
|
|
3050
3052
|
* Fully modernized from nape-compiled.js lines 1142–1338.
|
|
3051
3053
|
*/
|
|
3052
3054
|
|
|
3053
|
-
type Any$
|
|
3055
|
+
type Any$f = any;
|
|
3054
3056
|
declare class PreListener extends Listener {
|
|
3055
3057
|
static __name__: string[];
|
|
3056
3058
|
zpp_inner_zn: ZPP_InteractionListener;
|
|
3057
|
-
constructor(interactionType: InteractionType, options1: Any$
|
|
3058
|
-
get options1(): Any$
|
|
3059
|
-
set options1(options1: Any$
|
|
3060
|
-
get options2(): Any$
|
|
3061
|
-
set options2(options2: Any$
|
|
3062
|
-
get handler(): (cb: Any$
|
|
3063
|
-
set handler(handler: (cb: Any$
|
|
3059
|
+
constructor(interactionType: InteractionType, options1: Any$f, options2: Any$f, handler: (cb: Any$f) => Any$f, precedence?: number, pure?: boolean);
|
|
3060
|
+
get options1(): Any$f;
|
|
3061
|
+
set options1(options1: Any$f);
|
|
3062
|
+
get options2(): Any$f;
|
|
3063
|
+
set options2(options2: Any$f);
|
|
3064
|
+
get handler(): (cb: Any$f) => Any$f;
|
|
3065
|
+
set handler(handler: (cb: Any$f) => Any$f);
|
|
3064
3066
|
get pure(): boolean;
|
|
3065
3067
|
set pure(pure: boolean);
|
|
3066
3068
|
get interactionType(): InteractionType | null;
|
|
@@ -3075,35 +3077,35 @@ declare class PreListener extends Listener {
|
|
|
3075
3077
|
*
|
|
3076
3078
|
* Converted from nape-compiled.js lines 44587–44794, 133299–133300.
|
|
3077
3079
|
*/
|
|
3078
|
-
type Any$
|
|
3080
|
+
type Any$e = any;
|
|
3079
3081
|
declare class ZPP_Callback {
|
|
3080
3082
|
static __name__: string[];
|
|
3081
|
-
static _nape: Any$
|
|
3082
|
-
static _zpp: Any$
|
|
3083
|
+
static _nape: Any$e;
|
|
3084
|
+
static _zpp: Any$e;
|
|
3083
3085
|
static internal: boolean;
|
|
3084
3086
|
static zpp_pool: ZPP_Callback | null;
|
|
3085
|
-
outer_body: Any$
|
|
3086
|
-
outer_con: Any$
|
|
3087
|
-
outer_int: Any$
|
|
3087
|
+
outer_body: Any$e;
|
|
3088
|
+
outer_con: Any$e;
|
|
3089
|
+
outer_int: Any$e;
|
|
3088
3090
|
event: number;
|
|
3089
|
-
listener: Any$
|
|
3090
|
-
space: Any$
|
|
3091
|
+
listener: Any$e;
|
|
3092
|
+
space: Any$e;
|
|
3091
3093
|
index: number;
|
|
3092
3094
|
next: ZPP_Callback | null;
|
|
3093
3095
|
prev: ZPP_Callback | null;
|
|
3094
3096
|
length: number;
|
|
3095
|
-
int1: Any$
|
|
3096
|
-
int2: Any$
|
|
3097
|
-
set: Any$
|
|
3098
|
-
wrap_arbiters: Any$
|
|
3099
|
-
pre_arbiter: Any$
|
|
3097
|
+
int1: Any$e;
|
|
3098
|
+
int2: Any$e;
|
|
3099
|
+
set: Any$e;
|
|
3100
|
+
wrap_arbiters: Any$e;
|
|
3101
|
+
pre_arbiter: Any$e;
|
|
3100
3102
|
pre_swapped: boolean;
|
|
3101
|
-
body: Any$
|
|
3102
|
-
constraint: Any$
|
|
3103
|
-
__class__: Any$
|
|
3104
|
-
wrapper_body(): Any$
|
|
3105
|
-
wrapper_con(): Any$
|
|
3106
|
-
wrapper_int(): Any$
|
|
3103
|
+
body: Any$e;
|
|
3104
|
+
constraint: Any$e;
|
|
3105
|
+
__class__: Any$e;
|
|
3106
|
+
wrapper_body(): Any$e;
|
|
3107
|
+
wrapper_con(): Any$e;
|
|
3108
|
+
wrapper_int(): Any$e;
|
|
3107
3109
|
push(obj: ZPP_Callback): void;
|
|
3108
3110
|
push_rev(obj: ZPP_Callback): void;
|
|
3109
3111
|
pop(): ZPP_Callback;
|
|
@@ -3122,7 +3124,7 @@ declare class ZPP_Callback {
|
|
|
3122
3124
|
genarbs(): void;
|
|
3123
3125
|
}
|
|
3124
3126
|
|
|
3125
|
-
type Any$
|
|
3127
|
+
type Any$d = any;
|
|
3126
3128
|
/**
|
|
3127
3129
|
* Base class for all physics engine callbacks.
|
|
3128
3130
|
*
|
|
@@ -3135,12 +3137,12 @@ declare class Callback {
|
|
|
3135
3137
|
static __name__: string[];
|
|
3136
3138
|
zpp_inner: ZPP_Callback | null;
|
|
3137
3139
|
constructor();
|
|
3138
|
-
get event(): Any$
|
|
3139
|
-
get listener(): Any$
|
|
3140
|
+
get event(): Any$d;
|
|
3141
|
+
get listener(): Any$d;
|
|
3140
3142
|
toString(): string;
|
|
3141
3143
|
}
|
|
3142
3144
|
|
|
3143
|
-
type Any$
|
|
3145
|
+
type Any$c = any;
|
|
3144
3146
|
/**
|
|
3145
3147
|
* Callback for body events (WAKE/SLEEP).
|
|
3146
3148
|
*
|
|
@@ -3150,11 +3152,11 @@ type Any$a = any;
|
|
|
3150
3152
|
*/
|
|
3151
3153
|
declare class BodyCallback extends Callback {
|
|
3152
3154
|
static __name__: string[];
|
|
3153
|
-
get body(): Any$
|
|
3155
|
+
get body(): Any$c;
|
|
3154
3156
|
toString(): string;
|
|
3155
3157
|
}
|
|
3156
3158
|
|
|
3157
|
-
type Any$
|
|
3159
|
+
type Any$b = any;
|
|
3158
3160
|
/**
|
|
3159
3161
|
* Callback for constraint events (WAKE/SLEEP/BREAK).
|
|
3160
3162
|
*
|
|
@@ -3164,11 +3166,11 @@ type Any$9 = any;
|
|
|
3164
3166
|
*/
|
|
3165
3167
|
declare class ConstraintCallback extends Callback {
|
|
3166
3168
|
static __name__: string[];
|
|
3167
|
-
get constraint(): Any$
|
|
3169
|
+
get constraint(): Any$b;
|
|
3168
3170
|
toString(): string;
|
|
3169
3171
|
}
|
|
3170
3172
|
|
|
3171
|
-
type Any$
|
|
3173
|
+
type Any$a = any;
|
|
3172
3174
|
/**
|
|
3173
3175
|
* Callback for interaction events (BEGIN/END/ONGOING).
|
|
3174
3176
|
*
|
|
@@ -3178,13 +3180,13 @@ type Any$8 = any;
|
|
|
3178
3180
|
*/
|
|
3179
3181
|
declare class InteractionCallback extends Callback {
|
|
3180
3182
|
static __name__: string[];
|
|
3181
|
-
get int1(): Any$
|
|
3182
|
-
get int2(): Any$
|
|
3183
|
-
get arbiters(): Any$
|
|
3183
|
+
get int1(): Any$a;
|
|
3184
|
+
get int2(): Any$a;
|
|
3185
|
+
get arbiters(): Any$a;
|
|
3184
3186
|
toString(): string;
|
|
3185
3187
|
}
|
|
3186
3188
|
|
|
3187
|
-
type Any$
|
|
3189
|
+
type Any$9 = any;
|
|
3188
3190
|
/**
|
|
3189
3191
|
* Callback for pre-interaction events.
|
|
3190
3192
|
*
|
|
@@ -3194,21 +3196,21 @@ type Any$7 = any;
|
|
|
3194
3196
|
*/
|
|
3195
3197
|
declare class PreCallback extends Callback {
|
|
3196
3198
|
static __name__: string[];
|
|
3197
|
-
get arbiter(): Any$
|
|
3198
|
-
get int1(): Any$
|
|
3199
|
-
get int2(): Any$
|
|
3199
|
+
get arbiter(): Any$9;
|
|
3200
|
+
get int1(): Any$9;
|
|
3201
|
+
get int2(): Any$9;
|
|
3200
3202
|
get swapped(): boolean;
|
|
3201
3203
|
toString(): string;
|
|
3202
3204
|
}
|
|
3203
3205
|
|
|
3204
|
-
type Any$
|
|
3206
|
+
type Any$8 = any;
|
|
3205
3207
|
/**
|
|
3206
3208
|
* A pivot (pin) joint that constrains two bodies to share an anchor point.
|
|
3207
3209
|
*/
|
|
3208
3210
|
declare class PivotJoint extends Constraint {
|
|
3209
3211
|
constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2);
|
|
3210
3212
|
/** @internal */
|
|
3211
|
-
static _wrap(inner: Any$
|
|
3213
|
+
static _wrap(inner: Any$8): PivotJoint;
|
|
3212
3214
|
get body1(): Body;
|
|
3213
3215
|
set body1(value: Body | null);
|
|
3214
3216
|
get body2(): Body;
|
|
@@ -3219,14 +3221,14 @@ declare class PivotJoint extends Constraint {
|
|
|
3219
3221
|
set anchor2(value: Vec2);
|
|
3220
3222
|
}
|
|
3221
3223
|
|
|
3222
|
-
type Any$
|
|
3224
|
+
type Any$7 = any;
|
|
3223
3225
|
/**
|
|
3224
3226
|
* Constrains the distance between two anchor points on two bodies.
|
|
3225
3227
|
*/
|
|
3226
3228
|
declare class DistanceJoint extends Constraint {
|
|
3227
3229
|
constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, jointMin: number, jointMax: number);
|
|
3228
3230
|
/** @internal */
|
|
3229
|
-
static _wrap(inner: Any$
|
|
3231
|
+
static _wrap(inner: Any$7): DistanceJoint;
|
|
3230
3232
|
get body1(): Body;
|
|
3231
3233
|
set body1(value: Body | null);
|
|
3232
3234
|
get body2(): Body;
|
|
@@ -3241,27 +3243,106 @@ declare class DistanceJoint extends Constraint {
|
|
|
3241
3243
|
set jointMax(value: number);
|
|
3242
3244
|
}
|
|
3243
3245
|
|
|
3244
|
-
|
|
3246
|
+
/**
|
|
3247
|
+
* ZPP_AngleJoint — Internal class for angle joint constraints.
|
|
3248
|
+
*
|
|
3249
|
+
* Constrains the relative angle between two bodies within min/max bounds.
|
|
3250
|
+
* Contains the complete solver logic (preStep, warmStart, impulse application).
|
|
3251
|
+
*
|
|
3252
|
+
* Converted from nape-compiled.js lines 21441–21912.
|
|
3253
|
+
*/
|
|
3254
|
+
|
|
3255
|
+
type Any$6 = any;
|
|
3256
|
+
declare class ZPP_AngleJoint extends ZPP_Constraint {
|
|
3257
|
+
static __name__: string[];
|
|
3258
|
+
static _wrapFn: ((zpp: ZPP_AngleJoint) => Any$6) | null;
|
|
3259
|
+
outer_zn: Any$6;
|
|
3260
|
+
ratio: number;
|
|
3261
|
+
jointMin: number;
|
|
3262
|
+
jointMax: number;
|
|
3263
|
+
slack: boolean;
|
|
3264
|
+
equal: boolean;
|
|
3265
|
+
scale: number;
|
|
3266
|
+
b1: Any$6;
|
|
3267
|
+
b2: Any$6;
|
|
3268
|
+
kMass: number;
|
|
3269
|
+
jAcc: number;
|
|
3270
|
+
jMax: number;
|
|
3271
|
+
gamma: number;
|
|
3272
|
+
bias: number;
|
|
3273
|
+
stepped: boolean;
|
|
3274
|
+
__class__: Any$6;
|
|
3275
|
+
constructor();
|
|
3276
|
+
is_slack(): boolean;
|
|
3277
|
+
bodyImpulse(b: Any$6): Any$6;
|
|
3278
|
+
activeBodies(): void;
|
|
3279
|
+
inactiveBodies(): void;
|
|
3280
|
+
copy(dict?: Any$6, todo?: Any$6): Any$6;
|
|
3281
|
+
validate(): void;
|
|
3282
|
+
wake_connected(): void;
|
|
3283
|
+
forest(): void;
|
|
3284
|
+
pair_exists(id: Any$6, di: Any$6): boolean;
|
|
3285
|
+
clearcache(): void;
|
|
3286
|
+
preStep(dt: number): boolean;
|
|
3287
|
+
warmStart(): void;
|
|
3288
|
+
applyImpulseVel(): boolean;
|
|
3289
|
+
applyImpulsePos(): boolean;
|
|
3290
|
+
draw(_g: Any$6): void;
|
|
3291
|
+
/**
|
|
3292
|
+
* Small-angle-optimized body rotation. Used by all joints' applyImpulsePos.
|
|
3293
|
+
*/
|
|
3294
|
+
static _rotateBody(body: Any$6, dr: number): void;
|
|
3295
|
+
/**
|
|
3296
|
+
* Dict-lookup / deferred-todo body copying. Used by all joints' copy().
|
|
3297
|
+
*/
|
|
3298
|
+
static _copyBody(dict: Any$6, todo: Any$6, srcBody: Any$6, ret: Any$6, field: string): void;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
type Any$5 = any;
|
|
3245
3302
|
/**
|
|
3246
3303
|
* Constrains the relative angle between two bodies.
|
|
3304
|
+
*
|
|
3305
|
+
* Fully modernized — uses ZPP_AngleJoint directly (extracted to TypeScript).
|
|
3247
3306
|
*/
|
|
3248
3307
|
declare class AngleJoint extends Constraint {
|
|
3308
|
+
zpp_inner: ZPP_AngleJoint;
|
|
3249
3309
|
constructor(body1: Body | null, body2: Body | null, jointMin: number, jointMax: number, ratio?: number);
|
|
3250
3310
|
/** @internal */
|
|
3251
|
-
static _wrap(inner: Any$
|
|
3311
|
+
static _wrap(inner: Any$5): AngleJoint;
|
|
3252
3312
|
get body1(): Body;
|
|
3253
3313
|
set body1(value: Body | null);
|
|
3314
|
+
/** @internal */
|
|
3315
|
+
private _setBody1;
|
|
3254
3316
|
get body2(): Body;
|
|
3255
3317
|
set body2(value: Body | null);
|
|
3318
|
+
/** @internal */
|
|
3319
|
+
private _setBody2;
|
|
3256
3320
|
get jointMin(): number;
|
|
3257
3321
|
set jointMin(value: number);
|
|
3258
3322
|
get jointMax(): number;
|
|
3259
3323
|
set jointMax(value: number);
|
|
3260
3324
|
get ratio(): number;
|
|
3261
3325
|
set ratio(value: number);
|
|
3326
|
+
isSlack(): boolean;
|
|
3327
|
+
impulse(): Any$5;
|
|
3328
|
+
bodyImpulse(body: Body): Any$5;
|
|
3329
|
+
visitBodies(lambda: (body: Body) => void): void;
|
|
3330
|
+
/** @internal */ get_body1(): Any$5;
|
|
3331
|
+
/** @internal */ set_body1(v: Any$5): Any$5;
|
|
3332
|
+
/** @internal */ get_body2(): Any$5;
|
|
3333
|
+
/** @internal */ set_body2(v: Any$5): Any$5;
|
|
3334
|
+
/** @internal */ get_jointMin(): number;
|
|
3335
|
+
/** @internal */ set_jointMin(v: number): number;
|
|
3336
|
+
/** @internal */ get_jointMax(): number;
|
|
3337
|
+
/** @internal */ set_jointMax(v: number): number;
|
|
3338
|
+
/** @internal */ get_ratio(): number;
|
|
3339
|
+
/** @internal */ set_ratio(v: number): number;
|
|
3340
|
+
/** @internal backward compat alias for zpp_inner */
|
|
3341
|
+
get zpp_inner_zn(): ZPP_AngleJoint;
|
|
3342
|
+
set zpp_inner_zn(v: ZPP_AngleJoint);
|
|
3262
3343
|
}
|
|
3263
3344
|
|
|
3264
|
-
type Any$
|
|
3345
|
+
type Any$4 = any;
|
|
3265
3346
|
/**
|
|
3266
3347
|
* Weld joint — constrains two bodies to maintain a fixed relative
|
|
3267
3348
|
* position and angle (like gluing them together).
|
|
@@ -3269,7 +3350,7 @@ type Any$3 = any;
|
|
|
3269
3350
|
declare class WeldJoint extends Constraint {
|
|
3270
3351
|
constructor(body1: Body | null, body2: Body | null, anchor1: Vec2, anchor2: Vec2, phase?: number);
|
|
3271
3352
|
/** @internal */
|
|
3272
|
-
static _wrap(inner: Any$
|
|
3353
|
+
static _wrap(inner: Any$4): WeldJoint;
|
|
3273
3354
|
get body1(): Body;
|
|
3274
3355
|
set body1(value: Body | null);
|
|
3275
3356
|
get body2(): Body;
|
|
@@ -3282,22 +3363,82 @@ declare class WeldJoint extends Constraint {
|
|
|
3282
3363
|
set phase(value: number);
|
|
3283
3364
|
}
|
|
3284
3365
|
|
|
3366
|
+
/**
|
|
3367
|
+
* ZPP_MotorJoint — Internal class for motor joint constraints.
|
|
3368
|
+
*
|
|
3369
|
+
* Applies angular velocity to rotate bodies relative to each other.
|
|
3370
|
+
* Velocity-only constraint (no position correction).
|
|
3371
|
+
*
|
|
3372
|
+
* Converted from nape-compiled.js lines 23892–24197.
|
|
3373
|
+
*/
|
|
3374
|
+
|
|
3375
|
+
type Any$3 = any;
|
|
3376
|
+
declare class ZPP_MotorJoint extends ZPP_Constraint {
|
|
3377
|
+
static __name__: string[];
|
|
3378
|
+
static _wrapFn: ((zpp: ZPP_MotorJoint) => Any$3) | null;
|
|
3379
|
+
outer_zn: Any$3;
|
|
3380
|
+
ratio: number;
|
|
3381
|
+
rate: number;
|
|
3382
|
+
b1: Any$3;
|
|
3383
|
+
b2: Any$3;
|
|
3384
|
+
kMass: number;
|
|
3385
|
+
jAcc: number;
|
|
3386
|
+
jMax: number;
|
|
3387
|
+
stepped: boolean;
|
|
3388
|
+
__class__: Any$3;
|
|
3389
|
+
constructor();
|
|
3390
|
+
bodyImpulse(b: Any$3): Any$3;
|
|
3391
|
+
activeBodies(): void;
|
|
3392
|
+
inactiveBodies(): void;
|
|
3393
|
+
copy(dict?: Any$3, todo?: Any$3): Any$3;
|
|
3394
|
+
validate(): void;
|
|
3395
|
+
wake_connected(): void;
|
|
3396
|
+
forest(): void;
|
|
3397
|
+
pair_exists(id: Any$3, di: Any$3): boolean;
|
|
3398
|
+
clearcache(): void;
|
|
3399
|
+
preStep(dt: number): boolean;
|
|
3400
|
+
warmStart(): void;
|
|
3401
|
+
applyImpulseVel(): boolean;
|
|
3402
|
+
applyImpulsePos(): boolean;
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3285
3405
|
type Any$2 = any;
|
|
3286
3406
|
/**
|
|
3287
3407
|
* Motor joint — applies angular velocity to rotate bodies relative to each other.
|
|
3408
|
+
*
|
|
3409
|
+
* Fully modernized — uses ZPP_MotorJoint directly (extracted to TypeScript).
|
|
3288
3410
|
*/
|
|
3289
3411
|
declare class MotorJoint extends Constraint {
|
|
3290
|
-
|
|
3412
|
+
zpp_inner: ZPP_MotorJoint;
|
|
3413
|
+
constructor(body1: Body | null, body2: Body | null, rate?: number, ratio?: number);
|
|
3291
3414
|
/** @internal */
|
|
3292
3415
|
static _wrap(inner: Any$2): MotorJoint;
|
|
3293
3416
|
get body1(): Body;
|
|
3294
3417
|
set body1(value: Body | null);
|
|
3418
|
+
/** @internal */
|
|
3419
|
+
private _setBody1;
|
|
3295
3420
|
get body2(): Body;
|
|
3296
3421
|
set body2(value: Body | null);
|
|
3422
|
+
/** @internal */
|
|
3423
|
+
private _setBody2;
|
|
3297
3424
|
get rate(): number;
|
|
3298
3425
|
set rate(value: number);
|
|
3299
3426
|
get ratio(): number;
|
|
3300
3427
|
set ratio(value: number);
|
|
3428
|
+
impulse(): Any$2;
|
|
3429
|
+
bodyImpulse(body: Body): Any$2;
|
|
3430
|
+
visitBodies(lambda: (body: Body) => void): void;
|
|
3431
|
+
/** @internal */ get_body1(): Any$2;
|
|
3432
|
+
/** @internal */ set_body1(v: Any$2): Any$2;
|
|
3433
|
+
/** @internal */ get_body2(): Any$2;
|
|
3434
|
+
/** @internal */ set_body2(v: Any$2): Any$2;
|
|
3435
|
+
/** @internal */ get_rate(): number;
|
|
3436
|
+
/** @internal */ set_rate(v: number): number;
|
|
3437
|
+
/** @internal */ get_ratio(): number;
|
|
3438
|
+
/** @internal */ set_ratio(v: number): number;
|
|
3439
|
+
/** @internal backward compat alias for zpp_inner */
|
|
3440
|
+
get zpp_inner_zn(): ZPP_MotorJoint;
|
|
3441
|
+
set zpp_inner_zn(v: ZPP_MotorJoint);
|
|
3301
3442
|
}
|
|
3302
3443
|
|
|
3303
3444
|
type Any$1 = any;
|