followCameraPointersInput.d.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import type { Nullable } from "../../types";
  2. import type { FollowCamera } from "../../Cameras/followCamera";
  3. import { BaseCameraPointersInput } from "../../Cameras/Inputs/BaseCameraPointersInput";
  4. import type { PointerTouch } from "../../Events/pointerEvents";
  5. /**
  6. * Manage the pointers inputs to control an follow camera.
  7. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs
  8. */
  9. export declare class FollowCameraPointersInput extends BaseCameraPointersInput {
  10. /**
  11. * Defines the camera the input is attached to.
  12. */
  13. camera: FollowCamera;
  14. /**
  15. * Gets the class name of the current input.
  16. * @returns the class name
  17. */
  18. getClassName(): string;
  19. /**
  20. * Defines the pointer angular sensibility along the X axis or how fast is
  21. * the camera rotating.
  22. * A negative number will reverse the axis direction.
  23. */
  24. angularSensibilityX: number;
  25. /**
  26. * Defines the pointer angular sensibility along the Y axis or how fast is
  27. * the camera rotating.
  28. * A negative number will reverse the axis direction.
  29. */
  30. angularSensibilityY: number;
  31. /**
  32. * Defines the pointer pinch precision or how fast is the camera zooming.
  33. * A negative number will reverse the axis direction.
  34. */
  35. pinchPrecision: number;
  36. /**
  37. * pinchDeltaPercentage will be used instead of pinchPrecision if different
  38. * from 0.
  39. * It defines the percentage of current camera.radius to use as delta when
  40. * pinch zoom is used.
  41. */
  42. pinchDeltaPercentage: number;
  43. /**
  44. * Pointer X axis controls zoom. (X axis modifies camera.radius value.)
  45. */
  46. axisXControlRadius: boolean;
  47. /**
  48. * Pointer X axis controls height. (X axis modifies camera.heightOffset value.)
  49. */
  50. axisXControlHeight: boolean;
  51. /**
  52. * Pointer X axis controls angle. (X axis modifies camera.rotationOffset value.)
  53. */
  54. axisXControlRotation: boolean;
  55. /**
  56. * Pointer Y axis controls zoom. (Y axis modifies camera.radius value.)
  57. */
  58. axisYControlRadius: boolean;
  59. /**
  60. * Pointer Y axis controls height. (Y axis modifies camera.heightOffset value.)
  61. */
  62. axisYControlHeight: boolean;
  63. /**
  64. * Pointer Y axis controls angle. (Y axis modifies camera.rotationOffset value.)
  65. */
  66. axisYControlRotation: boolean;
  67. /**
  68. * Pinch controls zoom. (Pinch modifies camera.radius value.)
  69. */
  70. axisPinchControlRadius: boolean;
  71. /**
  72. * Pinch controls height. (Pinch modifies camera.heightOffset value.)
  73. */
  74. axisPinchControlHeight: boolean;
  75. /**
  76. * Pinch controls angle. (Pinch modifies camera.rotationOffset value.)
  77. */
  78. axisPinchControlRotation: boolean;
  79. /**
  80. * Log error messages if basic misconfiguration has occurred.
  81. */
  82. warningEnable: boolean;
  83. onTouch(pointA: Nullable<PointerTouch>, offsetX: number, offsetY: number): void;
  84. onMultiTouch(pointA: Nullable<PointerTouch>, pointB: Nullable<PointerTouch>, previousPinchSquaredDistance: number, pinchSquaredDistance: number, previousMultiTouchPanPosition: Nullable<PointerTouch>, multiTouchPanPosition: Nullable<PointerTouch>): void;
  85. private _warningCounter;
  86. private _warning;
  87. }