meshExploder.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import type { Mesh } from "../Meshes/mesh";
  2. /**
  3. * Class used to explode meshes (ie. to have a center and move them away from that center to better see the overall organization)
  4. */
  5. export declare class MeshExploder {
  6. private _centerMesh;
  7. private _meshes;
  8. private _meshesOrigins;
  9. private _toCenterVectors;
  10. private _scaledDirection;
  11. private _newPosition;
  12. private _centerPosition;
  13. /**
  14. * Explodes meshes from a center mesh.
  15. * @param meshes The meshes to explode.
  16. * @param centerMesh The mesh to be center of explosion.
  17. */
  18. constructor(meshes: Array<Mesh>, centerMesh?: Mesh);
  19. private _setCenterMesh;
  20. /**
  21. * Get class name
  22. * @returns "MeshExploder"
  23. */
  24. getClassName(): string;
  25. /**
  26. * "Exploded meshes"
  27. * @returns Array of meshes with the centerMesh at index 0.
  28. */
  29. getMeshes(): Array<Mesh>;
  30. /**
  31. * Explodes meshes giving a specific direction
  32. * @param direction Number to multiply distance of each mesh's origin from center. Use a negative number to implode, or zero to reset.
  33. */
  34. explode(direction?: number): void;
  35. }