Skip to content

Commit

Permalink
Add types for RapierPhysics
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Jul 2, 2023
1 parent 15e0d2d commit 265c41e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions types/three/examples/jsm/physics/RapierPhysics.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Mesh } from '../../../src/Three';

type Vector = { x: number; y: number; z: number };

export interface RapierPhysicsObject {
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;
setMeshVelocity: (mesh: Mesh, velocity: Vector, index?: number) => void;
}

export function RapierPhysics(): Promise<RapierPhysicsObject>;

0 comments on commit 265c41e

Please sign in to comment.