Skip to content

Commit

Permalink
Merge pull request #16698 from yomboprime/jsm_convexbreaker
Browse files Browse the repository at this point in the history
JSM: Added module and TS file for ConvexObjectBreaker
  • Loading branch information
Mugen87 authored Jun 6, 2019
2 parents 38f2f55 + e2fdca0 commit f420e67
Show file tree
Hide file tree
Showing 3 changed files with 550 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/jsm/misc/ConvexObjectBreaker.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {
Object3D
Plane,
Vector3
} from '../../../src/Three';

export interface CutByPlaneOutput {
object1: Object3D;
object2: Object3D;
}

export class ConvexObjectBreaker {
constructor(minSizeForBreak?: number, smallDelta?: number);
prepareBreakableObject(object: Object3D, mass: number, velocity: Vector3, angularVelocity: Vector3, breakable: boolean): void;
subdivideByImpact(object: Object3D, pointOfImpact: Vector3, normal: Vector3, maxRadialIterations: number, maxRandomIterations: number): Object3D[];
cutByPlane(object: Object3D, plane: Plane, output: CutByPlaneOutput): number;
}
Loading

0 comments on commit f420e67

Please sign in to comment.