first app vibe
This commit is contained in:
201
app/node_modules/@dimforge/rapier3d-compat/LICENSE
generated
vendored
Normal file
201
app/node_modules/@dimforge/rapier3d-compat/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2020 Dimforge EURL
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
33
app/node_modules/@dimforge/rapier3d-compat/README.md
generated
vendored
Normal file
33
app/node_modules/@dimforge/rapier3d-compat/README.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<p align="center">
|
||||
<img src="https://www.rapier.rs/img/rapier_logo_color_textpath_dark.svg" alt="crates.io">
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/vt9DJSW">
|
||||
<img src="https://img.shields.io/discord/507548572338880513.svg?logo=discord&colorB=7289DA">
|
||||
</a>
|
||||
<a href="https://github.com/dimforge/rapier.js/actions">
|
||||
<img src="https://github.com/dimforge/rapier.js/workflows/build/badge.svg" alt="Build status">
|
||||
</a>
|
||||
<a href="https://crates.io/crates/rapier3d">
|
||||
<img src="https://meritbadge.herokuapp.com/rapier3d?style=flat-square" alt="crates.io">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/@dimforge/rapier3d">
|
||||
<img src="https://badge.fury.io/js/%40dimforge%2Frapier3d.svg" alt="npm version">
|
||||
</a>
|
||||
<a href="https://opensource.org/licenses/Apache-2.0">
|
||||
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg">
|
||||
</a>
|
||||
</p>
|
||||
<p align = "center">
|
||||
<strong>
|
||||
<a href="https://rapier.rs">Website</a> | <a href="https://rapier.rs/docs/">Documentation</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<p align = "center">
|
||||
<b>3D physics engine</b>
|
||||
<i>for the JavaScript programming language (official bindings).</i>
|
||||
</p>
|
||||
|
||||
---
|
||||
15
app/node_modules/@dimforge/rapier3d-compat/coarena.d.ts
generated
vendored
Normal file
15
app/node_modules/@dimforge/rapier3d-compat/coarena.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export declare class Coarena<T> {
|
||||
fconv: Float64Array;
|
||||
uconv: Uint32Array;
|
||||
data: Array<T>;
|
||||
size: number;
|
||||
constructor();
|
||||
set(handle: number, data: T): void;
|
||||
len(): number;
|
||||
delete(handle: number): void;
|
||||
clear(): void;
|
||||
get(handle: number): T | null;
|
||||
forEach(f: (elt: T) => void): void;
|
||||
getAll(): Array<T>;
|
||||
private index;
|
||||
}
|
||||
188
app/node_modules/@dimforge/rapier3d-compat/control/character_controller.d.ts
generated
vendored
Normal file
188
app/node_modules/@dimforge/rapier3d-compat/control/character_controller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
import { Vector } from "../math";
|
||||
import { Collider, ColliderSet, InteractionGroups } from "../geometry";
|
||||
import { QueryFilterFlags, QueryPipeline } from "../pipeline";
|
||||
import { IntegrationParameters, RigidBodySet } from "../dynamics";
|
||||
/**
|
||||
* A collision between the character and an obstacle hit on its path.
|
||||
*/
|
||||
export declare class CharacterCollision {
|
||||
/** The collider involved in the collision. Null if the collider no longer exists in the physics world. */
|
||||
collider: Collider | null;
|
||||
/** The translation delta applied to the character before this collision took place. */
|
||||
translationDeltaApplied: Vector;
|
||||
/** The translation delta the character would move after this collision if there is no other obstacles. */
|
||||
translationDeltaRemaining: Vector;
|
||||
/** The time-of-impact between the character and the obstacles. */
|
||||
toi: number;
|
||||
/** The world-space contact point on the collider when the collision happens. */
|
||||
witness1: Vector;
|
||||
/** The local-space contact point on the character when the collision happens. */
|
||||
witness2: Vector;
|
||||
/** The world-space outward contact normal on the collider when the collision happens. */
|
||||
normal1: Vector;
|
||||
/** The local-space outward contact normal on the character when the collision happens. */
|
||||
normal2: Vector;
|
||||
}
|
||||
/**
|
||||
* A character controller for controlling kinematic bodies and parentless colliders by hitting
|
||||
* and sliding against obstacles.
|
||||
*/
|
||||
export declare class KinematicCharacterController {
|
||||
private raw;
|
||||
private rawCharacterCollision;
|
||||
private params;
|
||||
private bodies;
|
||||
private colliders;
|
||||
private queries;
|
||||
private _applyImpulsesToDynamicBodies;
|
||||
private _characterMass;
|
||||
constructor(offset: number, params: IntegrationParameters, bodies: RigidBodySet, colliders: ColliderSet, queries: QueryPipeline);
|
||||
/** @internal */
|
||||
free(): void;
|
||||
/**
|
||||
* The direction that goes "up". Used to determine where the floor is, and the floor’s angle.
|
||||
*/
|
||||
up(): Vector;
|
||||
/**
|
||||
* Sets the direction that goes "up". Used to determine where the floor is, and the floor’s angle.
|
||||
*/
|
||||
setUp(vector: Vector): void;
|
||||
applyImpulsesToDynamicBodies(): boolean;
|
||||
setApplyImpulsesToDynamicBodies(enabled: boolean): void;
|
||||
/**
|
||||
* Returns the custom value of the character mass, if it was set by `this.setCharacterMass`.
|
||||
*/
|
||||
characterMass(): number | null;
|
||||
/**
|
||||
* Set the mass of the character to be used for impulse resolution if `self.applyImpulsesToDynamicBodies`
|
||||
* is set to `true`.
|
||||
*
|
||||
* If no character mass is set explicitly (or if it is set to `null`) it is automatically assumed to be equal
|
||||
* to the mass of the rigid-body the character collider is attached to; or equal to 0 if the character collider
|
||||
* isn’t attached to any rigid-body.
|
||||
*
|
||||
* @param mass - The mass to set.
|
||||
*/
|
||||
setCharacterMass(mass: number | null): void;
|
||||
/**
|
||||
* A small gap to preserve between the character and its surroundings.
|
||||
*
|
||||
* This value should not be too large to avoid visual artifacts, but shouldn’t be too small
|
||||
* (must not be zero) to improve numerical stability of the character controller.
|
||||
*/
|
||||
offset(): number;
|
||||
/**
|
||||
* Sets a small gap to preserve between the character and its surroundings.
|
||||
*
|
||||
* This value should not be too large to avoid visual artifacts, but shouldn’t be too small
|
||||
* (must not be zero) to improve numerical stability of the character controller.
|
||||
*/
|
||||
setOffset(value: number): void;
|
||||
/**
|
||||
* Is sliding against obstacles enabled?
|
||||
*/
|
||||
slideEnabled(): boolean;
|
||||
/**
|
||||
* Enable or disable sliding against obstacles.
|
||||
*/
|
||||
setSlideEnabled(enabled: boolean): void;
|
||||
/**
|
||||
* The maximum step height a character can automatically step over.
|
||||
*/
|
||||
autostepMaxHeight(): number | null;
|
||||
/**
|
||||
* The minimum width of free space that must be available after stepping on a stair.
|
||||
*/
|
||||
autostepMinWidth(): number | null;
|
||||
/**
|
||||
* Can the character automatically step over dynamic bodies too?
|
||||
*/
|
||||
autostepIncludesDynamicBodies(): boolean | null;
|
||||
/**
|
||||
* Is automatically stepping over small objects enabled?
|
||||
*/
|
||||
autostepEnabled(): boolean;
|
||||
/**
|
||||
* Enabled automatically stepping over small objects.
|
||||
*
|
||||
* @param maxHeight - The maximum step height a character can automatically step over.
|
||||
* @param minWidth - The minimum width of free space that must be available after stepping on a stair.
|
||||
* @param includeDynamicBodies - Can the character automatically step over dynamic bodies too?
|
||||
*/
|
||||
enableAutostep(maxHeight: number, minWidth: number, includeDynamicBodies: boolean): void;
|
||||
/**
|
||||
* Disable automatically stepping over small objects.
|
||||
*/
|
||||
disableAutostep(): void;
|
||||
/**
|
||||
* The maximum angle (radians) between the floor’s normal and the `up` vector that the
|
||||
* character is able to climb.
|
||||
*/
|
||||
maxSlopeClimbAngle(): number;
|
||||
/**
|
||||
* Sets the maximum angle (radians) between the floor’s normal and the `up` vector that the
|
||||
* character is able to climb.
|
||||
*/
|
||||
setMaxSlopeClimbAngle(angle: number): void;
|
||||
/**
|
||||
* The minimum angle (radians) between the floor’s normal and the `up` vector before the
|
||||
* character starts to slide down automatically.
|
||||
*/
|
||||
minSlopeSlideAngle(): number;
|
||||
/**
|
||||
* Sets the minimum angle (radians) between the floor’s normal and the `up` vector before the
|
||||
* character starts to slide down automatically.
|
||||
*/
|
||||
setMinSlopeSlideAngle(angle: number): void;
|
||||
/**
|
||||
* If snap-to-ground is enabled, should the character be automatically snapped to the ground if
|
||||
* the distance between the ground and its feet are smaller than the specified threshold?
|
||||
*/
|
||||
snapToGroundDistance(): number | null;
|
||||
/**
|
||||
* Enables automatically snapping the character to the ground if the distance between
|
||||
* the ground and its feet are smaller than the specified threshold.
|
||||
*/
|
||||
enableSnapToGround(distance: number): void;
|
||||
/**
|
||||
* Disables automatically snapping the character to the ground.
|
||||
*/
|
||||
disableSnapToGround(): void;
|
||||
/**
|
||||
* Is automatically snapping the character to the ground enabled?
|
||||
*/
|
||||
snapToGroundEnabled(): boolean;
|
||||
/**
|
||||
* Computes the movement the given collider is able to execute after hitting and sliding on obstacles.
|
||||
*
|
||||
* @param collider - The collider to move.
|
||||
* @param desiredTranslationDelta - The desired collider movement.
|
||||
* @param filterFlags - Flags for excluding whole subsets of colliders from the obstacles taken into account.
|
||||
* @param filterGroups - Groups for excluding colliders with incompatible collision groups from the obstacles
|
||||
* taken into account.
|
||||
* @param filterPredicate - Any collider for which this closure returns `false` will be excluded from the
|
||||
* obstacles taken into account.
|
||||
*/
|
||||
computeColliderMovement(collider: Collider, desiredTranslationDelta: Vector, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterPredicate?: (collider: Collider) => boolean): void;
|
||||
/**
|
||||
* The movement computed by the last call to `this.computeColliderMovement`.
|
||||
*/
|
||||
computedMovement(): Vector;
|
||||
/**
|
||||
* The result of ground detection computed by the last call to `this.computeColliderMovement`.
|
||||
*/
|
||||
computedGrounded(): boolean;
|
||||
/**
|
||||
* The number of collisions against obstacles detected along the path of the last call
|
||||
* to `this.computeColliderMovement`.
|
||||
*/
|
||||
numComputedCollisions(): number;
|
||||
/**
|
||||
* Returns the collision against one of the obstacles detected along the path of the last
|
||||
* call to `this.computeColliderMovement`.
|
||||
*
|
||||
* @param i - The i-th collision will be returned.
|
||||
* @param out - If this argument is set, it will be filled with the collision information.
|
||||
*/
|
||||
computedCollision(i: number, out?: CharacterCollision): CharacterCollision | null;
|
||||
}
|
||||
2
app/node_modules/@dimforge/rapier3d-compat/control/index.d.ts
generated
vendored
Normal file
2
app/node_modules/@dimforge/rapier3d-compat/control/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./character_controller";
|
||||
export * from "./ray_cast_vehicle_controller";
|
||||
252
app/node_modules/@dimforge/rapier3d-compat/control/ray_cast_vehicle_controller.d.ts
generated
vendored
Normal file
252
app/node_modules/@dimforge/rapier3d-compat/control/ray_cast_vehicle_controller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,252 @@
|
||||
import { Vector } from "../math";
|
||||
import { Collider, ColliderSet, InteractionGroups } from "../geometry";
|
||||
import { QueryFilterFlags, QueryPipeline } from "../pipeline";
|
||||
import { RigidBody, RigidBodySet } from "../dynamics";
|
||||
/**
|
||||
* A character controller to simulate vehicles using ray-casting for the wheels.
|
||||
*/
|
||||
export declare class DynamicRayCastVehicleController {
|
||||
private raw;
|
||||
private bodies;
|
||||
private colliders;
|
||||
private queries;
|
||||
private _chassis;
|
||||
constructor(chassis: RigidBody, bodies: RigidBodySet, colliders: ColliderSet, queries: QueryPipeline);
|
||||
/** @internal */
|
||||
free(): void;
|
||||
/**
|
||||
* Updates the vehicle’s velocity based on its suspension, engine force, and brake.
|
||||
*
|
||||
* This directly updates the velocity of its chassis rigid-body.
|
||||
*
|
||||
* @param dt - Time increment used to integrate forces.
|
||||
* @param filterFlags - Flag to exclude categories of objects from the wheels’ ray-cast.
|
||||
* @param filterGroups - Only colliders compatible with these groups will be hit by the wheels’ ray-casts.
|
||||
* @param filterPredicate - Callback to filter out which collider will be hit by the wheels’ ray-casts.
|
||||
*/
|
||||
updateVehicle(dt: number, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterPredicate?: (collider: Collider) => boolean): void;
|
||||
/**
|
||||
* The current forward speed of the vehicle.
|
||||
*/
|
||||
currentVehicleSpeed(): number;
|
||||
/**
|
||||
* The rigid-body used as the chassis.
|
||||
*/
|
||||
chassis(): RigidBody;
|
||||
/**
|
||||
* The chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`).
|
||||
*/
|
||||
get indexUpAxis(): number;
|
||||
/**
|
||||
* Sets the chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`).
|
||||
*/
|
||||
set indexUpAxis(axis: number);
|
||||
/**
|
||||
* The chassis’ local _forward_ direction (`0 = x, 1 = y, 2 = z`).
|
||||
*/
|
||||
get indexForwardAxis(): number;
|
||||
/**
|
||||
* Sets the chassis’ local _forward_ direction (`0 = x, 1 = y, 2 = z`).
|
||||
*/
|
||||
set setIndexForwardAxis(axis: number);
|
||||
/**
|
||||
* Adds a new wheel attached to this vehicle.
|
||||
* @param chassisConnectionCs - The position of the wheel relative to the chassis.
|
||||
* @param directionCs - The direction of the wheel’s suspension, relative to the chassis. The ray-casting will
|
||||
* happen following this direction to detect the ground.
|
||||
* @param axleCs - The wheel’s axle axis, relative to the chassis.
|
||||
* @param suspensionRestLength - The rest length of the wheel’s suspension spring.
|
||||
* @param radius - The wheel’s radius.
|
||||
*/
|
||||
addWheel(chassisConnectionCs: Vector, directionCs: Vector, axleCs: Vector, suspensionRestLength: number, radius: number): void;
|
||||
/**
|
||||
* The number of wheels attached to this vehicle.
|
||||
*/
|
||||
numWheels(): number;
|
||||
/**
|
||||
* The position of the i-th wheel, relative to the chassis.
|
||||
*/
|
||||
wheelChassisConnectionPointCs(i: number): Vector | null;
|
||||
/**
|
||||
* Sets the position of the i-th wheel, relative to the chassis.
|
||||
*/
|
||||
setWheelChassisConnectionPointCs(i: number, value: Vector): void;
|
||||
/**
|
||||
* The rest length of the i-th wheel’s suspension spring.
|
||||
*/
|
||||
wheelSuspensionRestLength(i: number): number | null;
|
||||
/**
|
||||
* Sets the rest length of the i-th wheel’s suspension spring.
|
||||
*/
|
||||
setWheelSuspensionRestLength(i: number, value: number): void;
|
||||
/**
|
||||
* The maximum distance the i-th wheel suspension can travel before and after its resting length.
|
||||
*/
|
||||
wheelMaxSuspensionTravel(i: number): number | null;
|
||||
/**
|
||||
* Sets the maximum distance the i-th wheel suspension can travel before and after its resting length.
|
||||
*/
|
||||
setWheelMaxSuspensionTravel(i: number, value: number): void;
|
||||
/**
|
||||
* The i-th wheel’s radius.
|
||||
*/
|
||||
wheelRadius(i: number): number | null;
|
||||
/**
|
||||
* Sets the i-th wheel’s radius.
|
||||
*/
|
||||
setWheelRadius(i: number, value: number): void;
|
||||
/**
|
||||
* The i-th wheel’s suspension stiffness.
|
||||
*
|
||||
* Increase this value if the suspension appears to not push the vehicle strong enough.
|
||||
*/
|
||||
wheelSuspensionStiffness(i: number): number | null;
|
||||
/**
|
||||
* Sets the i-th wheel’s suspension stiffness.
|
||||
*
|
||||
* Increase this value if the suspension appears to not push the vehicle strong enough.
|
||||
*/
|
||||
setWheelSuspensionStiffness(i: number, value: number): void;
|
||||
/**
|
||||
* The i-th wheel’s suspension’s damping when it is being compressed.
|
||||
*/
|
||||
wheelSuspensionCompression(i: number): number | null;
|
||||
/**
|
||||
* The i-th wheel’s suspension’s damping when it is being compressed.
|
||||
*/
|
||||
setWheelSuspensionCompression(i: number, value: number): void;
|
||||
/**
|
||||
* The i-th wheel’s suspension’s damping when it is being released.
|
||||
*
|
||||
* Increase this value if the suspension appears to overshoot.
|
||||
*/
|
||||
wheelSuspensionRelaxation(i: number): number | null;
|
||||
/**
|
||||
* Sets the i-th wheel’s suspension’s damping when it is being released.
|
||||
*
|
||||
* Increase this value if the suspension appears to overshoot.
|
||||
*/
|
||||
setWheelSuspensionRelaxation(i: number, value: number): void;
|
||||
/**
|
||||
* The maximum force applied by the i-th wheel’s suspension.
|
||||
*/
|
||||
wheelMaxSuspensionForce(i: number): number | null;
|
||||
/**
|
||||
* Sets the maximum force applied by the i-th wheel’s suspension.
|
||||
*/
|
||||
setWheelMaxSuspensionForce(i: number, value: number): void;
|
||||
/**
|
||||
* The maximum amount of braking impulse applied on the i-th wheel to slow down the vehicle.
|
||||
*/
|
||||
wheelBrake(i: number): number | null;
|
||||
/**
|
||||
* Set the maximum amount of braking impulse applied on the i-th wheel to slow down the vehicle.
|
||||
*/
|
||||
setWheelBrake(i: number, value: number): void;
|
||||
/**
|
||||
* The steering angle (radians) for the i-th wheel.
|
||||
*/
|
||||
wheelSteering(i: number): number | null;
|
||||
/**
|
||||
* Sets the steering angle (radians) for the i-th wheel.
|
||||
*/
|
||||
setWheelSteering(i: number, value: number): void;
|
||||
/**
|
||||
* The forward force applied by the i-th wheel on the chassis.
|
||||
*/
|
||||
wheelEngineForce(i: number): number | null;
|
||||
/**
|
||||
* Sets the forward force applied by the i-th wheel on the chassis.
|
||||
*/
|
||||
setWheelEngineForce(i: number, value: number): void;
|
||||
/**
|
||||
* The direction of the i-th wheel’s suspension, relative to the chassis.
|
||||
*
|
||||
* The ray-casting will happen following this direction to detect the ground.
|
||||
*/
|
||||
wheelDirectionCs(i: number): Vector | null;
|
||||
/**
|
||||
* Sets the direction of the i-th wheel’s suspension, relative to the chassis.
|
||||
*
|
||||
* The ray-casting will happen following this direction to detect the ground.
|
||||
*/
|
||||
setWheelDirectionCs(i: number, value: Vector): void;
|
||||
/**
|
||||
* The i-th wheel’s axle axis, relative to the chassis.
|
||||
*
|
||||
* The axis index defined as 0 = X, 1 = Y, 2 = Z.
|
||||
*/
|
||||
wheelAxleCs(i: number): Vector | null;
|
||||
/**
|
||||
* Sets the i-th wheel’s axle axis, relative to the chassis.
|
||||
*
|
||||
* The axis index defined as 0 = X, 1 = Y, 2 = Z.
|
||||
*/
|
||||
setWheelAxleCs(i: number, value: Vector): void;
|
||||
/**
|
||||
* Parameter controlling how much traction the tire has.
|
||||
*
|
||||
* The larger the value, the more instantaneous braking will happen (with the risk of
|
||||
* causing the vehicle to flip if it’s too strong).
|
||||
*/
|
||||
wheelFrictionSlip(i: number): number | null;
|
||||
/**
|
||||
* Sets the parameter controlling how much traction the tire has.
|
||||
*
|
||||
* The larger the value, the more instantaneous braking will happen (with the risk of
|
||||
* causing the vehicle to flip if it’s too strong).
|
||||
*/
|
||||
setWheelFrictionSlip(i: number, value: number): void;
|
||||
/**
|
||||
* The multiplier of friction between a tire and the collider it’s on top of.
|
||||
*
|
||||
* The larger the value, the stronger side friction will be.
|
||||
*/
|
||||
wheelSideFrictionStiffness(i: number): number | null;
|
||||
/**
|
||||
* The multiplier of friction between a tire and the collider it’s on top of.
|
||||
*
|
||||
* The larger the value, the stronger side friction will be.
|
||||
*/
|
||||
setWheelSideFrictionStiffness(i: number, value: number): void;
|
||||
/**
|
||||
* The i-th wheel’s current rotation angle (radians) on its axle.
|
||||
*/
|
||||
wheelRotation(i: number): number | null;
|
||||
/**
|
||||
* The forward impulses applied by the i-th wheel on the chassis.
|
||||
*/
|
||||
wheelForwardImpulse(i: number): number | null;
|
||||
/**
|
||||
* The side impulses applied by the i-th wheel on the chassis.
|
||||
*/
|
||||
wheelSideImpulse(i: number): number | null;
|
||||
/**
|
||||
* The force applied by the i-th wheel suspension.
|
||||
*/
|
||||
wheelSuspensionForce(i: number): number | null;
|
||||
/**
|
||||
* The (world-space) contact normal between the i-th wheel and the floor.
|
||||
*/
|
||||
wheelContactNormal(i: number): Vector | null;
|
||||
/**
|
||||
* The (world-space) point hit by the wheel’s ray-cast for the i-th wheel.
|
||||
*/
|
||||
wheelContactPoint(i: number): Vector | null;
|
||||
/**
|
||||
* The suspension length for the i-th wheel.
|
||||
*/
|
||||
wheelSuspensionLength(i: number): number | null;
|
||||
/**
|
||||
* The (world-space) starting point of the ray-cast for the i-th wheel.
|
||||
*/
|
||||
wheelHardPoint(i: number): Vector | null;
|
||||
/**
|
||||
* Is the i-th wheel in contact with the ground?
|
||||
*/
|
||||
wheelIsInContact(i: number): boolean;
|
||||
/**
|
||||
* The collider hit by the ray-cast for the i-th wheel.
|
||||
*/
|
||||
wheelGroundObject(i: number): Collider | null;
|
||||
}
|
||||
15
app/node_modules/@dimforge/rapier3d-compat/dynamics/ccd_solver.d.ts
generated
vendored
Normal file
15
app/node_modules/@dimforge/rapier3d-compat/dynamics/ccd_solver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { RawCCDSolver } from "../raw";
|
||||
/**
|
||||
* The CCD solver responsible for resolving Continuous Collision Detection.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `ccdSolver.free()`
|
||||
* once you are done using it.
|
||||
*/
|
||||
export declare class CCDSolver {
|
||||
raw: RawCCDSolver;
|
||||
/**
|
||||
* Release the WASM memory occupied by this narrow-phase.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawCCDSolver);
|
||||
}
|
||||
13
app/node_modules/@dimforge/rapier3d-compat/dynamics/coefficient_combine_rule.d.ts
generated
vendored
Normal file
13
app/node_modules/@dimforge/rapier3d-compat/dynamics/coefficient_combine_rule.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* A rule applied to combine coefficients.
|
||||
*
|
||||
* Use this when configuring the `ColliderDesc` to specify
|
||||
* how friction and restitution coefficient should be combined
|
||||
* in a contact.
|
||||
*/
|
||||
export declare enum CoefficientCombineRule {
|
||||
Average = 0,
|
||||
Min = 1,
|
||||
Multiply = 2,
|
||||
Max = 3
|
||||
}
|
||||
259
app/node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint.d.ts
generated
vendored
Normal file
259
app/node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint.d.ts
generated
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
import { Rotation, Vector } from "../math";
|
||||
import { RawGenericJoint, RawImpulseJointSet, RawJointAxis } from "../raw";
|
||||
import { RigidBody } from "./rigid_body";
|
||||
import { RigidBodySet } from "./rigid_body_set";
|
||||
/**
|
||||
* The integer identifier of a collider added to a `ColliderSet`.
|
||||
*/
|
||||
export declare type ImpulseJointHandle = number;
|
||||
/**
|
||||
* An enum grouping all possible types of joints:
|
||||
*
|
||||
* - `Revolute`: A revolute joint that removes all degrees of freedom between the affected
|
||||
* bodies except for the rotation along one axis.
|
||||
* - `Fixed`: A fixed joint that removes all relative degrees of freedom between the affected bodies.
|
||||
* - `Prismatic`: A prismatic joint that removes all degrees of freedom between the affected
|
||||
* bodies except for the translation along one axis.
|
||||
* - `Spherical`: (3D only) A spherical joint that removes all relative linear degrees of freedom between the affected bodies.
|
||||
* - `Generic`: (3D only) A joint with customizable degrees of freedom, allowing any of the 6 axes to be locked.
|
||||
*/
|
||||
export declare enum JointType {
|
||||
Revolute = 0,
|
||||
Fixed = 1,
|
||||
Prismatic = 2,
|
||||
Rope = 3,
|
||||
Spring = 4,
|
||||
Spherical = 5,
|
||||
Generic = 6
|
||||
}
|
||||
export declare enum MotorModel {
|
||||
AccelerationBased = 0,
|
||||
ForceBased = 1
|
||||
}
|
||||
/**
|
||||
* An enum representing the possible joint axes of a generic joint.
|
||||
* They can be ORed together, like:
|
||||
* JointAxesMask.X || JointAxesMask.Y
|
||||
* to get a joint that is only free in the X and Y translational (positional) axes.
|
||||
*
|
||||
* Possible free axes are:
|
||||
*
|
||||
* - `X`: X translation axis
|
||||
* - `Y`: Y translation axis
|
||||
* - `Z`: Z translation axis
|
||||
* - `AngX`: X angular rotation axis
|
||||
* - `AngY`: Y angular rotations axis
|
||||
* - `AngZ`: Z angular rotation axis
|
||||
*/
|
||||
export declare enum JointAxesMask {
|
||||
X = 1,
|
||||
Y = 2,
|
||||
Z = 4,
|
||||
AngX = 8,
|
||||
AngY = 16,
|
||||
AngZ = 32
|
||||
}
|
||||
export declare class ImpulseJoint {
|
||||
protected rawSet: RawImpulseJointSet;
|
||||
protected bodySet: RigidBodySet;
|
||||
handle: ImpulseJointHandle;
|
||||
constructor(rawSet: RawImpulseJointSet, bodySet: RigidBodySet, handle: ImpulseJointHandle);
|
||||
static newTyped(rawSet: RawImpulseJointSet, bodySet: RigidBodySet, handle: ImpulseJointHandle): ImpulseJoint;
|
||||
/** @internal */
|
||||
finalizeDeserialization(bodySet: RigidBodySet): void;
|
||||
/**
|
||||
* Checks if this joint is still valid (i.e. that it has
|
||||
* not been deleted from the joint set yet).
|
||||
*/
|
||||
isValid(): boolean;
|
||||
/**
|
||||
* The first rigid-body this joint it attached to.
|
||||
*/
|
||||
body1(): RigidBody;
|
||||
/**
|
||||
* The second rigid-body this joint is attached to.
|
||||
*/
|
||||
body2(): RigidBody;
|
||||
/**
|
||||
* The type of this joint given as a string.
|
||||
*/
|
||||
type(): JointType;
|
||||
/**
|
||||
* The rotation quaternion that aligns this joint's first local axis to the `x` axis.
|
||||
*/
|
||||
frameX1(): Rotation;
|
||||
/**
|
||||
* The rotation matrix that aligns this joint's second local axis to the `x` axis.
|
||||
*/
|
||||
frameX2(): Rotation;
|
||||
/**
|
||||
* The position of the first anchor of this joint.
|
||||
*
|
||||
* The first anchor gives the position of the application point on the
|
||||
* local frame of the first rigid-body it is attached to.
|
||||
*/
|
||||
anchor1(): Vector;
|
||||
/**
|
||||
* The position of the second anchor of this joint.
|
||||
*
|
||||
* The second anchor gives the position of the application point on the
|
||||
* local frame of the second rigid-body it is attached to.
|
||||
*/
|
||||
anchor2(): Vector;
|
||||
/**
|
||||
* Sets the position of the first anchor of this joint.
|
||||
*
|
||||
* The first anchor gives the position of the application point on the
|
||||
* local frame of the first rigid-body it is attached to.
|
||||
*/
|
||||
setAnchor1(newPos: Vector): void;
|
||||
/**
|
||||
* Sets the position of the second anchor of this joint.
|
||||
*
|
||||
* The second anchor gives the position of the application point on the
|
||||
* local frame of the second rigid-body it is attached to.
|
||||
*/
|
||||
setAnchor2(newPos: Vector): void;
|
||||
/**
|
||||
* Controls whether contacts are computed between colliders attached
|
||||
* to the rigid-bodies linked by this joint.
|
||||
*/
|
||||
setContactsEnabled(enabled: boolean): void;
|
||||
/**
|
||||
* Indicates if contacts are enabled between colliders attached
|
||||
* to the rigid-bodies linked by this joint.
|
||||
*/
|
||||
contactsEnabled(): boolean;
|
||||
}
|
||||
export declare class UnitImpulseJoint extends ImpulseJoint {
|
||||
/**
|
||||
* The axis left free by this joint.
|
||||
*/
|
||||
protected rawAxis?(): RawJointAxis;
|
||||
/**
|
||||
* Are the limits enabled for this joint?
|
||||
*/
|
||||
limitsEnabled(): boolean;
|
||||
/**
|
||||
* The min limit of this joint.
|
||||
*/
|
||||
limitsMin(): number;
|
||||
/**
|
||||
* The max limit of this joint.
|
||||
*/
|
||||
limitsMax(): number;
|
||||
/**
|
||||
* Sets the limits of this joint.
|
||||
*
|
||||
* @param min - The minimum bound of this joint’s free coordinate.
|
||||
* @param max - The maximum bound of this joint’s free coordinate.
|
||||
*/
|
||||
setLimits(min: number, max: number): void;
|
||||
configureMotorModel(model: MotorModel): void;
|
||||
configureMotorVelocity(targetVel: number, factor: number): void;
|
||||
configureMotorPosition(targetPos: number, stiffness: number, damping: number): void;
|
||||
configureMotor(targetPos: number, targetVel: number, stiffness: number, damping: number): void;
|
||||
}
|
||||
export declare class FixedImpulseJoint extends ImpulseJoint {
|
||||
}
|
||||
export declare class RopeImpulseJoint extends ImpulseJoint {
|
||||
}
|
||||
export declare class SpringImpulseJoint extends ImpulseJoint {
|
||||
}
|
||||
export declare class PrismaticImpulseJoint extends UnitImpulseJoint {
|
||||
rawAxis(): RawJointAxis;
|
||||
}
|
||||
export declare class RevoluteImpulseJoint extends UnitImpulseJoint {
|
||||
rawAxis(): RawJointAxis;
|
||||
}
|
||||
export declare class GenericImpulseJoint extends ImpulseJoint {
|
||||
}
|
||||
export declare class SphericalImpulseJoint extends ImpulseJoint {
|
||||
}
|
||||
export declare class JointData {
|
||||
anchor1: Vector;
|
||||
anchor2: Vector;
|
||||
axis: Vector;
|
||||
frame1: Rotation;
|
||||
frame2: Rotation;
|
||||
jointType: JointType;
|
||||
limitsEnabled: boolean;
|
||||
limits: Array<number>;
|
||||
axesMask: JointAxesMask;
|
||||
stiffness: number;
|
||||
damping: number;
|
||||
length: number;
|
||||
private constructor();
|
||||
/**
|
||||
* Creates a new joint descriptor that builds a Fixed joint.
|
||||
*
|
||||
* A fixed joint removes all the degrees of freedom between the affected bodies, ensuring their
|
||||
* anchor and local frames coincide in world-space.
|
||||
*
|
||||
* @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param frame1 - The reference orientation of the joint wrt. the first rigid-body.
|
||||
* @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param frame2 - The reference orientation of the joint wrt. the second rigid-body.
|
||||
*/
|
||||
static fixed(anchor1: Vector, frame1: Rotation, anchor2: Vector, frame2: Rotation): JointData;
|
||||
static spring(rest_length: number, stiffness: number, damping: number, anchor1: Vector, anchor2: Vector): JointData;
|
||||
static rope(length: number, anchor1: Vector, anchor2: Vector): JointData;
|
||||
/**
|
||||
* Create a new joint descriptor that builds generic joints.
|
||||
*
|
||||
* A generic joint allows customizing its degrees of freedom
|
||||
* by supplying a mask of the joint axes that should remain locked.
|
||||
*
|
||||
* @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param axis - The X axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.
|
||||
* @param axesMask - Mask representing the locked axes of the joint. You can use logical OR to select these from
|
||||
* the JointAxesMask enum. For example, passing (JointAxesMask.AngX || JointAxesMask.AngY) will
|
||||
* create a joint locked in the X and Y rotational axes.
|
||||
*/
|
||||
static generic(anchor1: Vector, anchor2: Vector, axis: Vector, axesMask: JointAxesMask): JointData;
|
||||
/**
|
||||
* Create a new joint descriptor that builds spherical joints.
|
||||
*
|
||||
* A spherical joint allows three relative rotational degrees of freedom
|
||||
* by preventing any relative translation between the anchors of the
|
||||
* two attached rigid-bodies.
|
||||
*
|
||||
* @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
*/
|
||||
static spherical(anchor1: Vector, anchor2: Vector): JointData;
|
||||
/**
|
||||
* Creates a new joint descriptor that builds a Prismatic joint.
|
||||
*
|
||||
* A prismatic joint removes all the degrees of freedom between the
|
||||
* affected bodies, except for the translation along one axis.
|
||||
*
|
||||
* @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param axis - Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.
|
||||
*/
|
||||
static prismatic(anchor1: Vector, anchor2: Vector, axis: Vector): JointData;
|
||||
/**
|
||||
* Create a new joint descriptor that builds Revolute joints.
|
||||
*
|
||||
* A revolute joint removes all degrees of freedom between the affected
|
||||
* bodies except for the rotation along one axis.
|
||||
*
|
||||
* @param anchor1 - Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param anchor2 - Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the
|
||||
* local-space of the rigid-body.
|
||||
* @param axis - Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.
|
||||
*/
|
||||
static revolute(anchor1: Vector, anchor2: Vector, axis: Vector): JointData;
|
||||
intoRaw(): RawGenericJoint;
|
||||
}
|
||||
79
app/node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint_set.d.ts
generated
vendored
Normal file
79
app/node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint_set.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { RawImpulseJointSet } from "../raw";
|
||||
import { RigidBodySet } from "./rigid_body_set";
|
||||
import { ImpulseJoint, ImpulseJointHandle, JointData } from "./impulse_joint";
|
||||
import { RigidBodyHandle } from "./rigid_body";
|
||||
/**
|
||||
* A set of joints.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `jointSet.free()`
|
||||
* once you are done using it (and all the joints it created).
|
||||
*/
|
||||
export declare class ImpulseJointSet {
|
||||
raw: RawImpulseJointSet;
|
||||
private map;
|
||||
/**
|
||||
* Release the WASM memory occupied by this joint set.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawImpulseJointSet);
|
||||
/** @internal */
|
||||
finalizeDeserialization(bodies: RigidBodySet): void;
|
||||
/**
|
||||
* Creates a new joint and return its integer handle.
|
||||
*
|
||||
* @param bodies - The set of rigid-bodies containing the bodies the joint is attached to.
|
||||
* @param desc - The joint's parameters.
|
||||
* @param parent1 - The handle of the first rigid-body this joint is attached to.
|
||||
* @param parent2 - The handle of the second rigid-body this joint is attached to.
|
||||
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
||||
*/
|
||||
createJoint(bodies: RigidBodySet, desc: JointData, parent1: RigidBodyHandle, parent2: RigidBodyHandle, wakeUp: boolean): ImpulseJoint;
|
||||
/**
|
||||
* Remove a joint from this set.
|
||||
*
|
||||
* @param handle - The integer handle of the joint.
|
||||
* @param wakeUp - If `true`, the rigid-bodies attached by the removed joint will be woken-up automatically.
|
||||
*/
|
||||
remove(handle: ImpulseJointHandle, wakeUp: boolean): void;
|
||||
/**
|
||||
* Calls the given closure with the integer handle of each impulse joint attached to this rigid-body.
|
||||
*
|
||||
* @param f - The closure called with the integer handle of each impulse joint attached to the rigid-body.
|
||||
*/
|
||||
forEachJointHandleAttachedToRigidBody(handle: RigidBodyHandle, f: (handle: ImpulseJointHandle) => void): void;
|
||||
/**
|
||||
* Internal function, do not call directly.
|
||||
* @param handle
|
||||
*/
|
||||
unmap(handle: ImpulseJointHandle): void;
|
||||
/**
|
||||
* The number of joints on this set.
|
||||
*/
|
||||
len(): number;
|
||||
/**
|
||||
* Does this set contain a joint with the given handle?
|
||||
*
|
||||
* @param handle - The joint handle to check.
|
||||
*/
|
||||
contains(handle: ImpulseJointHandle): boolean;
|
||||
/**
|
||||
* Gets the joint with the given handle.
|
||||
*
|
||||
* Returns `null` if no joint with the specified handle exists.
|
||||
*
|
||||
* @param handle - The integer handle of the joint to retrieve.
|
||||
*/
|
||||
get(handle: ImpulseJointHandle): ImpulseJoint | null;
|
||||
/**
|
||||
* Applies the given closure to each joint contained by this set.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEach(f: (joint: ImpulseJoint) => void): void;
|
||||
/**
|
||||
* Gets all joints in the list.
|
||||
*
|
||||
* @returns joint list.
|
||||
*/
|
||||
getAll(): ImpulseJoint[];
|
||||
}
|
||||
10
app/node_modules/@dimforge/rapier3d-compat/dynamics/index.d.ts
generated
vendored
Normal file
10
app/node_modules/@dimforge/rapier3d-compat/dynamics/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export * from "./rigid_body";
|
||||
export * from "./rigid_body_set";
|
||||
export * from "./integration_parameters";
|
||||
export * from "./impulse_joint";
|
||||
export * from "./impulse_joint_set";
|
||||
export * from "./multibody_joint";
|
||||
export * from "./multibody_joint_set";
|
||||
export * from "./coefficient_combine_rule";
|
||||
export * from "./ccd_solver";
|
||||
export * from "./island_manager";
|
||||
66
app/node_modules/@dimforge/rapier3d-compat/dynamics/integration_parameters.d.ts
generated
vendored
Normal file
66
app/node_modules/@dimforge/rapier3d-compat/dynamics/integration_parameters.d.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { RawIntegrationParameters } from "../raw";
|
||||
export declare class IntegrationParameters {
|
||||
raw: RawIntegrationParameters;
|
||||
constructor(raw?: RawIntegrationParameters);
|
||||
/**
|
||||
* Free the WASM memory used by these integration parameters.
|
||||
*/
|
||||
free(): void;
|
||||
/**
|
||||
* The timestep length (default: `1.0 / 60.0`)
|
||||
*/
|
||||
get dt(): number;
|
||||
/**
|
||||
* The Error Reduction Parameter in `[0, 1]` is the proportion of
|
||||
* the positional error to be corrected at each time step (default: `0.2`).
|
||||
*/
|
||||
get erp(): number;
|
||||
/**
|
||||
* Amount of penetration the engine wont attempt to correct (default: `0.001m`).
|
||||
*/
|
||||
get allowedLinearError(): number;
|
||||
/**
|
||||
* The maximal distance separating two objects that will generate predictive contacts (default: `0.002`).
|
||||
*/
|
||||
get predictionDistance(): number;
|
||||
/**
|
||||
* The number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
||||
*/
|
||||
get numSolverIterations(): number;
|
||||
/**
|
||||
* Number of addition friction resolution iteration run during the last solver sub-step (default: `4`).
|
||||
*/
|
||||
get numAdditionalFrictionIterations(): number;
|
||||
/**
|
||||
* Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
||||
*/
|
||||
get numInternalPgsIterations(): number;
|
||||
/**
|
||||
* Minimum number of dynamic bodies in each active island (default: `128`).
|
||||
*/
|
||||
get minIslandSize(): number;
|
||||
/**
|
||||
* Maximum number of substeps performed by the solver (default: `1`).
|
||||
*/
|
||||
get maxCcdSubsteps(): number;
|
||||
set dt(value: number);
|
||||
set erp(value: number);
|
||||
set allowedLinearError(value: number);
|
||||
set predictionDistance(value: number);
|
||||
/**
|
||||
* Sets the number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
||||
*/
|
||||
set numSolverIterations(value: number);
|
||||
/**
|
||||
* Sets the number of addition friction resolution iteration run during the last solver sub-step (default: `4`).
|
||||
*/
|
||||
set numAdditionalFrictionIterations(value: number);
|
||||
/**
|
||||
* Sets the number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
||||
*/
|
||||
set numInternalPgsIterations(value: number);
|
||||
set minIslandSize(value: number);
|
||||
set maxCcdSubsteps(value: number);
|
||||
switchToStandardPgsSolver(): void;
|
||||
switchToSmallStepsPgsSolver(): void;
|
||||
}
|
||||
24
app/node_modules/@dimforge/rapier3d-compat/dynamics/island_manager.d.ts
generated
vendored
Normal file
24
app/node_modules/@dimforge/rapier3d-compat/dynamics/island_manager.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { RawIslandManager } from "../raw";
|
||||
import { RigidBodyHandle } from "./rigid_body";
|
||||
/**
|
||||
* The CCD solver responsible for resolving Continuous Collision Detection.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `ccdSolver.free()`
|
||||
* once you are done using it.
|
||||
*/
|
||||
export declare class IslandManager {
|
||||
raw: RawIslandManager;
|
||||
/**
|
||||
* Release the WASM memory occupied by this narrow-phase.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawIslandManager);
|
||||
/**
|
||||
* Applies the given closure to the handle of each active rigid-bodies contained by this set.
|
||||
*
|
||||
* A rigid-body is active if it is not sleeping, i.e., if it moved recently.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEachActiveRigidBodyHandle(f: (handle: RigidBodyHandle) => void): void;
|
||||
}
|
||||
42
app/node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint.d.ts
generated
vendored
Normal file
42
app/node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import { RawJointAxis, RawMultibodyJointSet } from "../raw";
|
||||
/**
|
||||
* The integer identifier of a collider added to a `ColliderSet`.
|
||||
*/
|
||||
export declare type MultibodyJointHandle = number;
|
||||
export declare class MultibodyJoint {
|
||||
protected rawSet: RawMultibodyJointSet;
|
||||
handle: MultibodyJointHandle;
|
||||
constructor(rawSet: RawMultibodyJointSet, handle: MultibodyJointHandle);
|
||||
static newTyped(rawSet: RawMultibodyJointSet, handle: MultibodyJointHandle): MultibodyJoint;
|
||||
/**
|
||||
* Checks if this joint is still valid (i.e. that it has
|
||||
* not been deleted from the joint set yet).
|
||||
*/
|
||||
isValid(): boolean;
|
||||
/**
|
||||
* Controls whether contacts are computed between colliders attached
|
||||
* to the rigid-bodies linked by this joint.
|
||||
*/
|
||||
setContactsEnabled(enabled: boolean): void;
|
||||
/**
|
||||
* Indicates if contacts are enabled between colliders attached
|
||||
* to the rigid-bodies linked by this joint.
|
||||
*/
|
||||
contactsEnabled(): boolean;
|
||||
}
|
||||
export declare class UnitMultibodyJoint extends MultibodyJoint {
|
||||
/**
|
||||
* The axis left free by this joint.
|
||||
*/
|
||||
protected rawAxis?(): RawJointAxis;
|
||||
}
|
||||
export declare class FixedMultibodyJoint extends MultibodyJoint {
|
||||
}
|
||||
export declare class PrismaticMultibodyJoint extends UnitMultibodyJoint {
|
||||
rawAxis(): RawJointAxis;
|
||||
}
|
||||
export declare class RevoluteMultibodyJoint extends UnitMultibodyJoint {
|
||||
rawAxis(): RawJointAxis;
|
||||
}
|
||||
export declare class SphericalMultibodyJoint extends MultibodyJoint {
|
||||
}
|
||||
76
app/node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint_set.d.ts
generated
vendored
Normal file
76
app/node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint_set.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
import { RawMultibodyJointSet } from "../raw";
|
||||
import { MultibodyJoint, MultibodyJointHandle } from "./multibody_joint";
|
||||
import { JointData } from "./impulse_joint";
|
||||
import { RigidBodyHandle } from "./rigid_body";
|
||||
/**
|
||||
* A set of joints.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `jointSet.free()`
|
||||
* once you are done using it (and all the joints it created).
|
||||
*/
|
||||
export declare class MultibodyJointSet {
|
||||
raw: RawMultibodyJointSet;
|
||||
private map;
|
||||
/**
|
||||
* Release the WASM memory occupied by this joint set.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawMultibodyJointSet);
|
||||
/**
|
||||
* Creates a new joint and return its integer handle.
|
||||
*
|
||||
* @param desc - The joint's parameters.
|
||||
* @param parent1 - The handle of the first rigid-body this joint is attached to.
|
||||
* @param parent2 - The handle of the second rigid-body this joint is attached to.
|
||||
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
||||
*/
|
||||
createJoint(desc: JointData, parent1: RigidBodyHandle, parent2: RigidBodyHandle, wakeUp: boolean): MultibodyJoint;
|
||||
/**
|
||||
* Remove a joint from this set.
|
||||
*
|
||||
* @param handle - The integer handle of the joint.
|
||||
* @param wake_up - If `true`, the rigid-bodies attached by the removed joint will be woken-up automatically.
|
||||
*/
|
||||
remove(handle: MultibodyJointHandle, wake_up: boolean): void;
|
||||
/**
|
||||
* Internal function, do not call directly.
|
||||
* @param handle
|
||||
*/
|
||||
unmap(handle: MultibodyJointHandle): void;
|
||||
/**
|
||||
* The number of joints on this set.
|
||||
*/
|
||||
len(): number;
|
||||
/**
|
||||
* Does this set contain a joint with the given handle?
|
||||
*
|
||||
* @param handle - The joint handle to check.
|
||||
*/
|
||||
contains(handle: MultibodyJointHandle): boolean;
|
||||
/**
|
||||
* Gets the joint with the given handle.
|
||||
*
|
||||
* Returns `null` if no joint with the specified handle exists.
|
||||
*
|
||||
* @param handle - The integer handle of the joint to retrieve.
|
||||
*/
|
||||
get(handle: MultibodyJointHandle): MultibodyJoint | null;
|
||||
/**
|
||||
* Applies the given closure to each joint contained by this set.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEach(f: (joint: MultibodyJoint) => void): void;
|
||||
/**
|
||||
* Calls the given closure with the integer handle of each multibody joint attached to this rigid-body.
|
||||
*
|
||||
* @param f - The closure called with the integer handle of each multibody joint attached to the rigid-body.
|
||||
*/
|
||||
forEachJointHandleAttachedToRigidBody(handle: RigidBodyHandle, f: (handle: MultibodyJointHandle) => void): void;
|
||||
/**
|
||||
* Gets all joints in the list.
|
||||
*
|
||||
* @returns joint list.
|
||||
*/
|
||||
getAll(): MultibodyJoint[];
|
||||
}
|
||||
710
app/node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body.d.ts
generated
vendored
Normal file
710
app/node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body.d.ts
generated
vendored
Normal file
@@ -0,0 +1,710 @@
|
||||
import { RawRigidBodySet } from "../raw";
|
||||
import { Rotation, Vector } from "../math";
|
||||
import { SdpMatrix3 } from "../math";
|
||||
import { Collider, ColliderSet } from "../geometry";
|
||||
/**
|
||||
* The integer identifier of a collider added to a `ColliderSet`.
|
||||
*/
|
||||
export declare type RigidBodyHandle = number;
|
||||
/**
|
||||
* The simulation status of a rigid-body.
|
||||
*/
|
||||
export declare enum RigidBodyType {
|
||||
/**
|
||||
* A `RigidBodyType::Dynamic` body can be affected by all external forces.
|
||||
*/
|
||||
Dynamic = 0,
|
||||
/**
|
||||
* A `RigidBodyType::Fixed` body cannot be affected by external forces.
|
||||
*/
|
||||
Fixed = 1,
|
||||
/**
|
||||
* A `RigidBodyType::KinematicPositionBased` body cannot be affected by any external forces but can be controlled
|
||||
* by the user at the position level while keeping realistic one-way interaction with dynamic bodies.
|
||||
*
|
||||
* One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body
|
||||
* cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be
|
||||
* modified by the user and is independent from any contact or joint it is involved in.
|
||||
*/
|
||||
KinematicPositionBased = 2,
|
||||
/**
|
||||
* A `RigidBodyType::KinematicVelocityBased` body cannot be affected by any external forces but can be controlled
|
||||
* by the user at the velocity level while keeping realistic one-way interaction with dynamic bodies.
|
||||
*
|
||||
* One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body
|
||||
* cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be
|
||||
* modified by the user and is independent from any contact or joint it is involved in.
|
||||
*/
|
||||
KinematicVelocityBased = 3
|
||||
}
|
||||
/**
|
||||
* A rigid-body.
|
||||
*/
|
||||
export declare class RigidBody {
|
||||
private rawSet;
|
||||
private colliderSet;
|
||||
readonly handle: RigidBodyHandle;
|
||||
/**
|
||||
* An arbitrary user-defined object associated with this rigid-body.
|
||||
*/
|
||||
userData?: unknown;
|
||||
constructor(rawSet: RawRigidBodySet, colliderSet: ColliderSet, handle: RigidBodyHandle);
|
||||
/** @internal */
|
||||
finalizeDeserialization(colliderSet: ColliderSet): void;
|
||||
/**
|
||||
* Checks if this rigid-body is still valid (i.e. that it has
|
||||
* not been deleted from the rigid-body set yet.
|
||||
*/
|
||||
isValid(): boolean;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to translate.
|
||||
*
|
||||
* @param locked - If `true`, this rigid-body will no longer translate due to forces and impulses.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
*/
|
||||
lockTranslations(locked: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to rotate.
|
||||
*
|
||||
* @param locked - If `true`, this rigid-body will no longer rotate due to torques and impulses.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
*/
|
||||
lockRotations(locked: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to translate along individual coordinate axes.
|
||||
*
|
||||
* @param enableX - If `false`, this rigid-body will no longer translate due to torques and impulses, along the X coordinate axis.
|
||||
* @param enableY - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Y coordinate axis.
|
||||
* @param enableZ - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Z coordinate axis.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
*/
|
||||
setEnabledTranslations(enableX: boolean, enableY: boolean, enableZ: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to translate along individual coordinate axes.
|
||||
*
|
||||
* @param enableX - If `false`, this rigid-body will no longer translate due to torques and impulses, along the X coordinate axis.
|
||||
* @param enableY - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Y coordinate axis.
|
||||
* @param enableZ - If `false`, this rigid-body will no longer translate due to torques and impulses, along the Z coordinate axis.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
* @deprecated use `this.setEnabledTranslations` with the same arguments instead.
|
||||
*/
|
||||
restrictTranslations(enableX: boolean, enableY: boolean, enableZ: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to rotate along individual coordinate axes.
|
||||
*
|
||||
* @param enableX - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the X coordinate axis.
|
||||
* @param enableY - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Y coordinate axis.
|
||||
* @param enableZ - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Z coordinate axis.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
*/
|
||||
setEnabledRotations(enableX: boolean, enableY: boolean, enableZ: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* Locks or unlocks the ability of this rigid-body to rotate along individual coordinate axes.
|
||||
*
|
||||
* @param enableX - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the X coordinate axis.
|
||||
* @param enableY - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Y coordinate axis.
|
||||
* @param enableZ - If `false`, this rigid-body will no longer rotate due to torques and impulses, along the Z coordinate axis.
|
||||
* @param wakeUp - If `true`, this rigid-body will be automatically awaken if it is currently asleep.
|
||||
* @deprecated use `this.setEnabledRotations` with the same arguments instead.
|
||||
*/
|
||||
restrictRotations(enableX: boolean, enableY: boolean, enableZ: boolean, wakeUp: boolean): void;
|
||||
/**
|
||||
* The dominance group, in [-127, +127] this rigid-body is part of.
|
||||
*/
|
||||
dominanceGroup(): number;
|
||||
/**
|
||||
* Sets the dominance group of this rigid-body.
|
||||
*
|
||||
* @param group - The dominance group of this rigid-body. Must be a signed integer in the range [-127, +127].
|
||||
*/
|
||||
setDominanceGroup(group: number): void;
|
||||
/**
|
||||
* The number of additional solver iterations that will be run for this
|
||||
* rigid-body and everything that interacts with it directly or indirectly
|
||||
* through contacts or joints.
|
||||
*/
|
||||
additionalSolverIterations(): number;
|
||||
/**
|
||||
* Sets the number of additional solver iterations that will be run for this
|
||||
* rigid-body and everything that interacts with it directly or indirectly
|
||||
* through contacts or joints.
|
||||
*
|
||||
* Compared to increasing the global `World.numSolverIteration`, setting this
|
||||
* value lets you increase accuracy on only a subset of the scene, resulting in reduced
|
||||
* performance loss.
|
||||
*
|
||||
* @param iters - The new number of additional solver iterations (default: 0).
|
||||
*/
|
||||
setAdditionalSolverIterations(iters: number): void;
|
||||
/**
|
||||
* Enable or disable CCD (Continuous Collision Detection) for this rigid-body.
|
||||
*
|
||||
* @param enabled - If `true`, CCD will be enabled for this rigid-body.
|
||||
*/
|
||||
enableCcd(enabled: boolean): void;
|
||||
/**
|
||||
* The world-space translation of this rigid-body.
|
||||
*/
|
||||
translation(): Vector;
|
||||
/**
|
||||
* The world-space orientation of this rigid-body.
|
||||
*/
|
||||
rotation(): Rotation;
|
||||
/**
|
||||
* The world-space next translation of this rigid-body.
|
||||
*
|
||||
* If this rigid-body is kinematic this value is set by the `setNextKinematicTranslation`
|
||||
* method and is used for estimating the kinematic body velocity at the next timestep.
|
||||
* For non-kinematic bodies, this value is currently unspecified.
|
||||
*/
|
||||
nextTranslation(): Vector;
|
||||
/**
|
||||
* The world-space next orientation of this rigid-body.
|
||||
*
|
||||
* If this rigid-body is kinematic this value is set by the `setNextKinematicRotation`
|
||||
* method and is used for estimating the kinematic body velocity at the next timestep.
|
||||
* For non-kinematic bodies, this value is currently unspecified.
|
||||
*/
|
||||
nextRotation(): Rotation;
|
||||
/**
|
||||
* Sets the translation of this rigid-body.
|
||||
*
|
||||
* @param tra - The world-space position of the rigid-body.
|
||||
* @param wakeUp - Forces the rigid-body to wake-up so it is properly affected by forces if it
|
||||
* wasn't moving before modifying its position.
|
||||
*/
|
||||
setTranslation(tra: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Sets the linear velocity of this rigid-body.
|
||||
*
|
||||
* @param vel - The linear velocity to set.
|
||||
* @param wakeUp - Forces the rigid-body to wake-up if it was asleep.
|
||||
*/
|
||||
setLinvel(vel: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* The scale factor applied to the gravity affecting
|
||||
* this rigid-body.
|
||||
*/
|
||||
gravityScale(): number;
|
||||
/**
|
||||
* Sets the scale factor applied to the gravity affecting
|
||||
* this rigid-body.
|
||||
*
|
||||
* @param factor - The scale factor to set. A value of 0.0 means
|
||||
* that this rigid-body will on longer be affected by gravity.
|
||||
* @param wakeUp - Forces the rigid-body to wake-up if it was asleep.
|
||||
*/
|
||||
setGravityScale(factor: number, wakeUp: boolean): void;
|
||||
/**
|
||||
* Sets the rotation quaternion of this rigid-body.
|
||||
*
|
||||
* This does nothing if a zero quaternion is provided.
|
||||
*
|
||||
* @param rotation - The rotation to set.
|
||||
* @param wakeUp - Forces the rigid-body to wake-up so it is properly affected by forces if it
|
||||
* wasn't moving before modifying its position.
|
||||
*/
|
||||
setRotation(rot: Rotation, wakeUp: boolean): void;
|
||||
/**
|
||||
* Sets the angular velocity fo this rigid-body.
|
||||
*
|
||||
* @param vel - The angular velocity to set.
|
||||
* @param wakeUp - Forces the rigid-body to wake-up if it was asleep.
|
||||
*/
|
||||
setAngvel(vel: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* If this rigid body is kinematic, sets its future translation after the next timestep integration.
|
||||
*
|
||||
* This should be used instead of `rigidBody.setTranslation` to make the dynamic object
|
||||
* interacting with this kinematic body behave as expected. Internally, Rapier will compute
|
||||
* an artificial velocity for this rigid-body from its current position and its next kinematic
|
||||
* position. This velocity will be used to compute forces on dynamic bodies interacting with
|
||||
* this body.
|
||||
*
|
||||
* @param t - The kinematic translation to set.
|
||||
*/
|
||||
setNextKinematicTranslation(t: Vector): void;
|
||||
/**
|
||||
* If this rigid body is kinematic, sets its future rotation after the next timestep integration.
|
||||
*
|
||||
* This should be used instead of `rigidBody.setRotation` to make the dynamic object
|
||||
* interacting with this kinematic body behave as expected. Internally, Rapier will compute
|
||||
* an artificial velocity for this rigid-body from its current position and its next kinematic
|
||||
* position. This velocity will be used to compute forces on dynamic bodies interacting with
|
||||
* this body.
|
||||
*
|
||||
* @param rot - The kinematic rotation to set.
|
||||
*/
|
||||
setNextKinematicRotation(rot: Rotation): void;
|
||||
/**
|
||||
* The linear velocity of this rigid-body.
|
||||
*/
|
||||
linvel(): Vector;
|
||||
/**
|
||||
* The angular velocity of this rigid-body.
|
||||
*/
|
||||
angvel(): Vector;
|
||||
/**
|
||||
* The mass of this rigid-body.
|
||||
*/
|
||||
mass(): number;
|
||||
/**
|
||||
* The inverse mass taking into account translation locking.
|
||||
*/
|
||||
effectiveInvMass(): Vector;
|
||||
/**
|
||||
* The inverse of the mass of a rigid-body.
|
||||
*
|
||||
* If this is zero, the rigid-body is assumed to have infinite mass.
|
||||
*/
|
||||
invMass(): number;
|
||||
/**
|
||||
* The center of mass of a rigid-body expressed in its local-space.
|
||||
*/
|
||||
localCom(): Vector;
|
||||
/**
|
||||
* The world-space center of mass of the rigid-body.
|
||||
*/
|
||||
worldCom(): Vector;
|
||||
/**
|
||||
* The inverse of the principal angular inertia of the rigid-body.
|
||||
*
|
||||
* Components set to zero are assumed to be infinite along the corresponding principal axis.
|
||||
*/
|
||||
invPrincipalInertiaSqrt(): Vector;
|
||||
/**
|
||||
* The angular inertia along the principal inertia axes of the rigid-body.
|
||||
*/
|
||||
principalInertia(): Vector;
|
||||
/**
|
||||
* The principal vectors of the local angular inertia tensor of the rigid-body.
|
||||
*/
|
||||
principalInertiaLocalFrame(): Rotation;
|
||||
/**
|
||||
* The square-root of the world-space inverse angular inertia tensor of the rigid-body,
|
||||
* taking into account rotation locking.
|
||||
*/
|
||||
effectiveWorldInvInertiaSqrt(): SdpMatrix3;
|
||||
/**
|
||||
* The effective world-space angular inertia (that takes the potential rotation locking into account) of
|
||||
* this rigid-body.
|
||||
*/
|
||||
effectiveAngularInertia(): SdpMatrix3;
|
||||
/**
|
||||
* Put this rigid body to sleep.
|
||||
*
|
||||
* A sleeping body no longer moves and is no longer simulated by the physics engine unless
|
||||
* it is waken up. It can be woken manually with `this.wakeUp()` or automatically due to
|
||||
* external forces like contacts.
|
||||
*/
|
||||
sleep(): void;
|
||||
/**
|
||||
* Wakes this rigid-body up.
|
||||
*
|
||||
* A dynamic rigid-body that does not move during several consecutive frames will
|
||||
* be put to sleep by the physics engine, i.e., it will stop being simulated in order
|
||||
* to avoid useless computations.
|
||||
* This methods forces a sleeping rigid-body to wake-up. This is useful, e.g., before modifying
|
||||
* the position of a dynamic body so that it is properly simulated afterwards.
|
||||
*/
|
||||
wakeUp(): void;
|
||||
/**
|
||||
* Is CCD enabled for this rigid-body?
|
||||
*/
|
||||
isCcdEnabled(): boolean;
|
||||
/**
|
||||
* The number of colliders attached to this rigid-body.
|
||||
*/
|
||||
numColliders(): number;
|
||||
/**
|
||||
* Retrieves the `i-th` collider attached to this rigid-body.
|
||||
*
|
||||
* @param i - The index of the collider to retrieve. Must be a number in `[0, this.numColliders()[`.
|
||||
* This index is **not** the same as the unique identifier of the collider.
|
||||
*/
|
||||
collider(i: number): Collider;
|
||||
/**
|
||||
* Sets whether this rigid-body is enabled or not.
|
||||
*
|
||||
* @param enabled - Set to `false` to disable this rigid-body and all its attached colliders.
|
||||
*/
|
||||
setEnabled(enabled: boolean): void;
|
||||
/**
|
||||
* Is this rigid-body enabled?
|
||||
*/
|
||||
isEnabled(): boolean;
|
||||
/**
|
||||
* The status of this rigid-body: static, dynamic, or kinematic.
|
||||
*/
|
||||
bodyType(): RigidBodyType;
|
||||
/**
|
||||
* Set a new status for this rigid-body: static, dynamic, or kinematic.
|
||||
*/
|
||||
setBodyType(type: RigidBodyType, wakeUp: boolean): void;
|
||||
/**
|
||||
* Is this rigid-body sleeping?
|
||||
*/
|
||||
isSleeping(): boolean;
|
||||
/**
|
||||
* Is the velocity of this rigid-body not zero?
|
||||
*/
|
||||
isMoving(): boolean;
|
||||
/**
|
||||
* Is this rigid-body static?
|
||||
*/
|
||||
isFixed(): boolean;
|
||||
/**
|
||||
* Is this rigid-body kinematic?
|
||||
*/
|
||||
isKinematic(): boolean;
|
||||
/**
|
||||
* Is this rigid-body dynamic?
|
||||
*/
|
||||
isDynamic(): boolean;
|
||||
/**
|
||||
* The linear damping coefficient of this rigid-body.
|
||||
*/
|
||||
linearDamping(): number;
|
||||
/**
|
||||
* The angular damping coefficient of this rigid-body.
|
||||
*/
|
||||
angularDamping(): number;
|
||||
/**
|
||||
* Sets the linear damping factor applied to this rigid-body.
|
||||
*
|
||||
* @param factor - The damping factor to set.
|
||||
*/
|
||||
setLinearDamping(factor: number): void;
|
||||
/**
|
||||
* Recompute the mass-properties of this rigid-bodies based on its currently attached colliders.
|
||||
*/
|
||||
recomputeMassPropertiesFromColliders(): void;
|
||||
/**
|
||||
* Sets the rigid-body's additional mass.
|
||||
*
|
||||
* The total angular inertia of the rigid-body will be scaled automatically based on this additional mass. If this
|
||||
* scaling effect isn’t desired, use Self::additional_mass_properties instead of this method.
|
||||
*
|
||||
* This is only the "additional" mass because the total mass of the rigid-body is equal to the sum of this
|
||||
* additional mass and the mass computed from the colliders (with non-zero densities) attached to this rigid-body.
|
||||
*
|
||||
* That total mass (which includes the attached colliders’ contributions) will be updated at the name physics step,
|
||||
* or can be updated manually with `this.recomputeMassPropertiesFromColliders`.
|
||||
*
|
||||
* This will override any previous additional mass-properties set by `this.setAdditionalMass`,
|
||||
* `this.setAdditionalMassProperties`, `RigidBodyDesc::setAdditionalMass`, or
|
||||
* `RigidBodyDesc.setAdditionalMassfProperties` for this rigid-body.
|
||||
*
|
||||
* @param mass - The additional mass to set.
|
||||
* @param wakeUp - If `true` then the rigid-body will be woken up if it was put to sleep because it did not move for a while.
|
||||
*/
|
||||
setAdditionalMass(mass: number, wakeUp: boolean): void;
|
||||
/**
|
||||
* Sets the rigid-body's additional mass-properties.
|
||||
*
|
||||
* This is only the "additional" mass-properties because the total mass-properties of the rigid-body is equal to the
|
||||
* sum of this additional mass-properties and the mass computed from the colliders (with non-zero densities) attached
|
||||
* to this rigid-body.
|
||||
*
|
||||
* That total mass-properties (which include the attached colliders’ contributions) will be updated at the name
|
||||
* physics step, or can be updated manually with `this.recomputeMassPropertiesFromColliders`.
|
||||
*
|
||||
* This will override any previous mass-properties set by `this.setAdditionalMass`,
|
||||
* `this.setAdditionalMassProperties`, `RigidBodyDesc.setAdditionalMass`, or `RigidBodyDesc.setAdditionalMassProperties`
|
||||
* for this rigid-body.
|
||||
*
|
||||
* If `wake_up` is true then the rigid-body will be woken up if it was put to sleep because it did not move for a while.
|
||||
*/
|
||||
setAdditionalMassProperties(mass: number, centerOfMass: Vector, principalAngularInertia: Vector, angularInertiaLocalFrame: Rotation, wakeUp: boolean): void;
|
||||
/**
|
||||
* Sets the linear damping factor applied to this rigid-body.
|
||||
*
|
||||
* @param factor - The damping factor to set.
|
||||
*/
|
||||
setAngularDamping(factor: number): void;
|
||||
/**
|
||||
* Resets to zero the user forces (but not torques) applied to this rigid-body.
|
||||
*
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
resetForces(wakeUp: boolean): void;
|
||||
/**
|
||||
* Resets to zero the user torques applied to this rigid-body.
|
||||
*
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
resetTorques(wakeUp: boolean): void;
|
||||
/**
|
||||
* Adds a force at the center-of-mass of this rigid-body.
|
||||
*
|
||||
* @param force - the world-space force to add to the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
addForce(force: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Applies an impulse at the center-of-mass of this rigid-body.
|
||||
*
|
||||
* @param impulse - the world-space impulse to apply on the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
applyImpulse(impulse: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Adds a torque at the center-of-mass of this rigid-body.
|
||||
*
|
||||
* @param torque - the world-space torque to add to the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
addTorque(torque: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Applies an impulsive torque at the center-of-mass of this rigid-body.
|
||||
*
|
||||
* @param torqueImpulse - the world-space torque impulse to apply on the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
applyTorqueImpulse(torqueImpulse: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Adds a force at the given world-space point of this rigid-body.
|
||||
*
|
||||
* @param force - the world-space force to add to the rigid-body.
|
||||
* @param point - the world-space point where the impulse is to be applied on the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
addForceAtPoint(force: Vector, point: Vector, wakeUp: boolean): void;
|
||||
/**
|
||||
* Applies an impulse at the given world-space point of this rigid-body.
|
||||
*
|
||||
* @param impulse - the world-space impulse to apply on the rigid-body.
|
||||
* @param point - the world-space point where the impulse is to be applied on the rigid-body.
|
||||
* @param wakeUp - should the rigid-body be automatically woken-up?
|
||||
*/
|
||||
applyImpulseAtPoint(impulse: Vector, point: Vector, wakeUp: boolean): void;
|
||||
}
|
||||
export declare class RigidBodyDesc {
|
||||
enabled: boolean;
|
||||
translation: Vector;
|
||||
rotation: Rotation;
|
||||
gravityScale: number;
|
||||
mass: number;
|
||||
massOnly: boolean;
|
||||
centerOfMass: Vector;
|
||||
translationsEnabledX: boolean;
|
||||
translationsEnabledY: boolean;
|
||||
linvel: Vector;
|
||||
angvel: Vector;
|
||||
principalAngularInertia: Vector;
|
||||
angularInertiaLocalFrame: Rotation;
|
||||
translationsEnabledZ: boolean;
|
||||
rotationsEnabledX: boolean;
|
||||
rotationsEnabledY: boolean;
|
||||
rotationsEnabledZ: boolean;
|
||||
linearDamping: number;
|
||||
angularDamping: number;
|
||||
status: RigidBodyType;
|
||||
canSleep: boolean;
|
||||
sleeping: boolean;
|
||||
ccdEnabled: boolean;
|
||||
dominanceGroup: number;
|
||||
additionalSolverIterations: number;
|
||||
userData?: unknown;
|
||||
constructor(status: RigidBodyType);
|
||||
/**
|
||||
* A rigid-body descriptor used to build a dynamic rigid-body.
|
||||
*/
|
||||
static dynamic(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a position-based kinematic rigid-body.
|
||||
*/
|
||||
static kinematicPositionBased(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a velocity-based kinematic rigid-body.
|
||||
*/
|
||||
static kinematicVelocityBased(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a fixed rigid-body.
|
||||
*/
|
||||
static fixed(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a dynamic rigid-body.
|
||||
*
|
||||
* @deprecated The method has been renamed to `.dynamic()`.
|
||||
*/
|
||||
static newDynamic(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a position-based kinematic rigid-body.
|
||||
*
|
||||
* @deprecated The method has been renamed to `.kinematicPositionBased()`.
|
||||
*/
|
||||
static newKinematicPositionBased(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a velocity-based kinematic rigid-body.
|
||||
*
|
||||
* @deprecated The method has been renamed to `.kinematicVelocityBased()`.
|
||||
*/
|
||||
static newKinematicVelocityBased(): RigidBodyDesc;
|
||||
/**
|
||||
* A rigid-body descriptor used to build a fixed rigid-body.
|
||||
*
|
||||
* @deprecated The method has been renamed to `.fixed()`.
|
||||
*/
|
||||
static newStatic(): RigidBodyDesc;
|
||||
setDominanceGroup(group: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the number of additional solver iterations that will be run for this
|
||||
* rigid-body and everything that interacts with it directly or indirectly
|
||||
* through contacts or joints.
|
||||
*
|
||||
* Compared to increasing the global `World.numSolverIteration`, setting this
|
||||
* value lets you increase accuracy on only a subset of the scene, resulting in reduced
|
||||
* performance loss.
|
||||
*
|
||||
* @param iters - The new number of additional solver iterations (default: 0).
|
||||
*/
|
||||
setAdditionalSolverIterations(iters: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets whether the created rigid-body will be enabled or disabled.
|
||||
* @param enabled − If set to `false` the rigid-body will be disabled at creation.
|
||||
*/
|
||||
setEnabled(enabled: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the initial translation of the rigid-body to create.
|
||||
*
|
||||
* @param tra - The translation to set.
|
||||
*/
|
||||
setTranslation(x: number, y: number, z: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the initial rotation of the rigid-body to create.
|
||||
*
|
||||
* @param rot - The rotation to set.
|
||||
*/
|
||||
setRotation(rot: Rotation): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the scale factor applied to the gravity affecting
|
||||
* the rigid-body being built.
|
||||
*
|
||||
* @param scale - The scale factor. Set this to `0.0` if the rigid-body
|
||||
* needs to ignore gravity.
|
||||
*/
|
||||
setGravityScale(scale: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the initial mass of the rigid-body being built, before adding colliders' contributions.
|
||||
*
|
||||
* @param mass − The initial mass of the rigid-body to create.
|
||||
*/
|
||||
setAdditionalMass(mass: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the initial linear velocity of the rigid-body to create.
|
||||
*
|
||||
* @param x - The linear velocity to set along the `x` axis.
|
||||
* @param y - The linear velocity to set along the `y` axis.
|
||||
* @param z - The linear velocity to set along the `z` axis.
|
||||
*/
|
||||
setLinvel(x: number, y: number, z: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the initial angular velocity of the rigid-body to create.
|
||||
*
|
||||
* @param vel - The angular velocity to set.
|
||||
*/
|
||||
setAngvel(vel: Vector): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the mass properties of the rigid-body being built.
|
||||
*
|
||||
* Note that the final mass properties of the rigid-bodies depends
|
||||
* on the initial mass-properties of the rigid-body (set by this method)
|
||||
* to which is added the contributions of all the colliders with non-zero density
|
||||
* attached to this rigid-body.
|
||||
*
|
||||
* Therefore, if you want your provided mass properties to be the final
|
||||
* mass properties of your rigid-body, don't attach colliders to it, or
|
||||
* only attach colliders with densities equal to zero.
|
||||
*
|
||||
* @param mass − The initial mass of the rigid-body to create.
|
||||
* @param centerOfMass − The initial center-of-mass of the rigid-body to create.
|
||||
* @param principalAngularInertia − The initial principal angular inertia of the rigid-body to create.
|
||||
* These are the eigenvalues of the angular inertia matrix.
|
||||
* @param angularInertiaLocalFrame − The initial local angular inertia frame of the rigid-body to create.
|
||||
* These are the eigenvectors of the angular inertia matrix.
|
||||
*/
|
||||
setAdditionalMassProperties(mass: number, centerOfMass: Vector, principalAngularInertia: Vector, angularInertiaLocalFrame: Rotation): RigidBodyDesc;
|
||||
/**
|
||||
* Allow translation of this rigid-body only along specific axes.
|
||||
* @param translationsEnabledX - Are translations along the X axis enabled?
|
||||
* @param translationsEnabledY - Are translations along the y axis enabled?
|
||||
* @param translationsEnabledZ - Are translations along the Z axis enabled?
|
||||
*/
|
||||
enabledTranslations(translationsEnabledX: boolean, translationsEnabledY: boolean, translationsEnabledZ: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Allow translation of this rigid-body only along specific axes.
|
||||
* @param translationsEnabledX - Are translations along the X axis enabled?
|
||||
* @param translationsEnabledY - Are translations along the y axis enabled?
|
||||
* @param translationsEnabledZ - Are translations along the Z axis enabled?
|
||||
* @deprecated use `this.enabledTranslations` with the same arguments instead.
|
||||
*/
|
||||
restrictTranslations(translationsEnabledX: boolean, translationsEnabledY: boolean, translationsEnabledZ: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Locks all translations that would have resulted from forces on
|
||||
* the created rigid-body.
|
||||
*/
|
||||
lockTranslations(): RigidBodyDesc;
|
||||
/**
|
||||
* Allow rotation of this rigid-body only along specific axes.
|
||||
* @param rotationsEnabledX - Are rotations along the X axis enabled?
|
||||
* @param rotationsEnabledY - Are rotations along the y axis enabled?
|
||||
* @param rotationsEnabledZ - Are rotations along the Z axis enabled?
|
||||
*/
|
||||
enabledRotations(rotationsEnabledX: boolean, rotationsEnabledY: boolean, rotationsEnabledZ: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Allow rotation of this rigid-body only along specific axes.
|
||||
* @param rotationsEnabledX - Are rotations along the X axis enabled?
|
||||
* @param rotationsEnabledY - Are rotations along the y axis enabled?
|
||||
* @param rotationsEnabledZ - Are rotations along the Z axis enabled?
|
||||
* @deprecated use `this.enabledRotations` with the same arguments instead.
|
||||
*/
|
||||
restrictRotations(rotationsEnabledX: boolean, rotationsEnabledY: boolean, rotationsEnabledZ: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Locks all rotations that would have resulted from forces on
|
||||
* the created rigid-body.
|
||||
*/
|
||||
lockRotations(): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the linear damping of the rigid-body to create.
|
||||
*
|
||||
* This will progressively slowdown the translational movement of the rigid-body.
|
||||
*
|
||||
* @param damping - The angular damping coefficient. Should be >= 0. The higher this
|
||||
* value is, the stronger the translational slowdown will be.
|
||||
*/
|
||||
setLinearDamping(damping: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the angular damping of the rigid-body to create.
|
||||
*
|
||||
* This will progressively slowdown the rotational movement of the rigid-body.
|
||||
*
|
||||
* @param damping - The angular damping coefficient. Should be >= 0. The higher this
|
||||
* value is, the stronger the rotational slowdown will be.
|
||||
*/
|
||||
setAngularDamping(damping: number): RigidBodyDesc;
|
||||
/**
|
||||
* Sets whether or not the rigid-body to create can sleep.
|
||||
*
|
||||
* @param can - true if the rigid-body can sleep, false if it can't.
|
||||
*/
|
||||
setCanSleep(can: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Sets whether or not the rigid-body is to be created asleep.
|
||||
*
|
||||
* @param can - true if the rigid-body should be in sleep, default false.
|
||||
*/
|
||||
setSleeping(sleeping: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Sets whether Continuous Collision Detection (CCD) is enabled for this rigid-body.
|
||||
*
|
||||
* @param enabled - true if the rigid-body has CCD enabled.
|
||||
*/
|
||||
setCcdEnabled(enabled: boolean): RigidBodyDesc;
|
||||
/**
|
||||
* Sets the user-defined object of this rigid-body.
|
||||
*
|
||||
* @param userData - The user-defined object to set.
|
||||
*/
|
||||
setUserData(data?: unknown): RigidBodyDesc;
|
||||
}
|
||||
78
app/node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body_set.d.ts
generated
vendored
Normal file
78
app/node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body_set.d.ts
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import { RawRigidBodySet } from "../raw";
|
||||
import { RigidBody, RigidBodyDesc, RigidBodyHandle } from "./rigid_body";
|
||||
import { ColliderSet } from "../geometry";
|
||||
import { ImpulseJointSet } from "./impulse_joint_set";
|
||||
import { MultibodyJointSet } from "./multibody_joint_set";
|
||||
import { IslandManager } from "./island_manager";
|
||||
/**
|
||||
* A set of rigid bodies that can be handled by a physics pipeline.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `rigidBodySet.free()`
|
||||
* once you are done using it (and all the rigid-bodies it created).
|
||||
*/
|
||||
export declare class RigidBodySet {
|
||||
raw: RawRigidBodySet;
|
||||
private map;
|
||||
/**
|
||||
* Release the WASM memory occupied by this rigid-body set.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawRigidBodySet);
|
||||
/**
|
||||
* Internal method, do not call this explicitly.
|
||||
*/
|
||||
finalizeDeserialization(colliderSet: ColliderSet): void;
|
||||
/**
|
||||
* Creates a new rigid-body and return its integer handle.
|
||||
*
|
||||
* @param desc - The description of the rigid-body to create.
|
||||
*/
|
||||
createRigidBody(colliderSet: ColliderSet, desc: RigidBodyDesc): RigidBody;
|
||||
/**
|
||||
* Removes a rigid-body from this set.
|
||||
*
|
||||
* This will also remove all the colliders and joints attached to the rigid-body.
|
||||
*
|
||||
* @param handle - The integer handle of the rigid-body to remove.
|
||||
* @param colliders - The set of colliders that may contain colliders attached to the removed rigid-body.
|
||||
* @param impulseJoints - The set of impulse joints that may contain joints attached to the removed rigid-body.
|
||||
* @param multibodyJoints - The set of multibody joints that may contain joints attached to the removed rigid-body.
|
||||
*/
|
||||
remove(handle: RigidBodyHandle, islands: IslandManager, colliders: ColliderSet, impulseJoints: ImpulseJointSet, multibodyJoints: MultibodyJointSet): void;
|
||||
/**
|
||||
* The number of rigid-bodies on this set.
|
||||
*/
|
||||
len(): number;
|
||||
/**
|
||||
* Does this set contain a rigid-body with the given handle?
|
||||
*
|
||||
* @param handle - The rigid-body handle to check.
|
||||
*/
|
||||
contains(handle: RigidBodyHandle): boolean;
|
||||
/**
|
||||
* Gets the rigid-body with the given handle.
|
||||
*
|
||||
* @param handle - The handle of the rigid-body to retrieve.
|
||||
*/
|
||||
get(handle: RigidBodyHandle): RigidBody | null;
|
||||
/**
|
||||
* Applies the given closure to each rigid-body contained by this set.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEach(f: (body: RigidBody) => void): void;
|
||||
/**
|
||||
* Applies the given closure to each active rigid-bodies contained by this set.
|
||||
*
|
||||
* A rigid-body is active if it is not sleeping, i.e., if it moved recently.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEachActiveRigidBody(islands: IslandManager, f: (body: RigidBody) => void): void;
|
||||
/**
|
||||
* Gets all rigid-bodies in the list.
|
||||
*
|
||||
* @returns rigid-bodies list.
|
||||
*/
|
||||
getAll(): RigidBody[];
|
||||
}
|
||||
7
app/node_modules/@dimforge/rapier3d-compat/exports.d.ts
generated
vendored
Normal file
7
app/node_modules/@dimforge/rapier3d-compat/exports.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare function version(): string;
|
||||
export * from "./math";
|
||||
export * from "./dynamics";
|
||||
export * from "./geometry";
|
||||
export * from "./pipeline";
|
||||
export * from "./init";
|
||||
export * from "./control";
|
||||
15
app/node_modules/@dimforge/rapier3d-compat/geometry/broad_phase.d.ts
generated
vendored
Normal file
15
app/node_modules/@dimforge/rapier3d-compat/geometry/broad_phase.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { RawBroadPhase } from "../raw";
|
||||
/**
|
||||
* The broad-phase used for coarse collision-detection.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `broadPhase.free()`
|
||||
* once you are done using it.
|
||||
*/
|
||||
export declare class BroadPhase {
|
||||
raw: RawBroadPhase;
|
||||
/**
|
||||
* Release the WASM memory occupied by this broad-phase.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawBroadPhase);
|
||||
}
|
||||
763
app/node_modules/@dimforge/rapier3d-compat/geometry/collider.d.ts
generated
vendored
Normal file
763
app/node_modules/@dimforge/rapier3d-compat/geometry/collider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,763 @@
|
||||
import { Rotation, Vector } from "../math";
|
||||
import { CoefficientCombineRule, RigidBody, RigidBodySet } from "../dynamics";
|
||||
import { ActiveHooks, ActiveEvents } from "../pipeline";
|
||||
import { InteractionGroups } from "./interaction_groups";
|
||||
import { Shape, ShapeType } from "./shape";
|
||||
import { Ray, RayIntersection } from "./ray";
|
||||
import { PointProjection } from "./point";
|
||||
import { ShapeColliderTOI, ShapeTOI } from "./toi";
|
||||
import { ShapeContact } from "./contact";
|
||||
import { ColliderSet } from "./collider_set";
|
||||
/**
|
||||
* Flags affecting whether collision-detection happens between two colliders
|
||||
* depending on the type of rigid-bodies they are attached to.
|
||||
*/
|
||||
export declare enum ActiveCollisionTypes {
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a dynamic body
|
||||
* and another collider attached to a dynamic body.
|
||||
*/
|
||||
DYNAMIC_DYNAMIC = 1,
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a dynamic body
|
||||
* and another collider attached to a kinematic body.
|
||||
*/
|
||||
DYNAMIC_KINEMATIC = 12,
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a dynamic body
|
||||
* and another collider attached to a fixed body (or not attached to any body).
|
||||
*/
|
||||
DYNAMIC_FIXED = 2,
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a kinematic body
|
||||
* and another collider attached to a kinematic body.
|
||||
*/
|
||||
KINEMATIC_KINEMATIC = 52224,
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a kinematic body
|
||||
* and another collider attached to a fixed body (or not attached to any body).
|
||||
*/
|
||||
KINEMATIC_FIXED = 8704,
|
||||
/**
|
||||
* Enable collision-detection between a collider attached to a fixed body (or
|
||||
* not attached to any body) and another collider attached to a fixed body (or
|
||||
* not attached to any body).
|
||||
*/
|
||||
FIXED_FIXED = 32,
|
||||
/**
|
||||
* The default active collision types, enabling collisions between a dynamic body
|
||||
* and another body of any type, but not enabling collisions between two non-dynamic bodies.
|
||||
*/
|
||||
DEFAULT = 15,
|
||||
/**
|
||||
* Enable collisions between any kind of rigid-bodies (including between two non-dynamic bodies).
|
||||
*/
|
||||
ALL = 60943
|
||||
}
|
||||
/**
|
||||
* The integer identifier of a collider added to a `ColliderSet`.
|
||||
*/
|
||||
export declare type ColliderHandle = number;
|
||||
/**
|
||||
* A geometric entity that can be attached to a body so it can be affected
|
||||
* by contacts and proximity queries.
|
||||
*/
|
||||
export declare class Collider {
|
||||
private colliderSet;
|
||||
readonly handle: ColliderHandle;
|
||||
private _shape;
|
||||
private _parent;
|
||||
constructor(colliderSet: ColliderSet, handle: ColliderHandle, parent: RigidBody | null, shape?: Shape);
|
||||
/** @internal */
|
||||
finalizeDeserialization(bodies: RigidBodySet): void;
|
||||
private ensureShapeIsCached;
|
||||
/**
|
||||
* The shape of this collider.
|
||||
*/
|
||||
get shape(): Shape;
|
||||
/**
|
||||
* Checks if this collider is still valid (i.e. that it has
|
||||
* not been deleted from the collider set yet).
|
||||
*/
|
||||
isValid(): boolean;
|
||||
/**
|
||||
* The world-space translation of this rigid-body.
|
||||
*/
|
||||
translation(): Vector;
|
||||
/**
|
||||
* The world-space orientation of this rigid-body.
|
||||
*/
|
||||
rotation(): Rotation;
|
||||
/**
|
||||
* Is this collider a sensor?
|
||||
*/
|
||||
isSensor(): boolean;
|
||||
/**
|
||||
* Sets whether or not this collider is a sensor.
|
||||
* @param isSensor - If `true`, the collider will be a sensor.
|
||||
*/
|
||||
setSensor(isSensor: boolean): void;
|
||||
/**
|
||||
* Sets the new shape of the collider.
|
||||
* @param shape - The collider’s new shape.
|
||||
*/
|
||||
setShape(shape: Shape): void;
|
||||
/**
|
||||
* Sets whether this collider is enabled or not.
|
||||
*
|
||||
* @param enabled - Set to `false` to disable this collider (its parent rigid-body won’t be disabled automatically by this).
|
||||
*/
|
||||
setEnabled(enabled: boolean): void;
|
||||
/**
|
||||
* Is this collider enabled?
|
||||
*/
|
||||
isEnabled(): boolean;
|
||||
/**
|
||||
* Sets the restitution coefficient of the collider to be created.
|
||||
*
|
||||
* @param restitution - The restitution coefficient in `[0, 1]`. A value of 0 (the default) means no bouncing behavior
|
||||
* while 1 means perfect bouncing (though energy may still be lost due to numerical errors of the
|
||||
* constraints solver).
|
||||
*/
|
||||
setRestitution(restitution: number): void;
|
||||
/**
|
||||
* Sets the friction coefficient of the collider to be created.
|
||||
*
|
||||
* @param friction - The friction coefficient. Must be greater or equal to 0. This is generally smaller than 1. The
|
||||
* higher the coefficient, the stronger friction forces will be for contacts with the collider
|
||||
* being built.
|
||||
*/
|
||||
setFriction(friction: number): void;
|
||||
/**
|
||||
* Gets the rule used to combine the friction coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*/
|
||||
frictionCombineRule(): CoefficientCombineRule;
|
||||
/**
|
||||
* Sets the rule used to combine the friction coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*
|
||||
* @param rule − The combine rule to apply.
|
||||
*/
|
||||
setFrictionCombineRule(rule: CoefficientCombineRule): void;
|
||||
/**
|
||||
* Gets the rule used to combine the restitution coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*/
|
||||
restitutionCombineRule(): CoefficientCombineRule;
|
||||
/**
|
||||
* Sets the rule used to combine the restitution coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*
|
||||
* @param rule − The combine rule to apply.
|
||||
*/
|
||||
setRestitutionCombineRule(rule: CoefficientCombineRule): void;
|
||||
/**
|
||||
* Sets the collision groups used by this collider.
|
||||
*
|
||||
* Two colliders will interact iff. their collision groups are compatible.
|
||||
* See the documentation of `InteractionGroups` for details on teh used bit pattern.
|
||||
*
|
||||
* @param groups - The collision groups used for the collider being built.
|
||||
*/
|
||||
setCollisionGroups(groups: InteractionGroups): void;
|
||||
/**
|
||||
* Sets the solver groups used by this collider.
|
||||
*
|
||||
* Forces between two colliders in contact will be computed iff their solver
|
||||
* groups are compatible.
|
||||
* See the documentation of `InteractionGroups` for details on the used bit pattern.
|
||||
*
|
||||
* @param groups - The solver groups used for the collider being built.
|
||||
*/
|
||||
setSolverGroups(groups: InteractionGroups): void;
|
||||
/**
|
||||
* Get the physics hooks active for this collider.
|
||||
*/
|
||||
activeHooks(): number;
|
||||
/**
|
||||
* Set the physics hooks active for this collider.
|
||||
*
|
||||
* Use this to enable custom filtering rules for contact/intersecstion pairs involving this collider.
|
||||
*
|
||||
* @param activeHooks - The hooks active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveHooks(activeHooks: ActiveHooks): void;
|
||||
/**
|
||||
* The events active for this collider.
|
||||
*/
|
||||
activeEvents(): ActiveEvents;
|
||||
/**
|
||||
* Set the events active for this collider.
|
||||
*
|
||||
* Use this to enable contact and/or intersection event reporting for this collider.
|
||||
*
|
||||
* @param activeEvents - The events active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveEvents(activeEvents: ActiveEvents): void;
|
||||
/**
|
||||
* Gets the collision types active for this collider.
|
||||
*/
|
||||
activeCollisionTypes(): ActiveCollisionTypes;
|
||||
/**
|
||||
* Sets the total force magnitude beyond which a contact force event can be emitted.
|
||||
*
|
||||
* @param threshold - The new force threshold.
|
||||
*/
|
||||
setContactForceEventThreshold(threshold: number): void;
|
||||
/**
|
||||
* The total force magnitude beyond which a contact force event can be emitted.
|
||||
*/
|
||||
contactForceEventThreshold(): number;
|
||||
/**
|
||||
* Set the collision types active for this collider.
|
||||
*
|
||||
* @param activeCollisionTypes - The hooks active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveCollisionTypes(activeCollisionTypes: ActiveCollisionTypes): void;
|
||||
/**
|
||||
* Sets the uniform density of this collider.
|
||||
*
|
||||
* This will override any previous mass-properties set by `this.setDensity`,
|
||||
* `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,
|
||||
* `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.
|
||||
*
|
||||
* The mass and angular inertia of this collider will be computed automatically based on its
|
||||
* shape.
|
||||
*/
|
||||
setDensity(density: number): void;
|
||||
/**
|
||||
* Sets the mass of this collider.
|
||||
*
|
||||
* This will override any previous mass-properties set by `this.setDensity`,
|
||||
* `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,
|
||||
* `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.
|
||||
*
|
||||
* The angular inertia of this collider will be computed automatically based on its shape
|
||||
* and this mass value.
|
||||
*/
|
||||
setMass(mass: number): void;
|
||||
/**
|
||||
* Sets the mass of this collider.
|
||||
*
|
||||
* This will override any previous mass-properties set by `this.setDensity`,
|
||||
* `this.setMass`, `this.setMassProperties`, `ColliderDesc.density`,
|
||||
* `ColliderDesc.mass`, or `ColliderDesc.massProperties` for this collider.
|
||||
*/
|
||||
setMassProperties(mass: number, centerOfMass: Vector, principalAngularInertia: Vector, angularInertiaLocalFrame: Rotation): void;
|
||||
/**
|
||||
* Sets the translation of this collider.
|
||||
*
|
||||
* @param tra - The world-space position of the collider.
|
||||
*/
|
||||
setTranslation(tra: Vector): void;
|
||||
/**
|
||||
* Sets the translation of this collider relative to its parent rigid-body.
|
||||
*
|
||||
* Does nothing if this collider isn't attached to a rigid-body.
|
||||
*
|
||||
* @param tra - The new translation of the collider relative to its parent.
|
||||
*/
|
||||
setTranslationWrtParent(tra: Vector): void;
|
||||
/**
|
||||
* Sets the rotation quaternion of this collider.
|
||||
*
|
||||
* This does nothing if a zero quaternion is provided.
|
||||
*
|
||||
* @param rotation - The rotation to set.
|
||||
*/
|
||||
setRotation(rot: Rotation): void;
|
||||
/**
|
||||
* Sets the rotation quaternion of this collider relative to its parent rigid-body.
|
||||
*
|
||||
* This does nothing if a zero quaternion is provided or if this collider isn't
|
||||
* attached to a rigid-body.
|
||||
*
|
||||
* @param rotation - The rotation to set.
|
||||
*/
|
||||
setRotationWrtParent(rot: Rotation): void;
|
||||
/**
|
||||
* The type of the shape of this collider.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
shapeType(): ShapeType;
|
||||
/**
|
||||
* The half-extents of this collider if it is a cuboid shape.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
halfExtents(): Vector;
|
||||
/**
|
||||
* Sets the half-extents of this collider if it is a cuboid shape.
|
||||
*
|
||||
* @param newHalfExtents - desired half extents.
|
||||
*/
|
||||
setHalfExtents(newHalfExtents: Vector): void;
|
||||
/**
|
||||
* The radius of this collider if it is a ball, cylinder, capsule, or cone shape.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
radius(): number;
|
||||
/**
|
||||
* Sets the radius of this collider if it is a ball, cylinder, capsule, or cone shape.
|
||||
*
|
||||
* @param newRadius - desired radius.
|
||||
*/
|
||||
setRadius(newRadius: number): void;
|
||||
/**
|
||||
* The radius of the round edges of this collider if it is a round cylinder.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
roundRadius(): number;
|
||||
/**
|
||||
* Sets the radius of the round edges of this collider if it has round edges.
|
||||
*
|
||||
* @param newBorderRadius - desired round edge radius.
|
||||
*/
|
||||
setRoundRadius(newBorderRadius: number): void;
|
||||
/**
|
||||
* The half height of this collider if it is a cylinder, capsule, or cone shape.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
halfHeight(): number;
|
||||
/**
|
||||
* Sets the half height of this collider if it is a cylinder, capsule, or cone shape.
|
||||
*
|
||||
* @param newHalfheight - desired half height.
|
||||
*/
|
||||
setHalfHeight(newHalfheight: number): void;
|
||||
/**
|
||||
* If this collider has a triangle mesh, polyline, convex polygon, or convex polyhedron shape,
|
||||
* this returns the vertex buffer of said shape.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
vertices(): Float32Array;
|
||||
/**
|
||||
* If this collider has a triangle mesh, polyline, or convex polyhedron shape,
|
||||
* this returns the index buffer of said shape.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
indices(): Uint32Array | undefined;
|
||||
/**
|
||||
* If this collider has a heightfield shape, this returns the heights buffer of
|
||||
* the heightfield.
|
||||
* In 3D, the returned height matrix is provided in column-major order.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
heightfieldHeights(): Float32Array;
|
||||
/**
|
||||
* If this collider has a heightfield shape, this returns the scale
|
||||
* applied to it.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
heightfieldScale(): Vector;
|
||||
/**
|
||||
* If this collider has a heightfield shape, this returns the number of
|
||||
* rows of its height matrix.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
heightfieldNRows(): number;
|
||||
/**
|
||||
* If this collider has a heightfield shape, this returns the number of
|
||||
* columns of its height matrix.
|
||||
* @deprecated this field will be removed in the future, please access this field on `shape` member instead.
|
||||
*/
|
||||
heightfieldNCols(): number;
|
||||
/**
|
||||
* The rigid-body this collider is attached to.
|
||||
*/
|
||||
parent(): RigidBody | null;
|
||||
/**
|
||||
* The friction coefficient of this collider.
|
||||
*/
|
||||
friction(): number;
|
||||
/**
|
||||
* The restitution coefficient of this collider.
|
||||
*/
|
||||
restitution(): number;
|
||||
/**
|
||||
* The density of this collider.
|
||||
*/
|
||||
density(): number;
|
||||
/**
|
||||
* The mass of this collider.
|
||||
*/
|
||||
mass(): number;
|
||||
/**
|
||||
* The volume of this collider.
|
||||
*/
|
||||
volume(): number;
|
||||
/**
|
||||
* The collision groups of this collider.
|
||||
*/
|
||||
collisionGroups(): InteractionGroups;
|
||||
/**
|
||||
* The solver groups of this collider.
|
||||
*/
|
||||
solverGroups(): InteractionGroups;
|
||||
/**
|
||||
* Tests if this collider contains a point.
|
||||
*
|
||||
* @param point - The point to test.
|
||||
*/
|
||||
containsPoint(point: Vector): boolean;
|
||||
/**
|
||||
* Find the projection of a point on this collider.
|
||||
*
|
||||
* @param point - The point to project.
|
||||
* @param solid - If this is set to `true` then the collider shapes are considered to
|
||||
* be plain (if the point is located inside of a plain shape, its projection is the point
|
||||
* itself). If it is set to `false` the collider shapes are considered to be hollow
|
||||
* (if the point is located inside of an hollow shape, it is projected on the shape's
|
||||
* boundary).
|
||||
*/
|
||||
projectPoint(point: Vector, solid: boolean): PointProjection | null;
|
||||
/**
|
||||
* Tests if this collider intersects the given ray.
|
||||
*
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
*/
|
||||
intersectsRay(ray: Ray, maxToi: number): boolean;
|
||||
castShape(collider1Vel: Vector, shape2: Shape, shape2Pos: Vector, shape2Rot: Rotation, shape2Vel: Vector, maxToi: number, stopAtPenetration: boolean): ShapeTOI | null;
|
||||
castCollider(collider1Vel: Vector, collider2: Collider, collider2Vel: Vector, maxToi: number, stopAtPenetration: boolean): ShapeColliderTOI | null;
|
||||
intersectsShape(shape2: Shape, shapePos2: Vector, shapeRot2: Rotation): boolean;
|
||||
/**
|
||||
* Computes one pair of contact points between the shape owned by this collider and the given shape.
|
||||
*
|
||||
* @param shape2 - The second shape.
|
||||
* @param shape2Pos - The initial position of the second shape.
|
||||
* @param shape2Rot - The rotation of the second shape.
|
||||
* @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.
|
||||
* @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.
|
||||
*/
|
||||
contactShape(shape2: Shape, shape2Pos: Vector, shape2Rot: Rotation, prediction: number): ShapeContact | null;
|
||||
/**
|
||||
* Computes one pair of contact points between the collider and the given collider.
|
||||
*
|
||||
* @param collider2 - The second collider.
|
||||
* @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.
|
||||
* @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.
|
||||
*/
|
||||
contactCollider(collider2: Collider, prediction: number): ShapeContact | null;
|
||||
castRay(ray: Ray, maxToi: number, solid: boolean): number;
|
||||
/**
|
||||
* Find the closest intersection between a ray and this collider.
|
||||
*
|
||||
* This also computes the normal at the hit point.
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
*/
|
||||
castRayAndGetNormal(ray: Ray, maxToi: number, solid: boolean): RayIntersection | null;
|
||||
}
|
||||
export declare enum MassPropsMode {
|
||||
Density = 0,
|
||||
Mass = 1,
|
||||
MassProps = 2
|
||||
}
|
||||
export declare class ColliderDesc {
|
||||
enabled: boolean;
|
||||
shape: Shape;
|
||||
massPropsMode: MassPropsMode;
|
||||
mass: number;
|
||||
centerOfMass: Vector;
|
||||
principalAngularInertia: Vector;
|
||||
angularInertiaLocalFrame: Rotation;
|
||||
density: number;
|
||||
friction: number;
|
||||
restitution: number;
|
||||
rotation: Rotation;
|
||||
translation: Vector;
|
||||
isSensor: boolean;
|
||||
collisionGroups: InteractionGroups;
|
||||
solverGroups: InteractionGroups;
|
||||
frictionCombineRule: CoefficientCombineRule;
|
||||
restitutionCombineRule: CoefficientCombineRule;
|
||||
activeEvents: ActiveEvents;
|
||||
activeHooks: ActiveHooks;
|
||||
activeCollisionTypes: ActiveCollisionTypes;
|
||||
contactForceEventThreshold: number;
|
||||
/**
|
||||
* Initializes a collider descriptor from the collision shape.
|
||||
*
|
||||
* @param shape - The shape of the collider being built.
|
||||
*/
|
||||
constructor(shape: Shape);
|
||||
/**
|
||||
* Create a new collider descriptor with a ball shape.
|
||||
*
|
||||
* @param radius - The radius of the ball.
|
||||
*/
|
||||
static ball(radius: number): ColliderDesc;
|
||||
/**
|
||||
* Create a new collider descriptor with a capsule shape.
|
||||
*
|
||||
* @param halfHeight - The half-height of the capsule, along the `y` axis.
|
||||
* @param radius - The radius of the capsule basis.
|
||||
*/
|
||||
static capsule(halfHeight: number, radius: number): ColliderDesc;
|
||||
/**
|
||||
* Creates a new segment shape.
|
||||
*
|
||||
* @param a - The first point of the segment.
|
||||
* @param b - The second point of the segment.
|
||||
*/
|
||||
static segment(a: Vector, b: Vector): ColliderDesc;
|
||||
/**
|
||||
* Creates a new triangle shape.
|
||||
*
|
||||
* @param a - The first point of the triangle.
|
||||
* @param b - The second point of the triangle.
|
||||
* @param c - The third point of the triangle.
|
||||
*/
|
||||
static triangle(a: Vector, b: Vector, c: Vector): ColliderDesc;
|
||||
/**
|
||||
* Creates a new triangle shape with round corners.
|
||||
*
|
||||
* @param a - The first point of the triangle.
|
||||
* @param b - The second point of the triangle.
|
||||
* @param c - The third point of the triangle.
|
||||
* @param borderRadius - The radius of the borders of this triangle. In 3D,
|
||||
* this is also equal to half the thickness of the triangle.
|
||||
*/
|
||||
static roundTriangle(a: Vector, b: Vector, c: Vector, borderRadius: number): ColliderDesc;
|
||||
/**
|
||||
* Creates a new collider descriptor with a polyline shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the polyline's vertices.
|
||||
* @param indices - The indices of the polyline's segments. If this is `undefined` or `null`,
|
||||
* the vertices are assumed to describe a line strip.
|
||||
*/
|
||||
static polyline(vertices: Float32Array, indices?: Uint32Array | null): ColliderDesc;
|
||||
/**
|
||||
* Creates a new collider descriptor with a triangle mesh shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the triangle mesh's vertices.
|
||||
* @param indices - The indices of the triangle mesh's triangles.
|
||||
*/
|
||||
static trimesh(vertices: Float32Array, indices: Uint32Array): ColliderDesc;
|
||||
/**
|
||||
* Creates a new collider descriptor with a cuboid shape.
|
||||
*
|
||||
* @param hx - The half-width of the rectangle along its local `x` axis.
|
||||
* @param hy - The half-width of the rectangle along its local `y` axis.
|
||||
* @param hz - The half-width of the rectangle along its local `z` axis.
|
||||
*/
|
||||
static cuboid(hx: number, hy: number, hz: number): ColliderDesc;
|
||||
/**
|
||||
* Creates a new collider descriptor with a rectangular shape with round borders.
|
||||
*
|
||||
* @param hx - The half-width of the rectangle along its local `x` axis.
|
||||
* @param hy - The half-width of the rectangle along its local `y` axis.
|
||||
* @param hz - The half-width of the rectangle along its local `z` axis.
|
||||
* @param borderRadius - The radius of the cuboid's borders.
|
||||
*/
|
||||
static roundCuboid(hx: number, hy: number, hz: number, borderRadius: number): ColliderDesc;
|
||||
/**
|
||||
* Creates a new collider descriptor with a heightfield shape.
|
||||
*
|
||||
* @param nrows − The number of rows in the heights matrix.
|
||||
* @param ncols - The number of columns in the heights matrix.
|
||||
* @param heights - The heights of the heightfield along its local `y` axis,
|
||||
* provided as a matrix stored in column-major order.
|
||||
* @param scale - The scale factor applied to the heightfield.
|
||||
*/
|
||||
static heightfield(nrows: number, ncols: number, heights: Float32Array, scale: Vector): ColliderDesc;
|
||||
/**
|
||||
* Create a new collider descriptor with a cylinder shape.
|
||||
*
|
||||
* @param halfHeight - The half-height of the cylinder, along the `y` axis.
|
||||
* @param radius - The radius of the cylinder basis.
|
||||
*/
|
||||
static cylinder(halfHeight: number, radius: number): ColliderDesc;
|
||||
/**
|
||||
* Create a new collider descriptor with a cylinder shape with rounded corners.
|
||||
*
|
||||
* @param halfHeight - The half-height of the cylinder, along the `y` axis.
|
||||
* @param radius - The radius of the cylinder basis.
|
||||
* @param borderRadius - The radius of the cylinder's rounded edges and vertices.
|
||||
*/
|
||||
static roundCylinder(halfHeight: number, radius: number, borderRadius: number): ColliderDesc;
|
||||
/**
|
||||
* Create a new collider descriptor with a cone shape.
|
||||
*
|
||||
* @param halfHeight - The half-height of the cone, along the `y` axis.
|
||||
* @param radius - The radius of the cone basis.
|
||||
*/
|
||||
static cone(halfHeight: number, radius: number): ColliderDesc;
|
||||
/**
|
||||
* Create a new collider descriptor with a cone shape with rounded corners.
|
||||
*
|
||||
* @param halfHeight - The half-height of the cone, along the `y` axis.
|
||||
* @param radius - The radius of the cone basis.
|
||||
* @param borderRadius - The radius of the cone's rounded edges and vertices.
|
||||
*/
|
||||
static roundCone(halfHeight: number, radius: number, borderRadius: number): ColliderDesc;
|
||||
/**
|
||||
* Computes the convex-hull of the given points and use the resulting
|
||||
* convex polyhedron as the shape for this new collider descriptor.
|
||||
*
|
||||
* @param points - The point that will be used to compute the convex-hull.
|
||||
*/
|
||||
static convexHull(points: Float32Array): ColliderDesc | null;
|
||||
/**
|
||||
* Creates a new collider descriptor that uses the given set of points assumed
|
||||
* to form a convex polyline (no convex-hull computation will be done).
|
||||
*
|
||||
* @param vertices - The vertices of the convex polyline.
|
||||
*/
|
||||
static convexMesh(vertices: Float32Array, indices?: Uint32Array | null): ColliderDesc | null;
|
||||
/**
|
||||
* Computes the convex-hull of the given points and use the resulting
|
||||
* convex polyhedron as the shape for this new collider descriptor. A
|
||||
* border is added to that convex polyhedron to give it round corners.
|
||||
*
|
||||
* @param points - The point that will be used to compute the convex-hull.
|
||||
* @param borderRadius - The radius of the round border added to the convex polyhedron.
|
||||
*/
|
||||
static roundConvexHull(points: Float32Array, borderRadius: number): ColliderDesc | null;
|
||||
/**
|
||||
* Creates a new collider descriptor that uses the given set of points assumed
|
||||
* to form a round convex polyline (no convex-hull computation will be done).
|
||||
*
|
||||
* @param vertices - The vertices of the convex polyline.
|
||||
* @param borderRadius - The radius of the round border added to the convex polyline.
|
||||
*/
|
||||
static roundConvexMesh(vertices: Float32Array, indices: Uint32Array | null, borderRadius: number): ColliderDesc | null;
|
||||
/**
|
||||
* Sets the position of the collider to be created relative to the rigid-body it is attached to.
|
||||
*/
|
||||
setTranslation(x: number, y: number, z: number): ColliderDesc;
|
||||
/**
|
||||
* Sets the rotation of the collider to be created relative to the rigid-body it is attached to.
|
||||
*
|
||||
* @param rot - The rotation of the collider to be created relative to the rigid-body it is attached to.
|
||||
*/
|
||||
setRotation(rot: Rotation): ColliderDesc;
|
||||
/**
|
||||
* Sets whether or not the collider being created is a sensor.
|
||||
*
|
||||
* A sensor collider does not take part of the physics simulation, but generates
|
||||
* proximity events.
|
||||
*
|
||||
* @param sensor - Set to `true` of the collider built is to be a sensor.
|
||||
*/
|
||||
setSensor(sensor: boolean): ColliderDesc;
|
||||
/**
|
||||
* Sets whether the created collider will be enabled or disabled.
|
||||
* @param enabled − If set to `false` the collider will be disabled at creation.
|
||||
*/
|
||||
setEnabled(enabled: boolean): ColliderDesc;
|
||||
/**
|
||||
* Sets the density of the collider being built.
|
||||
*
|
||||
* The mass and angular inertia tensor will be computed automatically based on this density and the collider’s shape.
|
||||
*
|
||||
* @param density - The density to set, must be greater or equal to 0. A density of 0 means that this collider
|
||||
* will not affect the mass or angular inertia of the rigid-body it is attached to.
|
||||
*/
|
||||
setDensity(density: number): ColliderDesc;
|
||||
/**
|
||||
* Sets the mass of the collider being built.
|
||||
*
|
||||
* The angular inertia tensor will be computed automatically based on this mass and the collider’s shape.
|
||||
*
|
||||
* @param mass - The mass to set, must be greater or equal to 0.
|
||||
*/
|
||||
setMass(mass: number): ColliderDesc;
|
||||
/**
|
||||
* Sets the mass properties of the collider being built.
|
||||
*
|
||||
* This replaces the mass-properties automatically computed from the collider's density and shape.
|
||||
* These mass-properties will be added to the mass-properties of the rigid-body this collider will be attached to.
|
||||
*
|
||||
* @param mass − The mass of the collider to create.
|
||||
* @param centerOfMass − The center-of-mass of the collider to create.
|
||||
* @param principalAngularInertia − The initial principal angular inertia of the collider to create.
|
||||
* These are the eigenvalues of the angular inertia matrix.
|
||||
* @param angularInertiaLocalFrame − The initial local angular inertia frame of the collider to create.
|
||||
* These are the eigenvectors of the angular inertia matrix.
|
||||
*/
|
||||
setMassProperties(mass: number, centerOfMass: Vector, principalAngularInertia: Vector, angularInertiaLocalFrame: Rotation): ColliderDesc;
|
||||
/**
|
||||
* Sets the restitution coefficient of the collider to be created.
|
||||
*
|
||||
* @param restitution - The restitution coefficient in `[0, 1]`. A value of 0 (the default) means no bouncing behavior
|
||||
* while 1 means perfect bouncing (though energy may still be lost due to numerical errors of the
|
||||
* constraints solver).
|
||||
*/
|
||||
setRestitution(restitution: number): ColliderDesc;
|
||||
/**
|
||||
* Sets the friction coefficient of the collider to be created.
|
||||
*
|
||||
* @param friction - The friction coefficient. Must be greater or equal to 0. This is generally smaller than 1. The
|
||||
* higher the coefficient, the stronger friction forces will be for contacts with the collider
|
||||
* being built.
|
||||
*/
|
||||
setFriction(friction: number): ColliderDesc;
|
||||
/**
|
||||
* Sets the rule used to combine the friction coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*
|
||||
* @param rule − The combine rule to apply.
|
||||
*/
|
||||
setFrictionCombineRule(rule: CoefficientCombineRule): ColliderDesc;
|
||||
/**
|
||||
* Sets the rule used to combine the restitution coefficients of two colliders
|
||||
* colliders involved in a contact.
|
||||
*
|
||||
* @param rule − The combine rule to apply.
|
||||
*/
|
||||
setRestitutionCombineRule(rule: CoefficientCombineRule): ColliderDesc;
|
||||
/**
|
||||
* Sets the collision groups used by this collider.
|
||||
*
|
||||
* Two colliders will interact iff. their collision groups are compatible.
|
||||
* See the documentation of `InteractionGroups` for details on teh used bit pattern.
|
||||
*
|
||||
* @param groups - The collision groups used for the collider being built.
|
||||
*/
|
||||
setCollisionGroups(groups: InteractionGroups): ColliderDesc;
|
||||
/**
|
||||
* Sets the solver groups used by this collider.
|
||||
*
|
||||
* Forces between two colliders in contact will be computed iff their solver
|
||||
* groups are compatible.
|
||||
* See the documentation of `InteractionGroups` for details on the used bit pattern.
|
||||
*
|
||||
* @param groups - The solver groups used for the collider being built.
|
||||
*/
|
||||
setSolverGroups(groups: InteractionGroups): ColliderDesc;
|
||||
/**
|
||||
* Set the physics hooks active for this collider.
|
||||
*
|
||||
* Use this to enable custom filtering rules for contact/intersecstion pairs involving this collider.
|
||||
*
|
||||
* @param activeHooks - The hooks active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveHooks(activeHooks: ActiveHooks): ColliderDesc;
|
||||
/**
|
||||
* Set the events active for this collider.
|
||||
*
|
||||
* Use this to enable contact and/or intersection event reporting for this collider.
|
||||
*
|
||||
* @param activeEvents - The events active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveEvents(activeEvents: ActiveEvents): ColliderDesc;
|
||||
/**
|
||||
* Set the collision types active for this collider.
|
||||
*
|
||||
* @param activeCollisionTypes - The hooks active for contact/intersection pairs involving this collider.
|
||||
*/
|
||||
setActiveCollisionTypes(activeCollisionTypes: ActiveCollisionTypes): ColliderDesc;
|
||||
/**
|
||||
* Sets the total force magnitude beyond which a contact force event can be emitted.
|
||||
*
|
||||
* @param threshold - The force threshold to set.
|
||||
*/
|
||||
setContactForceEventThreshold(threshold: number): ColliderDesc;
|
||||
}
|
||||
72
app/node_modules/@dimforge/rapier3d-compat/geometry/collider_set.d.ts
generated
vendored
Normal file
72
app/node_modules/@dimforge/rapier3d-compat/geometry/collider_set.d.ts
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import { RawColliderSet } from "../raw";
|
||||
import { Collider, ColliderDesc, ColliderHandle } from "./collider";
|
||||
import { ImpulseJointHandle, IslandManager, RigidBodyHandle } from "../dynamics";
|
||||
import { RigidBodySet } from "../dynamics";
|
||||
/**
|
||||
* A set of rigid bodies that can be handled by a physics pipeline.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `colliderSet.free()`
|
||||
* once you are done using it (and all the rigid-bodies it created).
|
||||
*/
|
||||
export declare class ColliderSet {
|
||||
raw: RawColliderSet;
|
||||
private map;
|
||||
/**
|
||||
* Release the WASM memory occupied by this collider set.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawColliderSet);
|
||||
/** @internal */
|
||||
castClosure<Res>(f?: (collider: Collider) => Res): (handle: ColliderHandle) => Res | undefined;
|
||||
/** @internal */
|
||||
finalizeDeserialization(bodies: RigidBodySet): void;
|
||||
/**
|
||||
* Creates a new collider and return its integer handle.
|
||||
*
|
||||
* @param bodies - The set of bodies where the collider's parent can be found.
|
||||
* @param desc - The collider's description.
|
||||
* @param parentHandle - The integer handle of the rigid-body this collider is attached to.
|
||||
*/
|
||||
createCollider(bodies: RigidBodySet, desc: ColliderDesc, parentHandle: RigidBodyHandle): Collider;
|
||||
/**
|
||||
* Remove a collider from this set.
|
||||
*
|
||||
* @param handle - The integer handle of the collider to remove.
|
||||
* @param bodies - The set of rigid-body containing the rigid-body the collider is attached to.
|
||||
* @param wakeUp - If `true`, the rigid-body the removed collider is attached to will be woken-up automatically.
|
||||
*/
|
||||
remove(handle: ColliderHandle, islands: IslandManager, bodies: RigidBodySet, wakeUp: boolean): void;
|
||||
/**
|
||||
* Internal function, do not call directly.
|
||||
* @param handle
|
||||
*/
|
||||
unmap(handle: ImpulseJointHandle): void;
|
||||
/**
|
||||
* Gets the rigid-body with the given handle.
|
||||
*
|
||||
* @param handle - The handle of the rigid-body to retrieve.
|
||||
*/
|
||||
get(handle: ColliderHandle): Collider | null;
|
||||
/**
|
||||
* The number of colliders on this set.
|
||||
*/
|
||||
len(): number;
|
||||
/**
|
||||
* Does this set contain a collider with the given handle?
|
||||
*
|
||||
* @param handle - The collider handle to check.
|
||||
*/
|
||||
contains(handle: ColliderHandle): boolean;
|
||||
/**
|
||||
* Applies the given closure to each collider contained by this set.
|
||||
*
|
||||
* @param f - The closure to apply.
|
||||
*/
|
||||
forEach(f: (collider: Collider) => void): void;
|
||||
/**
|
||||
* Gets all colliders in the list.
|
||||
*
|
||||
* @returns collider list.
|
||||
*/
|
||||
getAll(): Collider[];
|
||||
}
|
||||
31
app/node_modules/@dimforge/rapier3d-compat/geometry/contact.d.ts
generated
vendored
Normal file
31
app/node_modules/@dimforge/rapier3d-compat/geometry/contact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Vector } from "../math";
|
||||
import { RawShapeContact } from "../raw";
|
||||
/**
|
||||
* The contact info between two shapes.
|
||||
*/
|
||||
export declare class ShapeContact {
|
||||
/**
|
||||
* Distance between the two contact points.
|
||||
* If this is negative, this contact represents a penetration.
|
||||
*/
|
||||
distance: number;
|
||||
/**
|
||||
* Position of the contact on the first shape.
|
||||
*/
|
||||
point1: Vector;
|
||||
/**
|
||||
* Position of the contact on the second shape.
|
||||
*/
|
||||
point2: Vector;
|
||||
/**
|
||||
* Contact normal, pointing towards the exterior of the first shape.
|
||||
*/
|
||||
normal1: Vector;
|
||||
/**
|
||||
* Contact normal, pointing towards the exterior of the second shape.
|
||||
* If these contact data are expressed in world-space, this normal is equal to -normal1.
|
||||
*/
|
||||
normal2: Vector;
|
||||
constructor(dist: number, point1: Vector, point2: Vector, normal1: Vector, normal2: Vector);
|
||||
static fromRaw(raw: RawShapeContact): ShapeContact;
|
||||
}
|
||||
6
app/node_modules/@dimforge/rapier3d-compat/geometry/feature.d.ts
generated
vendored
Normal file
6
app/node_modules/@dimforge/rapier3d-compat/geometry/feature.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare enum FeatureType {
|
||||
Vertex = 0,
|
||||
Edge = 1,
|
||||
Face = 2,
|
||||
Unknown = 3
|
||||
}
|
||||
11
app/node_modules/@dimforge/rapier3d-compat/geometry/index.d.ts
generated
vendored
Normal file
11
app/node_modules/@dimforge/rapier3d-compat/geometry/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export * from "./broad_phase";
|
||||
export * from "./narrow_phase";
|
||||
export * from "./shape";
|
||||
export * from "./collider";
|
||||
export * from "./collider_set";
|
||||
export * from "./feature";
|
||||
export * from "./ray";
|
||||
export * from "./point";
|
||||
export * from "./toi";
|
||||
export * from "./interaction_groups";
|
||||
export * from "./contact";
|
||||
18
app/node_modules/@dimforge/rapier3d-compat/geometry/interaction_groups.d.ts
generated
vendored
Normal file
18
app/node_modules/@dimforge/rapier3d-compat/geometry/interaction_groups.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Pairwise filtering using bit masks.
|
||||
*
|
||||
* This filtering method is based on two 16-bit values:
|
||||
* - The interaction groups (the 16 left-most bits of `self.0`).
|
||||
* - The interaction mask (the 16 right-most bits of `self.0`).
|
||||
*
|
||||
* An interaction is allowed between two filters `a` and `b` two conditions
|
||||
* are met simultaneously:
|
||||
* - The interaction groups of `a` has at least one bit set to `1` in common with the interaction mask of `b`.
|
||||
* - The interaction groups of `b` has at least one bit set to `1` in common with the interaction mask of `a`.
|
||||
* In other words, interactions are allowed between two filter iff. the following condition is met:
|
||||
*
|
||||
* ```
|
||||
* ((a >> 16) & b) != 0 && ((b >> 16) & a) != 0
|
||||
* ```
|
||||
*/
|
||||
export declare type InteractionGroups = number;
|
||||
71
app/node_modules/@dimforge/rapier3d-compat/geometry/narrow_phase.d.ts
generated
vendored
Normal file
71
app/node_modules/@dimforge/rapier3d-compat/geometry/narrow_phase.d.ts
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
import { RawNarrowPhase, RawContactManifold } from "../raw";
|
||||
import { ColliderHandle } from "./collider";
|
||||
import { Vector } from "../math";
|
||||
/**
|
||||
* The narrow-phase used for precise collision-detection.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `narrowPhase.free()`
|
||||
* once you are done using it.
|
||||
*/
|
||||
export declare class NarrowPhase {
|
||||
raw: RawNarrowPhase;
|
||||
tempManifold: TempContactManifold;
|
||||
/**
|
||||
* Release the WASM memory occupied by this narrow-phase.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawNarrowPhase);
|
||||
/**
|
||||
* Enumerates all the colliders potentially in contact with the given collider.
|
||||
*
|
||||
* @param collider1 - The second collider involved in the contact.
|
||||
* @param f - Closure that will be called on each collider that is in contact with `collider1`.
|
||||
*/
|
||||
contactPairsWith(collider1: ColliderHandle, f: (collider2: ColliderHandle) => void): void;
|
||||
/**
|
||||
* Enumerates all the colliders intersecting the given colliders, assuming one of them
|
||||
* is a sensor.
|
||||
*/
|
||||
intersectionPairsWith(collider1: ColliderHandle, f: (collider2: ColliderHandle) => void): void;
|
||||
/**
|
||||
* Iterates through all the contact manifolds between the given pair of colliders.
|
||||
*
|
||||
* @param collider1 - The first collider involved in the contact.
|
||||
* @param collider2 - The second collider involved in the contact.
|
||||
* @param f - Closure that will be called on each contact manifold between the two colliders. If the second argument
|
||||
* passed to this closure is `true`, then the contact manifold data is flipped, i.e., methods like `localNormal1`
|
||||
* actually apply to the `collider2` and fields like `localNormal2` apply to the `collider1`.
|
||||
*/
|
||||
contactPair(collider1: ColliderHandle, collider2: ColliderHandle, f: (manifold: TempContactManifold, flipped: boolean) => void): void;
|
||||
/**
|
||||
* Returns `true` if `collider1` and `collider2` intersect and at least one of them is a sensor.
|
||||
* @param collider1 − The first collider involved in the intersection.
|
||||
* @param collider2 − The second collider involved in the intersection.
|
||||
*/
|
||||
intersectionPair(collider1: ColliderHandle, collider2: ColliderHandle): boolean;
|
||||
}
|
||||
export declare class TempContactManifold {
|
||||
raw: RawContactManifold;
|
||||
free(): void;
|
||||
constructor(raw: RawContactManifold);
|
||||
normal(): Vector;
|
||||
localNormal1(): Vector;
|
||||
localNormal2(): Vector;
|
||||
subshape1(): number;
|
||||
subshape2(): number;
|
||||
numContacts(): number;
|
||||
localContactPoint1(i: number): Vector | null;
|
||||
localContactPoint2(i: number): Vector | null;
|
||||
contactDist(i: number): number;
|
||||
contactFid1(i: number): number;
|
||||
contactFid2(i: number): number;
|
||||
contactImpulse(i: number): number;
|
||||
contactTangentImpulseX(i: number): number;
|
||||
contactTangentImpulseY(i: number): number;
|
||||
numSolverContacts(): number;
|
||||
solverContactPoint(i: number): Vector;
|
||||
solverContactDist(i: number): number;
|
||||
solverContactFriction(i: number): number;
|
||||
solverContactRestitution(i: number): number;
|
||||
solverContactTangentVelocity(i: number): Vector;
|
||||
}
|
||||
47
app/node_modules/@dimforge/rapier3d-compat/geometry/point.d.ts
generated
vendored
Normal file
47
app/node_modules/@dimforge/rapier3d-compat/geometry/point.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Collider } from "./collider";
|
||||
import { Vector } from "../math";
|
||||
import { RawPointColliderProjection, RawPointProjection } from "../raw";
|
||||
import { FeatureType } from "./feature";
|
||||
import { ColliderSet } from "./collider_set";
|
||||
/**
|
||||
* The projection of a point on a collider.
|
||||
*/
|
||||
export declare class PointProjection {
|
||||
/**
|
||||
* The projection of the point on the collider.
|
||||
*/
|
||||
point: Vector;
|
||||
/**
|
||||
* Is the point inside of the collider?
|
||||
*/
|
||||
isInside: boolean;
|
||||
constructor(point: Vector, isInside: boolean);
|
||||
static fromRaw(raw: RawPointProjection): PointProjection;
|
||||
}
|
||||
/**
|
||||
* The projection of a point on a collider (includes the collider handle).
|
||||
*/
|
||||
export declare class PointColliderProjection {
|
||||
/**
|
||||
* The collider hit by the ray.
|
||||
*/
|
||||
collider: Collider;
|
||||
/**
|
||||
* The projection of the point on the collider.
|
||||
*/
|
||||
point: Vector;
|
||||
/**
|
||||
* Is the point inside of the collider?
|
||||
*/
|
||||
isInside: boolean;
|
||||
/**
|
||||
* The type of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureType: FeatureType;
|
||||
/**
|
||||
* The id of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureId: number | undefined;
|
||||
constructor(collider: Collider, point: Vector, isInside: boolean, featureType?: FeatureType, featureId?: number);
|
||||
static fromRaw(colliderSet: ColliderSet, raw: RawPointColliderProjection): PointColliderProjection;
|
||||
}
|
||||
97
app/node_modules/@dimforge/rapier3d-compat/geometry/ray.d.ts
generated
vendored
Normal file
97
app/node_modules/@dimforge/rapier3d-compat/geometry/ray.d.ts
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
import { Vector } from "../math";
|
||||
import { RawRayColliderIntersection, RawRayColliderToi, RawRayIntersection } from "../raw";
|
||||
import { Collider } from "./collider";
|
||||
import { FeatureType } from "./feature";
|
||||
import { ColliderSet } from "./collider_set";
|
||||
/**
|
||||
* A ray. This is a directed half-line.
|
||||
*/
|
||||
export declare class Ray {
|
||||
/**
|
||||
* The starting point of the ray.
|
||||
*/
|
||||
origin: Vector;
|
||||
/**
|
||||
* The direction of propagation of the ray.
|
||||
*/
|
||||
dir: Vector;
|
||||
/**
|
||||
* Builds a ray from its origin and direction.
|
||||
*
|
||||
* @param origin - The ray's starting point.
|
||||
* @param dir - The ray's direction of propagation.
|
||||
*/
|
||||
constructor(origin: Vector, dir: Vector);
|
||||
pointAt(t: number): Vector;
|
||||
}
|
||||
/**
|
||||
* The intersection between a ray and a collider.
|
||||
*/
|
||||
export declare class RayIntersection {
|
||||
/**
|
||||
* The time-of-impact of the ray with the collider.
|
||||
*
|
||||
* The hit point is obtained from the ray's origin and direction: `origin + dir * toi`.
|
||||
*/
|
||||
toi: number;
|
||||
/**
|
||||
* The normal of the collider at the hit point.
|
||||
*/
|
||||
normal: Vector;
|
||||
/**
|
||||
* The type of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureType: FeatureType;
|
||||
/**
|
||||
* The id of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureId: number | undefined;
|
||||
constructor(toi: number, normal: Vector, featureType?: FeatureType, featureId?: number);
|
||||
static fromRaw(raw: RawRayIntersection): RayIntersection;
|
||||
}
|
||||
/**
|
||||
* The intersection between a ray and a collider (includes the collider handle).
|
||||
*/
|
||||
export declare class RayColliderIntersection {
|
||||
/**
|
||||
* The collider hit by the ray.
|
||||
*/
|
||||
collider: Collider;
|
||||
/**
|
||||
* The time-of-impact of the ray with the collider.
|
||||
*
|
||||
* The hit point is obtained from the ray's origin and direction: `origin + dir * toi`.
|
||||
*/
|
||||
toi: number;
|
||||
/**
|
||||
* The normal of the collider at the hit point.
|
||||
*/
|
||||
normal: Vector;
|
||||
/**
|
||||
* The type of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureType: FeatureType;
|
||||
/**
|
||||
* The id of the geometric feature the point was projected on.
|
||||
*/
|
||||
featureId: number | undefined;
|
||||
constructor(collider: Collider, toi: number, normal: Vector, featureType?: FeatureType, featureId?: number);
|
||||
static fromRaw(colliderSet: ColliderSet, raw: RawRayColliderIntersection): RayColliderIntersection;
|
||||
}
|
||||
/**
|
||||
* The time of impact between a ray and a collider.
|
||||
*/
|
||||
export declare class RayColliderToi {
|
||||
/**
|
||||
* The handle of the collider hit by the ray.
|
||||
*/
|
||||
collider: Collider;
|
||||
/**
|
||||
* The time-of-impact of the ray with the collider.
|
||||
*
|
||||
* The hit point is obtained from the ray's origin and direction: `origin + dir * toi`.
|
||||
*/
|
||||
toi: number;
|
||||
constructor(collider: Collider, toi: number);
|
||||
static fromRaw(colliderSet: ColliderSet, raw: RawRayColliderToi): RayColliderToi;
|
||||
}
|
||||
489
app/node_modules/@dimforge/rapier3d-compat/geometry/shape.d.ts
generated
vendored
Normal file
489
app/node_modules/@dimforge/rapier3d-compat/geometry/shape.d.ts
generated
vendored
Normal file
@@ -0,0 +1,489 @@
|
||||
import { Vector, Rotation } from "../math";
|
||||
import { RawColliderSet, RawShape } from "../raw";
|
||||
import { ShapeContact } from "./contact";
|
||||
import { PointProjection } from "./point";
|
||||
import { Ray, RayIntersection } from "./ray";
|
||||
import { ShapeTOI } from "./toi";
|
||||
import { ColliderHandle } from "./collider";
|
||||
export declare abstract class Shape {
|
||||
abstract intoRaw(): RawShape;
|
||||
/**
|
||||
* The concrete type of this shape.
|
||||
*/
|
||||
abstract get type(): ShapeType;
|
||||
/**
|
||||
* instant mode without cache
|
||||
*/
|
||||
static fromRaw(rawSet: RawColliderSet, handle: ColliderHandle): Shape;
|
||||
/**
|
||||
* Computes the time of impact between two moving shapes.
|
||||
* @param shapePos1 - The initial position of this sahpe.
|
||||
* @param shapeRot1 - The rotation of this shape.
|
||||
* @param shapeVel1 - The velocity of this shape.
|
||||
* @param shape2 - The second moving shape.
|
||||
* @param shapePos2 - The initial position of the second shape.
|
||||
* @param shapeRot2 - The rotation of the second shape.
|
||||
* @param shapeVel2 - The velocity of the second shape.
|
||||
* @param maxToi - The maximum time when the impact can happen.
|
||||
* @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if
|
||||
* the shape is penetrating another shape at its starting point **and** its trajectory is such
|
||||
* that it’s on a path to exist that penetration state.
|
||||
* @returns If the two moving shapes collider at some point along their trajectories, this returns the
|
||||
* time at which the two shape collider as well as the contact information during the impact. Returns
|
||||
* `null`if the two shapes never collide along their paths.
|
||||
*/
|
||||
castShape(shapePos1: Vector, shapeRot1: Rotation, shapeVel1: Vector, shape2: Shape, shapePos2: Vector, shapeRot2: Rotation, shapeVel2: Vector, maxToi: number, stopAtPenetration: boolean): ShapeTOI | null;
|
||||
/**
|
||||
* Tests if this shape intersects another shape.
|
||||
*
|
||||
* @param shapePos1 - The position of this shape.
|
||||
* @param shapeRot1 - The rotation of this shape.
|
||||
* @param shape2 - The second shape to test.
|
||||
* @param shapePos2 - The position of the second shape.
|
||||
* @param shapeRot2 - The rotation of the second shape.
|
||||
* @returns `true` if the two shapes intersect, `false` if they don’t.
|
||||
*/
|
||||
intersectsShape(shapePos1: Vector, shapeRot1: Rotation, shape2: Shape, shapePos2: Vector, shapeRot2: Rotation): boolean;
|
||||
/**
|
||||
* Computes one pair of contact points between two shapes.
|
||||
*
|
||||
* @param shapePos1 - The initial position of this sahpe.
|
||||
* @param shapeRot1 - The rotation of this shape.
|
||||
* @param shape2 - The second shape.
|
||||
* @param shapePos2 - The initial position of the second shape.
|
||||
* @param shapeRot2 - The rotation of the second shape.
|
||||
* @param prediction - The prediction value, if the shapes are separated by a distance greater than this value, test will fail.
|
||||
* @returns `null` if the shapes are separated by a distance greater than prediction, otherwise contact details. The result is given in world-space.
|
||||
*/
|
||||
contactShape(shapePos1: Vector, shapeRot1: Rotation, shape2: Shape, shapePos2: Vector, shapeRot2: Rotation, prediction: number): ShapeContact | null;
|
||||
containsPoint(shapePos: Vector, shapeRot: Rotation, point: Vector): boolean;
|
||||
projectPoint(shapePos: Vector, shapeRot: Rotation, point: Vector, solid: boolean): PointProjection;
|
||||
intersectsRay(ray: Ray, shapePos: Vector, shapeRot: Rotation, maxToi: number): boolean;
|
||||
castRay(ray: Ray, shapePos: Vector, shapeRot: Rotation, maxToi: number, solid: boolean): number;
|
||||
castRayAndGetNormal(ray: Ray, shapePos: Vector, shapeRot: Rotation, maxToi: number, solid: boolean): RayIntersection;
|
||||
}
|
||||
/**
|
||||
* An enumeration representing the type of a shape.
|
||||
*/
|
||||
export declare enum ShapeType {
|
||||
Ball = 0,
|
||||
Cuboid = 1,
|
||||
Capsule = 2,
|
||||
Segment = 3,
|
||||
Polyline = 4,
|
||||
Triangle = 5,
|
||||
TriMesh = 6,
|
||||
HeightField = 7,
|
||||
ConvexPolyhedron = 9,
|
||||
Cylinder = 10,
|
||||
Cone = 11,
|
||||
RoundCuboid = 12,
|
||||
RoundTriangle = 13,
|
||||
RoundCylinder = 14,
|
||||
RoundCone = 15,
|
||||
RoundConvexPolyhedron = 16,
|
||||
HalfSpace = 17
|
||||
}
|
||||
/**
|
||||
* A shape that is a sphere in 3D and a circle in 2D.
|
||||
*/
|
||||
export declare class Ball extends Shape {
|
||||
readonly type = ShapeType.Ball;
|
||||
/**
|
||||
* The balls radius.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* Creates a new ball with the given radius.
|
||||
* @param radius - The balls radius.
|
||||
*/
|
||||
constructor(radius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
export declare class HalfSpace extends Shape {
|
||||
readonly type = ShapeType.HalfSpace;
|
||||
/**
|
||||
* The outward normal of the half-space.
|
||||
*/
|
||||
normal: Vector;
|
||||
/**
|
||||
* Creates a new halfspace delimited by an infinite plane.
|
||||
*
|
||||
* @param normal - The outward normal of the plane.
|
||||
*/
|
||||
constructor(normal: Vector);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a box in 3D and a rectangle in 2D.
|
||||
*/
|
||||
export declare class Cuboid extends Shape {
|
||||
readonly type = ShapeType.Cuboid;
|
||||
/**
|
||||
* The half extent of the cuboid along each coordinate axis.
|
||||
*/
|
||||
halfExtents: Vector;
|
||||
/**
|
||||
* Creates a new 3D cuboid.
|
||||
* @param hx - The half width of the cuboid.
|
||||
* @param hy - The half height of the cuboid.
|
||||
* @param hz - The half depth of the cuboid.
|
||||
*/
|
||||
constructor(hx: number, hy: number, hz: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a box in 3D and a rectangle in 2D, with round corners.
|
||||
*/
|
||||
export declare class RoundCuboid extends Shape {
|
||||
readonly type = ShapeType.RoundCuboid;
|
||||
/**
|
||||
* The half extent of the cuboid along each coordinate axis.
|
||||
*/
|
||||
halfExtents: Vector;
|
||||
/**
|
||||
* The radius of the cuboid's round border.
|
||||
*/
|
||||
borderRadius: number;
|
||||
/**
|
||||
* Creates a new 3D cuboid.
|
||||
* @param hx - The half width of the cuboid.
|
||||
* @param hy - The half height of the cuboid.
|
||||
* @param hz - The half depth of the cuboid.
|
||||
* @param borderRadius - The radius of the borders of this cuboid. This will
|
||||
* effectively increase the half-extents of the cuboid by this radius.
|
||||
*/
|
||||
constructor(hx: number, hy: number, hz: number, borderRadius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a capsule.
|
||||
*/
|
||||
export declare class Capsule extends Shape {
|
||||
readonly type = ShapeType.Capsule;
|
||||
/**
|
||||
* The radius of the capsule's basis.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* The capsule's half height, along the `y` axis.
|
||||
*/
|
||||
halfHeight: number;
|
||||
/**
|
||||
* Creates a new capsule with the given radius and half-height.
|
||||
* @param halfHeight - The balls half-height along the `y` axis.
|
||||
* @param radius - The balls radius.
|
||||
*/
|
||||
constructor(halfHeight: number, radius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a segment.
|
||||
*/
|
||||
export declare class Segment extends Shape {
|
||||
readonly type = ShapeType.Segment;
|
||||
/**
|
||||
* The first point of the segment.
|
||||
*/
|
||||
a: Vector;
|
||||
/**
|
||||
* The second point of the segment.
|
||||
*/
|
||||
b: Vector;
|
||||
/**
|
||||
* Creates a new segment shape.
|
||||
* @param a - The first point of the segment.
|
||||
* @param b - The second point of the segment.
|
||||
*/
|
||||
constructor(a: Vector, b: Vector);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a segment.
|
||||
*/
|
||||
export declare class Triangle extends Shape {
|
||||
readonly type = ShapeType.Triangle;
|
||||
/**
|
||||
* The first point of the triangle.
|
||||
*/
|
||||
a: Vector;
|
||||
/**
|
||||
* The second point of the triangle.
|
||||
*/
|
||||
b: Vector;
|
||||
/**
|
||||
* The second point of the triangle.
|
||||
*/
|
||||
c: Vector;
|
||||
/**
|
||||
* Creates a new triangle shape.
|
||||
*
|
||||
* @param a - The first point of the triangle.
|
||||
* @param b - The second point of the triangle.
|
||||
* @param c - The third point of the triangle.
|
||||
*/
|
||||
constructor(a: Vector, b: Vector, c: Vector);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a triangle with round borders and a non-zero thickness.
|
||||
*/
|
||||
export declare class RoundTriangle extends Shape {
|
||||
readonly type = ShapeType.RoundTriangle;
|
||||
/**
|
||||
* The first point of the triangle.
|
||||
*/
|
||||
a: Vector;
|
||||
/**
|
||||
* The second point of the triangle.
|
||||
*/
|
||||
b: Vector;
|
||||
/**
|
||||
* The second point of the triangle.
|
||||
*/
|
||||
c: Vector;
|
||||
/**
|
||||
* The radius of the triangles's rounded edges and vertices.
|
||||
* In 3D, this is also equal to half the thickness of the round triangle.
|
||||
*/
|
||||
borderRadius: number;
|
||||
/**
|
||||
* Creates a new triangle shape with round corners.
|
||||
*
|
||||
* @param a - The first point of the triangle.
|
||||
* @param b - The second point of the triangle.
|
||||
* @param c - The third point of the triangle.
|
||||
* @param borderRadius - The radius of the borders of this triangle. In 3D,
|
||||
* this is also equal to half the thickness of the triangle.
|
||||
*/
|
||||
constructor(a: Vector, b: Vector, c: Vector, borderRadius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a triangle mesh.
|
||||
*/
|
||||
export declare class Polyline extends Shape {
|
||||
readonly type = ShapeType.Polyline;
|
||||
/**
|
||||
* The vertices of the polyline.
|
||||
*/
|
||||
vertices: Float32Array;
|
||||
/**
|
||||
* The indices of the segments.
|
||||
*/
|
||||
indices: Uint32Array;
|
||||
/**
|
||||
* Creates a new polyline shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the polyline's vertices.
|
||||
* @param indices - The indices of the polyline's segments. If this is `null` or not provided, then
|
||||
* the vertices are assumed to form a line strip.
|
||||
*/
|
||||
constructor(vertices: Float32Array, indices?: Uint32Array);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a triangle mesh.
|
||||
*/
|
||||
export declare class TriMesh extends Shape {
|
||||
readonly type = ShapeType.TriMesh;
|
||||
/**
|
||||
* The vertices of the triangle mesh.
|
||||
*/
|
||||
vertices: Float32Array;
|
||||
/**
|
||||
* The indices of the triangles.
|
||||
*/
|
||||
indices: Uint32Array;
|
||||
/**
|
||||
* Creates a new triangle mesh shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the triangle mesh's vertices.
|
||||
* @param indices - The indices of the triangle mesh's triangles.
|
||||
*/
|
||||
constructor(vertices: Float32Array, indices: Uint32Array);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a convex polygon.
|
||||
*/
|
||||
export declare class ConvexPolyhedron extends Shape {
|
||||
readonly type = ShapeType.ConvexPolyhedron;
|
||||
/**
|
||||
* The vertices of the convex polygon.
|
||||
*/
|
||||
vertices: Float32Array;
|
||||
/**
|
||||
* The indices of the convex polygon.
|
||||
*/
|
||||
indices?: Uint32Array | null;
|
||||
/**
|
||||
* Creates a new convex polygon shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the convex polygon's vertices.
|
||||
* @param indices - The index buffer of this convex mesh. If this is `null`
|
||||
* or `undefined`, the convex-hull of the input vertices will be computed
|
||||
* automatically. Otherwise, it will be assumed that the mesh you provide
|
||||
* is already convex.
|
||||
*/
|
||||
constructor(vertices: Float32Array, indices?: Uint32Array | null);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a convex polygon.
|
||||
*/
|
||||
export declare class RoundConvexPolyhedron extends Shape {
|
||||
readonly type = ShapeType.RoundConvexPolyhedron;
|
||||
/**
|
||||
* The vertices of the convex polygon.
|
||||
*/
|
||||
vertices: Float32Array;
|
||||
/**
|
||||
* The indices of the convex polygon.
|
||||
*/
|
||||
indices?: Uint32Array;
|
||||
/**
|
||||
* The radius of the convex polyhedron's rounded edges and vertices.
|
||||
*/
|
||||
borderRadius: number;
|
||||
/**
|
||||
* Creates a new convex polygon shape.
|
||||
*
|
||||
* @param vertices - The coordinates of the convex polygon's vertices.
|
||||
* @param indices - The index buffer of this convex mesh. If this is `null`
|
||||
* or `undefined`, the convex-hull of the input vertices will be computed
|
||||
* automatically. Otherwise, it will be assumed that the mesh you provide
|
||||
* is already convex.
|
||||
* @param borderRadius - The radius of the borders of this convex polyhedron.
|
||||
*/
|
||||
constructor(vertices: Float32Array, indices: Uint32Array | null | undefined, borderRadius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a heightfield.
|
||||
*/
|
||||
export declare class Heightfield extends Shape {
|
||||
readonly type = ShapeType.HeightField;
|
||||
/**
|
||||
* The number of rows in the heights matrix.
|
||||
*/
|
||||
nrows: number;
|
||||
/**
|
||||
* The number of columns in the heights matrix.
|
||||
*/
|
||||
ncols: number;
|
||||
/**
|
||||
* The heights of the heightfield along its local `y` axis,
|
||||
* provided as a matrix stored in column-major order.
|
||||
*/
|
||||
heights: Float32Array;
|
||||
/**
|
||||
* The dimensions of the heightfield's local `x,z` plane.
|
||||
*/
|
||||
scale: Vector;
|
||||
/**
|
||||
* Creates a new heightfield shape.
|
||||
*
|
||||
* @param nrows − The number of rows in the heights matrix.
|
||||
* @param ncols - The number of columns in the heights matrix.
|
||||
* @param heights - The heights of the heightfield along its local `y` axis,
|
||||
* provided as a matrix stored in column-major order.
|
||||
* @param scale - The dimensions of the heightfield's local `x,z` plane.
|
||||
*/
|
||||
constructor(nrows: number, ncols: number, heights: Float32Array, scale: Vector);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a 3D cylinder.
|
||||
*/
|
||||
export declare class Cylinder extends Shape {
|
||||
readonly type = ShapeType.Cylinder;
|
||||
/**
|
||||
* The radius of the cylinder's basis.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* The cylinder's half height, along the `y` axis.
|
||||
*/
|
||||
halfHeight: number;
|
||||
/**
|
||||
* Creates a new cylinder with the given radius and half-height.
|
||||
* @param halfHeight - The balls half-height along the `y` axis.
|
||||
* @param radius - The balls radius.
|
||||
*/
|
||||
constructor(halfHeight: number, radius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a 3D cylinder with round corners.
|
||||
*/
|
||||
export declare class RoundCylinder extends Shape {
|
||||
readonly type = ShapeType.RoundCylinder;
|
||||
/**
|
||||
* The radius of the cylinder's basis.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* The cylinder's half height, along the `y` axis.
|
||||
*/
|
||||
halfHeight: number;
|
||||
/**
|
||||
* The radius of the cylinder's rounded edges and vertices.
|
||||
*/
|
||||
borderRadius: number;
|
||||
/**
|
||||
* Creates a new cylinder with the given radius and half-height.
|
||||
* @param halfHeight - The balls half-height along the `y` axis.
|
||||
* @param radius - The balls radius.
|
||||
* @param borderRadius - The radius of the borders of this cylinder.
|
||||
*/
|
||||
constructor(halfHeight: number, radius: number, borderRadius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a 3D cone.
|
||||
*/
|
||||
export declare class Cone extends Shape {
|
||||
readonly type = ShapeType.Cone;
|
||||
/**
|
||||
* The radius of the cone's basis.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* The cone's half height, along the `y` axis.
|
||||
*/
|
||||
halfHeight: number;
|
||||
/**
|
||||
* Creates a new cone with the given radius and half-height.
|
||||
* @param halfHeight - The balls half-height along the `y` axis.
|
||||
* @param radius - The balls radius.
|
||||
*/
|
||||
constructor(halfHeight: number, radius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
/**
|
||||
* A shape that is a 3D cone with round corners.
|
||||
*/
|
||||
export declare class RoundCone extends Shape {
|
||||
readonly type = ShapeType.RoundCone;
|
||||
/**
|
||||
* The radius of the cone's basis.
|
||||
*/
|
||||
radius: number;
|
||||
/**
|
||||
* The cone's half height, along the `y` axis.
|
||||
*/
|
||||
halfHeight: number;
|
||||
/**
|
||||
* The radius of the cylinder's rounded edges and vertices.
|
||||
*/
|
||||
borderRadius: number;
|
||||
/**
|
||||
* Creates a new cone with the given radius and half-height.
|
||||
* @param halfHeight - The balls half-height along the `y` axis.
|
||||
* @param radius - The balls radius.
|
||||
* @param borderRadius - The radius of the borders of this cone.
|
||||
*/
|
||||
constructor(halfHeight: number, radius: number, borderRadius: number);
|
||||
intoRaw(): RawShape;
|
||||
}
|
||||
46
app/node_modules/@dimforge/rapier3d-compat/geometry/toi.d.ts
generated
vendored
Normal file
46
app/node_modules/@dimforge/rapier3d-compat/geometry/toi.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Collider } from "./collider";
|
||||
import { Vector } from "../math";
|
||||
import { RawShapeTOI, RawShapeColliderTOI } from "../raw";
|
||||
import { ColliderSet } from "./collider_set";
|
||||
/**
|
||||
* The intersection between a ray and a collider.
|
||||
*/
|
||||
export declare class ShapeTOI {
|
||||
/**
|
||||
* The time of impact of the two shapes.
|
||||
*/
|
||||
toi: number;
|
||||
/**
|
||||
* The local-space contact point on the first shape, at
|
||||
* the time of impact.
|
||||
*/
|
||||
witness1: Vector;
|
||||
/**
|
||||
* The local-space contact point on the second shape, at
|
||||
* the time of impact.
|
||||
*/
|
||||
witness2: Vector;
|
||||
/**
|
||||
* The local-space normal on the first shape, at
|
||||
* the time of impact.
|
||||
*/
|
||||
normal1: Vector;
|
||||
/**
|
||||
* The local-space normal on the second shape, at
|
||||
* the time of impact.
|
||||
*/
|
||||
normal2: Vector;
|
||||
constructor(toi: number, witness1: Vector, witness2: Vector, normal1: Vector, normal2: Vector);
|
||||
static fromRaw(colliderSet: ColliderSet, raw: RawShapeTOI): ShapeTOI;
|
||||
}
|
||||
/**
|
||||
* The intersection between a ray and a collider.
|
||||
*/
|
||||
export declare class ShapeColliderTOI extends ShapeTOI {
|
||||
/**
|
||||
* The handle of the collider hit by the ray.
|
||||
*/
|
||||
collider: Collider;
|
||||
constructor(collider: Collider, toi: number, witness1: Vector, witness2: Vector, normal1: Vector, normal2: Vector);
|
||||
static fromRaw(colliderSet: ColliderSet, raw: RawShapeColliderTOI): ShapeColliderTOI;
|
||||
}
|
||||
5
app/node_modules/@dimforge/rapier3d-compat/init.d.ts
generated
vendored
Normal file
5
app/node_modules/@dimforge/rapier3d-compat/init.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Initializes RAPIER.
|
||||
* Has to be called and awaited before using any library methods.
|
||||
*/
|
||||
export declare function init(): Promise<void>;
|
||||
94
app/node_modules/@dimforge/rapier3d-compat/math.d.ts
generated
vendored
Normal file
94
app/node_modules/@dimforge/rapier3d-compat/math.d.ts
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
import { RawVector, RawRotation } from "./raw";
|
||||
import { RawSdpMatrix3 } from "./raw";
|
||||
export interface Vector {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}
|
||||
/**
|
||||
* A 3D vector.
|
||||
*/
|
||||
export declare class Vector3 implements Vector {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
constructor(x: number, y: number, z: number);
|
||||
}
|
||||
export declare class VectorOps {
|
||||
static new(x: number, y: number, z: number): Vector;
|
||||
static intoRaw(v: Vector): RawVector;
|
||||
static zeros(): Vector;
|
||||
static fromRaw(raw: RawVector): Vector;
|
||||
static copy(out: Vector, input: Vector): void;
|
||||
}
|
||||
export interface Rotation {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
w: number;
|
||||
}
|
||||
/**
|
||||
* A quaternion.
|
||||
*/
|
||||
export declare class Quaternion implements Rotation {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
w: number;
|
||||
constructor(x: number, y: number, z: number, w: number);
|
||||
}
|
||||
export declare class RotationOps {
|
||||
static identity(): Rotation;
|
||||
static fromRaw(raw: RawRotation): Rotation;
|
||||
static intoRaw(rot: Rotation): RawRotation;
|
||||
static copy(out: Rotation, input: Rotation): void;
|
||||
}
|
||||
/**
|
||||
* A 3D symmetric-positive-definite matrix.
|
||||
*/
|
||||
export declare class SdpMatrix3 {
|
||||
/**
|
||||
* Row major list of the upper-triangular part of the symmetric matrix.
|
||||
*/
|
||||
elements: Float32Array;
|
||||
/**
|
||||
* Matrix element at row 1, column 1.
|
||||
*/
|
||||
get m11(): number;
|
||||
/**
|
||||
* Matrix element at row 1, column 2.
|
||||
*/
|
||||
get m12(): number;
|
||||
/**
|
||||
* Matrix element at row 2, column 1.
|
||||
*/
|
||||
get m21(): number;
|
||||
/**
|
||||
* Matrix element at row 1, column 3.
|
||||
*/
|
||||
get m13(): number;
|
||||
/**
|
||||
* Matrix element at row 3, column 1.
|
||||
*/
|
||||
get m31(): number;
|
||||
/**
|
||||
* Matrix element at row 2, column 2.
|
||||
*/
|
||||
get m22(): number;
|
||||
/**
|
||||
* Matrix element at row 2, column 3.
|
||||
*/
|
||||
get m23(): number;
|
||||
/**
|
||||
* Matrix element at row 3, column 2.
|
||||
*/
|
||||
get m32(): number;
|
||||
/**
|
||||
* Matrix element at row 3, column 3.
|
||||
*/
|
||||
get m33(): number;
|
||||
constructor(elements: Float32Array);
|
||||
}
|
||||
export declare class SdpMatrix3Ops {
|
||||
static fromRaw(raw: RawSdpMatrix3): SdpMatrix3;
|
||||
}
|
||||
30
app/node_modules/@dimforge/rapier3d-compat/package.json
generated
vendored
Normal file
30
app/node_modules/@dimforge/rapier3d-compat/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@dimforge/rapier3d-compat",
|
||||
"collaborators": [
|
||||
"Sébastien Crozet <developer@crozet.re>"
|
||||
],
|
||||
"description": "3-dimensional physics engine in Rust - official JS bindings. Compatibility package with inlined webassembly as base64.",
|
||||
"version": "0.12.0",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dimforge/rapier.js"
|
||||
},
|
||||
"files": [
|
||||
"*"
|
||||
],
|
||||
"module": "rapier.es.js",
|
||||
"homepage": "https://rapier.rs",
|
||||
"types": "rapier.d.ts",
|
||||
"sideEffects": [
|
||||
"./snippets/*"
|
||||
],
|
||||
"keywords": [
|
||||
"physics",
|
||||
"dynamics",
|
||||
"rigid",
|
||||
"real-time",
|
||||
"joints"
|
||||
],
|
||||
"main": "rapier.cjs.js"
|
||||
}
|
||||
39
app/node_modules/@dimforge/rapier3d-compat/pipeline/debug_render_pipeline.d.ts
generated
vendored
Normal file
39
app/node_modules/@dimforge/rapier3d-compat/pipeline/debug_render_pipeline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { RawDebugRenderPipeline } from "../raw";
|
||||
import { ImpulseJointSet, MultibodyJointSet, RigidBodySet } from "../dynamics";
|
||||
import { ColliderSet, NarrowPhase } from "../geometry";
|
||||
/**
|
||||
* The vertex and color buffers for debug-redering the physics scene.
|
||||
*/
|
||||
export declare class DebugRenderBuffers {
|
||||
/**
|
||||
* The lines to render. This is a flat array containing all the lines
|
||||
* to render. Each line is described as two consecutive point. Each
|
||||
* point is described as two (in 2D) or three (in 3D) consecutive
|
||||
* floats. For example, in 2D, the array: `[1, 2, 3, 4, 5, 6, 7, 8]`
|
||||
* describes the two segments `[[1, 2], [3, 4]]` and `[[5, 6], [7, 8]]`.
|
||||
*/
|
||||
vertices: Float32Array;
|
||||
/**
|
||||
* The color buffer. There is one color per vertex, and each color
|
||||
* has four consecutive components (in RGBA format).
|
||||
*/
|
||||
colors: Float32Array;
|
||||
constructor(vertices: Float32Array, colors: Float32Array);
|
||||
}
|
||||
/**
|
||||
* A pipeline for rendering the physics scene.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `debugRenderPipeline.free()`
|
||||
* once you are done using it (and all the rigid-bodies it created).
|
||||
*/
|
||||
export declare class DebugRenderPipeline {
|
||||
raw: RawDebugRenderPipeline;
|
||||
vertices: Float32Array;
|
||||
colors: Float32Array;
|
||||
/**
|
||||
* Release the WASM memory occupied by this serialization pipeline.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawDebugRenderPipeline);
|
||||
render(bodies: RigidBodySet, colliders: ColliderSet, impulse_joints: ImpulseJointSet, multibody_joints: MultibodyJointSet, narrow_phase: NarrowPhase): void;
|
||||
}
|
||||
101
app/node_modules/@dimforge/rapier3d-compat/pipeline/event_queue.d.ts
generated
vendored
Normal file
101
app/node_modules/@dimforge/rapier3d-compat/pipeline/event_queue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
import { RawContactForceEvent, RawEventQueue } from "../raw";
|
||||
import { ColliderHandle } from "../geometry";
|
||||
import { Vector } from "../math";
|
||||
/**
|
||||
* Flags indicating what events are enabled for colliders.
|
||||
*/
|
||||
export declare enum ActiveEvents {
|
||||
NONE = 0,
|
||||
/**
|
||||
* Enable collision events.
|
||||
*/
|
||||
COLLISION_EVENTS = 1,
|
||||
/**
|
||||
* Enable contact force events.
|
||||
*/
|
||||
CONTACT_FORCE_EVENTS = 2
|
||||
}
|
||||
/**
|
||||
* Event occurring when the sum of the magnitudes of the
|
||||
* contact forces between two colliders exceed a threshold.
|
||||
*
|
||||
* This object should **not** be stored anywhere. Its properties can only be
|
||||
* read from within the closure given to `EventHandler.drainContactForceEvents`.
|
||||
*/
|
||||
export declare class TempContactForceEvent {
|
||||
raw: RawContactForceEvent;
|
||||
free(): void;
|
||||
/**
|
||||
* The first collider involved in the contact.
|
||||
*/
|
||||
collider1(): ColliderHandle;
|
||||
/**
|
||||
* The second collider involved in the contact.
|
||||
*/
|
||||
collider2(): ColliderHandle;
|
||||
/**
|
||||
* The sum of all the forces between the two colliders.
|
||||
*/
|
||||
totalForce(): Vector;
|
||||
/**
|
||||
* The sum of the magnitudes of each force between the two colliders.
|
||||
*
|
||||
* Note that this is **not** the same as the magnitude of `self.total_force`.
|
||||
* Here we are summing the magnitude of all the forces, instead of taking
|
||||
* the magnitude of their sum.
|
||||
*/
|
||||
totalForceMagnitude(): number;
|
||||
/**
|
||||
* The world-space (unit) direction of the force with strongest magnitude.
|
||||
*/
|
||||
maxForceDirection(): Vector;
|
||||
/**
|
||||
* The magnitude of the largest force at a contact point of this contact pair.
|
||||
*/
|
||||
maxForceMagnitude(): number;
|
||||
}
|
||||
/**
|
||||
* A structure responsible for collecting events generated
|
||||
* by the physics engine.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `eventQueue.free()`
|
||||
* once you are done using it.
|
||||
*/
|
||||
export declare class EventQueue {
|
||||
raw: RawEventQueue;
|
||||
/**
|
||||
* Creates a new event collector.
|
||||
*
|
||||
* @param autoDrain -setting this to `true` is strongly recommended. If true, the collector will
|
||||
* be automatically drained before each `world.step(collector)`. If false, the collector will
|
||||
* keep all events in memory unless it is manually drained/cleared; this may lead to unbounded use of
|
||||
* RAM if no drain is performed.
|
||||
*/
|
||||
constructor(autoDrain: boolean, raw?: RawEventQueue);
|
||||
/**
|
||||
* Release the WASM memory occupied by this event-queue.
|
||||
*/
|
||||
free(): void;
|
||||
/**
|
||||
* Applies the given javascript closure on each collision event of this collector, then clear
|
||||
* the internal collision event buffer.
|
||||
*
|
||||
* @param f - JavaScript closure applied to each collision event. The
|
||||
* closure must take three arguments: two integers representing the handles of the colliders
|
||||
* involved in the collision, and a boolean indicating if the collision started (true) or stopped
|
||||
* (false).
|
||||
*/
|
||||
drainCollisionEvents(f: (handle1: ColliderHandle, handle2: ColliderHandle, started: boolean) => void): void;
|
||||
/**
|
||||
* Applies the given javascript closure on each contact force event of this collector, then clear
|
||||
* the internal collision event buffer.
|
||||
*
|
||||
* @param f - JavaScript closure applied to each collision event. The
|
||||
* closure must take one `TempContactForceEvent` argument.
|
||||
*/
|
||||
drainContactForceEvents(f: (event: TempContactForceEvent) => void): void;
|
||||
/**
|
||||
* Removes all events contained by this collector
|
||||
*/
|
||||
clear(): void;
|
||||
}
|
||||
7
app/node_modules/@dimforge/rapier3d-compat/pipeline/index.d.ts
generated
vendored
Normal file
7
app/node_modules/@dimforge/rapier3d-compat/pipeline/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export * from "./world";
|
||||
export * from "./physics_pipeline";
|
||||
export * from "./serialization_pipeline";
|
||||
export * from "./event_queue";
|
||||
export * from "./physics_hooks";
|
||||
export * from "./debug_render_pipeline";
|
||||
export * from "./query_pipeline";
|
||||
39
app/node_modules/@dimforge/rapier3d-compat/pipeline/physics_hooks.d.ts
generated
vendored
Normal file
39
app/node_modules/@dimforge/rapier3d-compat/pipeline/physics_hooks.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { RigidBodyHandle } from "../dynamics";
|
||||
import { ColliderHandle } from "../geometry";
|
||||
export declare enum ActiveHooks {
|
||||
NONE = 0,
|
||||
FILTER_CONTACT_PAIRS = 1,
|
||||
FILTER_INTERSECTION_PAIRS = 2
|
||||
}
|
||||
export declare enum SolverFlags {
|
||||
EMPTY = 0,
|
||||
COMPUTE_IMPULSE = 1
|
||||
}
|
||||
export interface PhysicsHooks {
|
||||
/**
|
||||
* Function that determines if contacts computation should happen between two colliders, and how the
|
||||
* constraints solver should behave for these contacts.
|
||||
*
|
||||
* This will only be executed and taken into account if at least one of the involved colliders contains the
|
||||
* `ActiveHooks.FILTER_CONTACT_PAIR` flag in its active hooks.
|
||||
*
|
||||
* @param collider1 − Handle of the first collider involved in the potential contact.
|
||||
* @param collider2 − Handle of the second collider involved in the potential contact.
|
||||
* @param body1 − Handle of the first body involved in the potential contact.
|
||||
* @param body2 − Handle of the second body involved in the potential contact.
|
||||
*/
|
||||
filterContactPair(collider1: ColliderHandle, collider2: ColliderHandle, body1: RigidBodyHandle, body2: RigidBodyHandle): SolverFlags | null;
|
||||
/**
|
||||
* Function that determines if intersection computation should happen between two colliders (where at least
|
||||
* one is a sensor).
|
||||
*
|
||||
* This will only be executed and taken into account if `one of the involved colliders contains the
|
||||
* `ActiveHooks.FILTER_INTERSECTION_PAIR` flag in its active hooks.
|
||||
*
|
||||
* @param collider1 − Handle of the first collider involved in the potential contact.
|
||||
* @param collider2 − Handle of the second collider involved in the potential contact.
|
||||
* @param body1 − Handle of the first body involved in the potential contact.
|
||||
* @param body2 − Handle of the second body involved in the potential contact.
|
||||
*/
|
||||
filterIntersectionPair(collider1: ColliderHandle, collider2: ColliderHandle, body1: RigidBodyHandle, body2: RigidBodyHandle): boolean;
|
||||
}
|
||||
12
app/node_modules/@dimforge/rapier3d-compat/pipeline/physics_pipeline.d.ts
generated
vendored
Normal file
12
app/node_modules/@dimforge/rapier3d-compat/pipeline/physics_pipeline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { RawPhysicsPipeline } from "../raw";
|
||||
import { Vector } from "../math";
|
||||
import { IntegrationParameters, ImpulseJointSet, MultibodyJointSet, RigidBodySet, CCDSolver, IslandManager } from "../dynamics";
|
||||
import { BroadPhase, ColliderSet, NarrowPhase } from "../geometry";
|
||||
import { EventQueue } from "./event_queue";
|
||||
import { PhysicsHooks } from "./physics_hooks";
|
||||
export declare class PhysicsPipeline {
|
||||
raw: RawPhysicsPipeline;
|
||||
free(): void;
|
||||
constructor(raw?: RawPhysicsPipeline);
|
||||
step(gravity: Vector, integrationParameters: IntegrationParameters, islands: IslandManager, broadPhase: BroadPhase, narrowPhase: NarrowPhase, bodies: RigidBodySet, colliders: ColliderSet, impulseJoints: ImpulseJointSet, multibodyJoints: MultibodyJointSet, ccdSolver: CCDSolver, eventQueue?: EventQueue, hooks?: PhysicsHooks): void;
|
||||
}
|
||||
190
app/node_modules/@dimforge/rapier3d-compat/pipeline/query_pipeline.d.ts
generated
vendored
Normal file
190
app/node_modules/@dimforge/rapier3d-compat/pipeline/query_pipeline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
import { RawQueryPipeline } from "../raw";
|
||||
import { ColliderHandle, ColliderSet, InteractionGroups, PointColliderProjection, Ray, RayColliderIntersection, RayColliderToi, Shape, ShapeColliderTOI } from "../geometry";
|
||||
import { RigidBodyHandle, RigidBodySet } from "../dynamics";
|
||||
import { Rotation, Vector } from "../math";
|
||||
/**
|
||||
* Flags for excluding whole sets of colliders from a scene query.
|
||||
*/
|
||||
export declare enum QueryFilterFlags {
|
||||
/**
|
||||
* Exclude from the query any collider attached to a fixed rigid-body and colliders with no rigid-body attached.
|
||||
*/
|
||||
EXCLUDE_FIXED = 1,
|
||||
/**
|
||||
* Exclude from the query any collider attached to a dynamic rigid-body.
|
||||
*/
|
||||
EXCLUDE_KINEMATIC = 2,
|
||||
/**
|
||||
* Exclude from the query any collider attached to a kinematic rigid-body.
|
||||
*/
|
||||
EXCLUDE_DYNAMIC = 4,
|
||||
/**
|
||||
* Exclude from the query any collider that is a sensor.
|
||||
*/
|
||||
EXCLUDE_SENSORS = 8,
|
||||
/**
|
||||
* Exclude from the query any collider that is not a sensor.
|
||||
*/
|
||||
EXCLUDE_SOLIDS = 16,
|
||||
/**
|
||||
* Excludes all colliders not attached to a dynamic rigid-body.
|
||||
*/
|
||||
ONLY_DYNAMIC = 3,
|
||||
/**
|
||||
* Excludes all colliders not attached to a kinematic rigid-body.
|
||||
*/
|
||||
ONLY_KINEMATIC = 5,
|
||||
/**
|
||||
* Exclude all colliders attached to a non-fixed rigid-body
|
||||
* (this will not exclude colliders not attached to any rigid-body).
|
||||
*/
|
||||
ONLY_FIXED = 6
|
||||
}
|
||||
/**
|
||||
* A pipeline for performing queries on all the colliders of a scene.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `queryPipeline.free()`
|
||||
* once you are done using it (and all the rigid-bodies it created).
|
||||
*/
|
||||
export declare class QueryPipeline {
|
||||
raw: RawQueryPipeline;
|
||||
/**
|
||||
* Release the WASM memory occupied by this query pipeline.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawQueryPipeline);
|
||||
/**
|
||||
* Updates the acceleration structure of the query pipeline.
|
||||
* @param bodies - The set of rigid-bodies taking part in this pipeline.
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
*/
|
||||
update(bodies: RigidBodySet, colliders: ColliderSet): void;
|
||||
/**
|
||||
* Find the closest intersection between a ray and a set of collider.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
* @param filter - The callback to filter out which collider will be hit.
|
||||
*/
|
||||
castRay(bodies: RigidBodySet, colliders: ColliderSet, ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): RayColliderToi | null;
|
||||
/**
|
||||
* Find the closest intersection between a ray and a set of collider.
|
||||
*
|
||||
* This also computes the normal at the hit point.
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
*/
|
||||
castRayAndGetNormal(bodies: RigidBodySet, colliders: ColliderSet, ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): RayColliderIntersection | null;
|
||||
/**
|
||||
* Cast a ray and collects all the intersections between a ray and the scene.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
* @param callback - The callback called once per hit (in no particular order) between a ray and a collider.
|
||||
* If this callback returns `false`, then the cast will stop and no further hits will be detected/reported.
|
||||
*/
|
||||
intersectionsWithRay(bodies: RigidBodySet, colliders: ColliderSet, ray: Ray, maxToi: number, solid: boolean, callback: (intersect: RayColliderIntersection) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): void;
|
||||
/**
|
||||
* Gets the handle of up to one collider intersecting the given shape.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param shapePos - The position of the shape used for the intersection test.
|
||||
* @param shapeRot - The orientation of the shape used for the intersection test.
|
||||
* @param shape - The shape used for the intersection test.
|
||||
* @param groups - The bit groups and filter associated to the ray, in order to only
|
||||
* hit the colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
intersectionWithShape(bodies: RigidBodySet, colliders: ColliderSet, shapePos: Vector, shapeRot: Rotation, shape: Shape, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): ColliderHandle | null;
|
||||
/**
|
||||
* Find the projection of a point on the closest collider.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param point - The point to project.
|
||||
* @param solid - If this is set to `true` then the collider shapes are considered to
|
||||
* be plain (if the point is located inside of a plain shape, its projection is the point
|
||||
* itself). If it is set to `false` the collider shapes are considered to be hollow
|
||||
* (if the point is located inside of an hollow shape, it is projected on the shape's
|
||||
* boundary).
|
||||
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
||||
* project on colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
projectPoint(bodies: RigidBodySet, colliders: ColliderSet, point: Vector, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): PointColliderProjection | null;
|
||||
/**
|
||||
* Find the projection of a point on the closest collider.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param point - The point to project.
|
||||
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
||||
* project on colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
projectPointAndGetFeature(bodies: RigidBodySet, colliders: ColliderSet, point: Vector, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): PointColliderProjection | null;
|
||||
/**
|
||||
* Find all the colliders containing the given point.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param point - The point used for the containment test.
|
||||
* @param groups - The bit groups and filter associated to the point to test, in order to only
|
||||
* test on colliders with collision groups compatible with the ray's group.
|
||||
* @param callback - A function called with the handles of each collider with a shape
|
||||
* containing the `point`.
|
||||
*/
|
||||
intersectionsWithPoint(bodies: RigidBodySet, colliders: ColliderSet, point: Vector, callback: (handle: ColliderHandle) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): void;
|
||||
/**
|
||||
* Casts a shape at a constant linear velocity and retrieve the first collider it hits.
|
||||
* This is similar to ray-casting except that we are casting a whole shape instead of
|
||||
* just a point (the ray origin).
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param shapePos - The initial position of the shape to cast.
|
||||
* @param shapeRot - The initial rotation of the shape to cast.
|
||||
* @param shapeVel - The constant velocity of the shape to cast (i.e. the cast direction).
|
||||
* @param shape - The shape to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.
|
||||
* @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if
|
||||
* the shape is penetrating another shape at its starting point **and** its trajectory is such
|
||||
* that it’s on a path to exist that penetration state.
|
||||
* @param groups - The bit groups and filter associated to the shape to cast, in order to only
|
||||
* test on colliders with collision groups compatible with this group.
|
||||
*/
|
||||
castShape(bodies: RigidBodySet, colliders: ColliderSet, shapePos: Vector, shapeRot: Rotation, shapeVel: Vector, shape: Shape, maxToi: number, stopAtPenetration: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): ShapeColliderTOI | null;
|
||||
/**
|
||||
* Retrieve all the colliders intersecting the given shape.
|
||||
*
|
||||
* @param colliders - The set of colliders taking part in this pipeline.
|
||||
* @param shapePos - The position of the shape to test.
|
||||
* @param shapeRot - The orientation of the shape to test.
|
||||
* @param shape - The shape to test.
|
||||
* @param groups - The bit groups and filter associated to the shape to test, in order to only
|
||||
* test on colliders with collision groups compatible with this group.
|
||||
* @param callback - A function called with the handles of each collider intersecting the `shape`.
|
||||
*/
|
||||
intersectionsWithShape(bodies: RigidBodySet, colliders: ColliderSet, shapePos: Vector, shapeRot: Rotation, shape: Shape, callback: (handle: ColliderHandle) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): void;
|
||||
/**
|
||||
* Finds the handles of all the colliders with an AABB intersecting the given AABB.
|
||||
*
|
||||
* @param aabbCenter - The center of the AABB to test.
|
||||
* @param aabbHalfExtents - The half-extents of the AABB to test.
|
||||
* @param callback - The callback that will be called with the handles of all the colliders
|
||||
* currently intersecting the given AABB.
|
||||
*/
|
||||
collidersWithAabbIntersectingAabb(aabbCenter: Vector, aabbHalfExtents: Vector, callback: (handle: ColliderHandle) => boolean): void;
|
||||
}
|
||||
37
app/node_modules/@dimforge/rapier3d-compat/pipeline/serialization_pipeline.d.ts
generated
vendored
Normal file
37
app/node_modules/@dimforge/rapier3d-compat/pipeline/serialization_pipeline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { RawSerializationPipeline } from "../raw";
|
||||
import { Vector } from "../math";
|
||||
import { IntegrationParameters, IslandManager, ImpulseJointSet, MultibodyJointSet, RigidBodySet } from "../dynamics";
|
||||
import { BroadPhase, ColliderSet, NarrowPhase } from "../geometry";
|
||||
import { World } from "./world";
|
||||
/**
|
||||
* A pipeline for serializing the physics scene.
|
||||
*
|
||||
* To avoid leaking WASM resources, this MUST be freed manually with `queryPipeline.free()`
|
||||
* once you are done using it (and all the rigid-bodies it created).
|
||||
*/
|
||||
export declare class SerializationPipeline {
|
||||
raw: RawSerializationPipeline;
|
||||
/**
|
||||
* Release the WASM memory occupied by this serialization pipeline.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(raw?: RawSerializationPipeline);
|
||||
/**
|
||||
* Serialize a complete physics state into a single byte array.
|
||||
* @param gravity - The current gravity affecting the simulation.
|
||||
* @param integrationParameters - The integration parameters of the simulation.
|
||||
* @param broadPhase - The broad-phase of the simulation.
|
||||
* @param narrowPhase - The narrow-phase of the simulation.
|
||||
* @param bodies - The rigid-bodies taking part into the simulation.
|
||||
* @param colliders - The colliders taking part into the simulation.
|
||||
* @param impulseJoints - The impulse joints taking part into the simulation.
|
||||
* @param multibodyJoints - The multibody joints taking part into the simulation.
|
||||
*/
|
||||
serializeAll(gravity: Vector, integrationParameters: IntegrationParameters, islands: IslandManager, broadPhase: BroadPhase, narrowPhase: NarrowPhase, bodies: RigidBodySet, colliders: ColliderSet, impulseJoints: ImpulseJointSet, multibodyJoints: MultibodyJointSet): Uint8Array;
|
||||
/**
|
||||
* Deserialize the complete physics state from a single byte array.
|
||||
*
|
||||
* @param data - The byte array to deserialize.
|
||||
*/
|
||||
deserializeAll(data: Uint8Array): World;
|
||||
}
|
||||
423
app/node_modules/@dimforge/rapier3d-compat/pipeline/world.d.ts
generated
vendored
Normal file
423
app/node_modules/@dimforge/rapier3d-compat/pipeline/world.d.ts
generated
vendored
Normal file
@@ -0,0 +1,423 @@
|
||||
import { RawBroadPhase, RawCCDSolver, RawColliderSet, RawDeserializedWorld, RawIntegrationParameters, RawIslandManager, RawImpulseJointSet, RawMultibodyJointSet, RawNarrowPhase, RawPhysicsPipeline, RawQueryPipeline, RawRigidBodySet, RawSerializationPipeline, RawDebugRenderPipeline } from "../raw";
|
||||
import { BroadPhase, Collider, ColliderDesc, ColliderHandle, ColliderSet, InteractionGroups, NarrowPhase, PointColliderProjection, Ray, RayColliderIntersection, RayColliderToi, Shape, ShapeColliderTOI, TempContactManifold } from "../geometry";
|
||||
import { CCDSolver, IntegrationParameters, IslandManager, ImpulseJoint, ImpulseJointHandle, MultibodyJoint, MultibodyJointHandle, JointData, ImpulseJointSet, MultibodyJointSet, RigidBody, RigidBodyDesc, RigidBodyHandle, RigidBodySet } from "../dynamics";
|
||||
import { Rotation, Vector } from "../math";
|
||||
import { PhysicsPipeline } from "./physics_pipeline";
|
||||
import { QueryFilterFlags, QueryPipeline } from "./query_pipeline";
|
||||
import { SerializationPipeline } from "./serialization_pipeline";
|
||||
import { EventQueue } from "./event_queue";
|
||||
import { PhysicsHooks } from "./physics_hooks";
|
||||
import { DebugRenderBuffers, DebugRenderPipeline } from "./debug_render_pipeline";
|
||||
import { KinematicCharacterController } from "../control";
|
||||
import { DynamicRayCastVehicleController } from "../control";
|
||||
/**
|
||||
* The physics world.
|
||||
*
|
||||
* This contains all the data-structures necessary for creating and simulating
|
||||
* bodies with contacts, joints, and external forces.
|
||||
*/
|
||||
export declare class World {
|
||||
gravity: Vector;
|
||||
integrationParameters: IntegrationParameters;
|
||||
islands: IslandManager;
|
||||
broadPhase: BroadPhase;
|
||||
narrowPhase: NarrowPhase;
|
||||
bodies: RigidBodySet;
|
||||
colliders: ColliderSet;
|
||||
impulseJoints: ImpulseJointSet;
|
||||
multibodyJoints: MultibodyJointSet;
|
||||
ccdSolver: CCDSolver;
|
||||
queryPipeline: QueryPipeline;
|
||||
physicsPipeline: PhysicsPipeline;
|
||||
serializationPipeline: SerializationPipeline;
|
||||
debugRenderPipeline: DebugRenderPipeline;
|
||||
characterControllers: Set<KinematicCharacterController>;
|
||||
vehicleControllers: Set<DynamicRayCastVehicleController>;
|
||||
/**
|
||||
* Release the WASM memory occupied by this physics world.
|
||||
*
|
||||
* All the fields of this physics world will be freed as well,
|
||||
* so there is no need to call their `.free()` methods individually.
|
||||
*/
|
||||
free(): void;
|
||||
constructor(gravity: Vector, rawIntegrationParameters?: RawIntegrationParameters, rawIslands?: RawIslandManager, rawBroadPhase?: RawBroadPhase, rawNarrowPhase?: RawNarrowPhase, rawBodies?: RawRigidBodySet, rawColliders?: RawColliderSet, rawImpulseJoints?: RawImpulseJointSet, rawMultibodyJoints?: RawMultibodyJointSet, rawCCDSolver?: RawCCDSolver, rawQueryPipeline?: RawQueryPipeline, rawPhysicsPipeline?: RawPhysicsPipeline, rawSerializationPipeline?: RawSerializationPipeline, rawDebugRenderPipeline?: RawDebugRenderPipeline);
|
||||
static fromRaw(raw: RawDeserializedWorld): World;
|
||||
/**
|
||||
* Takes a snapshot of this world.
|
||||
*
|
||||
* Use `World.restoreSnapshot` to create a new physics world with a state identical to
|
||||
* the state when `.takeSnapshot()` is called.
|
||||
*/
|
||||
takeSnapshot(): Uint8Array;
|
||||
/**
|
||||
* Creates a new physics world from a snapshot.
|
||||
*
|
||||
* This new physics world will be an identical copy of the snapshoted physics world.
|
||||
*/
|
||||
static restoreSnapshot(data: Uint8Array): World;
|
||||
/**
|
||||
* Computes all the lines (and their colors) needed to render the scene.
|
||||
*/
|
||||
debugRender(): DebugRenderBuffers;
|
||||
/**
|
||||
* Advance the simulation by one time step.
|
||||
*
|
||||
* All events generated by the physics engine are ignored.
|
||||
*
|
||||
* @param EventQueue - (optional) structure responsible for collecting
|
||||
* events generated by the physics engine.
|
||||
*/
|
||||
step(eventQueue?: EventQueue, hooks?: PhysicsHooks): void;
|
||||
/**
|
||||
* Update colliders positions after rigid-bodies moved.
|
||||
*
|
||||
* When a rigid-body moves, the positions of the colliders attached to it need to be updated. This update is
|
||||
* generally automatically done at the beginning and the end of each simulation step with World.step.
|
||||
* If the positions need to be updated without running a simulation step this method can be called manually.
|
||||
*/
|
||||
propagateModifiedBodyPositionsToColliders(): void;
|
||||
/**
|
||||
* Ensure subsequent scene queries take into account the collider positions set before this method is called.
|
||||
*
|
||||
* This does not step the physics simulation forward.
|
||||
*/
|
||||
updateSceneQueries(): void;
|
||||
/**
|
||||
* The current simulation timestep.
|
||||
*/
|
||||
get timestep(): number;
|
||||
/**
|
||||
* Sets the new simulation timestep.
|
||||
*
|
||||
* The simulation timestep governs by how much the physics state of the world will
|
||||
* be integrated. A simulation timestep should:
|
||||
* - be as small as possible. Typical values evolve around 0.016 (assuming the chosen unit is milliseconds,
|
||||
* corresponds to the time between two frames of a game running at 60FPS).
|
||||
* - not vary too much during the course of the simulation. A timestep with large variations may
|
||||
* cause instabilities in the simulation.
|
||||
*
|
||||
* @param dt - The timestep length, in seconds.
|
||||
*/
|
||||
set timestep(dt: number);
|
||||
/**
|
||||
* The number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
||||
*/
|
||||
get numSolverIterations(): number;
|
||||
/**
|
||||
* Sets the number of solver iterations run by the constraints solver for calculating forces (default: `4`).
|
||||
*
|
||||
* The greater this value is, the most rigid and realistic the physics simulation will be.
|
||||
* However a greater number of iterations is more computationally intensive.
|
||||
*
|
||||
* @param niter - The new number of solver iterations.
|
||||
*/
|
||||
set numSolverIterations(niter: number);
|
||||
/**
|
||||
* Number of addition friction resolution iteration run during the last solver sub-step (default: `4`).
|
||||
*/
|
||||
get numAdditionalFrictionIterations(): number;
|
||||
/**
|
||||
* Sets the number of addition friction resolution iteration run during the last solver sub-step (default: `4`).
|
||||
*
|
||||
* The greater this value is, the most realistic friction will be.
|
||||
* However a greater number of iterations is more computationally intensive.
|
||||
*
|
||||
* @param niter - The new number of additional friction iterations.
|
||||
*/
|
||||
set numAdditionalFrictionIterations(niter: number);
|
||||
/**
|
||||
* Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
||||
*/
|
||||
get numInternalPgsIterations(): number;
|
||||
/**
|
||||
* Sets the Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration (default: `1`).
|
||||
*
|
||||
* Increasing this parameter will improve stability of the simulation. It will have a lesser effect than
|
||||
* increasing `numSolverIterations` but is also less computationally expensive.
|
||||
*
|
||||
* @param niter - The new number of internal PGS iterations.
|
||||
*/
|
||||
set numInternalPgsIterations(niter: number);
|
||||
switchToStandardPgsSolver(): void;
|
||||
switchToSmallStepsPgsSolver(): void;
|
||||
/**
|
||||
* Creates a new rigid-body from the given rigid-body descriptor.
|
||||
*
|
||||
* @param body - The description of the rigid-body to create.
|
||||
*/
|
||||
createRigidBody(body: RigidBodyDesc): RigidBody;
|
||||
/**
|
||||
* Creates a new character controller.
|
||||
*
|
||||
* @param offset - The artificial gap added between the character’s chape and its environment.
|
||||
*/
|
||||
createCharacterController(offset: number): KinematicCharacterController;
|
||||
/**
|
||||
* Removes a character controller from this world.
|
||||
*
|
||||
* @param controller - The character controller to remove.
|
||||
*/
|
||||
removeCharacterController(controller: KinematicCharacterController): void;
|
||||
/**
|
||||
* Creates a new vehicle controller.
|
||||
*
|
||||
* @param chassis - The rigid-body used as the chassis of the vehicle controller. When the vehicle
|
||||
* controller is updated, it will change directly the rigid-body’s velocity. This
|
||||
* rigid-body must be a dynamic or kinematic-velocity-based rigid-body.
|
||||
*/
|
||||
createVehicleController(chassis: RigidBody): DynamicRayCastVehicleController;
|
||||
/**
|
||||
* Removes a vehicle controller from this world.
|
||||
*
|
||||
* @param controller - The vehicle controller to remove.
|
||||
*/
|
||||
removeVehicleController(controller: DynamicRayCastVehicleController): void;
|
||||
/**
|
||||
* Creates a new collider.
|
||||
*
|
||||
* @param desc - The description of the collider.
|
||||
* @param parent - The rigid-body this collider is attached to.
|
||||
*/
|
||||
createCollider(desc: ColliderDesc, parent?: RigidBody): Collider;
|
||||
/**
|
||||
* Creates a new impulse joint from the given joint descriptor.
|
||||
*
|
||||
* @param params - The description of the joint to create.
|
||||
* @param parent1 - The first rigid-body attached to this joint.
|
||||
* @param parent2 - The second rigid-body attached to this joint.
|
||||
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
||||
*/
|
||||
createImpulseJoint(params: JointData, parent1: RigidBody, parent2: RigidBody, wakeUp: boolean): ImpulseJoint;
|
||||
/**
|
||||
* Creates a new multibody joint from the given joint descriptor.
|
||||
*
|
||||
* @param params - The description of the joint to create.
|
||||
* @param parent1 - The first rigid-body attached to this joint.
|
||||
* @param parent2 - The second rigid-body attached to this joint.
|
||||
* @param wakeUp - Should the attached rigid-bodies be awakened?
|
||||
*/
|
||||
createMultibodyJoint(params: JointData, parent1: RigidBody, parent2: RigidBody, wakeUp: boolean): MultibodyJoint;
|
||||
/**
|
||||
* Retrieves a rigid-body from its handle.
|
||||
*
|
||||
* @param handle - The integer handle of the rigid-body to retrieve.
|
||||
*/
|
||||
getRigidBody(handle: RigidBodyHandle): RigidBody;
|
||||
/**
|
||||
* Retrieves a collider from its handle.
|
||||
*
|
||||
* @param handle - The integer handle of the collider to retrieve.
|
||||
*/
|
||||
getCollider(handle: ColliderHandle): Collider;
|
||||
/**
|
||||
* Retrieves an impulse joint from its handle.
|
||||
*
|
||||
* @param handle - The integer handle of the impulse joint to retrieve.
|
||||
*/
|
||||
getImpulseJoint(handle: ImpulseJointHandle): ImpulseJoint;
|
||||
/**
|
||||
* Retrieves an multibody joint from its handle.
|
||||
*
|
||||
* @param handle - The integer handle of the multibody joint to retrieve.
|
||||
*/
|
||||
getMultibodyJoint(handle: MultibodyJointHandle): MultibodyJoint;
|
||||
/**
|
||||
* Removes the given rigid-body from this physics world.
|
||||
*
|
||||
* This will remove this rigid-body as well as all its attached colliders and joints.
|
||||
* Every other bodies touching or attached by joints to this rigid-body will be woken-up.
|
||||
*
|
||||
* @param body - The rigid-body to remove.
|
||||
*/
|
||||
removeRigidBody(body: RigidBody): void;
|
||||
/**
|
||||
* Removes the given collider from this physics world.
|
||||
*
|
||||
* @param collider - The collider to remove.
|
||||
* @param wakeUp - If set to `true`, the rigid-body this collider is attached to will be awaken.
|
||||
*/
|
||||
removeCollider(collider: Collider, wakeUp: boolean): void;
|
||||
/**
|
||||
* Removes the given impulse joint from this physics world.
|
||||
*
|
||||
* @param joint - The impulse joint to remove.
|
||||
* @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.
|
||||
*/
|
||||
removeImpulseJoint(joint: ImpulseJoint, wakeUp: boolean): void;
|
||||
/**
|
||||
* Removes the given multibody joint from this physics world.
|
||||
*
|
||||
* @param joint - The multibody joint to remove.
|
||||
* @param wakeUp - If set to `true`, the rigid-bodies attached by this joint will be awaken.
|
||||
*/
|
||||
removeMultibodyJoint(joint: MultibodyJoint, wakeUp: boolean): void;
|
||||
/**
|
||||
* Applies the given closure to each collider managed by this physics world.
|
||||
*
|
||||
* @param f(collider) - The function to apply to each collider managed by this physics world. Called as `f(collider)`.
|
||||
*/
|
||||
forEachCollider(f: (collider: Collider) => void): void;
|
||||
/**
|
||||
* Applies the given closure to each rigid-body managed by this physics world.
|
||||
*
|
||||
* @param f(body) - The function to apply to each rigid-body managed by this physics world. Called as `f(collider)`.
|
||||
*/
|
||||
forEachRigidBody(f: (body: RigidBody) => void): void;
|
||||
/**
|
||||
* Applies the given closure to each active rigid-body managed by this physics world.
|
||||
*
|
||||
* After a short time of inactivity, a rigid-body is automatically deactivated ("asleep") by
|
||||
* the physics engine in order to save computational power. A sleeping rigid-body never moves
|
||||
* unless it is moved manually by the user.
|
||||
*
|
||||
* @param f - The function to apply to each active rigid-body managed by this physics world. Called as `f(collider)`.
|
||||
*/
|
||||
forEachActiveRigidBody(f: (body: RigidBody) => void): void;
|
||||
/**
|
||||
* Find the closest intersection between a ray and the physics world.
|
||||
*
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
* @param filter - The callback to filter out which collider will be hit.
|
||||
*/
|
||||
castRay(ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): RayColliderToi | null;
|
||||
/**
|
||||
* Find the closest intersection between a ray and the physics world.
|
||||
*
|
||||
* This also computes the normal at the hit point.
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
*/
|
||||
castRayAndGetNormal(ray: Ray, maxToi: number, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): RayColliderIntersection | null;
|
||||
/**
|
||||
* Cast a ray and collects all the intersections between a ray and the scene.
|
||||
*
|
||||
* @param ray - The ray to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the length of the ray to `ray.dir.norm() * maxToi`.
|
||||
* @param solid - If `false` then the ray will attempt to hit the boundary of a shape, even if its
|
||||
* origin already lies inside of a shape. In other terms, `true` implies that all shapes are plain,
|
||||
* whereas `false` implies that all shapes are hollow for this ray-cast.
|
||||
* @param groups - Used to filter the colliders that can or cannot be hit by the ray.
|
||||
* @param callback - The callback called once per hit (in no particular order) between a ray and a collider.
|
||||
* If this callback returns `false`, then the cast will stop and no further hits will be detected/reported.
|
||||
*/
|
||||
intersectionsWithRay(ray: Ray, maxToi: number, solid: boolean, callback: (intersect: RayColliderIntersection) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
||||
/**
|
||||
* Gets the handle of up to one collider intersecting the given shape.
|
||||
*
|
||||
* @param shapePos - The position of the shape used for the intersection test.
|
||||
* @param shapeRot - The orientation of the shape used for the intersection test.
|
||||
* @param shape - The shape used for the intersection test.
|
||||
* @param groups - The bit groups and filter associated to the ray, in order to only
|
||||
* hit the colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
intersectionWithShape(shapePos: Vector, shapeRot: Rotation, shape: Shape, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): Collider | null;
|
||||
/**
|
||||
* Find the projection of a point on the closest collider.
|
||||
*
|
||||
* @param point - The point to project.
|
||||
* @param solid - If this is set to `true` then the collider shapes are considered to
|
||||
* be plain (if the point is located inside of a plain shape, its projection is the point
|
||||
* itself). If it is set to `false` the collider shapes are considered to be hollow
|
||||
* (if the point is located inside of an hollow shape, it is projected on the shape's
|
||||
* boundary).
|
||||
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
||||
* project on colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
projectPoint(point: Vector, solid: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): PointColliderProjection | null;
|
||||
/**
|
||||
* Find the projection of a point on the closest collider.
|
||||
*
|
||||
* @param point - The point to project.
|
||||
* @param groups - The bit groups and filter associated to the point to project, in order to only
|
||||
* project on colliders with collision groups compatible with the ray's group.
|
||||
*/
|
||||
projectPointAndGetFeature(point: Vector, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): PointColliderProjection | null;
|
||||
/**
|
||||
* Find all the colliders containing the given point.
|
||||
*
|
||||
* @param point - The point used for the containment test.
|
||||
* @param groups - The bit groups and filter associated to the point to test, in order to only
|
||||
* test on colliders with collision groups compatible with the ray's group.
|
||||
* @param callback - A function called with the handles of each collider with a shape
|
||||
* containing the `point`.
|
||||
*/
|
||||
intersectionsWithPoint(point: Vector, callback: (handle: Collider) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
||||
/**
|
||||
* Casts a shape at a constant linear velocity and retrieve the first collider it hits.
|
||||
* This is similar to ray-casting except that we are casting a whole shape instead of
|
||||
* just a point (the ray origin).
|
||||
*
|
||||
* @param shapePos - The initial position of the shape to cast.
|
||||
* @param shapeRot - The initial rotation of the shape to cast.
|
||||
* @param shapeVel - The constant velocity of the shape to cast (i.e. the cast direction).
|
||||
* @param shape - The shape to cast.
|
||||
* @param maxToi - The maximum time-of-impact that can be reported by this cast. This effectively
|
||||
* limits the distance traveled by the shape to `shapeVel.norm() * maxToi`.
|
||||
* @param stopAtPenetration - If set to `false`, the linear shape-cast won’t immediately stop if
|
||||
* the shape is penetrating another shape at its starting point **and** its trajectory is such
|
||||
* that it’s on a path to exist that penetration state.
|
||||
* @param groups - The bit groups and filter associated to the shape to cast, in order to only
|
||||
* test on colliders with collision groups compatible with this group.
|
||||
*/
|
||||
castShape(shapePos: Vector, shapeRot: Rotation, shapeVel: Vector, shape: Shape, maxToi: number, stopAtPenetration: boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): ShapeColliderTOI | null;
|
||||
/**
|
||||
* Retrieve all the colliders intersecting the given shape.
|
||||
*
|
||||
* @param shapePos - The position of the shape to test.
|
||||
* @param shapeRot - The orientation of the shape to test.
|
||||
* @param shape - The shape to test.
|
||||
* @param groups - The bit groups and filter associated to the shape to test, in order to only
|
||||
* test on colliders with collision groups compatible with this group.
|
||||
* @param callback - A function called with the handles of each collider intersecting the `shape`.
|
||||
*/
|
||||
intersectionsWithShape(shapePos: Vector, shapeRot: Rotation, shape: Shape, callback: (collider: Collider) => boolean, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): void;
|
||||
/**
|
||||
* Finds the handles of all the colliders with an AABB intersecting the given AABB.
|
||||
*
|
||||
* @param aabbCenter - The center of the AABB to test.
|
||||
* @param aabbHalfExtents - The half-extents of the AABB to test.
|
||||
* @param callback - The callback that will be called with the handles of all the colliders
|
||||
* currently intersecting the given AABB.
|
||||
*/
|
||||
collidersWithAabbIntersectingAabb(aabbCenter: Vector, aabbHalfExtents: Vector, callback: (handle: Collider) => boolean): void;
|
||||
/**
|
||||
* Enumerates all the colliders potentially in contact with the given collider.
|
||||
*
|
||||
* @param collider1 - The second collider involved in the contact.
|
||||
* @param f - Closure that will be called on each collider that is in contact with `collider1`.
|
||||
*/
|
||||
contactPairsWith(collider1: Collider, f: (collider2: Collider) => void): void;
|
||||
/**
|
||||
* Enumerates all the colliders intersecting the given colliders, assuming one of them
|
||||
* is a sensor.
|
||||
*/
|
||||
intersectionPairsWith(collider1: Collider, f: (collider2: Collider) => void): void;
|
||||
/**
|
||||
* Iterates through all the contact manifolds between the given pair of colliders.
|
||||
*
|
||||
* @param collider1 - The first collider involved in the contact.
|
||||
* @param collider2 - The second collider involved in the contact.
|
||||
* @param f - Closure that will be called on each contact manifold between the two colliders. If the second argument
|
||||
* passed to this closure is `true`, then the contact manifold data is flipped, i.e., methods like `localNormal1`
|
||||
* actually apply to the `collider2` and fields like `localNormal2` apply to the `collider1`.
|
||||
*/
|
||||
contactPair(collider1: Collider, collider2: Collider, f: (manifold: TempContactManifold, flipped: boolean) => void): void;
|
||||
/**
|
||||
* Returns `true` if `collider1` and `collider2` intersect and at least one of them is a sensor.
|
||||
* @param collider1 − The first collider involved in the intersection.
|
||||
* @param collider2 − The second collider involved in the intersection.
|
||||
*/
|
||||
intersectionPair(collider1: Collider, collider2: Collider): boolean;
|
||||
}
|
||||
2
app/node_modules/@dimforge/rapier3d-compat/rapier.cjs.js
generated
vendored
Normal file
2
app/node_modules/@dimforge/rapier3d-compat/rapier.cjs.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
app/node_modules/@dimforge/rapier3d-compat/rapier.cjs.js.map
generated
vendored
Normal file
1
app/node_modules/@dimforge/rapier3d-compat/rapier.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
app/node_modules/@dimforge/rapier3d-compat/rapier.d.ts
generated
vendored
Normal file
3
app/node_modules/@dimforge/rapier3d-compat/rapier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as RAPIER from "./exports";
|
||||
export * from "./exports";
|
||||
export default RAPIER;
|
||||
2
app/node_modules/@dimforge/rapier3d-compat/rapier.es.js
generated
vendored
Normal file
2
app/node_modules/@dimforge/rapier3d-compat/rapier.es.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
app/node_modules/@dimforge/rapier3d-compat/rapier.es.js.map
generated
vendored
Normal file
1
app/node_modules/@dimforge/rapier3d-compat/rapier.es.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3497
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.d.ts
generated
vendored
Normal file
3497
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5733
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.js
generated
vendored
Normal file
5733
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d_bg.wasm
generated
vendored
Normal file
BIN
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d_bg.wasm
generated
vendored
Normal file
Binary file not shown.
495
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d_bg.wasm.d.ts
generated
vendored
Normal file
495
app/node_modules/@dimforge/rapier3d-compat/rapier_wasm3d_bg.wasm.d.ts
generated
vendored
Normal file
@@ -0,0 +1,495 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export const memory: WebAssembly.Memory;
|
||||
export function version(a: number): void;
|
||||
export function __wbg_rawkinematiccharactercontroller_free(a: number): void;
|
||||
export function rawkinematiccharactercontroller_new(a: number): number;
|
||||
export function rawkinematiccharactercontroller_setUp(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_setOffset(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_slideEnabled(a: number): number;
|
||||
export function rawkinematiccharactercontroller_setSlideEnabled(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_autostepMaxHeight(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_autostepMinWidth(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_autostepIncludesDynamicBodies(a: number): number;
|
||||
export function rawkinematiccharactercontroller_autostepEnabled(a: number): number;
|
||||
export function rawkinematiccharactercontroller_enableAutostep(a: number, b: number, c: number, d: number): void;
|
||||
export function rawkinematiccharactercontroller_disableAutostep(a: number): void;
|
||||
export function rawkinematiccharactercontroller_maxSlopeClimbAngle(a: number): number;
|
||||
export function rawkinematiccharactercontroller_setMaxSlopeClimbAngle(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_minSlopeSlideAngle(a: number): number;
|
||||
export function rawkinematiccharactercontroller_setMinSlopeSlideAngle(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_snapToGroundDistance(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_enableSnapToGround(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_disableSnapToGround(a: number): void;
|
||||
export function rawkinematiccharactercontroller_snapToGroundEnabled(a: number): number;
|
||||
export function rawkinematiccharactercontroller_computeColliderMovement(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number): void;
|
||||
export function rawkinematiccharactercontroller_computedMovement(a: number): number;
|
||||
export function rawkinematiccharactercontroller_computedGrounded(a: number): number;
|
||||
export function rawkinematiccharactercontroller_numComputedCollisions(a: number): number;
|
||||
export function rawkinematiccharactercontroller_computedCollision(a: number, b: number, c: number): number;
|
||||
export function __wbg_rawcharactercollision_free(a: number): void;
|
||||
export function rawcharactercollision_new(): number;
|
||||
export function rawcharactercollision_handle(a: number): number;
|
||||
export function rawcharactercollision_translationDeltaApplied(a: number): number;
|
||||
export function rawcharactercollision_translationDeltaRemaining(a: number): number;
|
||||
export function rawcharactercollision_toi(a: number): number;
|
||||
export function rawcharactercollision_worldWitness1(a: number): number;
|
||||
export function rawcharactercollision_worldWitness2(a: number): number;
|
||||
export function rawcharactercollision_worldNormal1(a: number): number;
|
||||
export function rawcharactercollision_worldNormal2(a: number): number;
|
||||
export function __wbg_rawdynamicraycastvehiclecontroller_free(a: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_new(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_current_vehicle_speed(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_chassis(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_index_up_axis(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_set_index_up_axis(a: number, b: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_index_forward_axis(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_set_index_forward_axis(a: number, b: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_add_wheel(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_num_wheels(a: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_update_vehicle(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_chassis_connection_point_cs(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_chassis_connection_point_cs(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_rest_length(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_suspension_rest_length(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_max_suspension_travel(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_travel(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_radius(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_radius(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_stiffness(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_suspension_stiffness(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_compression(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_suspension_compression(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_relaxation(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_suspension_relaxation(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_max_suspension_force(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_max_suspension_force(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_brake(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_brake(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_steering(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_steering(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_engine_force(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_engine_force(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_direction_cs(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_direction_cs(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_axle_cs(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_axle_cs(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_friction_slip(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_friction_slip(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_side_friction_stiffness(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_set_wheel_side_friction_stiffness(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_rotation(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_forward_impulse(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_side_impulse(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_force(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_contact_normal_ws(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_contact_point_ws(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_suspension_length(a: number, b: number, c: number): void;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_hard_point_ws(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_is_in_contact(a: number, b: number): number;
|
||||
export function rawdynamicraycastvehiclecontroller_wheel_ground_object(a: number, b: number, c: number): void;
|
||||
export function __wbg_rawccdsolver_free(a: number): void;
|
||||
export function rawccdsolver_new(): number;
|
||||
export function rawimpulsejointset_jointType(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointBodyHandle1(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointBodyHandle2(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointFrameX1(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointFrameX2(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointAnchor1(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointAnchor2(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointSetAnchor1(a: number, b: number, c: number): void;
|
||||
export function rawimpulsejointset_jointSetAnchor2(a: number, b: number, c: number): void;
|
||||
export function rawimpulsejointset_jointContactsEnabled(a: number, b: number): number;
|
||||
export function rawimpulsejointset_jointSetContactsEnabled(a: number, b: number, c: number): void;
|
||||
export function rawimpulsejointset_jointLimitsEnabled(a: number, b: number, c: number): number;
|
||||
export function rawimpulsejointset_jointLimitsMin(a: number, b: number, c: number): number;
|
||||
export function rawimpulsejointset_jointLimitsMax(a: number, b: number, c: number): number;
|
||||
export function rawimpulsejointset_jointSetLimits(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawimpulsejointset_jointConfigureMotorModel(a: number, b: number, c: number, d: number): void;
|
||||
export function rawimpulsejointset_jointConfigureMotorVelocity(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawimpulsejointset_jointConfigureMotorPosition(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawimpulsejointset_jointConfigureMotor(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
|
||||
export function __wbg_rawimpulsejointset_free(a: number): void;
|
||||
export function rawimpulsejointset_new(): number;
|
||||
export function rawimpulsejointset_createJoint(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawimpulsejointset_remove(a: number, b: number, c: number): void;
|
||||
export function rawimpulsejointset_len(a: number): number;
|
||||
export function rawimpulsejointset_contains(a: number, b: number): number;
|
||||
export function rawimpulsejointset_forEachJointHandle(a: number, b: number): void;
|
||||
export function rawimpulsejointset_forEachJointAttachedToRigidBody(a: number, b: number, c: number): void;
|
||||
export function __wbg_rawintegrationparameters_free(a: number): void;
|
||||
export function rawintegrationparameters_new(): number;
|
||||
export function rawintegrationparameters_dt(a: number): number;
|
||||
export function rawintegrationparameters_erp(a: number): number;
|
||||
export function rawintegrationparameters_numSolverIterations(a: number): number;
|
||||
export function rawintegrationparameters_numAdditionalFrictionIterations(a: number): number;
|
||||
export function rawintegrationparameters_numInternalPgsIterations(a: number): number;
|
||||
export function rawintegrationparameters_set_dt(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_erp(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_allowedLinearError(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_predictionDistance(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_numSolverIterations(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_numAdditionalFrictionIterations(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_numInternalPgsIterations(a: number, b: number): void;
|
||||
export function rawintegrationparameters_switchToStandardPgsSolver(a: number): void;
|
||||
export function rawintegrationparameters_switchToSmallStepsPgsSolver(a: number): void;
|
||||
export function __wbg_rawislandmanager_free(a: number): void;
|
||||
export function rawislandmanager_new(): number;
|
||||
export function rawislandmanager_forEachActiveRigidBodyHandle(a: number, b: number): void;
|
||||
export function __wbg_rawgenericjoint_free(a: number): void;
|
||||
export function rawgenericjoint_generic(a: number, b: number, c: number, d: number): number;
|
||||
export function rawgenericjoint_spring(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawgenericjoint_rope(a: number, b: number, c: number): number;
|
||||
export function rawgenericjoint_spherical(a: number, b: number): number;
|
||||
export function rawgenericjoint_prismatic(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawgenericjoint_fixed(a: number, b: number, c: number, d: number): number;
|
||||
export function rawgenericjoint_revolute(a: number, b: number, c: number): number;
|
||||
export function rawmultibodyjointset_jointType(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointFrameX1(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointFrameX2(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointAnchor1(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointAnchor2(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointContactsEnabled(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_jointSetContactsEnabled(a: number, b: number, c: number): void;
|
||||
export function rawmultibodyjointset_jointLimitsEnabled(a: number, b: number, c: number): number;
|
||||
export function rawmultibodyjointset_jointLimitsMin(a: number, b: number, c: number): number;
|
||||
export function rawmultibodyjointset_jointLimitsMax(a: number, b: number, c: number): number;
|
||||
export function __wbg_rawmultibodyjointset_free(a: number): void;
|
||||
export function rawmultibodyjointset_new(): number;
|
||||
export function rawmultibodyjointset_createJoint(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawmultibodyjointset_remove(a: number, b: number, c: number): void;
|
||||
export function rawmultibodyjointset_contains(a: number, b: number): number;
|
||||
export function rawmultibodyjointset_forEachJointHandle(a: number, b: number): void;
|
||||
export function rawmultibodyjointset_forEachJointAttachedToRigidBody(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbTranslation(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbRotation(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSleep(a: number, b: number): void;
|
||||
export function rawrigidbodyset_rbIsSleeping(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbIsMoving(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbNextTranslation(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbNextRotation(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetTranslation(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawrigidbodyset_rbSetRotation(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
|
||||
export function rawrigidbodyset_rbSetLinvel(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbSetAngvel(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbSetNextKinematicTranslation(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawrigidbodyset_rbSetNextKinematicRotation(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbSetAdditionalMass(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbSetAdditionalMassProperties(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
|
||||
export function rawrigidbodyset_rbLinvel(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbAngvel(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbLockTranslations(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbSetEnabledTranslations(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawrigidbodyset_rbLockRotations(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbSetEnabledRotations(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawrigidbodyset_rbDominanceGroup(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetDominanceGroup(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbEnableCcd(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbMass(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbInvMass(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbEffectiveInvMass(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbLocalCom(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbWorldCom(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbInvPrincipalInertiaSqrt(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbPrincipalInertiaLocalFrame(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbPrincipalInertia(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbEffectiveWorldInvInertiaSqrt(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbEffectiveAngularInertia(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbWakeUp(a: number, b: number): void;
|
||||
export function rawrigidbodyset_rbIsCcdEnabled(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbNumColliders(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbCollider(a: number, b: number, c: number): number;
|
||||
export function rawrigidbodyset_rbBodyType(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetBodyType(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbIsFixed(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbIsKinematic(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbIsDynamic(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbLinearDamping(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbAngularDamping(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetLinearDamping(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbSetAngularDamping(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbSetEnabled(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbIsEnabled(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbGravityScale(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetGravityScale(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbResetForces(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbResetTorques(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbAddForce(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbApplyImpulse(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbAddTorque(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbApplyTorqueImpulse(a: number, b: number, c: number, d: number): void;
|
||||
export function rawrigidbodyset_rbAddForceAtPoint(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawrigidbodyset_rbApplyImpulseAtPoint(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawrigidbodyset_rbAdditionalSolverIterations(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetAdditionalSolverIterations(a: number, b: number, c: number): void;
|
||||
export function rawrigidbodyset_rbUserData(a: number, b: number): number;
|
||||
export function rawrigidbodyset_rbSetUserData(a: number, b: number, c: number): void;
|
||||
export function __wbg_rawrigidbodyset_free(a: number): void;
|
||||
export function rawrigidbodyset_new(): number;
|
||||
export function rawrigidbodyset_createRigidBody(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number): number;
|
||||
export function rawrigidbodyset_remove(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawrigidbodyset_contains(a: number, b: number): number;
|
||||
export function rawrigidbodyset_forEachRigidBodyHandle(a: number, b: number): void;
|
||||
export function rawrigidbodyset_propagateModifiedBodyPositionsToColliders(a: number, b: number): void;
|
||||
export function __wbg_rawbroadphase_free(a: number): void;
|
||||
export function rawbroadphase_new(): number;
|
||||
export function rawcolliderset_coTranslation(a: number, b: number): number;
|
||||
export function rawcolliderset_coRotation(a: number, b: number): number;
|
||||
export function rawcolliderset_coSetTranslation(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawcolliderset_coSetTranslationWrtParent(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawcolliderset_coSetRotation(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawcolliderset_coSetRotationWrtParent(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function rawcolliderset_coIsSensor(a: number, b: number): number;
|
||||
export function rawcolliderset_coShapeType(a: number, b: number): number;
|
||||
export function rawcolliderset_coHalfspaceNormal(a: number, b: number): number;
|
||||
export function rawcolliderset_coHalfExtents(a: number, b: number): number;
|
||||
export function rawcolliderset_coSetHalfExtents(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coRadius(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetRadius(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coHalfHeight(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetHalfHeight(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coRoundRadius(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetRoundRadius(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coVertices(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coIndices(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coHeightfieldHeights(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coHeightfieldScale(a: number, b: number): number;
|
||||
export function rawcolliderset_coHeightfieldNRows(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coHeightfieldNCols(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coParent(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetEnabled(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coIsEnabled(a: number, b: number): number;
|
||||
export function rawcolliderset_coFriction(a: number, b: number): number;
|
||||
export function rawcolliderset_coRestitution(a: number, b: number): number;
|
||||
export function rawcolliderset_coDensity(a: number, b: number): number;
|
||||
export function rawcolliderset_coMass(a: number, b: number): number;
|
||||
export function rawcolliderset_coVolume(a: number, b: number): number;
|
||||
export function rawcolliderset_coCollisionGroups(a: number, b: number): number;
|
||||
export function rawcolliderset_coSolverGroups(a: number, b: number): number;
|
||||
export function rawcolliderset_coActiveHooks(a: number, b: number): number;
|
||||
export function rawcolliderset_coActiveCollisionTypes(a: number, b: number): number;
|
||||
export function rawcolliderset_coActiveEvents(a: number, b: number): number;
|
||||
export function rawcolliderset_coContactForceEventThreshold(a: number, b: number): number;
|
||||
export function rawcolliderset_coContainsPoint(a: number, b: number, c: number): number;
|
||||
export function rawcolliderset_coCastShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): number;
|
||||
export function rawcolliderset_coCastCollider(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
||||
export function rawcolliderset_coIntersectsShape(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawcolliderset_coContactShape(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawcolliderset_coContactCollider(a: number, b: number, c: number, d: number): number;
|
||||
export function rawcolliderset_coProjectPoint(a: number, b: number, c: number, d: number): number;
|
||||
export function rawcolliderset_coIntersectsRay(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawcolliderset_coCastRay(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawcolliderset_coCastRayAndGetNormal(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawcolliderset_coSetSensor(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetRestitution(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetFriction(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coFrictionCombineRule(a: number, b: number): number;
|
||||
export function rawcolliderset_coSetFrictionCombineRule(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coRestitutionCombineRule(a: number, b: number): number;
|
||||
export function rawcolliderset_coSetRestitutionCombineRule(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetCollisionGroups(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetSolverGroups(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetActiveHooks(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetActiveEvents(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetActiveCollisionTypes(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetShape(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetContactForceEventThreshold(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetDensity(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetMass(a: number, b: number, c: number): void;
|
||||
export function rawcolliderset_coSetMassProperties(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function __wbg_rawcolliderset_free(a: number): void;
|
||||
export function rawcolliderset_new(): number;
|
||||
export function rawcolliderset_len(a: number): number;
|
||||
export function rawcolliderset_contains(a: number, b: number): number;
|
||||
export function rawcolliderset_createCollider(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number): void;
|
||||
export function rawcolliderset_remove(a: number, b: number, c: number, d: number, e: number): void;
|
||||
export function rawcolliderset_forEachColliderHandle(a: number, b: number): void;
|
||||
export function __wbg_rawshapecontact_free(a: number): void;
|
||||
export function __wbg_rawnarrowphase_free(a: number): void;
|
||||
export function rawnarrowphase_new(): number;
|
||||
export function rawnarrowphase_contact_pairs_with(a: number, b: number, c: number): void;
|
||||
export function rawnarrowphase_contact_pair(a: number, b: number, c: number): number;
|
||||
export function rawnarrowphase_intersection_pairs_with(a: number, b: number, c: number): void;
|
||||
export function rawnarrowphase_intersection_pair(a: number, b: number, c: number): number;
|
||||
export function __wbg_rawcontactmanifold_free(a: number): void;
|
||||
export function rawcontactpair_collider1(a: number): number;
|
||||
export function rawcontactpair_collider2(a: number): number;
|
||||
export function rawcontactpair_numContactManifolds(a: number): number;
|
||||
export function rawcontactpair_contactManifold(a: number, b: number): number;
|
||||
export function rawcontactmanifold_normal(a: number): number;
|
||||
export function rawcontactmanifold_local_n1(a: number): number;
|
||||
export function rawcontactmanifold_local_n2(a: number): number;
|
||||
export function rawcontactmanifold_subshape1(a: number): number;
|
||||
export function rawcontactmanifold_subshape2(a: number): number;
|
||||
export function rawcontactmanifold_num_contacts(a: number): number;
|
||||
export function rawcontactmanifold_contact_local_p1(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_local_p2(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_dist(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_fid1(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_fid2(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_impulse(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_tangent_impulse_x(a: number, b: number): number;
|
||||
export function rawcontactmanifold_contact_tangent_impulse_y(a: number, b: number): number;
|
||||
export function rawcontactmanifold_num_solver_contacts(a: number): number;
|
||||
export function rawcontactmanifold_solver_contact_point(a: number, b: number): number;
|
||||
export function rawcontactmanifold_solver_contact_dist(a: number, b: number): number;
|
||||
export function rawcontactmanifold_solver_contact_friction(a: number, b: number): number;
|
||||
export function rawcontactmanifold_solver_contact_restitution(a: number, b: number): number;
|
||||
export function rawcontactmanifold_solver_contact_tangent_velocity(a: number, b: number): number;
|
||||
export function __wbg_rawpointprojection_free(a: number): void;
|
||||
export function rawpointprojection_point(a: number): number;
|
||||
export function rawpointprojection_isInside(a: number): number;
|
||||
export function __wbg_rawpointcolliderprojection_free(a: number): void;
|
||||
export function rawpointcolliderprojection_colliderHandle(a: number): number;
|
||||
export function rawpointcolliderprojection_point(a: number): number;
|
||||
export function rawpointcolliderprojection_isInside(a: number): number;
|
||||
export function rawpointcolliderprojection_featureType(a: number): number;
|
||||
export function rawpointcolliderprojection_featureId(a: number, b: number): void;
|
||||
export function __wbg_rawrayintersection_free(a: number): void;
|
||||
export function rawraycolliderintersection_normal(a: number): number;
|
||||
export function rawraycolliderintersection_toi(a: number): number;
|
||||
export function __wbg_rawraycollidertoi_free(a: number): void;
|
||||
export function __wbg_rawshape_free(a: number): void;
|
||||
export function rawshape_cuboid(a: number, b: number, c: number): number;
|
||||
export function rawshape_roundCuboid(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_ball(a: number): number;
|
||||
export function rawshape_halfspace(a: number): number;
|
||||
export function rawshape_capsule(a: number, b: number): number;
|
||||
export function rawshape_cylinder(a: number, b: number): number;
|
||||
export function rawshape_roundCylinder(a: number, b: number, c: number): number;
|
||||
export function rawshape_cone(a: number, b: number): number;
|
||||
export function rawshape_roundCone(a: number, b: number, c: number): number;
|
||||
export function rawshape_polyline(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_trimesh(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_heightfield(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawshape_segment(a: number, b: number): number;
|
||||
export function rawshape_triangle(a: number, b: number, c: number): number;
|
||||
export function rawshape_roundTriangle(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_convexHull(a: number, b: number): number;
|
||||
export function rawshape_roundConvexHull(a: number, b: number, c: number): number;
|
||||
export function rawshape_convexMesh(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_roundConvexMesh(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawshape_castShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): number;
|
||||
export function rawshape_intersectsShape(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawshape_contactShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
||||
export function rawshape_containsPoint(a: number, b: number, c: number, d: number): number;
|
||||
export function rawshape_projectPoint(a: number, b: number, c: number, d: number, e: number): number;
|
||||
export function rawshape_intersectsRay(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
||||
export function rawshape_castRay(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
||||
export function rawshape_castRayAndGetNormal(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number;
|
||||
export function rawshapetoi_witness1(a: number): number;
|
||||
export function rawshapetoi_normal1(a: number): number;
|
||||
export function rawshapetoi_normal2(a: number): number;
|
||||
export function __wbg_rawshapecollidertoi_free(a: number): void;
|
||||
export function rawshapecollidertoi_witness2(a: number): number;
|
||||
export function rawrotation_new(a: number, b: number, c: number, d: number): number;
|
||||
export function rawrotation_identity(): number;
|
||||
export function rawrotation_x(a: number): number;
|
||||
export function rawvector_zero(): number;
|
||||
export function rawvector_new(a: number, b: number, c: number): number;
|
||||
export function rawvector_set_x(a: number, b: number): void;
|
||||
export function rawvector_set_z(a: number, b: number): void;
|
||||
export function rawvector_xyz(a: number): number;
|
||||
export function rawvector_yxz(a: number): number;
|
||||
export function rawvector_zxy(a: number): number;
|
||||
export function rawvector_xzy(a: number): number;
|
||||
export function rawvector_yzx(a: number): number;
|
||||
export function rawvector_zyx(a: number): number;
|
||||
export function rawsdpmatrix3_elements(a: number): number;
|
||||
export function __wbg_rawdebugrenderpipeline_free(a: number): void;
|
||||
export function rawdebugrenderpipeline_new(): number;
|
||||
export function rawdebugrenderpipeline_vertices(a: number): number;
|
||||
export function rawdebugrenderpipeline_colors(a: number): number;
|
||||
export function rawdebugrenderpipeline_render(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
||||
export function __wbg_raweventqueue_free(a: number): void;
|
||||
export function __wbg_rawcontactforceevent_free(a: number): void;
|
||||
export function rawcontactforceevent_collider2(a: number): number;
|
||||
export function rawcontactforceevent_total_force(a: number): number;
|
||||
export function rawcontactforceevent_total_force_magnitude(a: number): number;
|
||||
export function rawcontactforceevent_max_force_direction(a: number): number;
|
||||
export function rawcontactforceevent_max_force_magnitude(a: number): number;
|
||||
export function raweventqueue_new(a: number): number;
|
||||
export function raweventqueue_drainCollisionEvents(a: number, b: number): void;
|
||||
export function raweventqueue_drainContactForceEvents(a: number, b: number): void;
|
||||
export function raweventqueue_clear(a: number): void;
|
||||
export function __wbg_rawphysicspipeline_free(a: number): void;
|
||||
export function rawphysicspipeline_new(): number;
|
||||
export function rawphysicspipeline_step(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): void;
|
||||
export function rawphysicspipeline_stepWithEvents(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): void;
|
||||
export function __wbg_rawquerypipeline_free(a: number): void;
|
||||
export function rawquerypipeline_new(): number;
|
||||
export function rawquerypipeline_update(a: number, b: number, c: number): void;
|
||||
export function rawquerypipeline_castRay(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): number;
|
||||
export function rawquerypipeline_castRayAndGetNormal(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): number;
|
||||
export function rawquerypipeline_intersectionsWithRay(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number): void;
|
||||
export function rawquerypipeline_intersectionWithShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): void;
|
||||
export function rawquerypipeline_projectPoint(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number): number;
|
||||
export function rawquerypipeline_projectPointAndGetFeature(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number;
|
||||
export function rawquerypipeline_intersectionsWithPoint(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number): void;
|
||||
export function rawquerypipeline_castShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number): number;
|
||||
export function rawquerypipeline_intersectionsWithShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): void;
|
||||
export function rawquerypipeline_collidersWithAabbIntersectingAabb(a: number, b: number, c: number, d: number): void;
|
||||
export function __wbg_rawdeserializedworld_free(a: number): void;
|
||||
export function rawdeserializedworld_takeGravity(a: number): number;
|
||||
export function rawdeserializedworld_takeIntegrationParameters(a: number): number;
|
||||
export function rawdeserializedworld_takeIslandManager(a: number): number;
|
||||
export function rawdeserializedworld_takeBroadPhase(a: number): number;
|
||||
export function rawdeserializedworld_takeNarrowPhase(a: number): number;
|
||||
export function rawdeserializedworld_takeBodies(a: number): number;
|
||||
export function rawdeserializedworld_takeColliders(a: number): number;
|
||||
export function rawdeserializedworld_takeImpulseJoints(a: number): number;
|
||||
export function rawdeserializedworld_takeMultibodyJoints(a: number): number;
|
||||
export function rawserializationpipeline_new(): number;
|
||||
export function rawserializationpipeline_serializeAll(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): number;
|
||||
export function rawserializationpipeline_deserializeAll(a: number, b: number): number;
|
||||
export function rawintegrationparameters_set_minIslandSize(a: number, b: number): void;
|
||||
export function rawintegrationparameters_set_maxCcdSubsteps(a: number, b: number): void;
|
||||
export function rawvector_set_y(a: number, b: number): void;
|
||||
export function rawkinematiccharactercontroller_up(a: number): number;
|
||||
export function rawshapecontact_normal2(a: number): number;
|
||||
export function rawshapecontact_point1(a: number): number;
|
||||
export function rawshapecontact_point2(a: number): number;
|
||||
export function rawrayintersection_normal(a: number): number;
|
||||
export function rawshapecollidertoi_witness1(a: number): number;
|
||||
export function rawshapecontact_normal1(a: number): number;
|
||||
export function rawshapecollidertoi_normal1(a: number): number;
|
||||
export function rawshapecollidertoi_normal2(a: number): number;
|
||||
export function rawshapetoi_witness2(a: number): number;
|
||||
export function rawkinematiccharactercontroller_offset(a: number): number;
|
||||
export function rawintegrationparameters_predictionDistance(a: number): number;
|
||||
export function rawintegrationparameters_minIslandSize(a: number): number;
|
||||
export function rawintegrationparameters_maxCcdSubsteps(a: number): number;
|
||||
export function rawrigidbodyset_len(a: number): number;
|
||||
export function rawshapecontact_distance(a: number): number;
|
||||
export function rawrayintersection_featureType(a: number): number;
|
||||
export function rawraycolliderintersection_colliderHandle(a: number): number;
|
||||
export function rawrayintersection_toi(a: number): number;
|
||||
export function rawraycolliderintersection_featureType(a: number): number;
|
||||
export function rawraycollidertoi_colliderHandle(a: number): number;
|
||||
export function rawraycollidertoi_toi(a: number): number;
|
||||
export function rawshapecollidertoi_colliderHandle(a: number): number;
|
||||
export function rawshapecollidertoi_toi(a: number): number;
|
||||
export function rawshapetoi_toi(a: number): number;
|
||||
export function rawrotation_y(a: number): number;
|
||||
export function rawrotation_z(a: number): number;
|
||||
export function rawrotation_w(a: number): number;
|
||||
export function rawvector_x(a: number): number;
|
||||
export function rawvector_y(a: number): number;
|
||||
export function rawvector_z(a: number): number;
|
||||
export function rawcontactforceevent_collider1(a: number): number;
|
||||
export function rawintegrationparameters_allowedLinearError(a: number): number;
|
||||
export function rawcolliderset_isHandleValid(a: number, b: number): number;
|
||||
export function __wbg_rawserializationpipeline_free(a: number): void;
|
||||
export function rawrayintersection_featureId(a: number, b: number): void;
|
||||
export function rawraycolliderintersection_featureId(a: number, b: number): void;
|
||||
export function __wbg_rawcontactpair_free(a: number): void;
|
||||
export function __wbg_rawraycolliderintersection_free(a: number): void;
|
||||
export function __wbg_rawshapetoi_free(a: number): void;
|
||||
export function __wbg_rawrotation_free(a: number): void;
|
||||
export function __wbg_rawvector_free(a: number): void;
|
||||
export function __wbg_rawsdpmatrix3_free(a: number): void;
|
||||
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
||||
export function __wbindgen_free(a: number, b: number, c: number): void;
|
||||
export function __wbindgen_malloc(a: number, b: number): number;
|
||||
export function __wbindgen_exn_store(a: number): void;
|
||||
1
app/node_modules/@dimforge/rapier3d-compat/raw.d.ts
generated
vendored
Normal file
1
app/node_modules/@dimforge/rapier3d-compat/raw.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./rapier_wasm3d"
|
||||
Reference in New Issue
Block a user