@dimforge/rapier3d-compat
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -253,3 +253,3 @@ import { RawRigidBodySet } from "../raw"; | ||
*/ | ||
isCcdEnabled(): void; | ||
isCcdEnabled(): boolean; | ||
/** | ||
@@ -256,0 +256,0 @@ * The number of colliders attached to this rigid-body. |
@@ -7,1 +7,2 @@ export declare function version(): string; | ||
export * from "./init"; | ||
export * from "./control"; |
@@ -20,2 +20,4 @@ import { RawColliderSet } from "../raw"; | ||
/** @internal */ | ||
castClosure<Res>(f?: (collider: Collider) => Res): (handle: ColliderHandle) => Res | undefined; | ||
/** @internal */ | ||
finalizeDeserialization(bodies: RigidBodySet): void; | ||
@@ -22,0 +24,0 @@ /** |
@@ -388,4 +388,4 @@ import { Rotation, Vector } from "../math"; | ||
intersectsRay(ray: Ray, maxToi: number): boolean; | ||
castShape(collider1Vel: Vector, shape2: Shape, shape2Pos: Vector, shape2Rot: Rotation, shape2Vel: Vector, maxToi: number): ShapeTOI | null; | ||
castCollider(collider1Vel: Vector, collider2: Collider, collider2Vel: Vector, maxToi: number): ShapeColliderTOI | null; | ||
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; | ||
@@ -392,0 +392,0 @@ /** |
@@ -27,8 +27,11 @@ import { Vector, Rotation } from "../math"; | ||
* @param shapeVel2 - The velocity of the second shape. | ||
* @param maxToi - The maximum time when the inpact can happen. | ||
* @returns If the two moving shapes collider at some point along their trajectories, this retruns the | ||
* time at which the two shape collider as well as the contact information durning the impact. Returns | ||
* @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): ShapeTOI | null; | ||
castShape(shapePos1: Vector, shapeRot1: Rotation, shapeVel1: Vector, shape2: Shape, shapePos2: Vector, shapeRot2: Rotation, shapeVel2: Vector, maxToi: number, stopAtPenetration: boolean): ShapeTOI | null; | ||
/** | ||
@@ -82,3 +85,4 @@ * Tests if this shape intersects another shape. | ||
RoundCone = 15, | ||
RoundConvexPolyhedron = 16 | ||
RoundConvexPolyhedron = 16, | ||
HalfSpace = 17 | ||
} | ||
@@ -101,2 +105,16 @@ /** | ||
} | ||
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; | ||
} | ||
/** | ||
@@ -103,0 +121,0 @@ * A shape that is a box in 3D and a rectangle in 2D. |
@@ -7,3 +7,3 @@ { | ||
"description": "3-dimensional physics engine in Rust - official JS bindings. Compatibility package with inlined webassembly as base64.", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"license": "Apache-2.0", | ||
@@ -10,0 +10,0 @@ "repository": { |
@@ -162,6 +162,9 @@ import { RawQueryPipeline } from "../raw"; | ||
* 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, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: ColliderHandle, filterExcludeRigidBody?: RigidBodyHandle, filterPredicate?: (collider: ColliderHandle) => boolean): ShapeColliderTOI | null; | ||
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; | ||
/** | ||
@@ -168,0 +171,0 @@ * Retrieve all the colliders intersecting the given shape. |
@@ -11,2 +11,3 @@ import { RawBroadPhase, RawCCDSolver, RawColliderSet, RawDeserializedWorld, RawIntegrationParameters, RawIslandManager, RawImpulseJointSet, RawMultibodyJointSet, RawNarrowPhase, RawPhysicsPipeline, RawQueryPipeline, RawRigidBodySet, RawSerializationPipeline, RawDebugRenderPipeline } from "../raw"; | ||
import { DebugRenderBuffers, DebugRenderPipeline } from "./debug_render_pipeline"; | ||
import { KinematicCharacterController } from "../control"; | ||
/** | ||
@@ -33,2 +34,3 @@ * The physics world. | ||
debugRenderPipeline: DebugRenderPipeline; | ||
characterControllers: Set<KinematicCharacterController>; | ||
/** | ||
@@ -130,2 +132,14 @@ * Release the WASM memory occupied by this physics world. | ||
/** | ||
* 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 collider. | ||
@@ -323,6 +337,9 @@ * | ||
* 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, filterFlags?: QueryFilterFlags, filterGroups?: InteractionGroups, filterExcludeCollider?: Collider, filterExcludeRigidBody?: RigidBody, filterPredicate?: (collider: Collider) => boolean): ShapeColliderTOI | null; | ||
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; | ||
/** | ||
@@ -329,0 +346,0 @@ * Retrieve all the colliders intersecting the given shape. |
@@ -5,2 +5,39 @@ /* tslint:disable */ | ||
export function version(a: number): void; | ||
export function __wbg_rawkinematiccharactercontroller_free(a: number): void; | ||
export function rawkinematiccharactercontroller_new(a: number): number; | ||
export function rawkinematiccharactercontroller_up(a: number): number; | ||
export function rawkinematiccharactercontroller_setUp(a: number, b: number): void; | ||
export function rawkinematiccharactercontroller_offset(a: number): number; | ||
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_translationApplied(a: number): number; | ||
export function rawcharactercollision_translationRemaining(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_rawccdsolver_free(a: number): void; | ||
@@ -148,2 +185,3 @@ export function rawccdsolver_new(): 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; | ||
@@ -172,4 +210,4 @@ export function rawcolliderset_coRadius(a: number, b: number, c: number): void; | ||
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): number; | ||
export function rawcolliderset_coCastCollider(a: number, b: number, c: number, d: number, e: number, f: 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; | ||
@@ -243,3 +281,2 @@ export function rawcolliderset_coContactShape(a: number, b: number, c: number, d: number, e: number, f: number): number; | ||
export function __wbg_rawpointprojection_free(a: number): void; | ||
export function rawpointprojection_point(a: number): number; | ||
export function rawpointprojection_isInside(a: number): number; | ||
@@ -262,2 +299,3 @@ export function __wbg_rawpointcolliderprojection_free(a: number): void; | ||
export function rawshape_ball(a: number): number; | ||
export function rawshape_halfspace(a: number): number; | ||
export function rawshape_capsule(a: number, b: number): number; | ||
@@ -278,3 +316,3 @@ export function rawshape_cylinder(a: number, b: 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): 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; | ||
@@ -293,4 +331,2 @@ export function rawshape_contactShape(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; | ||
export function rawshapecollidertoi_witness2(a: number): number; | ||
export function rawshapecollidertoi_normal1(a: number): number; | ||
export function rawshapecollidertoi_normal2(a: number): number; | ||
export function rawrotation_new(a: number, b: number, c: number, d: number): number; | ||
@@ -316,3 +352,2 @@ export function rawrotation_identity(): number; | ||
export function __wbg_rawcontactforceevent_free(a: number): void; | ||
export function rawcontactforceevent_collider1(a: number): number; | ||
export function rawcontactforceevent_collider2(a: number): number; | ||
@@ -341,3 +376,3 @@ export function rawcontactforceevent_total_force(a: 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): number; | ||
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; | ||
@@ -371,2 +406,3 @@ export function rawquerypipeline_collidersWithAabbIntersectingAabb(a: number, b: number, c: number, d: number): void; | ||
export function rawcolliderset_isHandleValid(a: number, b: number): number; | ||
export function rawraycolliderintersection_featureId(a: number, b: number): void; | ||
export function rawvector_set_x(a: number, b: number): void; | ||
@@ -376,2 +412,3 @@ export function rawvector_set_z(a: number, b: number): void; | ||
export function rawshapecontact_point1(a: number): number; | ||
export function rawpointprojection_point(a: number): number; | ||
export function rawshapetoi_witness1(a: number): number; | ||
@@ -381,7 +418,9 @@ export function rawraycollidertoi_toi(a: number): number; | ||
export function rawshapecollidertoi_witness1(a: number): number; | ||
export function rawraycolliderintersection_featureId(a: number, b: number): void; | ||
export function rawshapecollidertoi_normal1(a: number): number; | ||
export function rawshapecollidertoi_normal2(a: number): number; | ||
export function rawpointcolliderprojection_colliderHandle(a: number): number; | ||
export function rawraycolliderintersection_colliderHandle(a: number): number; | ||
export function rawraycollidertoi_colliderHandle(a: number): number; | ||
export function rawshapecollidertoi_colliderHandle(a: number): number; | ||
export function rawpointcolliderprojection_colliderHandle(a: number): number; | ||
export function rawcontactforceevent_collider1(a: number): number; | ||
export function __wbindgen_add_to_stack_pointer(a: number): number; | ||
@@ -388,0 +427,0 @@ export function __wbindgen_free(a: number, b: number): void; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7231362
51
27616