@newkrok/nape-js 3.8.2 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as Vec2, A as AABB, B as Body, S as Shape, M as Material, I as InteractionFilter, C as CollisionArbiter, a as Vec3, b as CbEvent, L as Listener, c as Interactor, d as InteractionType, e as Constraint, f as Arbiter, P as PreFlag, g as MatMN } from './ConvexResult-CYFNMlT2.cjs';
2
- export { h as ArbiterList, i as ArbiterType, j as BodyList, k as BodyType, l as Broadphase, m as CbTypeSet, n as Compound, o as CompoundList, p as ConstraintList, q as ConvexResult, r as ConvexResultList, D as DebugDraw, s as DebugVec2, E as Edge, F as FluidArbiter, t as FluidProperties, G as GravMassMode, u as InertiaMode, v as InteractionGroup, w as ListenerList, x as ListenerType, y as MassMode, z as Mat23, N as NapeList, H as Polygon, R as Ray, J as RayResult, K as RayResultList, O as ShapeList, Q as ShapeType, T as Space, U as TypedListLike } from './ConvexResult-CYFNMlT2.cjs';
1
+ import { V as Vec2, A as AABB, B as Body, S as Shape, M as Material, I as InteractionFilter, C as CollisionArbiter, a as Vec3, b as CbEvent, L as Listener, c as Interactor, d as InteractionType, e as Constraint, f as Arbiter, P as PreFlag, g as MatMN } from './ConvexResult-Hai2aEI-.cjs';
2
+ export { h as ArbiterList, i as ArbiterType, j as BodyList, k as BodyType, l as Broadphase, m as CbTypeSet, n as Compound, o as CompoundList, p as ConstraintList, q as ConvexResult, r as ConvexResultList, D as DebugDraw, s as DebugVec2, E as Edge, F as FluidArbiter, t as FluidProperties, G as GravMassMode, u as InertiaMode, v as InteractionGroup, w as ListenerList, x as ListenerType, y as MassMode, z as Mat23, N as NapeList, H as Polygon, R as Ray, J as RayResult, K as RayResultList, O as ShapeList, Q as ShapeType, T as Space, U as TypedListLike } from './ConvexResult-Hai2aEI-.cjs';
3
3
 
4
4
  /**
5
5
  * ZNPList<T> — Generic singly-linked list backed by ZNPNode<T>.
@@ -35,7 +35,6 @@ declare module "./ZNPList" {
35
35
  * Converted from nape-compiled.js lines 19050–19116.
36
36
  */
37
37
  declare class Winding {
38
- static __name__: string[];
39
38
  constructor();
40
39
  static get UNDEFINED(): Winding;
41
40
  static get CLOCKWISE(): Winding;
@@ -53,7 +52,6 @@ declare class Winding {
53
52
  * Converted from nape-compiled.js lines 16271–19420.
54
53
  */
55
54
  declare class GeomPoly {
56
- static __name__: string[];
57
55
  constructor(vertices?: any);
58
56
  private _checkDisposed;
59
57
  static get(vertices?: any): GeomPoly;
@@ -105,7 +103,6 @@ declare class GeomPoly {
105
103
  * Converted from nape-compiled.js lines 16879–17258.
106
104
  */
107
105
  declare class MarchingSquares {
108
- static __name__: string[];
109
106
  /**
110
107
  * Run the marching squares algorithm to extract polygons from an iso function.
111
108
  *
@@ -128,7 +125,6 @@ declare class MarchingSquares {
128
125
  * Fully modernized — calls ZPP_Geom, ZPP_SweepDistance, and ZPP_Collide directly.
129
126
  */
130
127
  declare class Geom {
131
- static __name__: string[];
132
128
  /**
133
129
  * Calculate minimum distance between two bodies and return closest points.
134
130
  */
@@ -155,8 +151,6 @@ declare class Geom {
155
151
  * A circular physics shape. The simplest and most performant collision shape.
156
152
  */
157
153
  declare class Circle extends Shape {
158
- static __name__: string[];
159
- static __super__: any;
160
154
  /**
161
155
  * Create a circle with the given radius and optional local centre-of-mass offset.
162
156
  * @param radius - Circle radius (must be > 0).
@@ -181,7 +175,6 @@ declare class Circle extends Shape {
181
175
  * Converted from nape-compiled.js lines 30760–30856.
182
176
  */
183
177
  declare class ValidationResult {
184
- static __name__: string[];
185
178
  constructor();
186
179
  static get VALID(): ValidationResult;
187
180
  static get DEGENERATE(): ValidationResult;
@@ -199,7 +192,6 @@ declare class ValidationResult {
199
192
  * Fully modernized — wraps extracted ZPP_Contact directly.
200
193
  */
201
194
  declare class Contact {
202
- static __name__: string[];
203
195
  constructor();
204
196
  /** The collision arbiter this contact belongs to, or null. */
205
197
  get arbiter(): CollisionArbiter | null;
@@ -255,7 +247,6 @@ declare class Contact {
255
247
  * Converted from nape-compiled.js lines 2647–2698.
256
248
  */
257
249
  declare class OptionType {
258
- static __name__: string[];
259
250
  /**
260
251
  * Creates an `OptionType` optionally seeded with initial include/exclude entries.
261
252
  *
@@ -308,7 +299,6 @@ declare class OptionType {
308
299
  * Converted from nape-compiled.js lines 689–770.
309
300
  */
310
301
  declare class CbType {
311
- static __name__: string[];
312
302
  constructor();
313
303
  /**
314
304
  * Built-in type automatically assigned to every {@link Body}.
@@ -386,7 +376,6 @@ declare class CbType {
386
376
  * Converted from nape-compiled.js lines 212–238.
387
377
  */
388
378
  declare class Callback {
389
- static __name__: string[];
390
379
  constructor();
391
380
  /** The event type that caused this callback to fire (e.g., `CbEvent.BEGIN`). */
392
381
  get event(): CbEvent;
@@ -404,7 +393,6 @@ declare class Callback {
404
393
  * Converted from nape-compiled.js lines 239–261.
405
394
  */
406
395
  declare class BodyCallback extends Callback {
407
- static __name__: string[];
408
396
  /** The body that woke or fell asleep. */
409
397
  get body(): Body;
410
398
  toString(): string;
@@ -436,7 +424,6 @@ declare class BodyCallback extends Callback {
436
424
  * Fully modernized from nape-compiled.js lines 434–515.
437
425
  */
438
426
  declare class BodyListener extends Listener {
439
- static __name__: string[];
440
427
  /**
441
428
  * @param event - Must be `CbEvent.WAKE` or `CbEvent.SLEEP`.
442
429
  * @param options - `CbType` or `OptionType` filter, or `null` to match all bodies.
@@ -464,7 +451,6 @@ declare class BodyListener extends Listener {
464
451
  * Converted from nape-compiled.js lines 1398–1445.
465
452
  */
466
453
  declare class InteractionCallback extends Callback {
467
- static __name__: string[];
468
454
  /** The first interactor involved in the interaction. */
469
455
  get int1(): Interactor;
470
456
  /** The second interactor involved in the interaction. */
@@ -513,7 +499,6 @@ declare class InteractionCallback extends Callback {
513
499
  * Fully modernized from nape-compiled.js lines 659–1091.
514
500
  */
515
501
  declare class InteractionListener extends Listener {
516
- static __name__: string[];
517
502
  /**
518
503
  * @param event - Must be `CbEvent.BEGIN`, `CbEvent.ONGOING`, or `CbEvent.END`.
519
504
  * @param interactionType - The kind of interaction to listen for (COLLISION, SENSOR, FLUID, or ANY).
@@ -552,7 +537,6 @@ declare class InteractionListener extends Listener {
552
537
  * Converted from nape-compiled.js lines 1262–1292.
553
538
  */
554
539
  declare class ConstraintCallback extends Callback {
555
- static __name__: string[];
556
540
  /** The constraint that woke, fell asleep, or broke. */
557
541
  get constraint(): Constraint;
558
542
  toString(): string;
@@ -587,7 +571,6 @@ declare class ConstraintCallback extends Callback {
587
571
  * Fully modernized from nape-compiled.js lines 546–649.
588
572
  */
589
573
  declare class ConstraintListener extends Listener {
590
- static __name__: string[];
591
574
  /**
592
575
  * @param event - Must be `CbEvent.WAKE`, `CbEvent.SLEEP`, or `CbEvent.BREAK`.
593
576
  * @param options - `CbType` or `OptionType` filter, or `null` to match all constraints.
@@ -618,7 +601,6 @@ declare class ConstraintListener extends Listener {
618
601
  * Converted from nape-compiled.js lines 2590–2634.
619
602
  */
620
603
  declare class PreCallback extends Callback {
621
- static __name__: string[];
622
604
  /** The arbiter representing the potential interaction. Use to inspect collision normal, etc. */
623
605
  get arbiter(): Arbiter;
624
606
  /** The first interactor in the pair (matches `options1` unless `swapped` is `true`). */
@@ -675,7 +657,6 @@ declare class PreCallback extends Callback {
675
657
  * Fully modernized from nape-compiled.js lines 1142–1338.
676
658
  */
677
659
  declare class PreListener extends Listener {
678
- static __name__: string[];
679
660
  /**
680
661
  * @param interactionType - The kind of interaction to intercept (COLLISION, SENSOR, FLUID, or ANY).
681
662
  * @param options1 - Filter for the first interactor, or `null` to match any.
@@ -1152,7 +1133,6 @@ declare class PulleyJoint extends Constraint {
1152
1133
  * Converted from nape-compiled.js lines 21424–21827.
1153
1134
  */
1154
1135
  declare class ZPP_Constraint {
1155
- static __name__: string[];
1156
1136
  /**
1157
1137
  * Namespace references, set by the compiled module after import.
1158
1138
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
@@ -1181,7 +1161,6 @@ declare class ZPP_Constraint {
1181
1161
  cbSet: any;
1182
1162
  wrap_cbTypes: any;
1183
1163
  pre_dt: number;
1184
- __class__: any;
1185
1164
  constructor();
1186
1165
  /**
1187
1166
  * Initialise base constraint fields.
@@ -1231,7 +1210,6 @@ declare class ZPP_Constraint {
1231
1210
  * Converted from nape-compiled.js lines 28038–28054.
1232
1211
  */
1233
1212
  declare class ZPP_UserBody {
1234
- static __name__: string[];
1235
1213
  cnt: number;
1236
1214
  body: any;
1237
1215
  constructor(cnt: number, body: any);
@@ -1250,8 +1228,6 @@ declare class ZPP_UserBody {
1250
1228
  */
1251
1229
 
1252
1230
  declare class ZPP_UserConstraint extends ZPP_Constraint {
1253
- static __name__: string[];
1254
- static __super__: typeof ZPP_Constraint;
1255
1231
  outer_zn: any;
1256
1232
  bodies: ZPP_UserBody[];
1257
1233
  dim: number;
@@ -1268,7 +1244,6 @@ declare class ZPP_UserConstraint extends ZPP_Constraint {
1268
1244
  vec3: any;
1269
1245
  J: number[];
1270
1246
  jOld: number[];
1271
- __class__: any;
1272
1247
  constructor(dim: number, velonly: boolean);
1273
1248
  bindVec2_invalidate(_: any): void;
1274
1249
  addBody(b: any): void;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as Vec2, A as AABB, B as Body, S as Shape, M as Material, I as InteractionFilter, C as CollisionArbiter, a as Vec3, b as CbEvent, L as Listener, c as Interactor, d as InteractionType, e as Constraint, f as Arbiter, P as PreFlag, g as MatMN } from './ConvexResult-CYFNMlT2.js';
2
- export { h as ArbiterList, i as ArbiterType, j as BodyList, k as BodyType, l as Broadphase, m as CbTypeSet, n as Compound, o as CompoundList, p as ConstraintList, q as ConvexResult, r as ConvexResultList, D as DebugDraw, s as DebugVec2, E as Edge, F as FluidArbiter, t as FluidProperties, G as GravMassMode, u as InertiaMode, v as InteractionGroup, w as ListenerList, x as ListenerType, y as MassMode, z as Mat23, N as NapeList, H as Polygon, R as Ray, J as RayResult, K as RayResultList, O as ShapeList, Q as ShapeType, T as Space, U as TypedListLike } from './ConvexResult-CYFNMlT2.js';
1
+ import { V as Vec2, A as AABB, B as Body, S as Shape, M as Material, I as InteractionFilter, C as CollisionArbiter, a as Vec3, b as CbEvent, L as Listener, c as Interactor, d as InteractionType, e as Constraint, f as Arbiter, P as PreFlag, g as MatMN } from './ConvexResult-Hai2aEI-.js';
2
+ export { h as ArbiterList, i as ArbiterType, j as BodyList, k as BodyType, l as Broadphase, m as CbTypeSet, n as Compound, o as CompoundList, p as ConstraintList, q as ConvexResult, r as ConvexResultList, D as DebugDraw, s as DebugVec2, E as Edge, F as FluidArbiter, t as FluidProperties, G as GravMassMode, u as InertiaMode, v as InteractionGroup, w as ListenerList, x as ListenerType, y as MassMode, z as Mat23, N as NapeList, H as Polygon, R as Ray, J as RayResult, K as RayResultList, O as ShapeList, Q as ShapeType, T as Space, U as TypedListLike } from './ConvexResult-Hai2aEI-.js';
3
3
 
4
4
  /**
5
5
  * ZNPList<T> — Generic singly-linked list backed by ZNPNode<T>.
@@ -35,7 +35,6 @@ declare module "./ZNPList" {
35
35
  * Converted from nape-compiled.js lines 19050–19116.
36
36
  */
37
37
  declare class Winding {
38
- static __name__: string[];
39
38
  constructor();
40
39
  static get UNDEFINED(): Winding;
41
40
  static get CLOCKWISE(): Winding;
@@ -53,7 +52,6 @@ declare class Winding {
53
52
  * Converted from nape-compiled.js lines 16271–19420.
54
53
  */
55
54
  declare class GeomPoly {
56
- static __name__: string[];
57
55
  constructor(vertices?: any);
58
56
  private _checkDisposed;
59
57
  static get(vertices?: any): GeomPoly;
@@ -105,7 +103,6 @@ declare class GeomPoly {
105
103
  * Converted from nape-compiled.js lines 16879–17258.
106
104
  */
107
105
  declare class MarchingSquares {
108
- static __name__: string[];
109
106
  /**
110
107
  * Run the marching squares algorithm to extract polygons from an iso function.
111
108
  *
@@ -128,7 +125,6 @@ declare class MarchingSquares {
128
125
  * Fully modernized — calls ZPP_Geom, ZPP_SweepDistance, and ZPP_Collide directly.
129
126
  */
130
127
  declare class Geom {
131
- static __name__: string[];
132
128
  /**
133
129
  * Calculate minimum distance between two bodies and return closest points.
134
130
  */
@@ -155,8 +151,6 @@ declare class Geom {
155
151
  * A circular physics shape. The simplest and most performant collision shape.
156
152
  */
157
153
  declare class Circle extends Shape {
158
- static __name__: string[];
159
- static __super__: any;
160
154
  /**
161
155
  * Create a circle with the given radius and optional local centre-of-mass offset.
162
156
  * @param radius - Circle radius (must be > 0).
@@ -181,7 +175,6 @@ declare class Circle extends Shape {
181
175
  * Converted from nape-compiled.js lines 30760–30856.
182
176
  */
183
177
  declare class ValidationResult {
184
- static __name__: string[];
185
178
  constructor();
186
179
  static get VALID(): ValidationResult;
187
180
  static get DEGENERATE(): ValidationResult;
@@ -199,7 +192,6 @@ declare class ValidationResult {
199
192
  * Fully modernized — wraps extracted ZPP_Contact directly.
200
193
  */
201
194
  declare class Contact {
202
- static __name__: string[];
203
195
  constructor();
204
196
  /** The collision arbiter this contact belongs to, or null. */
205
197
  get arbiter(): CollisionArbiter | null;
@@ -255,7 +247,6 @@ declare class Contact {
255
247
  * Converted from nape-compiled.js lines 2647–2698.
256
248
  */
257
249
  declare class OptionType {
258
- static __name__: string[];
259
250
  /**
260
251
  * Creates an `OptionType` optionally seeded with initial include/exclude entries.
261
252
  *
@@ -308,7 +299,6 @@ declare class OptionType {
308
299
  * Converted from nape-compiled.js lines 689–770.
309
300
  */
310
301
  declare class CbType {
311
- static __name__: string[];
312
302
  constructor();
313
303
  /**
314
304
  * Built-in type automatically assigned to every {@link Body}.
@@ -386,7 +376,6 @@ declare class CbType {
386
376
  * Converted from nape-compiled.js lines 212–238.
387
377
  */
388
378
  declare class Callback {
389
- static __name__: string[];
390
379
  constructor();
391
380
  /** The event type that caused this callback to fire (e.g., `CbEvent.BEGIN`). */
392
381
  get event(): CbEvent;
@@ -404,7 +393,6 @@ declare class Callback {
404
393
  * Converted from nape-compiled.js lines 239–261.
405
394
  */
406
395
  declare class BodyCallback extends Callback {
407
- static __name__: string[];
408
396
  /** The body that woke or fell asleep. */
409
397
  get body(): Body;
410
398
  toString(): string;
@@ -436,7 +424,6 @@ declare class BodyCallback extends Callback {
436
424
  * Fully modernized from nape-compiled.js lines 434–515.
437
425
  */
438
426
  declare class BodyListener extends Listener {
439
- static __name__: string[];
440
427
  /**
441
428
  * @param event - Must be `CbEvent.WAKE` or `CbEvent.SLEEP`.
442
429
  * @param options - `CbType` or `OptionType` filter, or `null` to match all bodies.
@@ -464,7 +451,6 @@ declare class BodyListener extends Listener {
464
451
  * Converted from nape-compiled.js lines 1398–1445.
465
452
  */
466
453
  declare class InteractionCallback extends Callback {
467
- static __name__: string[];
468
454
  /** The first interactor involved in the interaction. */
469
455
  get int1(): Interactor;
470
456
  /** The second interactor involved in the interaction. */
@@ -513,7 +499,6 @@ declare class InteractionCallback extends Callback {
513
499
  * Fully modernized from nape-compiled.js lines 659–1091.
514
500
  */
515
501
  declare class InteractionListener extends Listener {
516
- static __name__: string[];
517
502
  /**
518
503
  * @param event - Must be `CbEvent.BEGIN`, `CbEvent.ONGOING`, or `CbEvent.END`.
519
504
  * @param interactionType - The kind of interaction to listen for (COLLISION, SENSOR, FLUID, or ANY).
@@ -552,7 +537,6 @@ declare class InteractionListener extends Listener {
552
537
  * Converted from nape-compiled.js lines 1262–1292.
553
538
  */
554
539
  declare class ConstraintCallback extends Callback {
555
- static __name__: string[];
556
540
  /** The constraint that woke, fell asleep, or broke. */
557
541
  get constraint(): Constraint;
558
542
  toString(): string;
@@ -587,7 +571,6 @@ declare class ConstraintCallback extends Callback {
587
571
  * Fully modernized from nape-compiled.js lines 546–649.
588
572
  */
589
573
  declare class ConstraintListener extends Listener {
590
- static __name__: string[];
591
574
  /**
592
575
  * @param event - Must be `CbEvent.WAKE`, `CbEvent.SLEEP`, or `CbEvent.BREAK`.
593
576
  * @param options - `CbType` or `OptionType` filter, or `null` to match all constraints.
@@ -618,7 +601,6 @@ declare class ConstraintListener extends Listener {
618
601
  * Converted from nape-compiled.js lines 2590–2634.
619
602
  */
620
603
  declare class PreCallback extends Callback {
621
- static __name__: string[];
622
604
  /** The arbiter representing the potential interaction. Use to inspect collision normal, etc. */
623
605
  get arbiter(): Arbiter;
624
606
  /** The first interactor in the pair (matches `options1` unless `swapped` is `true`). */
@@ -675,7 +657,6 @@ declare class PreCallback extends Callback {
675
657
  * Fully modernized from nape-compiled.js lines 1142–1338.
676
658
  */
677
659
  declare class PreListener extends Listener {
678
- static __name__: string[];
679
660
  /**
680
661
  * @param interactionType - The kind of interaction to intercept (COLLISION, SENSOR, FLUID, or ANY).
681
662
  * @param options1 - Filter for the first interactor, or `null` to match any.
@@ -1152,7 +1133,6 @@ declare class PulleyJoint extends Constraint {
1152
1133
  * Converted from nape-compiled.js lines 21424–21827.
1153
1134
  */
1154
1135
  declare class ZPP_Constraint {
1155
- static __name__: string[];
1156
1136
  /**
1157
1137
  * Namespace references, set by the compiled module after import.
1158
1138
  * _nape = the `nape` public namespace (for CbTypeIterator in copyto)
@@ -1181,7 +1161,6 @@ declare class ZPP_Constraint {
1181
1161
  cbSet: any;
1182
1162
  wrap_cbTypes: any;
1183
1163
  pre_dt: number;
1184
- __class__: any;
1185
1164
  constructor();
1186
1165
  /**
1187
1166
  * Initialise base constraint fields.
@@ -1231,7 +1210,6 @@ declare class ZPP_Constraint {
1231
1210
  * Converted from nape-compiled.js lines 28038–28054.
1232
1211
  */
1233
1212
  declare class ZPP_UserBody {
1234
- static __name__: string[];
1235
1213
  cnt: number;
1236
1214
  body: any;
1237
1215
  constructor(cnt: number, body: any);
@@ -1250,8 +1228,6 @@ declare class ZPP_UserBody {
1250
1228
  */
1251
1229
 
1252
1230
  declare class ZPP_UserConstraint extends ZPP_Constraint {
1253
- static __name__: string[];
1254
- static __super__: typeof ZPP_Constraint;
1255
1231
  outer_zn: any;
1256
1232
  bodies: ZPP_UserBody[];
1257
1233
  dim: number;
@@ -1268,7 +1244,6 @@ declare class ZPP_UserConstraint extends ZPP_Constraint {
1268
1244
  vec3: any;
1269
1245
  J: number[];
1270
1246
  jOld: number[];
1271
- __class__: any;
1272
1247
  constructor(dim: number, velonly: boolean);
1273
1248
  bindVec2_invalidate(_: any): void;
1274
1249
  addBody(b: any): void;