babylon.arcRotateCameraInputsManager.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. module BABYLON {
  2. export class ArcRotateCameraInputsManager extends CameraInputsManager<ArcRotateCamera> {
  3. constructor(camera : ArcRotateCamera){
  4. super(camera);
  5. }
  6. add(input: ICameraInput<ArcRotateCamera>){
  7. super.add(input);
  8. if (this.camera._attachedElement && input.attachElement) {
  9. input.attachElement(this.camera._attachedElement, this.camera._noPreventDefault);
  10. }
  11. }
  12. public addMouseWheel(){
  13. this.add(new ArcRotateCameraMouseWheelInput());
  14. return this;
  15. }
  16. public addPointers(){
  17. this.add(new ArcRotateCameraPointersInput());
  18. return this;
  19. }
  20. public addKeyboard(){
  21. this.add(new ArcRotateCameraKeyboardMoveInput());
  22. return this;
  23. }
  24. public addGamepad(){
  25. this.add(new ArcRotateCameraGamepadInput());
  26. return this;
  27. }
  28. }
  29. }