@threenative/physics 0.3.13 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Area3D-CyRWumWF.d.ts → Area3D-BqLJBY6B.d.ts} +6 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1603 -78
- package/dist/native/index.d.ts +194 -1
- package/dist/native/index.js +65 -21
- package/dist/navigation/index.d.ts +1 -1
- package/package.json +4 -3
- package/wasm/checksums.json +6 -0
- package/wasm/threenative_native_physics.wasm +0 -0
|
@@ -301,6 +301,11 @@ interface IPhysicsSimulation {
|
|
|
301
301
|
*/
|
|
302
302
|
createVehicle?(options: IPhysicsVehicleCreateOptions): number;
|
|
303
303
|
setVehicleInput?(id: number, input: IPhysicsVehicleInput): void;
|
|
304
|
+
/**
|
|
305
|
+
* Godot's `VehicleWheel3D.wheel_friction_slip` for one wheel, at runtime: the grip cap that a
|
|
306
|
+
* handbrake drops on the rear pair. Cold path, called on a change of grip, not per frame.
|
|
307
|
+
*/
|
|
308
|
+
setVehicleWheelFriction?(id: number, wheel: number, frictionSlip: number): void;
|
|
304
309
|
readVehicleState?(id: number): IPhysicsVehicleState | undefined;
|
|
305
310
|
/** Cold-path respawn: move the chassis, drop both velocities, and face the given yaw in radians. */
|
|
306
311
|
resetVehicle?(id: number, position: IPhysicsVector3, yaw: number): void;
|
|
@@ -900,4 +905,4 @@ declare class Area3D {
|
|
|
900
905
|
dispose(): void;
|
|
901
906
|
}
|
|
902
907
|
|
|
903
|
-
export { type
|
|
908
|
+
export { type PhysicsPlugin as $, Area3D as A, Buoyancy3D as B, CharacterBody3D as C, type IPhysicsOptions as D, type IPhysicsPointQuery as E, type IPhysicsQueryHit as F, type IPhysicsRayHit as G, type IPhysicsRayQuery as H, type IPhysicsSimulation as I, type IPhysicsRotation as J, type IPhysicsRuntimeSimulation as K, type IPhysicsShapeDescriptor as L, type IPhysicsShapeQuery as M, type IPhysicsVehicleCreateOptions as N, type IPhysicsVehicleState as O, type IPhysicsWorldHandle as P, type IPointHit as Q, type IRayHit as R, type IRigidBody3DOptions as S, type IShapeHit as T, MAX_PHYSICS_QUERY_RESULTS as U, PHYSICS_COLLISION_EVENT_STRIDE as V, PHYSICS_TRANSFORM_STRIDE as W, PHYSICS_VEHICLE_WHEEL_STRIDE as X, type PhysicsBody3D as Y, PhysicsDirectSpaceState3D as Z, type PhysicsJointKind as _, type IPhysicsJointCreateOptions as a, type PhysicsQueryVector3 as a0, type PhysicsShapeKind as a1, RigidBody3D as a2, type RigidBodyType as a3, rapier as a4, type IPhysicsVehicleWheelOptions as a5, type ICollisionShapeHandle as a6, type INavigationAgent3DOptions as a7, type INavigationContext as a8, type INavigationObstacle3DOptions as a9, type INavigationRegion3DOptions as aa, NavigationAgent3D as ab, type NavigationAgentEvent as ac, type NavigationAgentHandler as ad, NavigationObstacle3D as ae, type NavigationPlugin as af, NavigationRegion3D as ag, recast as ah, type IPhysicsVector3 as b, type IPhysicsVehicleInput as c, type IPhysicsInputSnapshot as d, type AreaEvent as e, type AreaHandler as f, type BuoyancyPointPosition as g, CollisionShape3D as h, type CollisionShapeKind as i, type IArea3DOptions as j, type IAreaContact as k, type IBuoyancy3DOptions as l, type IBuoyancyHullPoint as m, type IBuoyancySurface as n, type IBuoyancySurfaceSample as o, type ICharacterBody3DOptions as p, type IIntersectPointOptions as q, type IIntersectRayOptions as r, type IIntersectShapeOptions as s, type IPhysicsBodyCreateOptions as t, type IPhysicsBodyHandle as u, type IPhysicsCharacterOptions as v, type IPhysicsColliderHandle as w, type IPhysicsContext as x, type IPhysicsHandle as y, type IPhysicsJointLimit as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as Area3D, B as Buoyancy3D,
|
|
1
|
+
import { x as IPhysicsContext, P as IPhysicsWorldHandle, u as IPhysicsBodyHandle, b as IPhysicsVector3, J as IPhysicsRotation, z as IPhysicsJointLimit, a2 as RigidBody3D, w as IPhysicsColliderHandle, Y as PhysicsBody3D, h as CollisionShape3D, a5 as IPhysicsVehicleWheelOptions } from './Area3D-BqLJBY6B.js';
|
|
2
|
+
export { A as Area3D, B as Buoyancy3D, g as BuoyancyPointPosition, C as CharacterBody3D, l as IBuoyancy3DOptions, m as IBuoyancyHullPoint, n as IBuoyancySurface, o as IBuoyancySurfaceSample, a6 as ICollisionShapeHandle, q as IIntersectPointOptions, r as IIntersectRayOptions, s as IIntersectShapeOptions, t as IPhysicsBodyCreateOptions, v as IPhysicsCharacterOptions, y as IPhysicsHandle, d as IPhysicsInputSnapshot, a as IPhysicsJointCreateOptions, E as IPhysicsPointQuery, F as IPhysicsQueryHit, G as IPhysicsRayHit, H as IPhysicsRayQuery, K as IPhysicsRuntimeSimulation, L as IPhysicsShapeDescriptor, M as IPhysicsShapeQuery, I as IPhysicsSimulation, N as IPhysicsVehicleCreateOptions, c as IPhysicsVehicleInput, O as IPhysicsVehicleState, Q as IPointHit, R as IRayHit, S as IRigidBody3DOptions, T as IShapeHit, U as MAX_PHYSICS_QUERY_RESULTS, V as PHYSICS_COLLISION_EVENT_STRIDE, W as PHYSICS_TRANSFORM_STRIDE, X as PHYSICS_VEHICLE_WHEEL_STRIDE, Z as PhysicsDirectSpaceState3D, _ as PhysicsJointKind, a0 as PhysicsQueryVector3, a1 as PhysicsShapeKind, a3 as RigidBodyType, a4 as rapier } from './Area3D-BqLJBY6B.js';
|
|
3
3
|
import { Object3D, BufferGeometry, Matrix4 } from 'three';
|
|
4
4
|
import { ISoftBodyCollision } from '@threenative/core';
|
|
5
5
|
import { ISnowFootprint, SnowField } from '@threenative/core/world';
|
|
@@ -309,6 +309,14 @@ declare class VehicleBody3D extends RigidBody3D {
|
|
|
309
309
|
* the last completed step, so read it after the physics update.
|
|
310
310
|
*/
|
|
311
311
|
get speed(): number;
|
|
312
|
+
/**
|
|
313
|
+
* Godot's `VehicleWheel3D.wheel_friction_slip`, changed while the car drives: the cap on the
|
|
314
|
+
* tyre's combined grip impulse, as a multiple of the load on it. Dropping the rear pair is a
|
|
315
|
+
* handbrake slide; restoring it is the catch. Cold path: call it when the grip changes.
|
|
316
|
+
*/
|
|
317
|
+
setWheelFrictionSlip(index: number, frictionSlip: number): void;
|
|
318
|
+
/** The wheel's current grip cap: its construction value until `setWheelFrictionSlip` moves it. */
|
|
319
|
+
wheelFrictionSlip(index: number): number;
|
|
312
320
|
/** Whether this wheel's suspension ray found ground on the last completed step. */
|
|
313
321
|
wheelContact(index: number): boolean;
|
|
314
322
|
/** How far the wheel hangs below its attachment point, in metres. Below the rest length while loaded. */
|