angular-three-rapier
Version:
Physics Rapier for Angular Three
65 lines (64 loc) • 4.4 kB
TypeScript
import { ElementRef, Injector } from '@angular/core';
import { FixedImpulseJoint, PrismaticImpulseJoint, RevoluteImpulseJoint, RigidBody, RopeImpulseJoint, SphericalImpulseJoint, SpringImpulseJoint } from '@dimforge/rapier3d-compat';
import { NgtrFixedJointParams, NgtrPrismaticJointParams, NgtrRevoluteJointParams, NgtrRopeJointParams, NgtrSphericalJointParams, NgtrSpringJointParams } from './types';
/**
* A fixed joint ensures that two rigid-bodies don't move relative to each other.
* Fixed joints are characterized by one local frame (represented by an isometry) on each rigid-body.
* The fixed-joint makes these frames coincide in world-space.
*
* @category Hooks - Joints
*/
export declare const injectFixedJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrFixedJointParams;
}) => import("@angular/core").Signal<FixedImpulseJoint | null>;
/**
* The spherical joint ensures that two points on the local-spaces of two rigid-bodies always coincide (it prevents any relative
* translational motion at this points). This is typically used to simulate ragdolls arms, pendulums, etc.
* They are characterized by one local anchor on each rigid-body. Each anchor represents the location of the
* points that need to coincide on the local-space of each rigid-body.
*
* @category Hooks - Joints
*/
export declare const injectSphericalJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrSphericalJointParams;
}) => import("@angular/core").Signal<SphericalImpulseJoint | null>;
/**
* The revolute joint prevents any relative movement between two rigid-bodies, except for relative
* rotations along one axis. This is typically used to simulate wheels, fans, etc.
* They are characterized by one local anchor as well as one local axis on each rigid-body.
*
* @category Hooks - Joints
*/
export declare const injectRevoluteJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrRevoluteJointParams;
}) => import("@angular/core").Signal<RevoluteImpulseJoint | null>;
/**
* The prismatic joint prevents any relative movement between two rigid-bodies, except for relative translations along one axis.
* It is characterized by one local anchor as well as one local axis on each rigid-body. In 3D, an optional
* local tangent axis can be specified for each rigid-body.
*
* @category Hooks - Joints
*/
export declare const injectPrismaticJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrPrismaticJointParams;
}) => import("@angular/core").Signal<PrismaticImpulseJoint | null>;
/**
* The rope joint limits the max distance between two bodies.
* @category Hooks - Joints
*/
export declare const injectRopeJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrRopeJointParams;
}) => import("@angular/core").Signal<RopeImpulseJoint | null>;
/**
* The spring joint applies a force proportional to the distance between two objects.
* @category Hooks - Joints
*/
export declare const injectSpringJoint: (bodyA: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), bodyB: RigidBody | ElementRef<RigidBody> | (() => ElementRef<RigidBody> | RigidBody | undefined | null), { injector, data }: {
injector?: Injector;
data: NgtrSpringJointParams;
}) => import("@angular/core").Signal<SpringImpulseJoint | null>;