@perplexdotgg/bounce 1.6.0 → 1.7.0
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/build/bounce.d.ts +15 -41
- package/build/bounce.js +1449 -1465
- package/package.json +1 -1
package/build/bounce.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ export declare class Aabb extends Aabb_base {
|
|
|
35
35
|
computeLargestComponent(): "x" | "y" | "z";
|
|
36
36
|
computeCentroid(out: Vec3): Vec3;
|
|
37
37
|
computeHalfExtents(out: Vec3): void;
|
|
38
|
+
/**
|
|
39
|
+
* expand this aabb to include the given point
|
|
40
|
+
* @param point the vec3 to expand to. meaning if the point is outside the aabb, it will expand to include the point
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
38
43
|
expandToPoint(point: Vec3): this;
|
|
39
44
|
enclosesAabb(aabb: Aabb): boolean;
|
|
40
45
|
expandByVector(vector: Vec3): void;
|
|
@@ -81,8 +86,6 @@ export declare const enum ActiveEdgeMode {
|
|
|
81
86
|
CollideWithAll = 1
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
declare function addFlag(flag: number, value: number): number;
|
|
85
|
-
|
|
86
89
|
export declare const AllFlag: number;
|
|
87
90
|
|
|
88
91
|
declare class AngleComponent extends AngleComponent_base {
|
|
@@ -273,7 +276,7 @@ declare class Body_2 extends Body_base {
|
|
|
273
276
|
world: World | null;
|
|
274
277
|
get shape(): Shape | null;
|
|
275
278
|
set shape(newShape: Shape);
|
|
276
|
-
setShape(newShape: Shape, updateBroadphase?: boolean): void;
|
|
279
|
+
setShape(newShape: Shape | null, updateBroadphase?: boolean): void;
|
|
277
280
|
/**
|
|
278
281
|
* integrates the linear velocity of a body
|
|
279
282
|
*/
|
|
@@ -741,6 +744,7 @@ declare class BvhModule {
|
|
|
741
744
|
constructor(world: World, options?: Partial<BvhModuleOptions>);
|
|
742
745
|
toArray(array: NumberArray, startOffset: number): number;
|
|
743
746
|
fromArray(array: NumberArray, startOffset: number): number;
|
|
747
|
+
markStaticBodyAsDirty(body: WithPool<Body_2>): void;
|
|
744
748
|
markDynamicBodyAsDirty(body: WithPool<Body_2>): void;
|
|
745
749
|
updateDirtyBodies(): void;
|
|
746
750
|
addDynamicBody(body: WithPool<Body_2>): void;
|
|
@@ -1131,22 +1135,6 @@ export declare class CollisionCollector {
|
|
|
1131
1135
|
addMiss(): void;
|
|
1132
1136
|
}
|
|
1133
1137
|
|
|
1134
|
-
export declare namespace CollisionFilter {
|
|
1135
|
-
export {
|
|
1136
|
-
createBitFlags,
|
|
1137
|
-
shouldPairCollide,
|
|
1138
|
-
shouldCollide,
|
|
1139
|
-
addFlag,
|
|
1140
|
-
removeFlag,
|
|
1141
|
-
toggleFlag,
|
|
1142
|
-
hasFlag,
|
|
1143
|
-
doesNotHaveFlag,
|
|
1144
|
-
setFlags,
|
|
1145
|
-
NoneFlag,
|
|
1146
|
-
AllFlag
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
1138
|
export declare class CollisionResult extends CollisionResult_base {
|
|
1151
1139
|
/**
|
|
1152
1140
|
* swaps the A and B data
|
|
@@ -1780,11 +1768,11 @@ declare interface Copyable<T> {
|
|
|
1780
1768
|
copy(value: T): void;
|
|
1781
1769
|
}
|
|
1782
1770
|
|
|
1783
|
-
declare function createBitFlags<T extends readonly string[]>(keys: T): {
|
|
1771
|
+
export declare function createBitFlags<T extends readonly string[]>(keys: T): {
|
|
1784
1772
|
[K in T[number] | "None" | "All"]: number;
|
|
1785
1773
|
};
|
|
1786
1774
|
|
|
1787
|
-
declare class Cylinder extends Cylinder_base implements ConvexShapeInterface {
|
|
1775
|
+
export declare class Cylinder extends Cylinder_base implements ConvexShapeInterface {
|
|
1788
1776
|
type: ShapeType.cylinder;
|
|
1789
1777
|
world: World | null;
|
|
1790
1778
|
intersectsAabb(aabb: Aabb): boolean;
|
|
@@ -2028,9 +2016,7 @@ referenceFrame: PropertyDefinition_2<ReferenceFrame, true>;
|
|
|
2028
2016
|
isEnabled: PropertyDefinitionBoolean<true>;
|
|
2029
2017
|
}>> | undefined>;
|
|
2030
2018
|
|
|
2031
|
-
declare
|
|
2032
|
-
|
|
2033
|
-
declare type DynamicShape = Exclude<Shape, HeightMap>;
|
|
2019
|
+
export declare type DynamicShape = Exclude<Shape, HeightMap>;
|
|
2034
2020
|
|
|
2035
2021
|
declare class Edge extends Edge_base {
|
|
2036
2022
|
}
|
|
@@ -2365,9 +2351,7 @@ declare interface GjkModuleSettings {
|
|
|
2365
2351
|
tolerance: number;
|
|
2366
2352
|
}
|
|
2367
2353
|
|
|
2368
|
-
declare
|
|
2369
|
-
|
|
2370
|
-
declare class HeightMap extends HeightMap_base implements ShapeCollectionInterface {
|
|
2354
|
+
export declare class HeightMap extends HeightMap_base implements ShapeCollectionInterface {
|
|
2371
2355
|
type: ShapeType.heightMap;
|
|
2372
2356
|
world: World | null;
|
|
2373
2357
|
heights: number[];
|
|
@@ -2813,7 +2797,7 @@ matrix: typeof Mat4;
|
|
|
2813
2797
|
matrix: typeof Mat4;
|
|
2814
2798
|
}>> | undefined>;
|
|
2815
2799
|
|
|
2816
|
-
declare type KinematicShape = Exclude<Shape, HeightMap>;
|
|
2800
|
+
export declare type KinematicShape = Exclude<Shape, HeightMap>;
|
|
2817
2801
|
|
|
2818
2802
|
export declare class Line extends Line_base {
|
|
2819
2803
|
setFromPointAndDirection(point: Vec3, direction: Vec3, length: number): void;
|
|
@@ -3349,7 +3333,7 @@ export declare class PolygonConvexSupport implements SupportShape {
|
|
|
3349
3333
|
export declare class Quat extends Quat_base {
|
|
3350
3334
|
constructor(data?: QuatInput, index?: number, pool?: PoolClass<Quat>);
|
|
3351
3335
|
reset(data?: QuatInput): this;
|
|
3352
|
-
set(data
|
|
3336
|
+
set(data?: QuatInput): this;
|
|
3353
3337
|
length(): number;
|
|
3354
3338
|
normalize(): this;
|
|
3355
3339
|
identity(): this;
|
|
@@ -3426,8 +3410,6 @@ export declare const enum ReferenceFrame {
|
|
|
3426
3410
|
world = 1
|
|
3427
3411
|
}
|
|
3428
3412
|
|
|
3429
|
-
declare function removeFlag(flag: number, value: number): number;
|
|
3430
|
-
|
|
3431
3413
|
declare class RotationEulerComponent extends RotationEulerComponent_base {
|
|
3432
3414
|
world: World;
|
|
3433
3415
|
deactivate(): void;
|
|
@@ -3547,8 +3529,6 @@ pointA: typeof Vec3;
|
|
|
3547
3529
|
pointB: typeof Vec3;
|
|
3548
3530
|
}>> | undefined>;
|
|
3549
3531
|
|
|
3550
|
-
declare function setFlags(...values: number[]): number;
|
|
3551
|
-
|
|
3552
3532
|
export declare type Shape = ConvexShape | ShapeCollection;
|
|
3553
3533
|
|
|
3554
3534
|
declare interface ShapeCastSettings {
|
|
@@ -3588,10 +3568,6 @@ export declare const enum ShapeType {
|
|
|
3588
3568
|
triangleMesh = 7
|
|
3589
3569
|
}
|
|
3590
3570
|
|
|
3591
|
-
declare function shouldCollide(maskA: number, groupB: number): boolean;
|
|
3592
|
-
|
|
3593
|
-
declare function shouldPairCollide(groupA: number, maskA: number, groupB: number, maskB: number): boolean;
|
|
3594
|
-
|
|
3595
3571
|
declare class SleepModule {
|
|
3596
3572
|
options: SleepOptions;
|
|
3597
3573
|
contactPairs: BodyPairsModule;
|
|
@@ -3785,7 +3761,7 @@ declare class StaticArray<T extends Copyable<any>> {
|
|
|
3785
3761
|
[Symbol.iterator](): Iterator<T>;
|
|
3786
3762
|
}
|
|
3787
3763
|
|
|
3788
|
-
declare type StaticShape = Shape;
|
|
3764
|
+
export declare type StaticShape = Shape;
|
|
3789
3765
|
|
|
3790
3766
|
export declare const enum SupportMode {
|
|
3791
3767
|
ExcludeConvexRadius = 0,
|
|
@@ -3810,8 +3786,6 @@ declare interface SupportShapeWithConvexRadius extends SupportShape {
|
|
|
3810
3786
|
getConvexRadius(): number;
|
|
3811
3787
|
}
|
|
3812
3788
|
|
|
3813
|
-
declare function toggleFlag(flag: number, value: number): number;
|
|
3814
|
-
|
|
3815
3789
|
export declare class TransformedShape extends TransformedShape_base {
|
|
3816
3790
|
get shape(): Shape | null;
|
|
3817
3791
|
set shape(value: Shape);
|
|
@@ -4171,7 +4145,7 @@ declare type Tuple4<T> = [T, T, T, T];
|
|
|
4171
4145
|
|
|
4172
4146
|
export declare class Vec3 extends Vec3_base {
|
|
4173
4147
|
constructor(data?: Vec3Input, index?: number, pool?: PoolClass<Vec3>);
|
|
4174
|
-
reset(data
|
|
4148
|
+
reset(data?: Vec3Input): this;
|
|
4175
4149
|
set(data: Vec3Input): this;
|
|
4176
4150
|
toObject(): {
|
|
4177
4151
|
x: number;
|