babylon.touchCamera.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. module BABYLON {
  2. // We're mainly based on the logic defined into the FreeCamera code
  3. export class TouchCamera extends FreeCamera {
  4. //-- Begin properties for backward compatibility for inputs
  5. public get touchAngularSensibility() {
  6. var touch = <FreeCameraTouchInput>this.inputs.attached["touch"];
  7. if (touch)
  8. return touch.touchAngularSensibility;
  9. }
  10. public set touchAngularSensibility(value) {
  11. var touch = <FreeCameraTouchInput>this.inputs.attached["touch"];
  12. if (touch)
  13. touch.touchAngularSensibility = value;
  14. }
  15. public get touchMoveSensibility() {
  16. var touch = <FreeCameraTouchInput>this.inputs.attached["touch"];
  17. if (touch)
  18. return touch.touchMoveSensibility;
  19. }
  20. public set touchMoveSensibility(value) {
  21. var touch = <FreeCameraTouchInput>this.inputs.attached["touch"];
  22. if (touch)
  23. touch.touchMoveSensibility = value;
  24. }
  25. //-- end properties for backward compatibility for inputs
  26. constructor(name: string, position: Vector3, scene: Scene) {
  27. super(name, position, scene);
  28. this.inputs.addTouch();
  29. }
  30. public getTypeName(): string {
  31. return "TouchCamera";
  32. }
  33. }
  34. }