### wheelHardPoint Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the world-space starting position of the ray-cast for a specific wheel. ```APIDOC ## wheelHardPoint(i) ### Description The (world-space) starting point of the ray-cast for the i-th wheel. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - Vector - The world-space position of the wheel's hard point. ``` -------------------------------- ### nextTranslation Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the world-space next translation of the rigid-body. ```APIDOC ## nextTranslation ### Description 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. ### Method GET ### Endpoint /rigidBody/nextTranslation ### Returns Vector - The next world-space translation. ``` -------------------------------- ### get Source: https://rapier.rs/javascript3d/classes/ColliderSet.html Retrieves a collider from the set using its integer handle. ```APIDOC ## get * get(handle): Collider * Gets the rigid-body with the given handle. #### Parameters * handle: number The handle of the rigid-body to retrieve. #### Returns Collider ``` -------------------------------- ### autostepMinWidth Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Gets the minimum width of free space required after stepping on a stair. ```APIDOC ## autostepMinWidth * autostepMinWidth(): number * The minimum width of free space that must be available after stepping on a stair. #### Returns number ``` -------------------------------- ### World Constructor Source: https://rapier.rs/javascript3d/classes/World.html Initializes a new World instance with gravity and optional raw physics parameters. ```APIDOC ## constructor World ### Description Initializes a new World instance. ### Method constructor ### Parameters - **gravity** (Vector) - The gravitational force applied to the world. - **rawIntegrationParameters** (RawIntegrationParameters) - Optional raw integration parameters. - **rawIslands** (RawIslandManager) - Optional raw island manager. - **rawBroadPhase** (RawBroadPhase) - Optional raw broad-phase collider. - **rawNarrowPhase** (RawNarrowPhase) - Optional raw narrow-phase collider. - **rawBodies** (RawRigidBodySet) - Optional raw rigid body set. - **rawColliders** (RawColliderSet) - Optional raw collider set. - **rawImpulseJoints** (RawImpulseJointSet) - Optional raw impulse joint set. - **rawMultibodyJoints** (RawMultibodyJointSet) - Optional raw multibody joint set. - **rawCCDSolver** (RawCCDSolver) - Optional raw CCD solver. - **rawPhysicsPipeline** (RawPhysicsPipeline) - Optional raw physics pipeline. - **rawSerializationPipeline** (RawSerializationPipeline) - Optional raw serialization pipeline. - **rawDebugRenderPipeline** (RawDebugRenderPipeline) - Optional raw debug render pipeline. ### Returns World - The newly created World instance. ``` -------------------------------- ### mass Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the mass of the rigid-body. ```APIDOC ## mass ### Description The mass of this rigid-body. ### Method GET ### Endpoint /rigidBody/mass ### Returns number - The mass of the rigid-body. ``` -------------------------------- ### SdpMatrix3 Constructor Source: https://rapier.rs/javascript3d/classes/SdpMatrix3.html Initializes a new SdpMatrix3 instance. ```APIDOC ## constructor ### Description Creates a new SdpMatrix3. ### Method constructor ### Parameters #### Path Parameters * **elements** (Float32Array) - Required - Row major list of the upper-triangular part of the symmetric matrix. ### Returns SdpMatrix3 ``` -------------------------------- ### RigidBody Constructor Source: https://rapier.rs/javascript3d/classes/RigidBody.html Initializes a new RigidBody instance. ```APIDOC ## new RigidBody(rawSet, colliderSet, handle) ### Description Initializes a new RigidBody instance. ### Parameters * **rawSet** (RawRigidBodySet) - The raw rigid body set. * **colliderSet** (ColliderSet) - The collider set. * **handle** (number) - The handle for the rigid body. ### Returns RigidBody ``` -------------------------------- ### rotation Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the world-space orientation of this rigid-body. ```APIDOC ## rotation ### Description The world-space orientation of this rigid-body. ### Method `rotation(): Rotation` ### Returns Rotation ``` -------------------------------- ### linvel Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the linear velocity of the rigid-body. ```APIDOC ## linvel ### Description The linear velocity of this rigid-body. ### Method GET ### Endpoint /rigidBody/linvel ### Returns Vector - The linear velocity. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Initializes a new instance of the KinematicCharacterController class. ```APIDOC ## constructor * new KinematicCharacterController(offset, params, broadPhase, narrowPhase, bodies, colliders): KinematicCharacterController * #### Parameters * offset: number * params: IntegrationParameters * broadPhase: BroadPhase * narrowPhase: NarrowPhase * bodies: RigidBodySet * colliders: ColliderSet #### Returns KinematicCharacterController ``` -------------------------------- ### rotation Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the world-space orientation of the collider. ```APIDOC ## rotation ### Description The world-space orientation of this collider. ### Method rotation ### Returns - **Rotation** - The world-space rotation of the collider. ``` -------------------------------- ### Vector3 Constructor Source: https://rapier.rs/javascript3d/classes/Vector3.html Initializes a new Vector3 instance. ```APIDOC ## Constructor Vector3 ### Description Creates a new 3D vector. ### Signature `new Vector3(x: number, y: number, z: number): Vector3` ### Parameters * **x** (number) - The x-component of the vector. * **y** (number) - The y-component of the vector. * **z** (number) - The z-component of the vector. ### Returns A new Vector3 instance. ``` -------------------------------- ### indexUpAxis Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets or sets the chassis' local up direction (0 = x, 1 = y, 2 = z). ```APIDOC ## indexUpAxis * get indexUpAxis(): number * The chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`). #### Returns number * set indexUpAxis(axis): void * Sets the chassis’ local _up_ direction (`0 = x, 1 = y, 2 = z`). #### Parameters * axis: number #### Returns void ``` -------------------------------- ### wheelRadius Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the radius of a specific wheel. ```APIDOC ## wheelRadius(i) ### Description The i-th wheel’s radius. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The radius of the wheel. ``` -------------------------------- ### RevoluteImpulseJoint Constructor Source: https://rapier.rs/javascript3d/classes/RevoluteImpulseJoint.html Initializes a new RevoluteImpulseJoint instance. ```APIDOC ## constructor ### Description Initializes a new RevoluteImpulseJoint. ### Parameters * `rawSet`: RawImpulseJointSet - The set of raw impulse joints. * `bodySet`: RigidBodySet - The set of rigid bodies. * `handle`: number - The handle of the joint. ### Returns RevoluteImpulseJoint - The newly created RevoluteImpulseJoint instance. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Initializes a new instance of the DynamicRayCastVehicleController class. ```APIDOC ## constructor * new DynamicRayCastVehicleController(chassis, broadPhase, narrowPhase, bodies, colliders): DynamicRayCastVehicleController * #### Parameters * chassis: RigidBody * broadPhase: BroadPhase * narrowPhase: NarrowPhase * bodies: RigidBodySet * colliders: ColliderSet #### Returns DynamicRayCastVehicleController ``` -------------------------------- ### chassis Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the rigid-body used as the chassis. ```APIDOC ## chassis * chassis(): RigidBody * The rigid-body used as the chassis. #### Returns RigidBody ``` -------------------------------- ### createRigidBody Source: https://rapier.rs/javascript3d/classes/RigidBodySet.html Creates a new rigid body and returns its integer handle. Requires a ColliderSet and a RigidBodyDesc. ```APIDOC ## createRigidBody ### Description Creates a new rigid-body and return its integer handle. ### Signature `createRigidBody(colliderSet: ColliderSet, desc: RigidBodyDesc): RigidBody` ### Parameters * `colliderSet` (ColliderSet) - The collider set to associate with the new rigid body. * `desc` (RigidBodyDesc) - The description of the rigid-body to create. ### Returns `RigidBody` - The newly created rigid body. ``` -------------------------------- ### softCcdPrediction Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the soft-CCD prediction distance for this rigid-body. ```APIDOC ## softCcdPrediction() ### Description Gets the soft-CCD prediction distance for this rigid-body. See the documentation of `RigidBodyDesc.setSoftCcdPrediction` for additional details. ### Method `softCcdPrediction(): number` ### Returns - **number** - The soft-CCD prediction distance. ``` -------------------------------- ### numColliders Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the number of colliders attached to this rigid-body. ```APIDOC ## numColliders ### Description The number of colliders attached to this rigid-body. ### Method GET ### Endpoint /rigidBody/numColliders ### Returns number - The number of colliders. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/NarrowPhase.html Initializes a new instance of the NarrowPhase class. It's important to manually free the WASM resources when done using `narrowPhase.free()`. ```APIDOC ## constructor ### Description Initializes a new instance of the NarrowPhase class. ### Parameters * `raw` (RawNarrowPhase) - Optional: The raw narrow-phase data. ### Returns NarrowPhase ``` -------------------------------- ### PhysicsPipeline Constructor Source: https://rapier.rs/javascript3d/classes/PhysicsPipeline.html Initializes a new instance of the PhysicsPipeline class. Optionally takes a raw physics pipeline object. ```APIDOC ## constructor ### Description Initializes a new instance of the PhysicsPipeline class. ### Signature `new PhysicsPipeline(raw?: RawPhysicsPipeline): PhysicsPipeline` ### Parameters * `raw` (RawPhysicsPipeline) - Optional. The raw physics pipeline object to initialize with. ``` -------------------------------- ### SerializationPipeline Constructor Source: https://rapier.rs/javascript3d/classes/SerializationPipeline.html Initializes a new instance of the SerializationPipeline. It can optionally take a raw serialization pipeline object. ```APIDOC ## constructor ### Description Initializes a new instance of the SerializationPipeline. ### Signature `new SerializationPipeline(raw?: RawSerializationPipeline): SerializationPipeline` ### Parameters * `raw` (RawSerializationPipeline) - Optional. The raw serialization pipeline object to initialize with. ``` -------------------------------- ### nextRotation Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the world-space next orientation of the rigid-body. ```APIDOC ## nextRotation ### Description 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. ### Method GET ### Endpoint /rigidBody/nextRotation ### Returns Rotation - The next world-space orientation. ``` -------------------------------- ### DebugRenderPipeline Constructor Source: https://rapier.rs/javascript3d/classes/DebugRenderPipeline.html Initializes a new instance of the DebugRenderPipeline. It's recommended to free this pipeline manually when done to prevent WASM memory leaks. ```APIDOC ## constructor ### Description Creates a new DebugRenderPipeline. ### Parameters * `raw` (RawDebugRenderPipeline, Optional): The raw debug render pipeline to use. ### Returns DebugRenderPipeline ``` -------------------------------- ### linearDamping Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the linear damping coefficient of the rigid-body. ```APIDOC ## linearDamping ### Description The linear damping coefficient of this rigid-body. ### Method GET ### Endpoint /rigidBody/linearDamping ### Returns number - The linear damping coefficient. ``` -------------------------------- ### parent Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the rigid body to which this collider is attached. ```APIDOC ## parent ### Description The rigid-body this collider is attached to. ### Method parent ### Returns - **RigidBody** - The parent rigid body, or null if none. ``` -------------------------------- ### UnitImpulseJoint Constructor Source: https://rapier.rs/javascript3d/classes/UnitImpulseJoint.html Initializes a new UnitImpulseJoint instance. ```APIDOC ## constructor ### Description Initializes a new UnitImpulseJoint instance. ### Method constructor ### Parameters - **rawSet** (RawImpulseJointSet) - Required - The raw set of impulse joints. - **bodySet** (RigidBodySet) - Required - The set of rigid bodies. - **handle** (number) - Required - The handle of the joint. ### Returns UnitImpulseJoint ``` -------------------------------- ### wakeUp Source: https://rapier.rs/javascript3d/classes/RigidBody.html Wakes this rigid-body up. ```APIDOC ## wakeUp() ### Description 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. ### Method `wakeUp(): void` ``` -------------------------------- ### numWheels Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the number of wheels attached to this vehicle. ```APIDOC ## numWheels * numWheels(): number * The number of wheels attached to this vehicle. #### Returns number ``` -------------------------------- ### currentVehicleSpeed Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the current forward speed of the vehicle. ```APIDOC ## currentVehicleSpeed * currentVehicleSpeed(): number * The current forward speed of the vehicle. #### Returns number ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/Voxels.html Creates a new shape made of voxels. ```APIDOC ## constructor ### Description Creates a new shape made of voxels. ### Signature `new Voxels(data: Int32Array | Float32Array, voxelSize: Vector): Voxels` ### Parameters * **data** (Int32Array | Float32Array) - Required - Defines the set of voxels. If this is a `Int32Array` then each voxel is defined from its (signed) grid coordinates, with 3 (resp 2) contiguous integers per voxel in 3D (resp 2D). If this is a `Float32Array`, each voxel will be such that they contain at least one point from this array (where each point is defined from 3 (resp 2) contiguous numbers per point in 3D (resp 2D). * **voxelSize** (Vector) - Required - The size of each voxel. ### Returns * Voxels ``` -------------------------------- ### localCom Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the center of mass of the rigid-body expressed in its local-space. ```APIDOC ## localCom ### Description The center of mass of a rigid-body expressed in its local-space. ### Method GET ### Endpoint /rigidBody/localCom ### Returns Vector - The local center of mass. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/RoundCone.html Creates a new RoundCone with the given radius, half-height, and border radius. ```APIDOC ## constructor ### Description Creates a new cone with the given radius and half-height. ### Signature `new RoundCone(halfHeight: number, radius: number, borderRadius: number): RoundCone` ### Parameters #### Parameters - **halfHeight** (number) - The cone's half-height along the `y` axis. - **radius** (number) - The cone's radius. - **borderRadius** (number) - The radius of the borders of this cone. ### Returns RoundCone ``` -------------------------------- ### invPrincipalInertia Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the inverse of the principal angular inertia of the rigid-body. ```APIDOC ## invPrincipalInertia ### Description 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. ### Method GET ### Endpoint /rigidBody/invPrincipalInertia ### Returns Vector - The inverse principal angular inertia. ``` -------------------------------- ### SdpMatrix3Ops Constructor Source: https://rapier.rs/javascript3d/classes/SdpMatrix3Ops.html Creates a new instance of SdpMatrix3Ops. ```APIDOC ## constructor ### Description Creates a new instance of SdpMatrix3Ops. ### Method constructor ### Returns - SdpMatrix3Ops: A new SdpMatrix3Ops object. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/RoundTriangle.html Creates a new triangle shape with round corners. ```APIDOC ## constructor ### Description Creates a new triangle shape with round corners. ### Signature `new RoundTriangle(a: Vector, b: Vector, c: Vector, borderRadius: number): RoundTriangle` ### Parameters #### Parameters - **a** (Vector) - Required - The first point of the triangle. - **b** (Vector) - Required - The second point of the triangle. - **c** (Vector) - Required - The third point of the triangle. - **borderRadius** (number) - Required - The radius of the borders of this triangle. In 3D, this is also equal to half the thickness of the triangle. ### Returns RoundTriangle ``` -------------------------------- ### wheelSuspensionLength Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the current suspension length of a specific wheel. ```APIDOC ## wheelSuspensionLength(i) ### Description The suspension length for the i-th wheel. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The current suspension length of the wheel. ``` -------------------------------- ### wheelSteering Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the current steering angle of a wheel in radians. ```APIDOC ## wheelSteering(i) ### Description The steering angle (radians) for the i-th wheel. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The steering angle of the wheel in radians. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/Ball.html Creates a new ball with the given radius. ```APIDOC ## constructor ### Description Creates a new ball with the given radius. ### Method constructor ### Parameters #### Path Parameters - **radius** (number) - Required - The balls radius. #### Response #### Success Response (200) - **Ball** (Ball) - Description of the returned Ball object. ``` -------------------------------- ### frictionCombineRule Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the rule used to combine friction coefficients. ```APIDOC ## frictionCombineRule ### Description Gets the rule used to combine the friction coefficients of two colliders colliders involved in a contact. ### Method `frictionCombineRule()` ### Returns CoefficientCombineRule ``` -------------------------------- ### Constructor Source: https://rapier.rs/javascript3d/classes/UnitMultibodyJoint.html Initializes a new instance of the UnitMultibodyJoint class. ```APIDOC ## constructor ### Description Initializes a new instance of the UnitMultibodyJoint class. ### Signature `new UnitMultibodyJoint(rawSet: RawMultibodyJointSet, handle: number): UnitMultibodyJoint` ### Parameters * **rawSet** (RawMultibodyJointSet) - The raw joint set. * **handle** (number) - The handle of the joint. ``` -------------------------------- ### wheelChassisConnectionPointCs Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the position of the i-th wheel, relative to the chassis. ```APIDOC ## wheelChassisConnectionPointCs ### Description The position of the i-th wheel, relative to the chassis. ### Method `wheelChassisConnectionPointCs(i: number): Vector` ### Parameters * **i** (number) - The index of the wheel. ### Returns * **Vector** - The position of the wheel relative to the chassis. ``` -------------------------------- ### Constructor Source: https://rapier.rs/javascript3d/classes/RoundCuboid.html Creates a new 3D cuboid with specified dimensions and border radius. ```APIDOC ## constructor ### Description Creates a new 3D cuboid. ### Signature `new RoundCuboid(hx: number, hy: number, hz: number, borderRadius: number): RoundCuboid` ### Parameters * **hx** (number) - The half width of the cuboid. * **hy** (number) - The half height of the cuboid. * **hz** (number) - The half depth of the cuboid. * **borderRadius** (number) - The radius of the borders of this cuboid. This will effectively increase the half-extents of the cuboid by this radius. ### Returns RoundCuboid ``` -------------------------------- ### get Source: https://rapier.rs/javascript3d/classes/RigidBodySet.html Retrieves the rigid body associated with the given handle. ```APIDOC ## get ### Description Gets the rigid-body with the given handle. ### Signature `get(handle: number): RigidBody` ### Parameters * `handle` (number) - The handle of the rigid-body to retrieve. ### Returns `RigidBody` - The rigid body with the specified handle. ``` -------------------------------- ### Constructor Source: https://rapier.rs/javascript3d/classes/GenericImpulseJoint.html Creates a new GenericImpulseJoint instance. ```APIDOC ## constructor ### Description Creates a new GenericImpulseJoint instance. ### Signature `new GenericImpulseJoint(rawSet: RawImpulseJointSet, bodySet: RigidBodySet, handle: number): GenericImpulseJoint` ### Parameters * **rawSet** (RawImpulseJointSet) - The set of raw impulse joints. * **bodySet** (RigidBodySet) - The set of rigid bodies. * **handle** (number) - The handle of the joint. ``` -------------------------------- ### version Source: https://rapier.rs/javascript3d/index.html Returns the version string of the Rapier3D library. ```APIDOC ## version ### Description Returns the version string of the Rapier3D library. ### Function Signature `version(): string` ### Returns - **string** - The version of the Rapier3D library. ``` -------------------------------- ### characterMass Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Gets the custom character mass if set by setCharacterMass. ```APIDOC ## characterMass * characterMass(): number * Returns the custom value of the character mass, if it was set by `this.setCharacterMass`. #### Returns number ``` -------------------------------- ### Constructor Source: https://rapier.rs/javascript3d/classes/RevoluteMultibodyJoint.html Creates a new RevoluteMultibodyJoint instance. ```APIDOC ## constructor ### Description Creates a new RevoluteMultibodyJoint instance. ### Parameters * **rawSet** (RawMultibodyJointSet) - The set of raw multibody joints. * **handle** (number) - The handle of the joint. ### Returns * RevoluteMultibodyJoint - The newly created RevoluteMultibodyJoint instance. ``` -------------------------------- ### PointProjection Constructor Source: https://rapier.rs/javascript3d/classes/PointProjection.html Constructs a new PointProjection instance. ```APIDOC ## constructor ### Description Creates a new PointProjection. ### Signature `new PointProjection(point: Vector, isInside: boolean): PointProjection` ### Parameters * **point** (Vector) - The projected point on the collider. * **isInside** (boolean) - Indicates if the original point was inside the collider. ``` -------------------------------- ### gravityScale Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the scale factor applied to the gravity affecting this rigid-body. ```APIDOC ## gravityScale ### Description The scale factor applied to the gravity affecting this rigid-body. ### Method GET ### Endpoint /rigidBody/gravityScale ### Returns number - The gravity scale factor. ``` -------------------------------- ### wheelSuspensionRestLength Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the resting length of the suspension spring for a specific wheel. ```APIDOC ## wheelSuspensionRestLength(i) ### Description The rest length of the i-th wheel’s suspension spring. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The resting length of the wheel's suspension spring. ``` -------------------------------- ### free Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Internal method to free resources. ```APIDOC ## free * free(): void * `Internal` #### Returns void ``` -------------------------------- ### ShapeCastHit Constructor Source: https://rapier.rs/javascript3d/classes/ShapeCastHit.html Constructs a new ShapeCastHit instance. ```APIDOC ## constructor ### Description Creates a new ShapeCastHit. ### Signature `new ShapeCastHit(time_of_impact: number, witness1: Vector, witness2: Vector, normal1: Vector, normal2: Vector): ShapeCastHit` ### Parameters * **time_of_impact** (number) - The time of impact of the two shapes. * **witness1** (Vector) - The local-space contact point on the first shape, at the time of impact. * **witness2** (Vector) - The local-space contact point on the second shape, at the time of impact. * **normal1** (Vector) - The local-space normal on the first shape, at the time of impact. * **normal2** (Vector) - The local-space normal on the second shape, at the time of impact. ### Returns ShapeCastHit - A new ShapeCastHit instance. ``` -------------------------------- ### wheelSuspensionForce Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the current force being applied by the suspension of a specific wheel. ```APIDOC ## wheelSuspensionForce(i) ### Description The force applied by the i-th wheel suspension. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The current suspension force applied by the wheel. ``` -------------------------------- ### Quaternion Constructor Source: https://rapier.rs/javascript3d/classes/Quaternion.html Initializes a new Quaternion object. ```APIDOC ## new Quaternion(x, y, z, w) ### Description Creates a new Quaternion. ### Parameters - **x** (number) - The x component of the quaternion. - **y** (number) - The y component of the quaternion. - **z** (number) - The z component of the quaternion. - **w** (number) - The w component of the quaternion. ### Returns - Quaternion - The newly created Quaternion object. ``` -------------------------------- ### wheelSuspensionCompression Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the damping value for when the suspension of a specific wheel is being compressed. ```APIDOC ## wheelSuspensionCompression(i) ### Description The i-th wheel’s suspension’s damping when it is being compressed. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The suspension compression damping value for the wheel. ``` -------------------------------- ### rotationWrtParent Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the orientation of the collider relative to its parent rigid body. ```APIDOC ## rotationWrtParent ### Description The orientation of this collider relative to its parent rigid-body. ### Method rotationWrtParent ### Returns - **Rotation** - The rotation relative to the parent, or null if no parent. ``` -------------------------------- ### ColliderSet Constructor Source: https://rapier.rs/javascript3d/classes/ColliderSet.html Initializes a new ColliderSet. It's important to free the WASM memory when done. ```APIDOC ## constructor * new ColliderSet(raw?: RawColliderSet): ColliderSet * #### Parameters * `Optional` raw: RawColliderSet #### Returns ColliderSet ``` -------------------------------- ### wheelMaxSuspensionForce Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the maximum force that the suspension of a specific wheel can apply. ```APIDOC ## wheelMaxSuspensionForce(i) ### Description The maximum force applied by the i-th wheel’s suspension. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The maximum suspension force for the wheel. ``` -------------------------------- ### constructor Source: https://rapier.rs/javascript3d/classes/RoundCylinder.html Creates a new RoundCylinder with the given radius and half-height. ```APIDOC ## constructor ### Description Creates a new cylinder with the given radius and half-height. ### Parameters * **halfHeight** (number) - The cylinder's half height, along the `y` axis. * **radius** (number) - The cylinder's radius. * **borderRadius** (number) - The radius of the borders of this cylinder. ### Returns RoundCylinder ``` -------------------------------- ### wheelForwardImpulse Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the forward impulses applied by the i-th wheel on the chassis. ```APIDOC ## wheelForwardImpulse ### Description The forward impulses applied by the i-th wheel on the chassis. ### Method `wheelForwardImpulse(i: number): number` ### Parameters * **i** (number) - The index of the wheel. ### Returns * **number** - The forward impulse. ``` -------------------------------- ### BroadPhase Constructor Source: https://rapier.rs/javascript3d/classes/BroadPhase.html Initializes a new BroadPhase instance. It's recommended to free the broad-phase manually using `broadPhase.free()` when done to avoid WASM resource leaks. ```APIDOC ## constructor * new BroadPhase(raw?): BroadPhase * #### Parameters * `Optional` raw: RawBroadPhase #### Returns BroadPhase ``` -------------------------------- ### wheelEngineForce Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the forward force applied by the i-th wheel on the chassis. ```APIDOC ## wheelEngineForce ### Description The forward force applied by the i-th wheel on the chassis. ### Method `wheelEngineForce(i: number): number` ### Parameters * **i** (number) - The index of the wheel. ### Returns * **number** - The forward engine force. ``` -------------------------------- ### free Source: https://rapier.rs/javascript3d/classes/BroadPhase.html Releases the WASM memory occupied by the broad-phase. ```APIDOC ## free ### Description Releases the WASM memory occupied by the broad-phase. ### Returns void ``` -------------------------------- ### wheelContactNormal Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the (world-space) contact normal between the i-th wheel and the floor. ```APIDOC ## wheelContactNormal ### Description The (world-space) contact normal between the i-th wheel and the floor. ### Method `wheelContactNormal(i: number): Vector` ### Parameters * **i** (number) - The index of the wheel. ### Returns * **Vector** - The world-space contact normal. ``` -------------------------------- ### PointProjection.fromRaw Source: https://rapier.rs/javascript3d/classes/PointProjection.html Creates a PointProjection instance from raw data. ```APIDOC ## `Static` fromRaw ### Description Creates a PointProjection from a raw data object. ### Signature `fromRaw(raw: RawPointProjection): PointProjection` ### Parameters * **raw** (RawPointProjection) - The raw data object to create the PointProjection from. ``` -------------------------------- ### computedMovement Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Gets the computed movement vector from the last computeColliderMovement call. ```APIDOC ## computedMovement * computedMovement(): Vector * The movement computed by the last call to `this.computeColliderMovement`. #### Returns Vector ``` -------------------------------- ### PhysicsPipeline.step Source: https://rapier.rs/javascript3d/classes/PhysicsPipeline.html Executes a single step of the physics simulation. ```APIDOC ## step ### Description Executes a single step of the physics simulation, advancing the state of all physics objects. ### Signature `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` ### Parameters * `gravity` (Vector) - The gravity vector to apply during the simulation step. * `integrationParameters` (IntegrationParameters) - Parameters controlling the integration process. * `islands` (IslandManager) - Manages the islands of connected bodies. * `broadPhase` (BroadPhase) - The broad phase collision detection algorithm. * `narrowPhase` (NarrowPhase) - The narrow phase collision detection algorithm. * `bodies` (RigidBodySet) - The set of rigid bodies in the simulation. * `colliders` (ColliderSet) - The set of colliders in the simulation. * `impulseJoints` (ImpulseJointSet) - The set of impulse joints. * `multibodyJoints` (MultibodyJointSet) - The set of multibody joints. * `ccdSolver` (CCDSolver) - The CCD (Continuous Collision Detection) solver. * `eventQueue` (EventQueue) - Optional. The event queue for handling simulation events. * `hooks` (PhysicsHooks) - Optional. Custom hooks to be executed during the simulation. ``` -------------------------------- ### PidController Constructor Source: https://rapier.rs/javascript3d/classes/PidController.html Initializes a new instance of the PidController class. ```APIDOC ## constructor ### Description Initializes a new instance of the PidController class. ### Signature `new PidController(params: IntegrationParameters, bodies: RigidBodySet, kp: number, ki: number, kd: number, axes: PidAxesMask): PidController` ### Parameters * **params** (IntegrationParameters) - The integration parameters for the controller. * **bodies** (RigidBodySet) - The set of rigid bodies to control. * **kp** (number) - The proportional gain. * **ki** (number) - The integral gain. * **kd** (number) - The derivative gain. * **axes** (PidAxesMask) - A mask specifying which axes the PID controller should operate on. ``` -------------------------------- ### activeHooks Method Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the physics hooks that are currently active for this collider. ```APIDOC ## activeHooks() ### Description Get the physics hooks active for this collider. ### Returns ActiveHooks ``` -------------------------------- ### autostepMaxHeight Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Gets the maximum step height a character can automatically step over. ```APIDOC ## autostepMaxHeight * autostepMaxHeight(): number * The maximum step height a character can automatically step over. #### Returns number ``` -------------------------------- ### DebugRenderBuffers Constructor Source: https://rapier.rs/javascript3d/classes/DebugRenderBuffers.html Initializes a new instance of the DebugRenderBuffers class with provided vertex and color data. ```APIDOC ## constructor ### Description Creates a new DebugRenderBuffers instance. ### Signature `new DebugRenderBuffers(vertices: Float32Array, colors: Float32Array): DebugRenderBuffers` ### Parameters #### Parameters - **vertices** (Float32Array) - Required - The array containing vertex data for the lines to render. - **colors** (Float32Array) - Required - The array containing color data for the vertices. ``` -------------------------------- ### World Methods Source: https://rapier.rs/javascript3d/classes/World.html Provides a comprehensive set of methods for interacting with and simulating the physics world, including ray casting, collision detection, body and joint manipulation, and stepping the simulation. ```APIDOC ## Methods ### castRay * castRay(ray: Ray, maxToi: number, filter: CollisionFilter): RayIntersection | null ### castRayAndGetNormal * castRayAndGetNormal(ray: Ray, maxToi: number, filter: CollisionFilter): RayIntersection | null ### castShape * castShape(shapeDesc: ShapeDesc, position: Isometry, velocity: Vector, maxToi: number, filter: CollisionFilter): ShapeIntersection | null ### collidersWithAabbIntersectingAabb * collidersWithAabbIntersectingAabb(aabb: Aabb, filter: CollisionFilter): number[] ### contactPair * contactPair(collider1: number, collider2: number, swappable: boolean): ContactManifold | null ### contactPairsWith * contactPairsWith(collider: number, filter: CollisionFilter): ContactPair[] ### createCharacterController * createCharacterController(desc: CharacterControllerDesc): number ### createCollider * createCollider(desc: ColliderDesc): number ### createImpulseJoint * createImpulseJoint(desc: ImpulseJointDesc): number ### createMultibodyJoint * createMultibodyJoint(desc: MultibodyJointDesc): number ### createPidController * createPidController(desc: PidControllerDesc): number ### createRigidBody * createRigidBody(desc: RigidBodyDesc): number ### createVehicleController * createVehicleController(desc: VehicleControllerDesc): number ### debugRender * debugRender(debugWorld: DebugRenderWorld): void ### forEachActiveRigidBody * forEachActiveRigidBody(callback: (body: RigidBody) => void): void ### forEachCollider * forEachCollider(callback: (collider: Collider) => void): void ### forEachRigidBody * forEachRigidBody(callback: (body: RigidBody) => void): void ### free * free(): void ### getCollider * getCollider(handle: number): Collider | null ### getImpulseJoint * getImpulseJoint(handle: number): ImpulseJoint | null ### getMultibodyJoint * getMultibodyJoint(handle: number): MultibodyJoint | null ### getRigidBody * getRigidBody(handle: number): RigidBody | null ### intersectionPair * intersectionPair(collider1: number, collider2: number, swappable: boolean): boolean ### intersectionPairsWith * intersectionPairsWith(collider: number, filter: CollisionFilter): number[] ### intersectionWithShape * intersectionWithShape(shapeDesc: ShapeDesc, position: Isometry, filter: CollisionFilter): number[] ### intersectionsWithPoint * intersectionsWithPoint(point: Vector, filter: CollisionFilter): number[] ### intersectionsWithRay * intersectionsWithRay(ray: Ray, filter: CollisionFilter): number[] ### intersectionsWithShape * intersectionsWithShape(shapeDesc: ShapeDesc, position: Isometry, filter: CollisionFilter): number[] ### projectPoint * projectPoint(point: Vector, filter: CollisionFilter): PointProjection | null ### projectPointAndGetFeature * projectPointAndGetFeature(point: Vector, filter: CollisionFilter): PointProjection | null ### propagateModifiedBodyPositionsToColliders * propagateModifiedBodyPositionsToColliders(): void ### removeCharacterController * removeCharacterController(handle: number): void ### removeCollider * removeCollider(handle: number): boolean ### removeImpulseJoint * removeImpulseJoint(handle: number): boolean ### removeMultibodyJoint * removeMultibodyJoint(handle: number): boolean ### removePidController * removePidController(handle: number): void ### removeRigidBody * removeRigidBody(handle: number): boolean ### removeVehicleController * removeVehicleController(handle: number): void ### step * step(dt: number, externalLinearAcceleration: Vector, externalAngularAcceleration: Vector): void ### takeSnapshot * takeSnapshot(): RawSimulationState ### timingBroadPhase * timingBroadPhase(): void ### timingCcd * timingCcd(): void ### timingCcdBroadPhase * timingCcdBroadPhase(): void ### timingCcdNarrowPhase * timingCcdNarrowPhase(): void ### timingCcdSolver * timingCcdSolver(): void ### timingCcdToiComputation * timingCcdToiComputation(): void ### timingCollisionDetection * timingCollisionDetection(): void ### timingIslandConstruction * timingIslandConstruction(): void ### timingNarrowPhase * timingNarrowPhase(): void ### timingSolver * timingSolver(): void ### timingStep * timingStep(): void ### timingUserChanges * timingUserChanges(): void ### timingVelocityAssembly * timingVelocityAssembly(): void ### timingVelocityResolution * timingVelocityResolution(): void ### timingVelocityUpdate * timingVelocityUpdate(): void ### timingVelocityWriteback * timingVelocityWriteback(): void ### fromRaw * fromRaw(rawState: RawSimulationState): void ### restoreSnapshot * restoreSnapshot(snapshot: RawSimulationState): void ``` -------------------------------- ### activeCollisionTypes Method Source: https://rapier.rs/javascript3d/classes/Collider.html Gets the collision types that are currently active for this collider. ```APIDOC ## activeCollisionTypes() ### Description Gets the collision types active for this collider. ### Returns ActiveCollisionTypes ``` -------------------------------- ### free Source: https://rapier.rs/javascript3d/classes/IslandManager.html Releases the WASM memory occupied by this narrow-phase. ```APIDOC ## free ### Description Release the WASM memory occupied by this narrow-phase. ### Signature `free(): void` ### Returns void ``` -------------------------------- ### intersectionWithShape Source: https://rapier.rs/javascript3d/classes/BroadPhase.html Gets the handle of up to one collider intersecting the given shape. ```APIDOC ## intersectionWithShape ### Description Gets the handle of up to one collider intersecting the given shape. ### Parameters * **narrowPhase**: NarrowPhase * **bodies**: RigidBodySet * **colliders**: ColliderSet - The set of colliders taking part in this pipeline. * **shapePos**: Vector - The position of the shape used for the intersection test. * **shapeRot**: Rotation - The orientation of the shape used for the intersection test. * **shape**: Shape - The shape used for the intersection test. * **filterFlags** (Optional): QueryFilterFlags * **filterGroups** (Optional): number * **filterExcludeCollider** (Optional): number * **filterExcludeRigidBody** (Optional): number * **filterPredicate** (Optional): ((collider) => boolean) ### Returns number - The handle of the intersecting collider, or a special value if no intersection is found. ``` -------------------------------- ### enableAutostep Source: https://rapier.rs/javascript3d/classes/KinematicCharacterController.html Enables automatic stepping over small objects with specified parameters. ```APIDOC ## enableAutostep * enableAutostep(maxHeight, minWidth, includeDynamicBodies): void * Enabled automatically stepping over small objects. #### Parameters * maxHeight: number * minWidth: number * includeDynamicBodies: boolean ``` -------------------------------- ### principalInertiaLocalFrame Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the principal vectors of the local angular inertia tensor of the rigid-body. ```APIDOC ## principalInertiaLocalFrame ### Description The principal vectors of the local angular inertia tensor of the rigid-body. ### Method GET ### Endpoint /rigidBody/principalInertiaLocalFrame ### Returns Rotation - The local frame of the principal inertia. ``` -------------------------------- ### IntegrationParameters Constructor Source: https://rapier.rs/javascript3d/classes/IntegrationParameters.html Initializes a new instance of the IntegrationParameters class. ```APIDOC ## constructor ### Description Initializes a new instance of the IntegrationParameters class. ### Signature `new IntegrationParameters(raw?: RawIntegrationParameters): IntegrationParameters` ### Parameters * `raw` (RawIntegrationParameters) - Optional. Initial raw parameters for integration. ``` -------------------------------- ### principalInertia Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the angular inertia along the principal inertia axes of the rigid-body. ```APIDOC ## principalInertia ### Description The angular inertia along the principal inertia axes of the rigid-body. ### Method GET ### Endpoint /rigidBody/principalInertia ### Returns Vector - The principal angular inertia. ``` -------------------------------- ### Constructor Source: https://rapier.rs/javascript3d/classes/Cuboid.html Creates a new 3D cuboid with specified half extents along each axis. ```APIDOC ## new Cuboid(hx, hy, hz): Cuboid ### Description Creates a new 3D cuboid. ### Parameters * **hx** (number) - The half width of the cuboid. * **hy** (number) - The half height of the cuboid. * **hz** (number) - The half depth of the cuboid. ### Returns Cuboid ``` -------------------------------- ### wheelRotation Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the current rotation angle of a wheel around its axle in radians. ```APIDOC ## wheelRotation(i) ### Description The i-th wheel’s current rotation angle (radians) on its axle. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The current rotation angle of the wheel in radians. ``` -------------------------------- ### World.restoreSnapshot Source: https://rapier.rs/javascript3d/classes/World.html Creates a new physics world from a snapshot. This new physics world will be an identical copy of the snapshoted physics world. ```APIDOC ## `Static` restoreSnapshot * restoreSnapshot(data): World * Creates a new physics world from a snapshot. This new physics world will be an identical copy of the snapshoted physics world. #### Parameters * data: Uint8Array #### Returns World ``` -------------------------------- ### Cone Constructor Source: https://rapier.rs/javascript3d/classes/Cone.html Creates a new cone with the given radius and half-height. ```APIDOC ## constructor new Cone(halfHeight, radius): Cone ### Description Creates a new cone with the given radius and half-height. ### Parameters * **halfHeight** (number) - The cone's half-height along the `y` axis. * **radius** (number) - The cone's radius. ``` -------------------------------- ### invMass Source: https://rapier.rs/javascript3d/classes/RigidBody.html Gets the inverse mass of the rigid-body. A value of zero indicates infinite mass. ```APIDOC ## invMass ### Description The inverse of the mass of a rigid-body. If this is zero, the rigid-body is assumed to have infinite mass. ### Method GET ### Endpoint /rigidBody/invMass ### Returns number - The inverse mass of the rigid-body. ``` -------------------------------- ### Get Rapier3D Version Source: https://rapier.rs/javascript3d/functions/version.html This function returns the current version of the @dimforge/rapier3d library as a string. ```APIDOC ## Function version ### Description Retrieves the current version of the Rapier3D library. ### Signature `version(): string` ### Returns - `string`: The version of the Rapier3D library. ``` -------------------------------- ### CCDSolver Constructor Source: https://rapier.rs/javascript3d/classes/CCDSolver.html Initializes a new instance of the CCDSolver. It can optionally take a raw CCDSolver object. ```APIDOC ## new CCDSolver(raw?) ### Description Initializes a new instance of the CCDSolver. ### Parameters * `raw` (RawCCDSolver) - Optional. The raw CCDSolver object to initialize with. ### Returns * CCDSolver - A new instance of the CCDSolver. ``` -------------------------------- ### IslandManager Constructor Source: https://rapier.rs/javascript3d/classes/IslandManager.html Initializes a new instance of IslandManager. Optionally takes a raw WASM object. ```APIDOC ## constructor ### Description Initializes a new instance of IslandManager. ### Signature `new IslandManager(raw?: RawIslandManager): IslandManager` ### Parameters * `raw` (RawIslandManager) - Optional. The raw WASM object to initialize with. ``` -------------------------------- ### wheelMaxSuspensionTravel Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the maximum distance a wheel's suspension can travel from its resting length. ```APIDOC ## wheelMaxSuspensionTravel(i) ### Description The maximum distance the i-th wheel suspension can travel before and after its resting length. ### Parameters #### Path Parameters - **i** (number) - Required - The index of the wheel. ### Returns - number - The maximum suspension travel distance for the wheel. ``` -------------------------------- ### PhysicsPipeline Source: https://rapier.rs/javascript3d/modules/default.html Re-exports PhysicsPipeline from the Rapier3D library. ```APIDOC ## PhysicsPipeline ### Description Re-exports PhysicsPipeline. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### wheelContactPoint Source: https://rapier.rs/javascript3d/classes/DynamicRayCastVehicleController.html Gets the (world-space) point hit by the wheel’s ray-cast for the i-th wheel. ```APIDOC ## wheelContactPoint ### Description The (world-space) point hit by the wheel’s ray-cast for the i-th wheel. ### Method `wheelContactPoint(i: number): Vector` ### Parameters * **i** (number) - The index of the wheel. ### Returns * **Vector** - The world-space contact point. ```