-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16698 from yomboprime/jsm_convexbreaker
JSM: Added module and TS file for ConvexObjectBreaker
- Loading branch information
Showing
3 changed files
with
550 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.