@threlte/rapier
Version:
Components and hooks to use the Rapier physics engine in Threlte
16 lines (15 loc) • 627 B
TypeScript
import RAPIER from '@dimforge/rapier3d-compat';
import { type Key, type Stage } from '@threlte/core';
import type { Framerate, RapierContext } from '../types/types';
export declare const createRapierContext: (worldArgs: ConstructorParameters<typeof RAPIER.World>, options: {
framerate?: Framerate;
autoStart?: boolean;
simulationStageOptions?: {
before?: (Key | Stage) | (Key | Stage)[];
after?: (Key | Stage) | (Key | Stage)[];
};
synchronizationStageOptions?: {
before?: (Key | Stage) | (Key | Stage)[];
after?: (Key | Stage) | (Key | Stage)[];
};
}) => RapierContext;