@newkrok/nape-js 3.3.37 → 3.3.38
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 +3000 -3612
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +521 -521
- package/dist/index.d.ts +521 -521
- package/dist/index.js +3000 -3612
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZPP_IContact — Internal impulse/mass-matrix data for a contact point.
|
|
3
|
+
*
|
|
4
|
+
* Stores relative positions (r1, r2), mass matrices (nMass, tMass),
|
|
5
|
+
* accumulated impulses (jnAcc, jtAcc), and friction/bounce coefficients.
|
|
6
|
+
* Also acts as a linked list node/container (Haxe ZNPList pattern).
|
|
7
|
+
*
|
|
8
|
+
* Converted from nape-compiled.js lines 32346–32733.
|
|
9
|
+
*/
|
|
10
|
+
type Any$V = any;
|
|
11
|
+
declare class ZPP_IContact {
|
|
12
|
+
static __name__: string[];
|
|
13
|
+
length: number;
|
|
14
|
+
pushmod: boolean;
|
|
15
|
+
modified: boolean;
|
|
16
|
+
_inuse: boolean;
|
|
17
|
+
next: ZPP_IContact | null;
|
|
18
|
+
r1x: number;
|
|
19
|
+
r1y: number;
|
|
20
|
+
r2x: number;
|
|
21
|
+
r2y: number;
|
|
22
|
+
nMass: number;
|
|
23
|
+
tMass: number;
|
|
24
|
+
bounce: number;
|
|
25
|
+
friction: number;
|
|
26
|
+
jnAcc: number;
|
|
27
|
+
jtAcc: number;
|
|
28
|
+
lr1x: number;
|
|
29
|
+
lr1y: number;
|
|
30
|
+
lr2x: number;
|
|
31
|
+
lr2y: number;
|
|
32
|
+
__class__: Any$V;
|
|
33
|
+
elem(): this;
|
|
34
|
+
begin(): ZPP_IContact | null;
|
|
35
|
+
setbegin(i: ZPP_IContact | null): void;
|
|
36
|
+
add(o: ZPP_IContact): ZPP_IContact;
|
|
37
|
+
inlined_add(o: ZPP_IContact): ZPP_IContact;
|
|
38
|
+
addAll(x: ZPP_IContact): void;
|
|
39
|
+
insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
|
|
40
|
+
inlined_insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
|
|
41
|
+
pop(): void;
|
|
42
|
+
inlined_pop(): void;
|
|
43
|
+
pop_unsafe(): ZPP_IContact;
|
|
44
|
+
inlined_pop_unsafe(): ZPP_IContact;
|
|
45
|
+
remove(obj: ZPP_IContact): void;
|
|
46
|
+
try_remove(obj: ZPP_IContact): boolean;
|
|
47
|
+
inlined_remove(obj: ZPP_IContact): void;
|
|
48
|
+
inlined_try_remove(obj: ZPP_IContact): boolean;
|
|
49
|
+
erase(pre: ZPP_IContact | null): ZPP_IContact | null;
|
|
50
|
+
inlined_erase(pre: ZPP_IContact | null): ZPP_IContact | null;
|
|
51
|
+
splice(pre: ZPP_IContact, n: number): ZPP_IContact | null;
|
|
52
|
+
clear(): void;
|
|
53
|
+
inlined_clear(): void;
|
|
54
|
+
reverse(): void;
|
|
55
|
+
empty(): boolean;
|
|
56
|
+
size(): number;
|
|
57
|
+
has(obj: ZPP_IContact): boolean;
|
|
58
|
+
inlined_has(obj: ZPP_IContact): boolean;
|
|
59
|
+
front(): ZPP_IContact | null;
|
|
60
|
+
back(): ZPP_IContact | null;
|
|
61
|
+
iterator_at(ind: number): ZPP_IContact | null;
|
|
62
|
+
at(ind: number): ZPP_IContact | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* ZPP_Contact — Internal contact point representation for the nape physics engine.
|
|
67
|
+
*
|
|
68
|
+
* Stores contact point data (position, distance, hash, stamp, etc.) and
|
|
69
|
+
* manages a lazy Vec2 position wrapper. Also acts as a linked list
|
|
70
|
+
* node/container (Haxe ZNPList pattern). Each contact holds a reference to
|
|
71
|
+
* a ZPP_IContact for impulse/mass data.
|
|
72
|
+
*
|
|
73
|
+
* Converted from nape-compiled.js lines 31853–32345, 81644–81645.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
type Any$U = any;
|
|
77
|
+
declare class ZPP_Contact {
|
|
78
|
+
static __name__: string[];
|
|
79
|
+
static _nape: Any$U;
|
|
80
|
+
static _zpp: Any$U;
|
|
81
|
+
static zpp_pool: ZPP_Contact | null;
|
|
82
|
+
static internal: boolean;
|
|
83
|
+
static _wrapFn: ((zpp: ZPP_Contact) => Any$U) | null;
|
|
84
|
+
outer: Any$U;
|
|
85
|
+
px: number;
|
|
86
|
+
py: number;
|
|
87
|
+
wrap_position: Any$U;
|
|
88
|
+
arbiter: Any$U;
|
|
89
|
+
inner: ZPP_IContact;
|
|
90
|
+
active: boolean;
|
|
91
|
+
posOnly: boolean;
|
|
92
|
+
stamp: number;
|
|
93
|
+
hash: number;
|
|
94
|
+
fresh: boolean;
|
|
95
|
+
dist: number;
|
|
96
|
+
elasticity: number;
|
|
97
|
+
length: number;
|
|
98
|
+
pushmod: boolean;
|
|
99
|
+
modified: boolean;
|
|
100
|
+
_inuse: boolean;
|
|
101
|
+
next: ZPP_Contact | null;
|
|
102
|
+
__class__: Any$U;
|
|
103
|
+
constructor();
|
|
104
|
+
wrapper(): Any$U;
|
|
105
|
+
position_validate(): void;
|
|
106
|
+
getposition(): void;
|
|
107
|
+
inactiveme(): boolean;
|
|
108
|
+
free(): void;
|
|
109
|
+
alloc(): void;
|
|
110
|
+
elem(): this;
|
|
111
|
+
begin(): ZPP_Contact | null;
|
|
112
|
+
setbegin(i: ZPP_Contact | null): void;
|
|
113
|
+
add(o: ZPP_Contact): ZPP_Contact;
|
|
114
|
+
inlined_add(o: ZPP_Contact): ZPP_Contact;
|
|
115
|
+
addAll(x: ZPP_Contact): void;
|
|
116
|
+
insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
|
|
117
|
+
inlined_insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
|
|
118
|
+
pop(): void;
|
|
119
|
+
inlined_pop(): void;
|
|
120
|
+
pop_unsafe(): ZPP_Contact;
|
|
121
|
+
inlined_pop_unsafe(): ZPP_Contact;
|
|
122
|
+
remove(obj: ZPP_Contact): void;
|
|
123
|
+
try_remove(obj: ZPP_Contact): boolean;
|
|
124
|
+
inlined_remove(obj: ZPP_Contact): void;
|
|
125
|
+
inlined_try_remove(obj: ZPP_Contact): boolean;
|
|
126
|
+
erase(pre: ZPP_Contact | null): ZPP_Contact | null;
|
|
127
|
+
inlined_erase(pre: ZPP_Contact | null): ZPP_Contact | null;
|
|
128
|
+
splice(pre: ZPP_Contact, n: number): ZPP_Contact | null;
|
|
129
|
+
clear(): void;
|
|
130
|
+
inlined_clear(): void;
|
|
131
|
+
reverse(): void;
|
|
132
|
+
empty(): boolean;
|
|
133
|
+
size(): number;
|
|
134
|
+
has(obj: ZPP_Contact): boolean;
|
|
135
|
+
inlined_has(obj: ZPP_Contact): boolean;
|
|
136
|
+
front(): ZPP_Contact | null;
|
|
137
|
+
back(): ZPP_Contact | null;
|
|
138
|
+
iterator_at(ind: number): ZPP_Contact | null;
|
|
139
|
+
at(ind: number): ZPP_Contact | null;
|
|
140
|
+
}
|
|
141
|
+
|
|
1
142
|
/**
|
|
2
143
|
* Core engine module — manages access to the compiled nape namespace.
|
|
3
144
|
*
|
|
@@ -25,13 +166,13 @@ declare function getNape(): any;
|
|
|
25
166
|
*
|
|
26
167
|
* Converted from nape-compiled.js lines 83820–84273, 134996.
|
|
27
168
|
*/
|
|
28
|
-
type Any$
|
|
169
|
+
type Any$T = any;
|
|
29
170
|
declare class ZPP_Vec2 {
|
|
30
171
|
static zpp_pool: ZPP_Vec2 | null;
|
|
31
172
|
static __name__: string[];
|
|
32
|
-
static _nape: Any$
|
|
33
|
-
static _zpp: Any$
|
|
34
|
-
static _wrapFn: ((zpp: ZPP_Vec2) => Any$
|
|
173
|
+
static _nape: Any$T;
|
|
174
|
+
static _zpp: Any$T;
|
|
175
|
+
static _wrapFn: ((zpp: ZPP_Vec2) => Any$T) | null;
|
|
35
176
|
x: number;
|
|
36
177
|
y: number;
|
|
37
178
|
next: ZPP_Vec2 | null;
|
|
@@ -40,18 +181,18 @@ declare class ZPP_Vec2 {
|
|
|
40
181
|
pushmod: boolean;
|
|
41
182
|
_inuse: boolean;
|
|
42
183
|
weak: boolean;
|
|
43
|
-
outer: Any$
|
|
184
|
+
outer: Any$T;
|
|
44
185
|
_immutable: boolean;
|
|
45
186
|
_isimmutable: (() => void) | null;
|
|
46
187
|
_validate: (() => void) | null;
|
|
47
188
|
_invalidate: ((self: ZPP_Vec2) => void) | null;
|
|
48
|
-
__class__: Any$
|
|
189
|
+
__class__: Any$T;
|
|
49
190
|
/** Static factory with optional pooling and immutability. */
|
|
50
191
|
static get(x: number, y: number, immutable?: boolean): ZPP_Vec2;
|
|
51
192
|
validate(): void;
|
|
52
193
|
invalidate(): void;
|
|
53
194
|
immutable(): void;
|
|
54
|
-
wrapper(): Any$
|
|
195
|
+
wrapper(): Any$T;
|
|
55
196
|
free(): void;
|
|
56
197
|
alloc(): void;
|
|
57
198
|
elem(): ZPP_Vec2;
|
|
@@ -203,20 +344,20 @@ type NapeInner = any;
|
|
|
203
344
|
*
|
|
204
345
|
* Converted from nape-compiled.js lines 83412–83434.
|
|
205
346
|
*/
|
|
206
|
-
type Any$
|
|
347
|
+
type Any$S = any;
|
|
207
348
|
declare class ZPP_Vec3 {
|
|
208
349
|
static __name__: string[];
|
|
209
|
-
static _zpp: Any$
|
|
210
|
-
static _wrapFn: ((zpp: ZPP_Vec3) => Any$
|
|
211
|
-
outer: Any$
|
|
350
|
+
static _zpp: Any$S;
|
|
351
|
+
static _wrapFn: ((zpp: ZPP_Vec3) => Any$S) | null;
|
|
352
|
+
outer: Any$S;
|
|
212
353
|
x: number;
|
|
213
354
|
y: number;
|
|
214
355
|
z: number;
|
|
215
356
|
immutable: boolean;
|
|
216
357
|
_validate: (() => void) | null;
|
|
217
|
-
__class__: Any$
|
|
358
|
+
__class__: Any$S;
|
|
218
359
|
validate(): void;
|
|
219
|
-
wrapper(): Any$
|
|
360
|
+
wrapper(): Any$S;
|
|
220
361
|
}
|
|
221
362
|
|
|
222
363
|
/**
|
|
@@ -280,13 +421,13 @@ declare class Vec3 {
|
|
|
280
421
|
*
|
|
281
422
|
* Converted from nape-compiled.js lines 73495–73561, 133826.
|
|
282
423
|
*/
|
|
283
|
-
type Any$
|
|
424
|
+
type Any$R = any;
|
|
284
425
|
declare class ZPP_Mat23 {
|
|
285
426
|
static __name__: string[];
|
|
286
|
-
static _nape: Any$
|
|
287
|
-
static _wrapFn: ((zpp: ZPP_Mat23) => Any$
|
|
427
|
+
static _nape: Any$R;
|
|
428
|
+
static _wrapFn: ((zpp: ZPP_Mat23) => Any$R) | null;
|
|
288
429
|
static zpp_pool: ZPP_Mat23 | null;
|
|
289
|
-
outer: Any$
|
|
430
|
+
outer: Any$R;
|
|
290
431
|
a: number;
|
|
291
432
|
b: number;
|
|
292
433
|
c: number;
|
|
@@ -295,13 +436,13 @@ declare class ZPP_Mat23 {
|
|
|
295
436
|
ty: number;
|
|
296
437
|
_invalidate: (() => void) | null;
|
|
297
438
|
next: ZPP_Mat23 | null;
|
|
298
|
-
__class__: Any$
|
|
439
|
+
__class__: Any$R;
|
|
299
440
|
/** Static factory with pooling. */
|
|
300
441
|
static get(): ZPP_Mat23;
|
|
301
442
|
/** Create an identity matrix from pool. */
|
|
302
443
|
static identity(): ZPP_Mat23;
|
|
303
444
|
/** Create a public wrapper, recycling any existing inner. */
|
|
304
|
-
wrapper(): Any$
|
|
445
|
+
wrapper(): Any$R;
|
|
305
446
|
invalidate(): void;
|
|
306
447
|
set(m: ZPP_Mat23): void;
|
|
307
448
|
setas(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
|
|
@@ -362,13 +503,13 @@ declare class Mat23 {
|
|
|
362
503
|
*
|
|
363
504
|
* Converted from nape-compiled.js lines 69554–69563.
|
|
364
505
|
*/
|
|
365
|
-
type Any$
|
|
506
|
+
type Any$Q = any;
|
|
366
507
|
declare class ZPP_GeomPoly {
|
|
367
508
|
static __name__: string[];
|
|
368
|
-
outer: Any$
|
|
369
|
-
vertices: Any$
|
|
370
|
-
__class__: Any$
|
|
371
|
-
constructor(outer?: Any$
|
|
509
|
+
outer: Any$Q;
|
|
510
|
+
vertices: Any$Q;
|
|
511
|
+
__class__: Any$Q;
|
|
512
|
+
constructor(outer?: Any$Q);
|
|
372
513
|
}
|
|
373
514
|
|
|
374
515
|
/**
|
|
@@ -392,7 +533,7 @@ declare class Winding {
|
|
|
392
533
|
toString(): string;
|
|
393
534
|
}
|
|
394
535
|
|
|
395
|
-
type Any$
|
|
536
|
+
type Any$P = any;
|
|
396
537
|
/**
|
|
397
538
|
* A polygon represented as a circular doubly-linked list of vertices.
|
|
398
539
|
*
|
|
@@ -407,8 +548,8 @@ declare class GeomPoly {
|
|
|
407
548
|
zpp_inner: ZPP_GeomPoly;
|
|
408
549
|
zpp_pool: GeomPoly | null;
|
|
409
550
|
zpp_disp: boolean;
|
|
410
|
-
get _inner(): Any$
|
|
411
|
-
constructor(vertices?: Any$
|
|
551
|
+
get _inner(): Any$P;
|
|
552
|
+
constructor(vertices?: Any$P);
|
|
412
553
|
private _checkDisposed;
|
|
413
554
|
/** @internal Get compiled ZPP_GeomVert class */
|
|
414
555
|
private static _gvClass;
|
|
@@ -434,12 +575,12 @@ declare class GeomPoly {
|
|
|
434
575
|
private static _addVertices;
|
|
435
576
|
/** @internal After copying, dispose weak Vec2 inputs */
|
|
436
577
|
private static _disposeWeakInputs;
|
|
437
|
-
static get(vertices?: Any$
|
|
578
|
+
static get(vertices?: Any$P): GeomPoly;
|
|
438
579
|
empty(): boolean;
|
|
439
580
|
size(): number;
|
|
440
|
-
iterator(): Any$
|
|
441
|
-
forwardIterator(): Any$
|
|
442
|
-
backwardsIterator(): Any$
|
|
581
|
+
iterator(): Any$P;
|
|
582
|
+
forwardIterator(): Any$P;
|
|
583
|
+
backwardsIterator(): Any$P;
|
|
443
584
|
current(): Vec2;
|
|
444
585
|
push(vertex: Vec2): this;
|
|
445
586
|
pop(): this;
|
|
@@ -452,7 +593,7 @@ declare class GeomPoly {
|
|
|
452
593
|
copy(): GeomPoly;
|
|
453
594
|
dispose(): void;
|
|
454
595
|
area(): number;
|
|
455
|
-
winding(): Any$
|
|
596
|
+
winding(): Any$P;
|
|
456
597
|
contains(point: Vec2): boolean;
|
|
457
598
|
isClockwise(): boolean;
|
|
458
599
|
isConvex(): boolean;
|
|
@@ -460,14 +601,14 @@ declare class GeomPoly {
|
|
|
460
601
|
isMonotone(): boolean;
|
|
461
602
|
isDegenerate(): boolean;
|
|
462
603
|
simplify(epsilon: number): GeomPoly;
|
|
463
|
-
simpleDecomposition(output?: Any$
|
|
464
|
-
monotoneDecomposition(output?: Any$
|
|
465
|
-
convexDecomposition(delaunay?: boolean, output?: Any$
|
|
466
|
-
triangularDecomposition(delaunay?: boolean, output?: Any$
|
|
604
|
+
simpleDecomposition(output?: Any$P): Any$P;
|
|
605
|
+
monotoneDecomposition(output?: Any$P): Any$P;
|
|
606
|
+
convexDecomposition(delaunay?: boolean, output?: Any$P): Any$P;
|
|
607
|
+
triangularDecomposition(delaunay?: boolean, output?: Any$P): Any$P;
|
|
467
608
|
inflate(inflation: number): GeomPoly;
|
|
468
|
-
cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$
|
|
469
|
-
transform(matrix: Any$
|
|
470
|
-
bounds(): Any$
|
|
609
|
+
cut(start: Vec2, end: Vec2, boundedStart?: boolean, boundedEnd?: boolean, output?: Any$P): Any$P;
|
|
610
|
+
transform(matrix: Any$P): this;
|
|
611
|
+
bounds(): Any$P;
|
|
471
612
|
top(): Vec2;
|
|
472
613
|
bottom(): Vec2;
|
|
473
614
|
left(): Vec2;
|
|
@@ -483,30 +624,30 @@ declare class GeomPoly {
|
|
|
483
624
|
*
|
|
484
625
|
* Converted from nape-compiled.js lines 63546–63965, 134951.
|
|
485
626
|
*/
|
|
486
|
-
type Any$
|
|
627
|
+
type Any$O = any;
|
|
487
628
|
declare class ZPP_AABB {
|
|
488
629
|
static zpp_pool: ZPP_AABB | null;
|
|
489
630
|
static __name__: string[];
|
|
490
|
-
static _nape: Any$
|
|
491
|
-
static _zpp: Any$
|
|
492
|
-
static _wrapFn: ((zpp: ZPP_AABB) => Any$
|
|
631
|
+
static _nape: Any$O;
|
|
632
|
+
static _zpp: Any$O;
|
|
633
|
+
static _wrapFn: ((zpp: ZPP_AABB) => Any$O) | null;
|
|
493
634
|
_invalidate: ((self: ZPP_AABB) => void) | null;
|
|
494
635
|
_validate: (() => void) | null;
|
|
495
636
|
_immutable: boolean;
|
|
496
|
-
outer: Any$
|
|
637
|
+
outer: Any$O;
|
|
497
638
|
next: ZPP_AABB | null;
|
|
498
639
|
minx: number;
|
|
499
640
|
miny: number;
|
|
500
641
|
maxx: number;
|
|
501
642
|
maxy: number;
|
|
502
|
-
wrap_min: Any$
|
|
503
|
-
wrap_max: Any$
|
|
504
|
-
__class__: Any$
|
|
643
|
+
wrap_min: Any$O;
|
|
644
|
+
wrap_max: Any$O;
|
|
645
|
+
__class__: Any$O;
|
|
505
646
|
/** Static factory with pooling. */
|
|
506
647
|
static get(minx: number, miny: number, maxx: number, maxy: number): ZPP_AABB;
|
|
507
648
|
validate(): void;
|
|
508
649
|
invalidate(): void;
|
|
509
|
-
wrapper(): Any$
|
|
650
|
+
wrapper(): Any$O;
|
|
510
651
|
alloc(): void;
|
|
511
652
|
free(): void;
|
|
512
653
|
copy(): ZPP_AABB;
|
|
@@ -517,10 +658,10 @@ declare class ZPP_AABB {
|
|
|
517
658
|
private static _makeVec2Wrapper;
|
|
518
659
|
getmin(): void;
|
|
519
660
|
dom_min(): void;
|
|
520
|
-
mod_min(min: Any$
|
|
661
|
+
mod_min(min: Any$O): void;
|
|
521
662
|
getmax(): void;
|
|
522
663
|
dom_max(): void;
|
|
523
|
-
mod_max(max: Any$
|
|
664
|
+
mod_max(max: Any$O): void;
|
|
524
665
|
intersectX(x: ZPP_AABB): boolean;
|
|
525
666
|
intersectY(x: ZPP_AABB): boolean;
|
|
526
667
|
intersect(x: ZPP_AABB): boolean;
|
|
@@ -584,18 +725,18 @@ declare class AABB {
|
|
|
584
725
|
*
|
|
585
726
|
* Converted from nape-compiled.js lines 72949–72972.
|
|
586
727
|
*/
|
|
587
|
-
type Any$
|
|
728
|
+
type Any$N = any;
|
|
588
729
|
declare class ZPP_MatMN {
|
|
589
730
|
static __name__: string[];
|
|
590
|
-
outer: Any$
|
|
731
|
+
outer: Any$N;
|
|
591
732
|
m: number;
|
|
592
733
|
n: number;
|
|
593
734
|
x: number[];
|
|
594
|
-
__class__: Any$
|
|
735
|
+
__class__: Any$N;
|
|
595
736
|
constructor(m: number, n: number);
|
|
596
737
|
}
|
|
597
738
|
|
|
598
|
-
type Any$
|
|
739
|
+
type Any$M = any;
|
|
599
740
|
/**
|
|
600
741
|
* Variable-sized M×N matrix.
|
|
601
742
|
*
|
|
@@ -606,7 +747,7 @@ declare class MatMN {
|
|
|
606
747
|
zpp_inner: ZPP_MatMN;
|
|
607
748
|
get _inner(): NapeInner;
|
|
608
749
|
constructor(rows: number, cols: number);
|
|
609
|
-
static _wrap(inner: Any$
|
|
750
|
+
static _wrap(inner: Any$M): MatMN;
|
|
610
751
|
get rows(): number;
|
|
611
752
|
get cols(): number;
|
|
612
753
|
x(row: number, col: number): number;
|
|
@@ -616,7 +757,7 @@ declare class MatMN {
|
|
|
616
757
|
mul(matrix: MatMN): MatMN;
|
|
617
758
|
}
|
|
618
759
|
|
|
619
|
-
type Any$
|
|
760
|
+
type Any$L = any;
|
|
620
761
|
/**
|
|
621
762
|
* Isosurface extraction using the marching squares algorithm.
|
|
622
763
|
*
|
|
@@ -639,7 +780,7 @@ declare class MarchingSquares {
|
|
|
639
780
|
* @param output - Optional GeomPolyList to populate. If null, a new one is created.
|
|
640
781
|
* @returns The populated GeomPolyList.
|
|
641
782
|
*/
|
|
642
|
-
static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$
|
|
783
|
+
static run(iso: (x: number, y: number) => number, bounds: AABB, cellsize: Vec2, quality?: number, subgrid?: Vec2 | null, combine?: boolean, output?: Any$L): Any$L;
|
|
643
784
|
}
|
|
644
785
|
|
|
645
786
|
/**
|
|
@@ -675,31 +816,31 @@ declare class Ray {
|
|
|
675
816
|
*
|
|
676
817
|
* Converted from nape-compiled.js lines 38897–39076, 86860–86862.
|
|
677
818
|
*/
|
|
678
|
-
type Any$
|
|
819
|
+
type Any$K = any;
|
|
679
820
|
declare class ZPP_ConvexRayResult {
|
|
680
821
|
static __name__: string[];
|
|
681
822
|
static rayPool: ZPP_ConvexRayResult | null;
|
|
682
823
|
static convexPool: ZPP_ConvexRayResult | null;
|
|
683
824
|
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$
|
|
825
|
+
static _createRayResult: (() => Any$K) | null;
|
|
826
|
+
static _createConvexResult: (() => Any$K) | null;
|
|
827
|
+
normal: Any$K;
|
|
828
|
+
shape: Any$K;
|
|
829
|
+
convex: Any$K;
|
|
830
|
+
position: Any$K;
|
|
831
|
+
ray: Any$K;
|
|
691
832
|
inner: boolean;
|
|
692
833
|
next: ZPP_ConvexRayResult | null;
|
|
693
834
|
toiDistance: number;
|
|
694
|
-
__class__: Any$
|
|
695
|
-
static getRay(normal: Any$
|
|
696
|
-
static getConvex(normal: Any$
|
|
835
|
+
__class__: Any$K;
|
|
836
|
+
static getRay(normal: Any$K, time: number, inner: boolean, shape: Any$K): Any$K;
|
|
837
|
+
static getConvex(normal: Any$K, position: Any$K, toiDistance: number, shape: Any$K): Any$K;
|
|
697
838
|
disposed(): void;
|
|
698
839
|
free(): void;
|
|
699
840
|
private static _disposeVec2;
|
|
700
841
|
}
|
|
701
842
|
|
|
702
|
-
type Any$
|
|
843
|
+
type Any$J = any;
|
|
703
844
|
/**
|
|
704
845
|
* Result from a convex-cast query.
|
|
705
846
|
*
|
|
@@ -714,18 +855,18 @@ declare class ConvexResult {
|
|
|
714
855
|
get _inner(): NapeInner;
|
|
715
856
|
constructor();
|
|
716
857
|
/** @internal */
|
|
717
|
-
static _wrap(inner: Any$
|
|
858
|
+
static _wrap(inner: Any$J): ConvexResult;
|
|
718
859
|
get normal(): Vec2;
|
|
719
860
|
get position(): Vec2;
|
|
720
861
|
get toi(): number;
|
|
721
|
-
get shape(): Any$
|
|
862
|
+
get shape(): Any$J;
|
|
722
863
|
dispose(): void;
|
|
723
864
|
toString(): string;
|
|
724
865
|
/** @internal */
|
|
725
866
|
private _disposed;
|
|
726
867
|
}
|
|
727
868
|
|
|
728
|
-
type Any$
|
|
869
|
+
type Any$I = any;
|
|
729
870
|
/**
|
|
730
871
|
* Result from a raycast query.
|
|
731
872
|
*
|
|
@@ -740,18 +881,18 @@ declare class RayResult {
|
|
|
740
881
|
get _inner(): NapeInner;
|
|
741
882
|
constructor();
|
|
742
883
|
/** @internal */
|
|
743
|
-
static _wrap(inner: Any$
|
|
884
|
+
static _wrap(inner: Any$I): RayResult;
|
|
744
885
|
get normal(): Vec2;
|
|
745
886
|
get distance(): number;
|
|
746
887
|
get inner(): boolean;
|
|
747
|
-
get shape(): Any$
|
|
888
|
+
get shape(): Any$I;
|
|
748
889
|
dispose(): void;
|
|
749
890
|
toString(): string;
|
|
750
891
|
/** @internal */
|
|
751
892
|
private _disposed;
|
|
752
893
|
}
|
|
753
894
|
|
|
754
|
-
type Any$
|
|
895
|
+
type Any$H = any;
|
|
755
896
|
/**
|
|
756
897
|
* Static utility class for geometric queries between shapes and bodies.
|
|
757
898
|
*
|
|
@@ -769,7 +910,7 @@ declare class Geom {
|
|
|
769
910
|
* @param out2 - Output Vec2 for closest point on body2.
|
|
770
911
|
* @returns The distance between the two bodies.
|
|
771
912
|
*/
|
|
772
|
-
static distanceBody(body1: Any$
|
|
913
|
+
static distanceBody(body1: Any$H, body2: Any$H, out1: Vec2, out2: Vec2): number;
|
|
773
914
|
/**
|
|
774
915
|
* Calculate minimum distance between two shapes and return closest points.
|
|
775
916
|
* @param shape1 - First shape (must be part of a body).
|
|
@@ -778,28 +919,28 @@ declare class Geom {
|
|
|
778
919
|
* @param out2 - Output Vec2 for closest point on shape2.
|
|
779
920
|
* @returns The distance between the two shapes.
|
|
780
921
|
*/
|
|
781
|
-
static distance(shape1: Any$
|
|
922
|
+
static distance(shape1: Any$H, shape2: Any$H, out1: Vec2, out2: Vec2): number;
|
|
782
923
|
/**
|
|
783
924
|
* Test if two bodies intersect (any of their shapes overlap).
|
|
784
925
|
* @param body1 - First body (must have shapes).
|
|
785
926
|
* @param body2 - Second body (must have shapes).
|
|
786
927
|
* @returns True if the bodies intersect.
|
|
787
928
|
*/
|
|
788
|
-
static intersectsBody(body1: Any$
|
|
929
|
+
static intersectsBody(body1: Any$H, body2: Any$H): boolean;
|
|
789
930
|
/**
|
|
790
931
|
* Test if two shapes intersect.
|
|
791
932
|
* @param shape1 - First shape (must be part of a body).
|
|
792
933
|
* @param shape2 - Second shape (must be part of a body).
|
|
793
934
|
* @returns True if the shapes intersect.
|
|
794
935
|
*/
|
|
795
|
-
static intersects(shape1: Any$
|
|
936
|
+
static intersects(shape1: Any$H, shape2: Any$H): boolean;
|
|
796
937
|
/**
|
|
797
938
|
* Test if shape1 fully contains shape2.
|
|
798
939
|
* @param shape1 - Containing shape (must be part of a body).
|
|
799
940
|
* @param shape2 - Contained shape (must be part of a body).
|
|
800
941
|
* @returns True if shape1 contains shape2.
|
|
801
942
|
*/
|
|
802
|
-
static contains(shape1: Any$
|
|
943
|
+
static contains(shape1: Any$H, shape2: Any$H): boolean;
|
|
803
944
|
}
|
|
804
945
|
|
|
805
946
|
/**
|
|
@@ -863,7 +1004,7 @@ declare class NapeList<T> implements Iterable<T> {
|
|
|
863
1004
|
*
|
|
864
1005
|
* Converted from nape-compiled.js lines 87523–87601, 135477–135481.
|
|
865
1006
|
*/
|
|
866
|
-
type Any$
|
|
1007
|
+
type Any$G = any;
|
|
867
1008
|
declare class ZPP_Material {
|
|
868
1009
|
static zpp_pool: ZPP_Material | null;
|
|
869
1010
|
static WAKE: number;
|
|
@@ -876,27 +1017,27 @@ declare class ZPP_Material {
|
|
|
876
1017
|
* _nape = the `nape` public namespace (for wrapper creation)
|
|
877
1018
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_ZPP_Shape)
|
|
878
1019
|
*/
|
|
879
|
-
static _nape: Any$
|
|
880
|
-
static _zpp: Any$
|
|
1020
|
+
static _nape: Any$G;
|
|
1021
|
+
static _zpp: Any$G;
|
|
881
1022
|
/**
|
|
882
1023
|
* Wrapper factory callback, registered by the modernized Material class.
|
|
883
1024
|
* When set, wrapper() uses this instead of creating a compiled Material.
|
|
884
1025
|
*/
|
|
885
|
-
static _wrapFn: ((zpp: ZPP_Material) => Any$
|
|
1026
|
+
static _wrapFn: ((zpp: ZPP_Material) => Any$G) | null;
|
|
886
1027
|
elasticity: number;
|
|
887
1028
|
dynamicFriction: number;
|
|
888
1029
|
staticFriction: number;
|
|
889
1030
|
density: number;
|
|
890
1031
|
rollingFriction: number;
|
|
891
|
-
shapes: Any$
|
|
892
|
-
wrap_shapes: Any$
|
|
893
|
-
outer: Any$
|
|
894
|
-
userData: Any$
|
|
1032
|
+
shapes: Any$G;
|
|
1033
|
+
wrap_shapes: Any$G;
|
|
1034
|
+
outer: Any$G;
|
|
1035
|
+
userData: Any$G;
|
|
895
1036
|
next: ZPP_Material | null;
|
|
896
|
-
__class__: Any$
|
|
1037
|
+
__class__: Any$G;
|
|
897
1038
|
constructor();
|
|
898
1039
|
/** Create/return the public nape.phys.Material wrapper for this internal object. */
|
|
899
|
-
wrapper(): Any$
|
|
1040
|
+
wrapper(): Any$G;
|
|
900
1041
|
/** Called when this object is returned to the pool. */
|
|
901
1042
|
free(): void;
|
|
902
1043
|
/** Called when this object is taken from the pool. */
|
|
@@ -904,9 +1045,9 @@ declare class ZPP_Material {
|
|
|
904
1045
|
/** Initialize the shapes list (called during feature construction). */
|
|
905
1046
|
feature_cons(): void;
|
|
906
1047
|
/** Register a shape that uses this material. */
|
|
907
|
-
addShape(shape: Any$
|
|
1048
|
+
addShape(shape: Any$G): void;
|
|
908
1049
|
/** Unregister a shape that no longer uses this material. */
|
|
909
|
-
remShape(shape: Any$
|
|
1050
|
+
remShape(shape: Any$G): void;
|
|
910
1051
|
/** Create a copy with the same property values. */
|
|
911
1052
|
copy(): ZPP_Material;
|
|
912
1053
|
/** Copy all property values from another ZPP_Material. */
|
|
@@ -966,36 +1107,36 @@ declare class Material {
|
|
|
966
1107
|
*
|
|
967
1108
|
* Converted from nape-compiled.js lines 87335–87523, 135403.
|
|
968
1109
|
*/
|
|
969
|
-
type Any$
|
|
1110
|
+
type Any$F = any;
|
|
970
1111
|
declare class ZPP_FluidProperties {
|
|
971
1112
|
static zpp_pool: ZPP_FluidProperties | null;
|
|
972
1113
|
static __name__: string[];
|
|
973
|
-
static _nape: Any$
|
|
974
|
-
static _zpp: Any$
|
|
975
|
-
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$
|
|
1114
|
+
static _nape: Any$F;
|
|
1115
|
+
static _zpp: Any$F;
|
|
1116
|
+
static _wrapFn: ((zpp: ZPP_FluidProperties) => Any$F) | null;
|
|
976
1117
|
viscosity: number;
|
|
977
1118
|
density: number;
|
|
978
1119
|
gravityx: number;
|
|
979
1120
|
gravityy: number;
|
|
980
|
-
wrap_gravity: Any$
|
|
981
|
-
shapes: Any$
|
|
982
|
-
wrap_shapes: Any$
|
|
983
|
-
outer: Any$
|
|
984
|
-
userData: Any$
|
|
1121
|
+
wrap_gravity: Any$F;
|
|
1122
|
+
shapes: Any$F;
|
|
1123
|
+
wrap_shapes: Any$F;
|
|
1124
|
+
outer: Any$F;
|
|
1125
|
+
userData: Any$F;
|
|
985
1126
|
next: ZPP_FluidProperties | null;
|
|
986
|
-
__class__: Any$
|
|
1127
|
+
__class__: Any$F;
|
|
987
1128
|
constructor();
|
|
988
1129
|
/** Create/return the public nape.phys.FluidProperties wrapper. */
|
|
989
|
-
wrapper(): Any$
|
|
1130
|
+
wrapper(): Any$F;
|
|
990
1131
|
free(): void;
|
|
991
1132
|
alloc(): void;
|
|
992
1133
|
feature_cons(): void;
|
|
993
|
-
addShape(shape: Any$
|
|
994
|
-
remShape(shape: Any$
|
|
1134
|
+
addShape(shape: Any$F): void;
|
|
1135
|
+
remShape(shape: Any$F): void;
|
|
995
1136
|
/** Copy with object pooling. */
|
|
996
1137
|
copy(): ZPP_FluidProperties;
|
|
997
1138
|
/** Called when gravity Vec2 wrapper is invalidated (user set new gravity). */
|
|
998
|
-
gravity_invalidate(x: Any$
|
|
1139
|
+
gravity_invalidate(x: Any$F): void;
|
|
999
1140
|
/** Sync the gravity Vec2 wrapper with internal values. */
|
|
1000
1141
|
gravity_validate(): void;
|
|
1001
1142
|
/** Lazily create and return the gravity Vec2 wrapper. */
|
|
@@ -1046,33 +1187,33 @@ declare class FluidProperties {
|
|
|
1046
1187
|
*
|
|
1047
1188
|
* Converted from nape-compiled.js lines 63255–63366, 135329.
|
|
1048
1189
|
*/
|
|
1049
|
-
type Any$
|
|
1190
|
+
type Any$E = any;
|
|
1050
1191
|
declare class ZPP_InteractionFilter {
|
|
1051
1192
|
static zpp_pool: ZPP_InteractionFilter | null;
|
|
1052
1193
|
static __name__: string[];
|
|
1053
|
-
static _nape: Any$
|
|
1054
|
-
static _zpp: Any$
|
|
1055
|
-
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$
|
|
1194
|
+
static _nape: Any$E;
|
|
1195
|
+
static _zpp: Any$E;
|
|
1196
|
+
static _wrapFn: ((zpp: ZPP_InteractionFilter) => Any$E) | null;
|
|
1056
1197
|
collisionGroup: number;
|
|
1057
1198
|
collisionMask: number;
|
|
1058
1199
|
sensorGroup: number;
|
|
1059
1200
|
sensorMask: number;
|
|
1060
1201
|
fluidGroup: number;
|
|
1061
1202
|
fluidMask: number;
|
|
1062
|
-
shapes: Any$
|
|
1063
|
-
wrap_shapes: Any$
|
|
1064
|
-
outer: Any$
|
|
1065
|
-
userData: Any$
|
|
1203
|
+
shapes: Any$E;
|
|
1204
|
+
wrap_shapes: Any$E;
|
|
1205
|
+
outer: Any$E;
|
|
1206
|
+
userData: Any$E;
|
|
1066
1207
|
next: ZPP_InteractionFilter | null;
|
|
1067
|
-
__class__: Any$
|
|
1208
|
+
__class__: Any$E;
|
|
1068
1209
|
constructor();
|
|
1069
1210
|
/** Create/return the public nape.dynamics.InteractionFilter wrapper. */
|
|
1070
|
-
wrapper(): Any$
|
|
1211
|
+
wrapper(): Any$E;
|
|
1071
1212
|
free(): void;
|
|
1072
1213
|
alloc(): void;
|
|
1073
1214
|
feature_cons(): void;
|
|
1074
|
-
addShape(shape: Any$
|
|
1075
|
-
remShape(shape: Any$
|
|
1215
|
+
addShape(shape: Any$E): void;
|
|
1216
|
+
remShape(shape: Any$E): void;
|
|
1076
1217
|
/** Create a copy with object pooling. */
|
|
1077
1218
|
copy(): ZPP_InteractionFilter;
|
|
1078
1219
|
/** Test whether two filters allow collision between their shapes. */
|
|
@@ -1136,22 +1277,22 @@ declare class InteractionFilter {
|
|
|
1136
1277
|
*
|
|
1137
1278
|
* Converted from nape-compiled.js lines 63367–63463, 135330–135331.
|
|
1138
1279
|
*/
|
|
1139
|
-
type Any$
|
|
1280
|
+
type Any$D = any;
|
|
1140
1281
|
declare class ZPP_InteractionGroup {
|
|
1141
1282
|
static SHAPE: number;
|
|
1142
1283
|
static BODY: number;
|
|
1143
1284
|
static __name__: string[];
|
|
1144
|
-
static _zpp: Any$
|
|
1145
|
-
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$
|
|
1146
|
-
outer: Any$
|
|
1285
|
+
static _zpp: Any$D;
|
|
1286
|
+
static _wrapFn: ((zpp: ZPP_InteractionGroup) => Any$D) | null;
|
|
1287
|
+
outer: Any$D;
|
|
1147
1288
|
ignore: boolean;
|
|
1148
1289
|
group: ZPP_InteractionGroup | null;
|
|
1149
|
-
groups: Any$
|
|
1150
|
-
wrap_groups: Any$
|
|
1151
|
-
interactors: Any$
|
|
1152
|
-
wrap_interactors: Any$
|
|
1290
|
+
groups: Any$D;
|
|
1291
|
+
wrap_groups: Any$D;
|
|
1292
|
+
interactors: Any$D;
|
|
1293
|
+
wrap_interactors: Any$D;
|
|
1153
1294
|
depth: number;
|
|
1154
|
-
__class__: Any$
|
|
1295
|
+
__class__: Any$D;
|
|
1155
1296
|
constructor();
|
|
1156
1297
|
/** Set or change the parent group. */
|
|
1157
1298
|
setGroup(group: ZPP_InteractionGroup | null): void;
|
|
@@ -1162,9 +1303,9 @@ declare class ZPP_InteractionGroup {
|
|
|
1162
1303
|
/** Remove a child group. */
|
|
1163
1304
|
remGroup(group: ZPP_InteractionGroup): void;
|
|
1164
1305
|
/** Register an interactor in this group. */
|
|
1165
|
-
addInteractor(intx: Any$
|
|
1306
|
+
addInteractor(intx: Any$D): void;
|
|
1166
1307
|
/** Unregister an interactor from this group. */
|
|
1167
|
-
remInteractor(intx: Any$
|
|
1308
|
+
remInteractor(intx: Any$D, flag?: number): void;
|
|
1168
1309
|
}
|
|
1169
1310
|
|
|
1170
1311
|
/**
|
|
@@ -1324,7 +1465,7 @@ interface CbTypeSet {
|
|
|
1324
1465
|
*
|
|
1325
1466
|
* Converted from nape-compiled.js lines 21424–21827.
|
|
1326
1467
|
*/
|
|
1327
|
-
type Any$
|
|
1468
|
+
type Any$C = any;
|
|
1328
1469
|
declare class ZPP_Constraint {
|
|
1329
1470
|
static __name__: string[];
|
|
1330
1471
|
/**
|
|
@@ -1332,13 +1473,13 @@ declare class ZPP_Constraint {
|
|
|
1332
1473
|
* _nape = the `nape` public namespace (for CbTypeIterator in copyto)
|
|
1333
1474
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_CbSet, etc.)
|
|
1334
1475
|
*/
|
|
1335
|
-
static _nape: Any$
|
|
1336
|
-
static _zpp: Any$
|
|
1337
|
-
outer: Any$
|
|
1476
|
+
static _nape: Any$C;
|
|
1477
|
+
static _zpp: Any$C;
|
|
1478
|
+
outer: Any$C;
|
|
1338
1479
|
id: number;
|
|
1339
|
-
userData: Any$
|
|
1340
|
-
compound: Any$
|
|
1341
|
-
space: Any$
|
|
1480
|
+
userData: Any$C;
|
|
1481
|
+
compound: Any$C;
|
|
1482
|
+
space: Any$C;
|
|
1342
1483
|
active: boolean;
|
|
1343
1484
|
stiff: boolean;
|
|
1344
1485
|
frequency: number;
|
|
@@ -1348,14 +1489,14 @@ declare class ZPP_Constraint {
|
|
|
1348
1489
|
breakUnderForce: boolean;
|
|
1349
1490
|
breakUnderError: boolean;
|
|
1350
1491
|
removeOnBreak: boolean;
|
|
1351
|
-
component: Any$
|
|
1492
|
+
component: Any$C;
|
|
1352
1493
|
ignore: boolean;
|
|
1353
1494
|
__velocity: boolean;
|
|
1354
|
-
cbTypes: Any$
|
|
1355
|
-
cbSet: Any$
|
|
1356
|
-
wrap_cbTypes: Any$
|
|
1495
|
+
cbTypes: Any$C;
|
|
1496
|
+
cbSet: Any$C;
|
|
1497
|
+
wrap_cbTypes: Any$C;
|
|
1357
1498
|
pre_dt: number;
|
|
1358
|
-
__class__: Any$
|
|
1499
|
+
__class__: Any$C;
|
|
1359
1500
|
constructor();
|
|
1360
1501
|
/**
|
|
1361
1502
|
* Initialise base constraint fields.
|
|
@@ -1373,18 +1514,18 @@ declare class ZPP_Constraint {
|
|
|
1373
1514
|
forest(): void;
|
|
1374
1515
|
broken(): void;
|
|
1375
1516
|
warmStart(): void;
|
|
1376
|
-
draw(_g: Any$
|
|
1377
|
-
pair_exists(_id: Any$
|
|
1517
|
+
draw(_g: Any$C): void;
|
|
1518
|
+
pair_exists(_id: Any$C, _di: Any$C): boolean;
|
|
1378
1519
|
preStep(_dt: number): boolean;
|
|
1379
1520
|
applyImpulseVel(): boolean;
|
|
1380
1521
|
applyImpulsePos(): boolean;
|
|
1381
|
-
copy(_dict?: Any$
|
|
1522
|
+
copy(_dict?: Any$C, _todo?: Any$C): Any$C;
|
|
1382
1523
|
immutable_midstep(name: string): void;
|
|
1383
1524
|
setupcbTypes(): void;
|
|
1384
1525
|
immutable_cbTypes(): void;
|
|
1385
|
-
wrap_cbTypes_subber(pcb: Any$
|
|
1386
|
-
wrap_cbTypes_adder(cb: Any$
|
|
1387
|
-
insert_cbtype(cb: Any$
|
|
1526
|
+
wrap_cbTypes_subber(pcb: Any$C): void;
|
|
1527
|
+
wrap_cbTypes_adder(cb: Any$C): boolean;
|
|
1528
|
+
insert_cbtype(cb: Any$C): void;
|
|
1388
1529
|
alloc_cbSet(): void;
|
|
1389
1530
|
dealloc_cbSet(): void;
|
|
1390
1531
|
activate(): void;
|
|
@@ -1394,12 +1535,12 @@ declare class ZPP_Constraint {
|
|
|
1394
1535
|
activeInSpace(): void;
|
|
1395
1536
|
inactiveOrOutSpace(): void;
|
|
1396
1537
|
wake(): void;
|
|
1397
|
-
copyto(ret: Any$
|
|
1398
|
-
static _findRoot(comp: Any$
|
|
1399
|
-
static _unionComponents(a: Any$
|
|
1538
|
+
copyto(ret: Any$C): void;
|
|
1539
|
+
static _findRoot(comp: Any$C): Any$C;
|
|
1540
|
+
static _unionComponents(a: Any$C, b: Any$C): void;
|
|
1400
1541
|
}
|
|
1401
1542
|
|
|
1402
|
-
type Any$
|
|
1543
|
+
type Any$B = any;
|
|
1403
1544
|
/**
|
|
1404
1545
|
* Base class for all constraints / joints.
|
|
1405
1546
|
*
|
|
@@ -1416,16 +1557,16 @@ declare class Constraint {
|
|
|
1416
1557
|
* are fully modernized. Also serves as backward compat for compiled code.
|
|
1417
1558
|
* @internal
|
|
1418
1559
|
*/
|
|
1419
|
-
_inner: Any$
|
|
1560
|
+
_inner: Any$B;
|
|
1420
1561
|
debugDraw: boolean;
|
|
1421
1562
|
/** @internal */
|
|
1422
1563
|
protected constructor();
|
|
1423
1564
|
/** @internal */
|
|
1424
|
-
static _wrap(inner: Any$
|
|
1565
|
+
static _wrap(inner: Any$B): Constraint;
|
|
1425
1566
|
get space(): Space | null;
|
|
1426
1567
|
set space(value: Space | null);
|
|
1427
|
-
get compound(): Any$
|
|
1428
|
-
set compound(value: Any$
|
|
1568
|
+
get compound(): Any$B;
|
|
1569
|
+
set compound(value: Any$B);
|
|
1429
1570
|
get active(): boolean;
|
|
1430
1571
|
set active(value: boolean);
|
|
1431
1572
|
get ignore(): boolean;
|
|
@@ -1448,17 +1589,17 @@ declare class Constraint {
|
|
|
1448
1589
|
set removeOnBreak(value: boolean);
|
|
1449
1590
|
get isSleeping(): boolean;
|
|
1450
1591
|
get userData(): Record<string, unknown>;
|
|
1451
|
-
get cbTypes(): Any$
|
|
1452
|
-
impulse(): Any$
|
|
1453
|
-
bodyImpulse(_body: Body): Any$
|
|
1592
|
+
get cbTypes(): Any$B;
|
|
1593
|
+
impulse(): Any$B;
|
|
1594
|
+
bodyImpulse(_body: Body): Any$B;
|
|
1454
1595
|
visitBodies(_fn: (body: Body) => void): void;
|
|
1455
1596
|
copy(): Constraint;
|
|
1456
1597
|
toString(): string;
|
|
1457
|
-
/** @internal */ get_userData(): Any$
|
|
1458
|
-
/** @internal */ get_compound(): Any$
|
|
1459
|
-
/** @internal */ set_compound(v: Any$
|
|
1460
|
-
/** @internal */ get_space(): Any$
|
|
1461
|
-
/** @internal */ set_space(v: Any$
|
|
1598
|
+
/** @internal */ get_userData(): Any$B;
|
|
1599
|
+
/** @internal */ get_compound(): Any$B;
|
|
1600
|
+
/** @internal */ set_compound(v: Any$B): Any$B;
|
|
1601
|
+
/** @internal */ get_space(): Any$B;
|
|
1602
|
+
/** @internal */ set_space(v: Any$B): Any$B;
|
|
1462
1603
|
/** @internal */ get_isSleeping(): boolean;
|
|
1463
1604
|
/** @internal */ get_active(): boolean;
|
|
1464
1605
|
/** @internal */ set_active(v: boolean): boolean;
|
|
@@ -1480,7 +1621,7 @@ declare class Constraint {
|
|
|
1480
1621
|
/** @internal */ set_breakUnderError(v: boolean): boolean;
|
|
1481
1622
|
/** @internal */ get_removeOnBreak(): boolean;
|
|
1482
1623
|
/** @internal */ set_removeOnBreak(v: boolean): boolean;
|
|
1483
|
-
/** @internal */ get_cbTypes(): Any$
|
|
1624
|
+
/** @internal */ get_cbTypes(): Any$B;
|
|
1484
1625
|
}
|
|
1485
1626
|
|
|
1486
1627
|
/**
|
|
@@ -1492,24 +1633,24 @@ declare class Constraint {
|
|
|
1492
1633
|
*
|
|
1493
1634
|
* Converted from nape-compiled.js lines 27259–27304, 112053–112139.
|
|
1494
1635
|
*/
|
|
1495
|
-
type Any$
|
|
1636
|
+
type Any$A = any;
|
|
1496
1637
|
declare class ZPP_Listener {
|
|
1497
1638
|
static __name__: string[];
|
|
1498
|
-
static _nape: Any$
|
|
1499
|
-
static _zpp: Any$
|
|
1639
|
+
static _nape: Any$A;
|
|
1640
|
+
static _zpp: Any$A;
|
|
1500
1641
|
static internal: boolean;
|
|
1501
|
-
static types: Any$
|
|
1502
|
-
static events: Any$
|
|
1503
|
-
space: Any$
|
|
1504
|
-
interaction: Any$
|
|
1505
|
-
constraint: Any$
|
|
1506
|
-
body: Any$
|
|
1642
|
+
static types: Any$A[];
|
|
1643
|
+
static events: Any$A[];
|
|
1644
|
+
space: Any$A;
|
|
1645
|
+
interaction: Any$A;
|
|
1646
|
+
constraint: Any$A;
|
|
1647
|
+
body: Any$A;
|
|
1507
1648
|
precedence: number;
|
|
1508
1649
|
event: number;
|
|
1509
1650
|
type: number;
|
|
1510
1651
|
id: number;
|
|
1511
|
-
outer: Any$
|
|
1512
|
-
__class__: Any$
|
|
1652
|
+
outer: Any$A;
|
|
1653
|
+
__class__: Any$A;
|
|
1513
1654
|
constructor();
|
|
1514
1655
|
/** Sort comparator: higher precedence first, then by id descending. */
|
|
1515
1656
|
static setlt(a: ZPP_Listener, b: ZPP_Listener): boolean;
|
|
@@ -1585,20 +1726,20 @@ declare class ListenerType {
|
|
|
1585
1726
|
* Fully modernized from nape-compiled.js lines 231–433.
|
|
1586
1727
|
*/
|
|
1587
1728
|
|
|
1588
|
-
type Any$
|
|
1729
|
+
type Any$z = any;
|
|
1589
1730
|
declare class Listener {
|
|
1590
1731
|
static __name__: string[];
|
|
1591
1732
|
zpp_inner: ZPP_Listener;
|
|
1592
|
-
get _inner(): Any$
|
|
1733
|
+
get _inner(): Any$z;
|
|
1593
1734
|
constructor();
|
|
1594
|
-
static _wrap(inner: Any$
|
|
1735
|
+
static _wrap(inner: Any$z): Listener;
|
|
1595
1736
|
get type(): ListenerType;
|
|
1596
1737
|
get event(): CbEvent;
|
|
1597
1738
|
set event(event: CbEvent);
|
|
1598
1739
|
get precedence(): number;
|
|
1599
1740
|
set precedence(precedence: number);
|
|
1600
1741
|
get space(): Space | null;
|
|
1601
|
-
set space(space: Space | Any$
|
|
1742
|
+
set space(space: Space | Any$z | null);
|
|
1602
1743
|
toString(): string;
|
|
1603
1744
|
}
|
|
1604
1745
|
|
|
@@ -1685,46 +1826,46 @@ declare class BodyType {
|
|
|
1685
1826
|
* Converted from nape-compiled.js lines 52431–54547.
|
|
1686
1827
|
*/
|
|
1687
1828
|
|
|
1688
|
-
type Any$
|
|
1829
|
+
type Any$y = any;
|
|
1689
1830
|
declare class ZPP_Body {
|
|
1690
1831
|
static __name__: string[];
|
|
1691
|
-
static __super__: Any$
|
|
1832
|
+
static __super__: Any$y;
|
|
1692
1833
|
/**
|
|
1693
1834
|
* Namespace references, set by the compiled module after import.
|
|
1694
1835
|
* _nape = the `nape` public namespace
|
|
1695
1836
|
* _zpp = the `zpp_nape` internal namespace
|
|
1696
1837
|
*/
|
|
1697
|
-
static _nape: Any$
|
|
1698
|
-
static _zpp: Any$
|
|
1699
|
-
static types: Any$
|
|
1700
|
-
static bodystack: Any$
|
|
1701
|
-
static bodyset: Any$
|
|
1838
|
+
static _nape: Any$y;
|
|
1839
|
+
static _zpp: Any$y;
|
|
1840
|
+
static types: Any$y[];
|
|
1841
|
+
static bodystack: Any$y;
|
|
1842
|
+
static bodyset: Any$y;
|
|
1702
1843
|
static cur_graph_depth: number;
|
|
1703
|
-
static bodysetlt(a: Any$
|
|
1704
|
-
static __static(): Any$
|
|
1705
|
-
outer_i: Any$
|
|
1844
|
+
static bodysetlt(a: Any$y, b: Any$y): boolean;
|
|
1845
|
+
static __static(): Any$y;
|
|
1846
|
+
outer_i: Any$y;
|
|
1706
1847
|
id: number;
|
|
1707
|
-
userData: Any$
|
|
1708
|
-
ishape: Any$
|
|
1709
|
-
ibody: Any$
|
|
1710
|
-
icompound: Any$
|
|
1711
|
-
wrap_cbTypes: Any$
|
|
1712
|
-
cbSet: Any$
|
|
1713
|
-
cbTypes: Any$
|
|
1714
|
-
group: Any$
|
|
1715
|
-
cbsets: Any$
|
|
1716
|
-
outer: Any$
|
|
1848
|
+
userData: Any$y;
|
|
1849
|
+
ishape: Any$y;
|
|
1850
|
+
ibody: Any$y;
|
|
1851
|
+
icompound: Any$y;
|
|
1852
|
+
wrap_cbTypes: Any$y;
|
|
1853
|
+
cbSet: Any$y;
|
|
1854
|
+
cbTypes: Any$y;
|
|
1855
|
+
group: Any$y;
|
|
1856
|
+
cbsets: Any$y;
|
|
1857
|
+
outer: Any$y;
|
|
1717
1858
|
world: boolean;
|
|
1718
1859
|
type: number;
|
|
1719
|
-
compound: Any$
|
|
1720
|
-
shapes: Any$
|
|
1721
|
-
wrap_shapes: Any$
|
|
1722
|
-
space: Any$
|
|
1723
|
-
arbiters: Any$
|
|
1724
|
-
wrap_arbiters: Any$
|
|
1725
|
-
constraints: Any$
|
|
1726
|
-
wrap_constraints: Any$
|
|
1727
|
-
component: Any$
|
|
1860
|
+
compound: Any$y;
|
|
1861
|
+
shapes: Any$y;
|
|
1862
|
+
wrap_shapes: Any$y;
|
|
1863
|
+
space: Any$y;
|
|
1864
|
+
arbiters: Any$y;
|
|
1865
|
+
wrap_arbiters: Any$y;
|
|
1866
|
+
constraints: Any$y;
|
|
1867
|
+
wrap_constraints: Any$y;
|
|
1868
|
+
component: Any$y;
|
|
1728
1869
|
graph_depth: number;
|
|
1729
1870
|
sweepTime: number;
|
|
1730
1871
|
sweep_angvel: number;
|
|
@@ -1737,20 +1878,20 @@ declare class ZPP_Body {
|
|
|
1737
1878
|
pre_posy: number;
|
|
1738
1879
|
posx: number;
|
|
1739
1880
|
posy: number;
|
|
1740
|
-
wrap_pos: Any$
|
|
1881
|
+
wrap_pos: Any$y;
|
|
1741
1882
|
velx: number;
|
|
1742
1883
|
vely: number;
|
|
1743
|
-
wrap_vel: Any$
|
|
1884
|
+
wrap_vel: Any$y;
|
|
1744
1885
|
forcex: number;
|
|
1745
1886
|
forcey: number;
|
|
1746
|
-
wrap_force: Any$
|
|
1887
|
+
wrap_force: Any$y;
|
|
1747
1888
|
kinvelx: number;
|
|
1748
1889
|
kinvely: number;
|
|
1749
|
-
wrap_kinvel: Any$
|
|
1890
|
+
wrap_kinvel: Any$y;
|
|
1750
1891
|
svelx: number;
|
|
1751
1892
|
svely: number;
|
|
1752
|
-
wrap_svel: Any$
|
|
1753
|
-
wrapcvel: Any$
|
|
1893
|
+
wrap_svel: Any$y;
|
|
1894
|
+
wrapcvel: Any$y;
|
|
1754
1895
|
angvel: number;
|
|
1755
1896
|
torque: number;
|
|
1756
1897
|
kinangvel: number;
|
|
@@ -1787,9 +1928,9 @@ declare class ZPP_Body {
|
|
|
1787
1928
|
worldCOMx: number;
|
|
1788
1929
|
worldCOMy: number;
|
|
1789
1930
|
zip_worldCOM: boolean;
|
|
1790
|
-
wrap_localCOM: Any$
|
|
1791
|
-
wrap_worldCOM: Any$
|
|
1792
|
-
__class__: Any$
|
|
1931
|
+
wrap_localCOM: Any$y;
|
|
1932
|
+
wrap_worldCOM: Any$y;
|
|
1933
|
+
__class__: Any$y;
|
|
1793
1934
|
constructor();
|
|
1794
1935
|
isStatic(): boolean;
|
|
1795
1936
|
isDynamic(): boolean;
|
|
@@ -1797,23 +1938,23 @@ declare class ZPP_Body {
|
|
|
1797
1938
|
invalidate_type(): void;
|
|
1798
1939
|
invalidate_shapes(): void;
|
|
1799
1940
|
init_bodysetlist(): void;
|
|
1800
|
-
connectedBodies_cont(b: Any$
|
|
1801
|
-
connectedBodies(depth: number, output: Any$
|
|
1802
|
-
interactingBodies(type: number, output: Any$
|
|
1941
|
+
connectedBodies_cont(b: Any$y): void;
|
|
1942
|
+
connectedBodies(depth: number, output: Any$y): Any$y;
|
|
1943
|
+
interactingBodies(type: number, output: Any$y): Any$y;
|
|
1803
1944
|
atRest(dt: number): boolean;
|
|
1804
1945
|
refreshArbiters(): void;
|
|
1805
1946
|
sweepIntegrate(dt: number): void;
|
|
1806
|
-
sweepValidate(s: Any$
|
|
1947
|
+
sweepValidate(s: Any$y): void;
|
|
1807
1948
|
invalidate_pos(): void;
|
|
1808
|
-
pos_invalidate(pos: Any$
|
|
1949
|
+
pos_invalidate(pos: Any$y): void;
|
|
1809
1950
|
pos_validate(): void;
|
|
1810
|
-
vel_invalidate(vel: Any$
|
|
1951
|
+
vel_invalidate(vel: Any$y): void;
|
|
1811
1952
|
vel_validate(): void;
|
|
1812
|
-
kinvel_invalidate(vel: Any$
|
|
1953
|
+
kinvel_invalidate(vel: Any$y): void;
|
|
1813
1954
|
kinvel_validate(): void;
|
|
1814
|
-
svel_invalidate(vel: Any$
|
|
1955
|
+
svel_invalidate(vel: Any$y): void;
|
|
1815
1956
|
svel_validate(): void;
|
|
1816
|
-
force_invalidate(force: Any$
|
|
1957
|
+
force_invalidate(force: Any$y): void;
|
|
1817
1958
|
force_validate(): void;
|
|
1818
1959
|
private _setupVec2Wrapper;
|
|
1819
1960
|
setupPosition(): void;
|
|
@@ -1850,37 +1991,37 @@ declare class ZPP_Body {
|
|
|
1850
1991
|
getworldCOM(): void;
|
|
1851
1992
|
__immutable_midstep(): void;
|
|
1852
1993
|
clear(): void;
|
|
1853
|
-
shapes_adder(s: Any$
|
|
1854
|
-
shapes_subber(s: Any$
|
|
1855
|
-
shapes_invalidate(_param: Any$
|
|
1994
|
+
shapes_adder(s: Any$y): boolean;
|
|
1995
|
+
shapes_subber(s: Any$y): void;
|
|
1996
|
+
shapes_invalidate(_param: Any$y): void;
|
|
1856
1997
|
shapes_modifiable(): void;
|
|
1857
1998
|
addedToSpace(): void;
|
|
1858
1999
|
removedFromSpace(): void;
|
|
1859
2000
|
private _removeArbiterFromList;
|
|
1860
|
-
copy(): Any$
|
|
2001
|
+
copy(): Any$y;
|
|
1861
2002
|
wake: () => void;
|
|
1862
2003
|
__iaddedToSpace: () => void;
|
|
1863
2004
|
__iremovedFromSpace: () => void;
|
|
1864
2005
|
immutable_midstep: (name: string) => void;
|
|
1865
|
-
copyto: (ret: Any$
|
|
1866
|
-
insert_cbtype: (cb: Any$
|
|
2006
|
+
copyto: (ret: Any$y) => void;
|
|
2007
|
+
insert_cbtype: (cb: Any$y) => void;
|
|
1867
2008
|
alloc_cbSet: () => void;
|
|
1868
2009
|
dealloc_cbSet: () => void;
|
|
1869
2010
|
setupcbTypes: () => void;
|
|
1870
2011
|
immutable_cbTypes: () => void;
|
|
1871
|
-
wrap_cbTypes_subber: (pcb: Any$
|
|
1872
|
-
wrap_cbTypes_adder: (cb: Any$
|
|
1873
|
-
setGroup: (group: Any$
|
|
1874
|
-
lookup_group: () => Any$
|
|
1875
|
-
getSpace: () => Any$
|
|
2012
|
+
wrap_cbTypes_subber: (pcb: Any$y) => void;
|
|
2013
|
+
wrap_cbTypes_adder: (cb: Any$y) => void;
|
|
2014
|
+
setGroup: (group: Any$y) => void;
|
|
2015
|
+
lookup_group: () => Any$y;
|
|
2016
|
+
getSpace: () => Any$y;
|
|
1876
2017
|
isShape: () => boolean;
|
|
1877
2018
|
isBody: () => boolean;
|
|
1878
2019
|
isCompound: () => boolean;
|
|
1879
2020
|
static _initialized: boolean;
|
|
1880
|
-
static _init(zpp: Any$
|
|
2021
|
+
static _init(zpp: Any$y, nape: Any$y): void;
|
|
1881
2022
|
}
|
|
1882
2023
|
|
|
1883
|
-
type Any$
|
|
2024
|
+
type Any$x = any;
|
|
1884
2025
|
/**
|
|
1885
2026
|
* A rigid body in the physics simulation.
|
|
1886
2027
|
*
|
|
@@ -1888,19 +2029,19 @@ type Any$z = any;
|
|
|
1888
2029
|
*/
|
|
1889
2030
|
declare class Body extends Interactor {
|
|
1890
2031
|
static __name__: string[];
|
|
1891
|
-
static __super__: Any$
|
|
2032
|
+
static __super__: Any$x;
|
|
1892
2033
|
/** Direct access to the extracted internal ZPP_Body. */
|
|
1893
2034
|
zpp_inner: ZPP_Body;
|
|
1894
2035
|
debugDraw: boolean;
|
|
1895
|
-
/** @internal */ set_type: (type: Any$
|
|
1896
|
-
/** @internal */ set_position: (position: Any$
|
|
2036
|
+
/** @internal */ set_type: (type: Any$x) => Any$x;
|
|
2037
|
+
/** @internal */ set_position: (position: Any$x) => Any$x;
|
|
1897
2038
|
/** @internal */ set_rotation: (rotation: number) => number;
|
|
1898
|
-
/** @internal */ set_velocity: (velocity: Any$
|
|
2039
|
+
/** @internal */ set_velocity: (velocity: Any$x) => Any$x;
|
|
1899
2040
|
/** @internal */ set_angularVel: (angularVel: number) => number;
|
|
1900
|
-
/** @internal */ set_kinematicVel: (kinematicVel: Any$
|
|
2041
|
+
/** @internal */ set_kinematicVel: (kinematicVel: Any$x) => Any$x;
|
|
1901
2042
|
/** @internal */ set_kinAngVel: (kinAngVel: number) => number;
|
|
1902
|
-
/** @internal */ set_surfaceVel: (surfaceVel: Any$
|
|
1903
|
-
/** @internal */ set_force: (force: Any$
|
|
2043
|
+
/** @internal */ set_surfaceVel: (surfaceVel: Any$x) => Any$x;
|
|
2044
|
+
/** @internal */ set_force: (force: Any$x) => Any$x;
|
|
1904
2045
|
/** @internal */ set_torque: (torque: number) => number;
|
|
1905
2046
|
/** @internal */ get_mass: () => number;
|
|
1906
2047
|
/** @internal */ set_mass: (mass: number) => number;
|
|
@@ -1912,36 +2053,36 @@ declare class Body extends Interactor {
|
|
|
1912
2053
|
/** @internal */ set_gravMassScale: (gravMassScale: number) => number;
|
|
1913
2054
|
/** @internal */ set_allowMovement: (v: boolean) => boolean;
|
|
1914
2055
|
/** @internal */ set_allowRotation: (v: boolean) => boolean;
|
|
1915
|
-
/** @internal */ set_space: (space: Any$
|
|
1916
|
-
/** @internal */ set_compound: (compound: Any$
|
|
1917
|
-
/** @internal */ get_localCOM: () => Any$
|
|
1918
|
-
/** @internal */ get_worldCOM: () => Any$
|
|
1919
|
-
/** @internal */ integrate: (deltaTime: number) => Any$
|
|
1920
|
-
/** @internal */ applyImpulse: (impulse: Any$
|
|
2056
|
+
/** @internal */ set_space: (space: Any$x) => Any$x;
|
|
2057
|
+
/** @internal */ set_compound: (compound: Any$x) => Any$x;
|
|
2058
|
+
/** @internal */ get_localCOM: () => Any$x;
|
|
2059
|
+
/** @internal */ get_worldCOM: () => Any$x;
|
|
2060
|
+
/** @internal */ integrate: (deltaTime: number) => Any$x;
|
|
2061
|
+
/** @internal */ applyImpulse: (impulse: Any$x, pos?: Any$x, sleepable?: boolean) => void;
|
|
1921
2062
|
/** @internal */ applyAngularImpulse: (impulse: number, sleepable?: boolean) => void;
|
|
1922
|
-
/** @internal */ setVelocityFromTarget: (targetPosition: Any$
|
|
1923
|
-
/** @internal */ localPointToWorld: (point: Any$
|
|
1924
|
-
/** @internal */ worldPointToLocal: (point: Any$
|
|
1925
|
-
/** @internal */ localVectorToWorld: (vector: Any$
|
|
1926
|
-
/** @internal */ worldVectorToLocal: (vector: Any$
|
|
1927
|
-
/** @internal */ translateShapes: (translation: Any$
|
|
2063
|
+
/** @internal */ setVelocityFromTarget: (targetPosition: Any$x, targetRotation: number, deltaTime: number) => Any$x;
|
|
2064
|
+
/** @internal */ localPointToWorld: (point: Any$x, weak?: boolean) => Any$x;
|
|
2065
|
+
/** @internal */ worldPointToLocal: (point: Any$x, weak?: boolean) => Any$x;
|
|
2066
|
+
/** @internal */ localVectorToWorld: (vector: Any$x, weak?: boolean) => Any$x;
|
|
2067
|
+
/** @internal */ worldVectorToLocal: (vector: Any$x, weak?: boolean) => Any$x;
|
|
2068
|
+
/** @internal */ translateShapes: (translation: Any$x) => void;
|
|
1928
2069
|
/** @internal */ rotateShapes: (angle: number) => void;
|
|
1929
2070
|
/** @internal */ scaleShapes: (scaleX: number, scaleY: number) => void;
|
|
1930
2071
|
/** @internal */ align: () => void;
|
|
1931
|
-
/** @internal */ rotate: (centre: Any$
|
|
1932
|
-
/** @internal */ setShapeMaterials: (material: Any$
|
|
1933
|
-
/** @internal */ setShapeFilters: (filter: Any$
|
|
1934
|
-
/** @internal */ setShapeFluidProperties: (fluidProperties: Any$
|
|
1935
|
-
/** @internal */ contains: (point: Any$
|
|
2072
|
+
/** @internal */ rotate: (centre: Any$x, angle: number) => void;
|
|
2073
|
+
/** @internal */ setShapeMaterials: (material: Any$x) => void;
|
|
2074
|
+
/** @internal */ setShapeFilters: (filter: Any$x) => void;
|
|
2075
|
+
/** @internal */ setShapeFluidProperties: (fluidProperties: Any$x) => void;
|
|
2076
|
+
/** @internal */ contains: (point: Any$x) => boolean;
|
|
1936
2077
|
/** @internal */ crushFactor: () => number;
|
|
1937
|
-
/** @internal */ connectedBodies: (depth?: number, output?: Any$
|
|
1938
|
-
/** @internal */ interactingBodies: (type?: Any$
|
|
1939
|
-
/** @internal */ get_massMode: () => Any$
|
|
1940
|
-
/** @internal */ set_massMode: (mode: Any$
|
|
1941
|
-
/** @internal */ get_inertiaMode: () => Any$
|
|
1942
|
-
/** @internal */ set_inertiaMode: (mode: Any$
|
|
1943
|
-
/** @internal */ get_gravMassMode: () => Any$
|
|
1944
|
-
/** @internal */ set_gravMassMode: (mode: Any$
|
|
2078
|
+
/** @internal */ connectedBodies: (depth?: number, output?: Any$x) => Any$x;
|
|
2079
|
+
/** @internal */ interactingBodies: (type?: Any$x, depth?: number, output?: Any$x) => Any$x;
|
|
2080
|
+
/** @internal */ get_massMode: () => Any$x;
|
|
2081
|
+
/** @internal */ set_massMode: (mode: Any$x) => Any$x;
|
|
2082
|
+
/** @internal */ get_inertiaMode: () => Any$x;
|
|
2083
|
+
/** @internal */ set_inertiaMode: (mode: Any$x) => Any$x;
|
|
2084
|
+
/** @internal */ get_gravMassMode: () => Any$x;
|
|
2085
|
+
/** @internal */ set_gravMassMode: (mode: Any$x) => Any$x;
|
|
1945
2086
|
/** @internal */ _toString: () => string;
|
|
1946
2087
|
constructor(type?: BodyType, position?: Vec2);
|
|
1947
2088
|
/** @internal */
|
|
@@ -1991,40 +2132,40 @@ declare class Body extends Interactor {
|
|
|
1991
2132
|
get shapes(): NapeList<Shape>;
|
|
1992
2133
|
get space(): Space;
|
|
1993
2134
|
set space(value: Space | null);
|
|
1994
|
-
get compound(): Any$
|
|
1995
|
-
set compound(value: Any$
|
|
2135
|
+
get compound(): Any$x;
|
|
2136
|
+
set compound(value: Any$x);
|
|
1996
2137
|
get bounds(): AABB;
|
|
1997
2138
|
get constraintVelocity(): Vec2;
|
|
1998
2139
|
get localCOM(): Vec2;
|
|
1999
2140
|
get worldCOM(): Vec2;
|
|
2000
2141
|
copy(): Body;
|
|
2001
2142
|
toString(): string;
|
|
2002
|
-
get_type(): Any$
|
|
2003
|
-
get_shapes(): Any$
|
|
2143
|
+
get_type(): Any$x;
|
|
2144
|
+
get_shapes(): Any$x;
|
|
2004
2145
|
get_isBullet(): boolean;
|
|
2005
2146
|
set_isBullet(v: boolean): boolean;
|
|
2006
2147
|
get_disableCCD(): boolean;
|
|
2007
2148
|
set_disableCCD(v: boolean): boolean;
|
|
2008
|
-
get_position(): Any$
|
|
2009
|
-
get_velocity(): Any$
|
|
2149
|
+
get_position(): Any$x;
|
|
2150
|
+
get_velocity(): Any$x;
|
|
2010
2151
|
get_rotation(): number;
|
|
2011
2152
|
get_angularVel(): number;
|
|
2012
|
-
get_kinematicVel(): Any$
|
|
2153
|
+
get_kinematicVel(): Any$x;
|
|
2013
2154
|
get_kinAngVel(): number;
|
|
2014
|
-
get_surfaceVel(): Any$
|
|
2015
|
-
get_force(): Any$
|
|
2155
|
+
get_surfaceVel(): Any$x;
|
|
2156
|
+
get_force(): Any$x;
|
|
2016
2157
|
get_torque(): number;
|
|
2017
|
-
get_bounds(): Any$
|
|
2018
|
-
get_constraintVelocity(): Any$
|
|
2158
|
+
get_bounds(): Any$x;
|
|
2159
|
+
get_constraintVelocity(): Any$x;
|
|
2019
2160
|
get_constraintMass(): number;
|
|
2020
2161
|
get_constraintInertia(): number;
|
|
2021
2162
|
get_allowMovement(): boolean;
|
|
2022
2163
|
get_allowRotation(): boolean;
|
|
2023
2164
|
get_isSleeping(): boolean;
|
|
2024
|
-
get_compound(): Any$
|
|
2025
|
-
get_space(): Any$
|
|
2026
|
-
get_arbiters(): Any$
|
|
2027
|
-
get_constraints(): Any$
|
|
2165
|
+
get_compound(): Any$x;
|
|
2166
|
+
get_space(): Any$x;
|
|
2167
|
+
get_arbiters(): Any$x;
|
|
2168
|
+
get_constraints(): Any$x;
|
|
2028
2169
|
}
|
|
2029
2170
|
|
|
2030
2171
|
/**
|
|
@@ -2035,77 +2176,77 @@ declare class Body extends Interactor {
|
|
|
2035
2176
|
*
|
|
2036
2177
|
* Converted from nape-compiled.js lines 55195–55521.
|
|
2037
2178
|
*/
|
|
2038
|
-
type Any$
|
|
2179
|
+
type Any$w = any;
|
|
2039
2180
|
declare class ZPP_Compound {
|
|
2040
2181
|
static __name__: string[];
|
|
2041
|
-
static __super__: Any$
|
|
2182
|
+
static __super__: Any$w;
|
|
2042
2183
|
/**
|
|
2043
2184
|
* Namespace references, set by the compiled module after import.
|
|
2044
2185
|
* _nape = the `nape` public namespace (for wrapper creation in copy())
|
|
2045
2186
|
* _zpp = the `zpp_nape` internal namespace (for ZNPList_*, ZPP_BodyList, etc.)
|
|
2046
2187
|
*/
|
|
2047
|
-
static _nape: Any$
|
|
2048
|
-
static _zpp: Any$
|
|
2188
|
+
static _nape: Any$w;
|
|
2189
|
+
static _zpp: Any$w;
|
|
2049
2190
|
/**
|
|
2050
2191
|
* Wrapper factory callback, registered by the modernized Compound class.
|
|
2051
2192
|
* When set, wrapper() uses this instead of the compiled Compound constructor.
|
|
2052
2193
|
*/
|
|
2053
|
-
static _wrapFn: ((zpp: ZPP_Compound) => Any$
|
|
2054
|
-
outer_i: Any$
|
|
2194
|
+
static _wrapFn: ((zpp: ZPP_Compound) => Any$w) | null;
|
|
2195
|
+
outer_i: Any$w;
|
|
2055
2196
|
id: number;
|
|
2056
|
-
userData: Any$
|
|
2057
|
-
ishape: Any$
|
|
2058
|
-
ibody: Any$
|
|
2059
|
-
icompound: Any$
|
|
2060
|
-
wrap_cbTypes: Any$
|
|
2061
|
-
cbSet: Any$
|
|
2062
|
-
cbTypes: Any$
|
|
2063
|
-
group: Any$
|
|
2064
|
-
cbsets: Any$
|
|
2065
|
-
outer: Any$
|
|
2066
|
-
bodies: Any$
|
|
2067
|
-
constraints: Any$
|
|
2068
|
-
compounds: Any$
|
|
2069
|
-
wrap_bodies: Any$
|
|
2070
|
-
wrap_constraints: Any$
|
|
2071
|
-
wrap_compounds: Any$
|
|
2197
|
+
userData: Any$w;
|
|
2198
|
+
ishape: Any$w;
|
|
2199
|
+
ibody: Any$w;
|
|
2200
|
+
icompound: Any$w;
|
|
2201
|
+
wrap_cbTypes: Any$w;
|
|
2202
|
+
cbSet: Any$w;
|
|
2203
|
+
cbTypes: Any$w;
|
|
2204
|
+
group: Any$w;
|
|
2205
|
+
cbsets: Any$w;
|
|
2206
|
+
outer: Any$w;
|
|
2207
|
+
bodies: Any$w;
|
|
2208
|
+
constraints: Any$w;
|
|
2209
|
+
compounds: Any$w;
|
|
2210
|
+
wrap_bodies: Any$w;
|
|
2211
|
+
wrap_constraints: Any$w;
|
|
2212
|
+
wrap_compounds: Any$w;
|
|
2072
2213
|
depth: number;
|
|
2073
|
-
compound: Any$
|
|
2074
|
-
space: Any$
|
|
2075
|
-
__class__: Any$
|
|
2214
|
+
compound: Any$w;
|
|
2215
|
+
space: Any$w;
|
|
2216
|
+
__class__: Any$w;
|
|
2076
2217
|
constructor();
|
|
2077
2218
|
__imutable_midstep(name: string): void;
|
|
2078
2219
|
addedToSpace(): void;
|
|
2079
2220
|
removedFromSpace(): void;
|
|
2080
2221
|
breakApart(): void;
|
|
2081
2222
|
private static _zppOf;
|
|
2082
|
-
bodies_adder(x: Any$
|
|
2083
|
-
bodies_subber(x: Any$
|
|
2223
|
+
bodies_adder(x: Any$w): boolean;
|
|
2224
|
+
bodies_subber(x: Any$w): void;
|
|
2084
2225
|
bodies_modifiable(): void;
|
|
2085
|
-
constraints_adder(x: Any$
|
|
2086
|
-
constraints_subber(x: Any$
|
|
2226
|
+
constraints_adder(x: Any$w): boolean;
|
|
2227
|
+
constraints_subber(x: Any$w): void;
|
|
2087
2228
|
constraints_modifiable(): void;
|
|
2088
|
-
compounds_adder(x: Any$
|
|
2089
|
-
compounds_subber(x: Any$
|
|
2229
|
+
compounds_adder(x: Any$w): boolean;
|
|
2230
|
+
compounds_subber(x: Any$w): void;
|
|
2090
2231
|
compounds_modifiable(): void;
|
|
2091
|
-
copy(dict?: Any$
|
|
2232
|
+
copy(dict?: Any$w[], todo?: Any$w[]): Any$w;
|
|
2092
2233
|
isShape: () => boolean;
|
|
2093
2234
|
isBody: () => boolean;
|
|
2094
2235
|
isCompound: () => boolean;
|
|
2095
2236
|
__iaddedToSpace: () => void;
|
|
2096
2237
|
__iremovedFromSpace: () => void;
|
|
2097
2238
|
wake: () => void;
|
|
2098
|
-
getSpace: () => Any$
|
|
2239
|
+
getSpace: () => Any$w;
|
|
2099
2240
|
setupcbTypes: () => void;
|
|
2100
2241
|
immutable_cbTypes: () => void;
|
|
2101
|
-
wrap_cbTypes_subber: (pcb: Any$
|
|
2102
|
-
wrap_cbTypes_adder: (cb: Any$
|
|
2103
|
-
insert_cbtype: (cb: Any$
|
|
2242
|
+
wrap_cbTypes_subber: (pcb: Any$w) => void;
|
|
2243
|
+
wrap_cbTypes_adder: (cb: Any$w) => boolean;
|
|
2244
|
+
insert_cbtype: (cb: Any$w) => void;
|
|
2104
2245
|
alloc_cbSet: () => void;
|
|
2105
2246
|
dealloc_cbSet: () => void;
|
|
2106
2247
|
immutable_midstep: (name: string) => void;
|
|
2107
|
-
copyto: (ret: Any$
|
|
2108
|
-
lookup_group: () => Any$
|
|
2248
|
+
copyto: (ret: Any$w) => void;
|
|
2249
|
+
lookup_group: () => Any$w;
|
|
2109
2250
|
/**
|
|
2110
2251
|
* Initialize prototype by copying ZPP_Interactor methods.
|
|
2111
2252
|
* Must be called after _zpp is set (during compiled module init).
|
|
@@ -2113,7 +2254,7 @@ declare class ZPP_Compound {
|
|
|
2113
2254
|
static _init(): void;
|
|
2114
2255
|
}
|
|
2115
2256
|
|
|
2116
|
-
type Any$
|
|
2257
|
+
type Any$v = any;
|
|
2117
2258
|
/**
|
|
2118
2259
|
* A compound physics object — a hierarchical grouping of Bodies, Constraints,
|
|
2119
2260
|
* and other Compounds.
|
|
@@ -2122,18 +2263,18 @@ type Any$x = any;
|
|
|
2122
2263
|
*/
|
|
2123
2264
|
declare class Compound extends Interactor {
|
|
2124
2265
|
static __name__: string[];
|
|
2125
|
-
static __super__: Any$
|
|
2266
|
+
static __super__: Any$v;
|
|
2126
2267
|
/** Direct access to the extracted internal ZPP_Compound. */
|
|
2127
2268
|
zpp_inner: ZPP_Compound;
|
|
2128
2269
|
constructor();
|
|
2129
2270
|
/** @internal */
|
|
2130
2271
|
static _wrap(inner: NapeInner): Compound;
|
|
2131
2272
|
/** Bodies in this compound. */
|
|
2132
|
-
get bodies(): Any$
|
|
2273
|
+
get bodies(): Any$v;
|
|
2133
2274
|
/** Constraints in this compound. */
|
|
2134
|
-
get constraints(): Any$
|
|
2275
|
+
get constraints(): Any$v;
|
|
2135
2276
|
/** Child compounds in this compound. */
|
|
2136
|
-
get compounds(): Any$
|
|
2277
|
+
get compounds(): Any$v;
|
|
2137
2278
|
/** Parent compound, or null if this is a root compound. */
|
|
2138
2279
|
get compound(): Compound | null;
|
|
2139
2280
|
set compound(value: Compound | null);
|
|
@@ -2147,7 +2288,7 @@ declare class Compound extends Interactor {
|
|
|
2147
2288
|
/** Recursively visit all bodies in this compound and its sub-compounds. */
|
|
2148
2289
|
visitBodies(lambda: (body: Body) => void): void;
|
|
2149
2290
|
/** Recursively visit all constraints in this compound and its sub-compounds. */
|
|
2150
|
-
visitConstraints(lambda: (constraint: Any$
|
|
2291
|
+
visitConstraints(lambda: (constraint: Any$v) => void): void;
|
|
2151
2292
|
/** Recursively visit all sub-compounds in this compound. */
|
|
2152
2293
|
visitCompounds(lambda: (compound: Compound) => void): void;
|
|
2153
2294
|
/** Calculate the center of mass of all bodies in this compound. */
|
|
@@ -2157,13 +2298,13 @@ declare class Compound extends Interactor {
|
|
|
2157
2298
|
/** Rotate all bodies in this compound around the given centre point. */
|
|
2158
2299
|
rotate(centre: Vec2, angle: number): Compound;
|
|
2159
2300
|
toString(): string;
|
|
2160
|
-
get_bodies(): Any$
|
|
2161
|
-
get_constraints(): Any$
|
|
2162
|
-
get_compounds(): Any$
|
|
2163
|
-
get_compound(): Any$
|
|
2164
|
-
set_compound(compound: Any$
|
|
2165
|
-
get_space(): Any$
|
|
2166
|
-
set_space(space: Any$
|
|
2301
|
+
get_bodies(): Any$v;
|
|
2302
|
+
get_constraints(): Any$v;
|
|
2303
|
+
get_compounds(): Any$v;
|
|
2304
|
+
get_compound(): Any$v;
|
|
2305
|
+
set_compound(compound: Any$v): Any$v;
|
|
2306
|
+
get_space(): Any$v;
|
|
2307
|
+
set_space(space: Any$v): Any$v;
|
|
2167
2308
|
}
|
|
2168
2309
|
|
|
2169
2310
|
/**
|
|
@@ -2328,17 +2469,17 @@ declare class ArbiterType {
|
|
|
2328
2469
|
*
|
|
2329
2470
|
* Converted from nape-compiled.js lines 29044–29362, 80738–80766.
|
|
2330
2471
|
*/
|
|
2331
|
-
type Any$
|
|
2472
|
+
type Any$u = any;
|
|
2332
2473
|
declare class ZPP_Arbiter {
|
|
2333
2474
|
static __name__: string[];
|
|
2334
|
-
static _nape: Any$
|
|
2335
|
-
static _zpp: Any$
|
|
2475
|
+
static _nape: Any$u;
|
|
2476
|
+
static _zpp: Any$u;
|
|
2336
2477
|
static internal: boolean;
|
|
2337
2478
|
static COL: number;
|
|
2338
2479
|
static FLUID: number;
|
|
2339
2480
|
static SENSOR: number;
|
|
2340
|
-
static types: Any$
|
|
2341
|
-
outer: Any$
|
|
2481
|
+
static types: Any$u[];
|
|
2482
|
+
outer: Any$u;
|
|
2342
2483
|
hnext: ZPP_Arbiter | null;
|
|
2343
2484
|
id: number;
|
|
2344
2485
|
di: number;
|
|
@@ -2356,31 +2497,31 @@ declare class ZPP_Arbiter {
|
|
|
2356
2497
|
fresh: boolean;
|
|
2357
2498
|
immState: number;
|
|
2358
2499
|
invalidated: boolean;
|
|
2359
|
-
b1: Any$
|
|
2360
|
-
b2: Any$
|
|
2361
|
-
ws1: Any$
|
|
2362
|
-
ws2: Any$
|
|
2363
|
-
pair: Any$
|
|
2500
|
+
b1: Any$u;
|
|
2501
|
+
b2: Any$u;
|
|
2502
|
+
ws1: Any$u;
|
|
2503
|
+
ws2: Any$u;
|
|
2504
|
+
pair: Any$u;
|
|
2364
2505
|
type: number;
|
|
2365
|
-
colarb: Any$
|
|
2366
|
-
fluidarb: Any$
|
|
2367
|
-
sensorarb: Any$
|
|
2368
|
-
__class__: Any$
|
|
2506
|
+
colarb: Any$u;
|
|
2507
|
+
fluidarb: Any$u;
|
|
2508
|
+
sensorarb: Any$u;
|
|
2509
|
+
__class__: Any$u;
|
|
2369
2510
|
constructor();
|
|
2370
|
-
wrapper(): Any$
|
|
2511
|
+
wrapper(): Any$u;
|
|
2371
2512
|
inactiveme(): boolean;
|
|
2372
2513
|
acting(): boolean;
|
|
2373
2514
|
swap_features(): void;
|
|
2374
|
-
lazyRetire(s: Any$
|
|
2375
|
-
sup_assign(s1: Any$
|
|
2515
|
+
lazyRetire(s: Any$u, b: Any$u): void;
|
|
2516
|
+
sup_assign(s1: Any$u, s2: Any$u, id: number, di: number): void;
|
|
2376
2517
|
sup_retire(): void;
|
|
2377
2518
|
/** Remove this arbiter from a ZNPList_ZPP_Arbiter */
|
|
2378
|
-
static _removeFromArbiterList(list: Any$
|
|
2519
|
+
static _removeFromArbiterList(list: Any$u, arb: ZPP_Arbiter, zpp: Any$u): void;
|
|
2379
2520
|
/** Add this arbiter to a ZNPList_ZPP_Arbiter */
|
|
2380
|
-
static _addToArbiterList(list: Any$
|
|
2521
|
+
static _addToArbiterList(list: Any$u, arb: ZPP_Arbiter, zpp: Any$u): void;
|
|
2381
2522
|
}
|
|
2382
2523
|
|
|
2383
|
-
type Any$
|
|
2524
|
+
type Any$t = any;
|
|
2384
2525
|
/**
|
|
2385
2526
|
* Represents an interaction arbiter between two shapes.
|
|
2386
2527
|
*
|
|
@@ -2399,21 +2540,21 @@ declare class Arbiter {
|
|
|
2399
2540
|
/** Whether this arbiter is currently sleeping. */
|
|
2400
2541
|
get isSleeping(): boolean;
|
|
2401
2542
|
/** The type of this arbiter (COLLISION, SENSOR, or FLUID). */
|
|
2402
|
-
get type(): Any$
|
|
2543
|
+
get type(): Any$t;
|
|
2403
2544
|
/** Cast to CollisionArbiter if this is a collision, else null. */
|
|
2404
|
-
get collisionArbiter(): Any$
|
|
2545
|
+
get collisionArbiter(): Any$t;
|
|
2405
2546
|
/** Cast to FluidArbiter if this is a fluid interaction, else null. */
|
|
2406
|
-
get fluidArbiter(): Any$
|
|
2547
|
+
get fluidArbiter(): Any$t;
|
|
2407
2548
|
/** First shape (lower id). */
|
|
2408
|
-
get shape1(): Any$
|
|
2549
|
+
get shape1(): Any$t;
|
|
2409
2550
|
/** Second shape (higher id). */
|
|
2410
|
-
get shape2(): Any$
|
|
2551
|
+
get shape2(): Any$t;
|
|
2411
2552
|
/** Body of shape1. */
|
|
2412
|
-
get body1(): Any$
|
|
2553
|
+
get body1(): Any$t;
|
|
2413
2554
|
/** Body of shape2. */
|
|
2414
|
-
get body2(): Any$
|
|
2555
|
+
get body2(): Any$t;
|
|
2415
2556
|
/** The pre-handler state of this arbiter. */
|
|
2416
|
-
get state(): Any$
|
|
2557
|
+
get state(): Any$t;
|
|
2417
2558
|
/** Whether this is a collision arbiter. */
|
|
2418
2559
|
isCollisionArbiter(): boolean;
|
|
2419
2560
|
/** Whether this is a fluid arbiter. */
|
|
@@ -2424,15 +2565,15 @@ declare class Arbiter {
|
|
|
2424
2565
|
* Total impulse of this arbiter. Base implementation returns Vec3(0,0,0).
|
|
2425
2566
|
* Overridden by CollisionArbiter and FluidArbiter.
|
|
2426
2567
|
*/
|
|
2427
|
-
totalImpulse(body?: Any$
|
|
2568
|
+
totalImpulse(body?: Any$t, _freshOnly?: boolean): Vec3;
|
|
2428
2569
|
toString(): string;
|
|
2429
2570
|
/** @internal */
|
|
2430
2571
|
protected _activeCheck(): void;
|
|
2431
2572
|
/** @internal */
|
|
2432
|
-
protected _checkBody(body: Any$
|
|
2573
|
+
protected _checkBody(body: Any$t): void;
|
|
2433
2574
|
}
|
|
2434
2575
|
|
|
2435
|
-
type Any$
|
|
2576
|
+
type Any$s = any;
|
|
2436
2577
|
/**
|
|
2437
2578
|
* A collision arbiter between two shapes in contact.
|
|
2438
2579
|
*
|
|
@@ -2446,15 +2587,15 @@ declare class CollisionArbiter extends Arbiter {
|
|
|
2446
2587
|
static __super__: typeof Arbiter;
|
|
2447
2588
|
constructor();
|
|
2448
2589
|
/** Contact points for this collision. */
|
|
2449
|
-
get contacts(): Any$
|
|
2590
|
+
get contacts(): Any$s;
|
|
2450
2591
|
/** Collision normal vector. */
|
|
2451
|
-
get normal(): Any$
|
|
2592
|
+
get normal(): Any$s;
|
|
2452
2593
|
/** Sum of the radii of the two shapes at the collision point. */
|
|
2453
2594
|
get radius(): number;
|
|
2454
2595
|
/** Reference edge of shape1 (if polygon), or null. */
|
|
2455
|
-
get referenceEdge1(): Any$
|
|
2596
|
+
get referenceEdge1(): Any$s;
|
|
2456
2597
|
/** Reference edge of shape2 (if polygon), or null. */
|
|
2457
|
-
get referenceEdge2(): Any$
|
|
2598
|
+
get referenceEdge2(): Any$s;
|
|
2458
2599
|
/** Coefficient of restitution (elasticity). Mutable in pre-handler only. */
|
|
2459
2600
|
get elasticity(): number;
|
|
2460
2601
|
set elasticity(value: number);
|
|
@@ -2472,20 +2613,20 @@ declare class CollisionArbiter extends Arbiter {
|
|
|
2472
2613
|
/** Whether the second contact point lies on a polygon vertex (poly-circle only). */
|
|
2473
2614
|
secondVertex(): boolean;
|
|
2474
2615
|
/** Normal impulse accumulated across all contacts. */
|
|
2475
|
-
normalImpulse(body?: Any$
|
|
2616
|
+
normalImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
|
|
2476
2617
|
/** Tangent (friction) impulse accumulated across all contacts. */
|
|
2477
|
-
tangentImpulse(body?: Any$
|
|
2618
|
+
tangentImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
|
|
2478
2619
|
/** Total impulse (normal + tangent + rolling) accumulated across all contacts. */
|
|
2479
|
-
totalImpulse(body?: Any$
|
|
2620
|
+
totalImpulse(body?: Any$s, freshOnly?: boolean): Vec3;
|
|
2480
2621
|
/** Rolling impulse for this collision. */
|
|
2481
|
-
rollingImpulse(body?: Any$
|
|
2622
|
+
rollingImpulse(body?: Any$s, freshOnly?: boolean): number;
|
|
2482
2623
|
/** @internal Throw if not in pre-handler mutable window. */
|
|
2483
2624
|
private _mutableCheck;
|
|
2484
2625
|
/** @internal Accumulate impulse from contacts. */
|
|
2485
2626
|
private _accumulateImpulse;
|
|
2486
2627
|
}
|
|
2487
2628
|
|
|
2488
|
-
type Any$
|
|
2629
|
+
type Any$r = any;
|
|
2489
2630
|
/**
|
|
2490
2631
|
* A fluid arbiter between two shapes with fluid interaction.
|
|
2491
2632
|
*
|
|
@@ -2505,152 +2646,11 @@ declare class FluidArbiter extends Arbiter {
|
|
|
2505
2646
|
get overlap(): number;
|
|
2506
2647
|
set overlap(value: number);
|
|
2507
2648
|
/** Buoyancy impulse applied by this fluid arbiter. */
|
|
2508
|
-
buoyancyImpulse(body?: Any$
|
|
2649
|
+
buoyancyImpulse(body?: Any$r): Vec3;
|
|
2509
2650
|
/** Drag impulse applied by this fluid arbiter. */
|
|
2510
|
-
dragImpulse(body?: Any$
|
|
2651
|
+
dragImpulse(body?: Any$r): Vec3;
|
|
2511
2652
|
/** Total impulse (buoyancy + drag). */
|
|
2512
|
-
totalImpulse(body?: Any$
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
/**
|
|
2516
|
-
* ZPP_IContact — Internal impulse/mass-matrix data for a contact point.
|
|
2517
|
-
*
|
|
2518
|
-
* Stores relative positions (r1, r2), mass matrices (nMass, tMass),
|
|
2519
|
-
* accumulated impulses (jnAcc, jtAcc), and friction/bounce coefficients.
|
|
2520
|
-
* Also acts as a linked list node/container (Haxe ZNPList pattern).
|
|
2521
|
-
*
|
|
2522
|
-
* Converted from nape-compiled.js lines 32346–32733.
|
|
2523
|
-
*/
|
|
2524
|
-
type Any$s = any;
|
|
2525
|
-
declare class ZPP_IContact {
|
|
2526
|
-
static __name__: string[];
|
|
2527
|
-
length: number;
|
|
2528
|
-
pushmod: boolean;
|
|
2529
|
-
modified: boolean;
|
|
2530
|
-
_inuse: boolean;
|
|
2531
|
-
next: ZPP_IContact | null;
|
|
2532
|
-
r1x: number;
|
|
2533
|
-
r1y: number;
|
|
2534
|
-
r2x: number;
|
|
2535
|
-
r2y: number;
|
|
2536
|
-
nMass: number;
|
|
2537
|
-
tMass: number;
|
|
2538
|
-
bounce: number;
|
|
2539
|
-
friction: number;
|
|
2540
|
-
jnAcc: number;
|
|
2541
|
-
jtAcc: number;
|
|
2542
|
-
lr1x: number;
|
|
2543
|
-
lr1y: number;
|
|
2544
|
-
lr2x: number;
|
|
2545
|
-
lr2y: number;
|
|
2546
|
-
__class__: Any$s;
|
|
2547
|
-
elem(): this;
|
|
2548
|
-
begin(): ZPP_IContact | null;
|
|
2549
|
-
setbegin(i: ZPP_IContact | null): void;
|
|
2550
|
-
add(o: ZPP_IContact): ZPP_IContact;
|
|
2551
|
-
inlined_add(o: ZPP_IContact): ZPP_IContact;
|
|
2552
|
-
addAll(x: ZPP_IContact): void;
|
|
2553
|
-
insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
|
|
2554
|
-
inlined_insert(cur: ZPP_IContact | null, o: ZPP_IContact): ZPP_IContact;
|
|
2555
|
-
pop(): void;
|
|
2556
|
-
inlined_pop(): void;
|
|
2557
|
-
pop_unsafe(): ZPP_IContact;
|
|
2558
|
-
inlined_pop_unsafe(): ZPP_IContact;
|
|
2559
|
-
remove(obj: ZPP_IContact): void;
|
|
2560
|
-
try_remove(obj: ZPP_IContact): boolean;
|
|
2561
|
-
inlined_remove(obj: ZPP_IContact): void;
|
|
2562
|
-
inlined_try_remove(obj: ZPP_IContact): boolean;
|
|
2563
|
-
erase(pre: ZPP_IContact | null): ZPP_IContact | null;
|
|
2564
|
-
inlined_erase(pre: ZPP_IContact | null): ZPP_IContact | null;
|
|
2565
|
-
splice(pre: ZPP_IContact, n: number): ZPP_IContact | null;
|
|
2566
|
-
clear(): void;
|
|
2567
|
-
inlined_clear(): void;
|
|
2568
|
-
reverse(): void;
|
|
2569
|
-
empty(): boolean;
|
|
2570
|
-
size(): number;
|
|
2571
|
-
has(obj: ZPP_IContact): boolean;
|
|
2572
|
-
inlined_has(obj: ZPP_IContact): boolean;
|
|
2573
|
-
front(): ZPP_IContact | null;
|
|
2574
|
-
back(): ZPP_IContact | null;
|
|
2575
|
-
iterator_at(ind: number): ZPP_IContact | null;
|
|
2576
|
-
at(ind: number): ZPP_IContact | null;
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
/**
|
|
2580
|
-
* ZPP_Contact — Internal contact point representation for the nape physics engine.
|
|
2581
|
-
*
|
|
2582
|
-
* Stores contact point data (position, distance, hash, stamp, etc.) and
|
|
2583
|
-
* manages a lazy Vec2 position wrapper. Also acts as a linked list
|
|
2584
|
-
* node/container (Haxe ZNPList pattern). Each contact holds a reference to
|
|
2585
|
-
* a ZPP_IContact for impulse/mass data.
|
|
2586
|
-
*
|
|
2587
|
-
* Converted from nape-compiled.js lines 31853–32345, 81644–81645.
|
|
2588
|
-
*/
|
|
2589
|
-
|
|
2590
|
-
type Any$r = any;
|
|
2591
|
-
declare class ZPP_Contact {
|
|
2592
|
-
static __name__: string[];
|
|
2593
|
-
static _nape: Any$r;
|
|
2594
|
-
static _zpp: Any$r;
|
|
2595
|
-
static zpp_pool: ZPP_Contact | null;
|
|
2596
|
-
static internal: boolean;
|
|
2597
|
-
static _wrapFn: ((zpp: ZPP_Contact) => Any$r) | null;
|
|
2598
|
-
outer: Any$r;
|
|
2599
|
-
px: number;
|
|
2600
|
-
py: number;
|
|
2601
|
-
wrap_position: Any$r;
|
|
2602
|
-
arbiter: Any$r;
|
|
2603
|
-
inner: ZPP_IContact;
|
|
2604
|
-
active: boolean;
|
|
2605
|
-
posOnly: boolean;
|
|
2606
|
-
stamp: number;
|
|
2607
|
-
hash: number;
|
|
2608
|
-
fresh: boolean;
|
|
2609
|
-
dist: number;
|
|
2610
|
-
elasticity: number;
|
|
2611
|
-
length: number;
|
|
2612
|
-
pushmod: boolean;
|
|
2613
|
-
modified: boolean;
|
|
2614
|
-
_inuse: boolean;
|
|
2615
|
-
next: ZPP_Contact | null;
|
|
2616
|
-
__class__: Any$r;
|
|
2617
|
-
constructor();
|
|
2618
|
-
wrapper(): Any$r;
|
|
2619
|
-
position_validate(): void;
|
|
2620
|
-
getposition(): void;
|
|
2621
|
-
inactiveme(): boolean;
|
|
2622
|
-
free(): void;
|
|
2623
|
-
alloc(): void;
|
|
2624
|
-
elem(): this;
|
|
2625
|
-
begin(): ZPP_Contact | null;
|
|
2626
|
-
setbegin(i: ZPP_Contact | null): void;
|
|
2627
|
-
add(o: ZPP_Contact): ZPP_Contact;
|
|
2628
|
-
inlined_add(o: ZPP_Contact): ZPP_Contact;
|
|
2629
|
-
addAll(x: ZPP_Contact): void;
|
|
2630
|
-
insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
|
|
2631
|
-
inlined_insert(cur: ZPP_Contact | null, o: ZPP_Contact): ZPP_Contact;
|
|
2632
|
-
pop(): void;
|
|
2633
|
-
inlined_pop(): void;
|
|
2634
|
-
pop_unsafe(): ZPP_Contact;
|
|
2635
|
-
inlined_pop_unsafe(): ZPP_Contact;
|
|
2636
|
-
remove(obj: ZPP_Contact): void;
|
|
2637
|
-
try_remove(obj: ZPP_Contact): boolean;
|
|
2638
|
-
inlined_remove(obj: ZPP_Contact): void;
|
|
2639
|
-
inlined_try_remove(obj: ZPP_Contact): boolean;
|
|
2640
|
-
erase(pre: ZPP_Contact | null): ZPP_Contact | null;
|
|
2641
|
-
inlined_erase(pre: ZPP_Contact | null): ZPP_Contact | null;
|
|
2642
|
-
splice(pre: ZPP_Contact, n: number): ZPP_Contact | null;
|
|
2643
|
-
clear(): void;
|
|
2644
|
-
inlined_clear(): void;
|
|
2645
|
-
reverse(): void;
|
|
2646
|
-
empty(): boolean;
|
|
2647
|
-
size(): number;
|
|
2648
|
-
has(obj: ZPP_Contact): boolean;
|
|
2649
|
-
inlined_has(obj: ZPP_Contact): boolean;
|
|
2650
|
-
front(): ZPP_Contact | null;
|
|
2651
|
-
back(): ZPP_Contact | null;
|
|
2652
|
-
iterator_at(ind: number): ZPP_Contact | null;
|
|
2653
|
-
at(ind: number): ZPP_Contact | null;
|
|
2653
|
+
totalImpulse(body?: Any$r, _freshOnly?: boolean): Vec3;
|
|
2654
2654
|
}
|
|
2655
2655
|
|
|
2656
2656
|
type Any$q = any;
|