babylon.arcRotateCameraInputsManager.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. var __extends = (this && this.__extends) || function (d, b) {
  2. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  3. function __() { this.constructor = d; }
  4. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5. };
  6. var BABYLON;
  7. (function (BABYLON) {
  8. var ArcRotateCameraInputsManager = (function (_super) {
  9. __extends(ArcRotateCameraInputsManager, _super);
  10. function ArcRotateCameraInputsManager(camera) {
  11. _super.call(this, camera);
  12. }
  13. ArcRotateCameraInputsManager.prototype.add = function (input) {
  14. _super.prototype.add.call(this, input);
  15. if (this.camera._attachedElement && input.attachElement) {
  16. input.attachElement(this.camera._attachedElement, this.camera._noPreventDefault);
  17. }
  18. };
  19. ArcRotateCameraInputsManager.prototype.addMouseWheel = function () {
  20. this.add(new BABYLON.ArcRotateCameraMouseWheelInput());
  21. return this;
  22. };
  23. ArcRotateCameraInputsManager.prototype.addPointers = function () {
  24. this.add(new BABYLON.ArcRotateCameraPointersInput());
  25. return this;
  26. };
  27. ArcRotateCameraInputsManager.prototype.addKeyboard = function () {
  28. this.add(new BABYLON.ArcRotateCameraKeyboardMoveInput());
  29. return this;
  30. };
  31. return ArcRotateCameraInputsManager;
  32. }(BABYLON.CameraInputsManager));
  33. BABYLON.ArcRotateCameraInputsManager = ArcRotateCameraInputsManager;
  34. })(BABYLON || (BABYLON = {}));