freeCameraInputsManager.d.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import type { FreeCamera } from "./freeCamera";
  2. import { CameraInputsManager } from "./cameraInputsManager";
  3. import { FreeCameraMouseInput } from "../Cameras/Inputs/freeCameraMouseInput";
  4. import { FreeCameraMouseWheelInput } from "../Cameras/Inputs/freeCameraMouseWheelInput";
  5. import type { Nullable } from "../types";
  6. /**
  7. * Default Inputs manager for the FreeCamera.
  8. * It groups all the default supported inputs for ease of use.
  9. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs
  10. */
  11. export declare class FreeCameraInputsManager extends CameraInputsManager<FreeCamera> {
  12. /**
  13. * @internal
  14. */
  15. _mouseInput: Nullable<FreeCameraMouseInput>;
  16. /**
  17. * @internal
  18. */
  19. _mouseWheelInput: Nullable<FreeCameraMouseWheelInput>;
  20. /**
  21. * Instantiates a new FreeCameraInputsManager.
  22. * @param camera Defines the camera the inputs belong to
  23. */
  24. constructor(camera: FreeCamera);
  25. /**
  26. * Add keyboard input support to the input manager.
  27. * @returns the current input manager
  28. */
  29. addKeyboard(): FreeCameraInputsManager;
  30. /**
  31. * Add mouse input support to the input manager.
  32. * @param touchEnabled if the FreeCameraMouseInput should support touch (default: true)
  33. * @returns the current input manager
  34. */
  35. addMouse(touchEnabled?: boolean): FreeCameraInputsManager;
  36. /**
  37. * Removes the mouse input support from the manager
  38. * @returns the current input manager
  39. */
  40. removeMouse(): FreeCameraInputsManager;
  41. /**
  42. * Add mouse wheel input support to the input manager.
  43. * @returns the current input manager
  44. */
  45. addMouseWheel(): FreeCameraInputsManager;
  46. /**
  47. * Removes the mouse wheel input support from the manager
  48. * @returns the current input manager
  49. */
  50. removeMouseWheel(): FreeCameraInputsManager;
  51. /**
  52. * Add touch input support to the input manager.
  53. * @returns the current input manager
  54. */
  55. addTouch(): FreeCameraInputsManager;
  56. /**
  57. * Remove all attached input methods from a camera
  58. */
  59. clear(): void;
  60. }