@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
36 lines (35 loc) • 1.14 kB
TypeScript
import type { Mesh } from "../Meshes/mesh.js";
/**
* Class used to explode meshes (ie. to have a center and move them away from that center to better see the overall organization)
*/
export declare class MeshExploder {
private _centerMesh;
private _meshes;
private _meshesOrigins;
private _toCenterVectors;
private _scaledDirection;
private _newPosition;
private _centerPosition;
/**
* Explodes meshes from a center mesh.
* @param meshes The meshes to explode.
* @param centerMesh The mesh to be center of explosion.
*/
constructor(meshes: Array<Mesh>, centerMesh?: Mesh);
private _setCenterMesh;
/**
* Get class name
* @returns "MeshExploder"
*/
getClassName(): string;
/**
* "Exploded meshes"
* @returns Array of meshes with the centerMesh at index 0.
*/
getMeshes(): Array<Mesh>;
/**
* Explodes meshes giving a specific direction
* @param direction Number to multiply distance of each mesh's origin from center. Use a negative number to implode, or zero to reset.
*/
explode(direction?: number): void;
}