followCameraMouseWheelInput.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import type { FollowCamera } from "../../Cameras/followCamera";
  2. import type { ICameraInput } from "../../Cameras/cameraInputsManager";
  3. /**
  4. * Manage the mouse wheel inputs to control a follow camera.
  5. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs
  6. */
  7. export declare class FollowCameraMouseWheelInput implements ICameraInput<FollowCamera> {
  8. /**
  9. * Defines the camera the input is attached to.
  10. */
  11. camera: FollowCamera;
  12. /**
  13. * Moue wheel controls zoom. (Mouse wheel modifies camera.radius value.)
  14. */
  15. axisControlRadius: boolean;
  16. /**
  17. * Moue wheel controls height. (Mouse wheel modifies camera.heightOffset value.)
  18. */
  19. axisControlHeight: boolean;
  20. /**
  21. * Moue wheel controls angle. (Mouse wheel modifies camera.rotationOffset value.)
  22. */
  23. axisControlRotation: boolean;
  24. /**
  25. * Gets or Set the mouse wheel precision or how fast is the camera moves in
  26. * relation to mouseWheel events.
  27. */
  28. wheelPrecision: number;
  29. /**
  30. * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
  31. * It defines the percentage of current camera.radius to use as delta when wheel is used.
  32. */
  33. wheelDeltaPercentage: number;
  34. private _wheel;
  35. private _observer;
  36. /**
  37. * Attach the input controls to a specific dom element to get the input from.
  38. * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
  39. */
  40. attachControl(noPreventDefault?: boolean): void;
  41. /**
  42. * Detach the current controls from the specified dom element.
  43. */
  44. detachControl(): void;
  45. /**
  46. * Gets the class name of the current input.
  47. * @returns the class name
  48. */
  49. getClassName(): string;
  50. /**
  51. * Get the friendly name associated with the input class.
  52. * @returns the input friendly name
  53. */
  54. getSimpleName(): string;
  55. }