babylon.arcRotateCamera.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  7. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  8. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  9. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  10. return c > 3 && r && Object.defineProperty(target, key, r), r;
  11. };
  12. var BABYLON;
  13. (function (BABYLON) {
  14. var ArcRotateCamera = (function (_super) {
  15. __extends(ArcRotateCamera, _super);
  16. function ArcRotateCamera(name, alpha, beta, radius, target, scene) {
  17. var _this = this;
  18. _super.call(this, name, BABYLON.Vector3.Zero(), scene);
  19. this.inertialAlphaOffset = 0;
  20. this.inertialBetaOffset = 0;
  21. this.inertialRadiusOffset = 0;
  22. this.lowerAlphaLimit = null;
  23. this.upperAlphaLimit = null;
  24. this.lowerBetaLimit = 0.01;
  25. this.upperBetaLimit = Math.PI;
  26. this.lowerRadiusLimit = null;
  27. this.upperRadiusLimit = null;
  28. this.inertialPanningX = 0;
  29. this.inertialPanningY = 0;
  30. //-- end properties for backward compatibility for inputs
  31. this.zoomOnFactor = 1;
  32. this.targetScreenOffset = BABYLON.Vector2.Zero();
  33. this.allowUpsideDown = true;
  34. this._viewMatrix = new BABYLON.Matrix();
  35. // Panning
  36. this.panningAxis = new BABYLON.Vector3(1, 1, 0);
  37. this.checkCollisions = false;
  38. this.collisionRadius = new BABYLON.Vector3(0.5, 0.5, 0.5);
  39. this._collider = new BABYLON.Collider();
  40. this._previousPosition = BABYLON.Vector3.Zero();
  41. this._collisionVelocity = BABYLON.Vector3.Zero();
  42. this._newPosition = BABYLON.Vector3.Zero();
  43. this._onCollisionPositionChange = function (collisionId, newPosition, collidedMesh) {
  44. if (collidedMesh === void 0) { collidedMesh = null; }
  45. if (_this.getScene().workerCollisions && _this.checkCollisions) {
  46. newPosition.multiplyInPlace(_this._collider.radius);
  47. }
  48. if (!collidedMesh) {
  49. _this._previousPosition.copyFrom(_this.position);
  50. }
  51. else {
  52. _this.setPosition(newPosition);
  53. if (_this.onCollide) {
  54. _this.onCollide(collidedMesh);
  55. }
  56. }
  57. // Recompute because of constraints
  58. var cosa = Math.cos(_this.alpha);
  59. var sina = Math.sin(_this.alpha);
  60. var cosb = Math.cos(_this.beta);
  61. var sinb = Math.sin(_this.beta);
  62. if (sinb === 0) {
  63. sinb = 0.0001;
  64. }
  65. var target = _this._getTargetPosition();
  66. target.addToRef(new BABYLON.Vector3(_this.radius * cosa * sinb, _this.radius * cosb, _this.radius * sina * sinb), _this._newPosition);
  67. _this.position.copyFrom(_this._newPosition);
  68. var up = _this.upVector;
  69. if (_this.allowUpsideDown && _this.beta < 0) {
  70. up = up.clone();
  71. up = up.negate();
  72. }
  73. BABYLON.Matrix.LookAtLHToRef(_this.position, target, up, _this._viewMatrix);
  74. _this._viewMatrix.m[12] += _this.targetScreenOffset.x;
  75. _this._viewMatrix.m[13] += _this.targetScreenOffset.y;
  76. _this._collisionTriggered = false;
  77. };
  78. if (!target) {
  79. this.target = BABYLON.Vector3.Zero();
  80. }
  81. else {
  82. this.target = target;
  83. }
  84. this.alpha = alpha;
  85. this.beta = beta;
  86. this.radius = radius;
  87. this.getViewMatrix();
  88. this.inputs = new BABYLON.ArcRotateCameraInputsManager(this);
  89. this.inputs.addKeyboard().addMouseWheel().addPointers().addGamepad();
  90. }
  91. Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityX", {
  92. //-- begin properties for backward compatibility for inputs
  93. get: function () {
  94. var pointers = this.inputs.attached["pointers"];
  95. if (pointers)
  96. return pointers.angularSensibilityX;
  97. },
  98. set: function (value) {
  99. var pointers = this.inputs.attached["pointers"];
  100. if (pointers) {
  101. pointers.angularSensibilityX = value;
  102. }
  103. },
  104. enumerable: true,
  105. configurable: true
  106. });
  107. Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityY", {
  108. get: function () {
  109. var pointers = this.inputs.attached["pointers"];
  110. if (pointers)
  111. return pointers.angularSensibilityY;
  112. },
  113. set: function (value) {
  114. var pointers = this.inputs.attached["pointers"];
  115. if (pointers) {
  116. pointers.angularSensibilityY = value;
  117. }
  118. },
  119. enumerable: true,
  120. configurable: true
  121. });
  122. Object.defineProperty(ArcRotateCamera.prototype, "pinchPrecision", {
  123. get: function () {
  124. var pointers = this.inputs.attached["pointers"];
  125. if (pointers)
  126. return pointers.pinchPrecision;
  127. },
  128. set: function (value) {
  129. var pointers = this.inputs.attached["pointers"];
  130. if (pointers) {
  131. pointers.pinchPrecision = value;
  132. }
  133. },
  134. enumerable: true,
  135. configurable: true
  136. });
  137. Object.defineProperty(ArcRotateCamera.prototype, "panningSensibility", {
  138. get: function () {
  139. var pointers = this.inputs.attached["pointers"];
  140. if (pointers)
  141. return pointers.panningSensibility;
  142. },
  143. set: function (value) {
  144. var pointers = this.inputs.attached["pointers"];
  145. if (pointers) {
  146. pointers.panningSensibility = value;
  147. }
  148. },
  149. enumerable: true,
  150. configurable: true
  151. });
  152. Object.defineProperty(ArcRotateCamera.prototype, "keysUp", {
  153. get: function () {
  154. var keyboard = this.inputs.attached["keyboard"];
  155. if (keyboard)
  156. return keyboard.keysUp;
  157. },
  158. set: function (value) {
  159. var keyboard = this.inputs.attached["keyboard"];
  160. if (keyboard)
  161. keyboard.keysUp = value;
  162. },
  163. enumerable: true,
  164. configurable: true
  165. });
  166. Object.defineProperty(ArcRotateCamera.prototype, "keysDown", {
  167. get: function () {
  168. var keyboard = this.inputs.attached["keyboard"];
  169. if (keyboard)
  170. return keyboard.keysDown;
  171. },
  172. set: function (value) {
  173. var keyboard = this.inputs.attached["keyboard"];
  174. if (keyboard)
  175. keyboard.keysDown = value;
  176. },
  177. enumerable: true,
  178. configurable: true
  179. });
  180. Object.defineProperty(ArcRotateCamera.prototype, "keysLeft", {
  181. get: function () {
  182. var keyboard = this.inputs.attached["keyboard"];
  183. if (keyboard)
  184. return keyboard.keysLeft;
  185. },
  186. set: function (value) {
  187. var keyboard = this.inputs.attached["keyboard"];
  188. if (keyboard)
  189. keyboard.keysLeft = value;
  190. },
  191. enumerable: true,
  192. configurable: true
  193. });
  194. Object.defineProperty(ArcRotateCamera.prototype, "keysRight", {
  195. get: function () {
  196. var keyboard = this.inputs.attached["keyboard"];
  197. if (keyboard)
  198. return keyboard.keysRight;
  199. },
  200. set: function (value) {
  201. var keyboard = this.inputs.attached["keyboard"];
  202. if (keyboard)
  203. keyboard.keysRight = value;
  204. },
  205. enumerable: true,
  206. configurable: true
  207. });
  208. Object.defineProperty(ArcRotateCamera.prototype, "wheelPrecision", {
  209. get: function () {
  210. var mousewheel = this.inputs.attached["mousewheel"];
  211. if (mousewheel)
  212. return mousewheel.wheelPrecision;
  213. },
  214. set: function (value) {
  215. var mousewheel = this.inputs.attached["mousewheel"];
  216. if (mousewheel)
  217. mousewheel.wheelPrecision = value;
  218. },
  219. enumerable: true,
  220. configurable: true
  221. });
  222. // Cache
  223. ArcRotateCamera.prototype._initCache = function () {
  224. _super.prototype._initCache.call(this);
  225. this._cache.target = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
  226. this._cache.alpha = undefined;
  227. this._cache.beta = undefined;
  228. this._cache.radius = undefined;
  229. this._cache.targetScreenOffset = BABYLON.Vector2.Zero();
  230. };
  231. ArcRotateCamera.prototype._updateCache = function (ignoreParentClass) {
  232. if (!ignoreParentClass) {
  233. _super.prototype._updateCache.call(this);
  234. }
  235. this._cache.target.copyFrom(this._getTargetPosition());
  236. this._cache.alpha = this.alpha;
  237. this._cache.beta = this.beta;
  238. this._cache.radius = this.radius;
  239. this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset);
  240. };
  241. ArcRotateCamera.prototype._getTargetPosition = function () {
  242. if (this.target.getAbsolutePosition) {
  243. return this.target.getAbsolutePosition();
  244. }
  245. return this.target;
  246. };
  247. // Synchronized
  248. ArcRotateCamera.prototype._isSynchronizedViewMatrix = function () {
  249. if (!_super.prototype._isSynchronizedViewMatrix.call(this))
  250. return false;
  251. return this._cache.target.equals(this.target)
  252. && this._cache.alpha === this.alpha
  253. && this._cache.beta === this.beta
  254. && this._cache.radius === this.radius
  255. && this._cache.targetScreenOffset.equals(this.targetScreenOffset);
  256. };
  257. // Methods
  258. ArcRotateCamera.prototype.attachControl = function (element, noPreventDefault, useCtrlForPanning) {
  259. var _this = this;
  260. if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
  261. this._useCtrlForPanning = useCtrlForPanning;
  262. this.inputs.attachElement(element, noPreventDefault);
  263. this._reset = function () {
  264. _this.inertialAlphaOffset = 0;
  265. _this.inertialBetaOffset = 0;
  266. _this.inertialRadiusOffset = 0;
  267. };
  268. };
  269. ArcRotateCamera.prototype.detachControl = function (element) {
  270. this.inputs.detachElement(element);
  271. if (this._reset) {
  272. this._reset();
  273. }
  274. };
  275. ArcRotateCamera.prototype._checkInputs = function () {
  276. //if (async) collision inspection was triggered, don't update the camera's position - until the collision callback was called.
  277. if (this._collisionTriggered) {
  278. return;
  279. }
  280. this.inputs.checkInputs();
  281. // Inertia
  282. if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) {
  283. this.alpha += this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
  284. this.beta += this.inertialBetaOffset;
  285. this.radius -= this.inertialRadiusOffset;
  286. this.inertialAlphaOffset *= this.inertia;
  287. this.inertialBetaOffset *= this.inertia;
  288. this.inertialRadiusOffset *= this.inertia;
  289. if (Math.abs(this.inertialAlphaOffset) < BABYLON.Epsilon)
  290. this.inertialAlphaOffset = 0;
  291. if (Math.abs(this.inertialBetaOffset) < BABYLON.Epsilon)
  292. this.inertialBetaOffset = 0;
  293. if (Math.abs(this.inertialRadiusOffset) < BABYLON.Epsilon)
  294. this.inertialRadiusOffset = 0;
  295. }
  296. // Panning inertia
  297. if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) {
  298. if (!this._localDirection) {
  299. this._localDirection = BABYLON.Vector3.Zero();
  300. this._transformedDirection = BABYLON.Vector3.Zero();
  301. }
  302. this.inertialPanningX *= this.inertia;
  303. this.inertialPanningY *= this.inertia;
  304. if (Math.abs(this.inertialPanningX) < BABYLON.Epsilon)
  305. this.inertialPanningX = 0;
  306. if (Math.abs(this.inertialPanningY) < BABYLON.Epsilon)
  307. this.inertialPanningY = 0;
  308. this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY);
  309. this._localDirection.multiplyInPlace(this.panningAxis);
  310. this._viewMatrix.invertToRef(this._cameraTransformMatrix);
  311. BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection);
  312. //Eliminate y if map panning is enabled (panningAxis == 1,0,1)
  313. if (!this.panningAxis.y) {
  314. this._transformedDirection.y = 0;
  315. }
  316. this.target.addInPlace(this._transformedDirection);
  317. }
  318. // Limits
  319. this._checkLimits();
  320. _super.prototype._checkInputs.call(this);
  321. };
  322. ArcRotateCamera.prototype._checkLimits = function () {
  323. if (this.lowerBetaLimit === null || this.lowerBetaLimit === undefined) {
  324. if (this.allowUpsideDown && this.beta > Math.PI) {
  325. this.beta = this.beta - (2 * Math.PI);
  326. }
  327. }
  328. else {
  329. if (this.beta < this.lowerBetaLimit) {
  330. this.beta = this.lowerBetaLimit;
  331. }
  332. }
  333. if (this.upperBetaLimit === null || this.upperBetaLimit === undefined) {
  334. if (this.allowUpsideDown && this.beta < -Math.PI) {
  335. this.beta = this.beta + (2 * Math.PI);
  336. }
  337. }
  338. else {
  339. if (this.beta > this.upperBetaLimit) {
  340. this.beta = this.upperBetaLimit;
  341. }
  342. }
  343. if (this.lowerAlphaLimit && this.alpha < this.lowerAlphaLimit) {
  344. this.alpha = this.lowerAlphaLimit;
  345. }
  346. if (this.upperAlphaLimit && this.alpha > this.upperAlphaLimit) {
  347. this.alpha = this.upperAlphaLimit;
  348. }
  349. if (this.lowerRadiusLimit && this.radius < this.lowerRadiusLimit) {
  350. this.radius = this.lowerRadiusLimit;
  351. }
  352. if (this.upperRadiusLimit && this.radius > this.upperRadiusLimit) {
  353. this.radius = this.upperRadiusLimit;
  354. }
  355. };
  356. ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
  357. var radiusv3 = this.position.subtract(this._getTargetPosition());
  358. this.radius = radiusv3.length();
  359. // Alpha
  360. this.alpha = Math.acos(radiusv3.x / Math.sqrt(Math.pow(radiusv3.x, 2) + Math.pow(radiusv3.z, 2)));
  361. if (radiusv3.z < 0) {
  362. this.alpha = 2 * Math.PI - this.alpha;
  363. }
  364. // Beta
  365. this.beta = Math.acos(radiusv3.y / this.radius);
  366. this._checkLimits();
  367. };
  368. ArcRotateCamera.prototype.setPosition = function (position) {
  369. if (this.position.equals(position)) {
  370. return;
  371. }
  372. this.position = position;
  373. this.rebuildAnglesAndRadius();
  374. };
  375. ArcRotateCamera.prototype.setTarget = function (target) {
  376. if (this._getTargetPosition().equals(target)) {
  377. return;
  378. }
  379. this.target = target;
  380. this.rebuildAnglesAndRadius();
  381. };
  382. ArcRotateCamera.prototype._getViewMatrix = function () {
  383. // Compute
  384. var cosa = Math.cos(this.alpha);
  385. var sina = Math.sin(this.alpha);
  386. var cosb = Math.cos(this.beta);
  387. var sinb = Math.sin(this.beta);
  388. if (sinb === 0) {
  389. sinb = 0.0001;
  390. }
  391. var target = this._getTargetPosition();
  392. target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
  393. if (this.getScene().collisionsEnabled && this.checkCollisions) {
  394. this._collider.radius = this.collisionRadius;
  395. this._newPosition.subtractToRef(this.position, this._collisionVelocity);
  396. this._collisionTriggered = true;
  397. this.getScene().collisionCoordinator.getNewPosition(this.position, this._collisionVelocity, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId);
  398. }
  399. else {
  400. this.position.copyFrom(this._newPosition);
  401. var up = this.upVector;
  402. if (this.allowUpsideDown && this.beta < 0) {
  403. up = up.clone();
  404. up = up.negate();
  405. }
  406. BABYLON.Matrix.LookAtLHToRef(this.position, target, up, this._viewMatrix);
  407. this._viewMatrix.m[12] += this.targetScreenOffset.x;
  408. this._viewMatrix.m[13] += this.targetScreenOffset.y;
  409. }
  410. return this._viewMatrix;
  411. };
  412. ArcRotateCamera.prototype.zoomOn = function (meshes, doNotUpdateMaxZ) {
  413. if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
  414. meshes = meshes || this.getScene().meshes;
  415. var minMaxVector = BABYLON.Mesh.MinMax(meshes);
  416. var distance = BABYLON.Vector3.Distance(minMaxVector.min, minMaxVector.max);
  417. this.radius = distance * this.zoomOnFactor;
  418. this.focusOn({ min: minMaxVector.min, max: minMaxVector.max, distance: distance }, doNotUpdateMaxZ);
  419. };
  420. ArcRotateCamera.prototype.focusOn = function (meshesOrMinMaxVectorAndDistance, doNotUpdateMaxZ) {
  421. if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
  422. var meshesOrMinMaxVector;
  423. var distance;
  424. if (meshesOrMinMaxVectorAndDistance.min === undefined) {
  425. meshesOrMinMaxVector = meshesOrMinMaxVectorAndDistance || this.getScene().meshes;
  426. meshesOrMinMaxVector = BABYLON.Mesh.MinMax(meshesOrMinMaxVector);
  427. distance = BABYLON.Vector3.Distance(meshesOrMinMaxVector.min, meshesOrMinMaxVector.max);
  428. }
  429. else {
  430. meshesOrMinMaxVector = meshesOrMinMaxVectorAndDistance;
  431. distance = meshesOrMinMaxVectorAndDistance.distance;
  432. }
  433. this.target = BABYLON.Mesh.Center(meshesOrMinMaxVector);
  434. if (!doNotUpdateMaxZ) {
  435. this.maxZ = distance * 2;
  436. }
  437. };
  438. /**
  439. * @override
  440. * Override Camera.createRigCamera
  441. */
  442. ArcRotateCamera.prototype.createRigCamera = function (name, cameraIndex) {
  443. switch (this.cameraRigMode) {
  444. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
  445. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
  446. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
  447. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
  448. case BABYLON.Camera.RIG_MODE_VR:
  449. var alphaShift = this._cameraRigParams.stereoHalfAngle * (cameraIndex === 0 ? 1 : -1);
  450. var rigCam = new ArcRotateCamera(name, this.alpha + alphaShift, this.beta, this.radius, this.target, this.getScene());
  451. rigCam._cameraRigParams = {};
  452. return rigCam;
  453. }
  454. return null;
  455. };
  456. /**
  457. * @override
  458. * Override Camera._updateRigCameras
  459. */
  460. ArcRotateCamera.prototype._updateRigCameras = function () {
  461. switch (this.cameraRigMode) {
  462. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
  463. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
  464. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
  465. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
  466. case BABYLON.Camera.RIG_MODE_VR:
  467. var camLeft = this._rigCameras[0];
  468. var camRight = this._rigCameras[1];
  469. camLeft.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle;
  470. camRight.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle;
  471. camLeft.beta = camRight.beta = this.beta;
  472. camLeft.radius = camRight.radius = this.radius;
  473. break;
  474. }
  475. _super.prototype._updateRigCameras.call(this);
  476. };
  477. ArcRotateCamera.prototype.dispose = function () {
  478. this.inputs.clear();
  479. _super.prototype.dispose.call(this);
  480. };
  481. ArcRotateCamera.prototype.getTypeName = function () {
  482. return "ArcRotateCamera";
  483. };
  484. __decorate([
  485. BABYLON.serialize()
  486. ], ArcRotateCamera.prototype, "alpha", void 0);
  487. __decorate([
  488. BABYLON.serialize()
  489. ], ArcRotateCamera.prototype, "beta", void 0);
  490. __decorate([
  491. BABYLON.serialize()
  492. ], ArcRotateCamera.prototype, "radius", void 0);
  493. __decorate([
  494. BABYLON.serializeAsVector3()
  495. ], ArcRotateCamera.prototype, "target", void 0);
  496. __decorate([
  497. BABYLON.serialize()
  498. ], ArcRotateCamera.prototype, "inertialAlphaOffset", void 0);
  499. __decorate([
  500. BABYLON.serialize()
  501. ], ArcRotateCamera.prototype, "inertialBetaOffset", void 0);
  502. __decorate([
  503. BABYLON.serialize()
  504. ], ArcRotateCamera.prototype, "inertialRadiusOffset", void 0);
  505. __decorate([
  506. BABYLON.serialize()
  507. ], ArcRotateCamera.prototype, "lowerAlphaLimit", void 0);
  508. __decorate([
  509. BABYLON.serialize()
  510. ], ArcRotateCamera.prototype, "upperAlphaLimit", void 0);
  511. __decorate([
  512. BABYLON.serialize()
  513. ], ArcRotateCamera.prototype, "lowerBetaLimit", void 0);
  514. __decorate([
  515. BABYLON.serialize()
  516. ], ArcRotateCamera.prototype, "upperBetaLimit", void 0);
  517. __decorate([
  518. BABYLON.serialize()
  519. ], ArcRotateCamera.prototype, "lowerRadiusLimit", void 0);
  520. __decorate([
  521. BABYLON.serialize()
  522. ], ArcRotateCamera.prototype, "upperRadiusLimit", void 0);
  523. __decorate([
  524. BABYLON.serialize()
  525. ], ArcRotateCamera.prototype, "inertialPanningX", void 0);
  526. __decorate([
  527. BABYLON.serialize()
  528. ], ArcRotateCamera.prototype, "inertialPanningY", void 0);
  529. __decorate([
  530. BABYLON.serialize()
  531. ], ArcRotateCamera.prototype, "zoomOnFactor", void 0);
  532. __decorate([
  533. BABYLON.serialize()
  534. ], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
  535. return ArcRotateCamera;
  536. })(BABYLON.TargetCamera);
  537. BABYLON.ArcRotateCamera = ArcRotateCamera;
  538. })(BABYLON || (BABYLON = {}));