@vladkrutenyuk/three-kvy-core
Version:
Everything you need to create any-complexity 3D apps with Three.js. Empower Three.js with a modular, lifecycle-managed context that seamlessly propagates through objects via reusable features providing structured logic.
15 lines (14 loc) • 768 B
TypeScript
import type * as RAPIER from "@dimforge/rapier3d-compat";
import { IFeaturable, Object3DFeature } from "@vladkrutenyuk/three-kvy-core";
import { ModulesWithRapierPhysics } from "./RapierPhysics";
export type ColliderType = keyof typeof RAPIER.ColliderDesc;
export type ColliderParams<T extends ColliderType = ColliderType> = T extends ColliderType ? [T, ...Parameters<(typeof RAPIER.ColliderDesc)[T]>] : never;
export declare class Collider extends Object3DFeature<ModulesWithRapierPhysics> {
get col(): RAPIER.Collider;
private _col?;
protected _params: ColliderParams;
constructor(object: IFeaturable, props: ColliderParams);
private _setter?;
set(setter: typeof this._setter): this;
protected useCtx(ctx: typeof this.ctx): () => void;
}