Mouse.d.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import type { PointerLockControls } from 'three/examples/jsm/controls/PointerLockControls';
  2. export declare class Mouse {
  3. private _x;
  4. private _y;
  5. private _movementX;
  6. private _movementY;
  7. private _isMoving;
  8. private _mouseStopTimer;
  9. private _isLeftButtonDown;
  10. private _isLeftButtonPressed;
  11. private _isLeftButtonUp;
  12. private _isRightButtonDown;
  13. private _isRightButtonPressed;
  14. private _isRightButtonUp;
  15. private _isMidButtonDown;
  16. private _isMidButtonPressed;
  17. private _isMidButtonUp;
  18. private _buttonDown;
  19. private _buttonPressed;
  20. private _buttonUp;
  21. private _wheelY;
  22. private _wheelX;
  23. private _wheelTimeout;
  24. private _enabled;
  25. private _pointerLock;
  26. get pointerLock(): PointerLockControls;
  27. get x(): number;
  28. get y(): number;
  29. get movementX(): number;
  30. get movementY(): number;
  31. get isMoving(): boolean;
  32. get isLeftButtonDown(): boolean;
  33. get isLeftButtonPressed(): boolean;
  34. get isLeftButtonUp(): boolean;
  35. get isRightButtonDown(): boolean;
  36. get isRightButtonPressed(): boolean;
  37. get isRightButtonUp(): boolean;
  38. get isMidButtonDown(): boolean;
  39. get isMidButtonPressed(): boolean;
  40. get isMidButtonUp(): boolean;
  41. get buttonDown(): number | undefined;
  42. get buttonPressed(): number | undefined;
  43. get buttonUp(): number | undefined;
  44. get wheelY(): number;
  45. get wheelX(): number;
  46. get enabled(): boolean;
  47. set enabled(value: boolean);
  48. init(): void;
  49. getButtonDown(button: number): boolean;
  50. getButtonPressed(button: number): boolean;
  51. getButtonUp(button: number): boolean;
  52. lock(): void;
  53. private unlockFunction;
  54. unlock(): void;
  55. private onMouseMove;
  56. private setMouseMovement;
  57. private resetMouseMovement;
  58. private onMouseDown;
  59. private onMouseUp;
  60. private onWheelMove;
  61. }