boneAxesViewer.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import type { Nullable } from "../types";
  2. import { AxesViewer } from "../Debug/axesViewer";
  3. import { Vector3 } from "../Maths/math.vector";
  4. import type { Mesh } from "../Meshes/mesh";
  5. import type { Bone } from "../Bones/bone";
  6. import type { Scene } from "../scene";
  7. /**
  8. * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
  9. * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
  10. */
  11. export declare class BoneAxesViewer extends AxesViewer {
  12. /**
  13. * Gets or sets the target mesh where to display the axes viewer
  14. */
  15. mesh: Nullable<Mesh>;
  16. /**
  17. * Gets or sets the target bone where to display the axes viewer
  18. */
  19. bone: Nullable<Bone>;
  20. /** Gets current position */
  21. pos: Vector3;
  22. /** Gets direction of X axis */
  23. xaxis: Vector3;
  24. /** Gets direction of Y axis */
  25. yaxis: Vector3;
  26. /** Gets direction of Z axis */
  27. zaxis: Vector3;
  28. /**
  29. * Creates a new BoneAxesViewer
  30. * @param scene defines the hosting scene
  31. * @param bone defines the target bone
  32. * @param mesh defines the target mesh
  33. * @param scaleLines defines a scaling factor for line length (1 by default)
  34. */
  35. constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
  36. /**
  37. * Force the viewer to update
  38. */
  39. update(): void;
  40. /** Releases resources */
  41. dispose(): void;
  42. }