babylon.arcRotateCamera.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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, panningMouseButton) {
  259. var _this = this;
  260. if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
  261. if (panningMouseButton === void 0) { panningMouseButton = 2; }
  262. this._useCtrlForPanning = useCtrlForPanning;
  263. this._panningMouseButton = panningMouseButton;
  264. this.inputs.attachElement(element, noPreventDefault);
  265. this._reset = function () {
  266. _this.inertialAlphaOffset = 0;
  267. _this.inertialBetaOffset = 0;
  268. _this.inertialRadiusOffset = 0;
  269. };
  270. };
  271. ArcRotateCamera.prototype.detachControl = function (element) {
  272. this.inputs.detachElement(element);
  273. if (this._reset) {
  274. this._reset();
  275. }
  276. };
  277. ArcRotateCamera.prototype._checkInputs = function () {
  278. //if (async) collision inspection was triggered, don't update the camera's position - until the collision callback was called.
  279. if (this._collisionTriggered) {
  280. return;
  281. }
  282. this.inputs.checkInputs();
  283. // Inertia
  284. if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) {
  285. this.beta += this.inertialBetaOffset;
  286. if (this.getScene().useRightHandedSystem) {
  287. this.alpha -= this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
  288. }
  289. else {
  290. this.alpha += this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset;
  291. }
  292. this.radius -= this.inertialRadiusOffset;
  293. this.inertialAlphaOffset *= this.inertia;
  294. this.inertialBetaOffset *= this.inertia;
  295. this.inertialRadiusOffset *= this.inertia;
  296. if (Math.abs(this.inertialAlphaOffset) < BABYLON.Epsilon)
  297. this.inertialAlphaOffset = 0;
  298. if (Math.abs(this.inertialBetaOffset) < BABYLON.Epsilon)
  299. this.inertialBetaOffset = 0;
  300. if (Math.abs(this.inertialRadiusOffset) < BABYLON.Epsilon)
  301. this.inertialRadiusOffset = 0;
  302. }
  303. // Panning inertia
  304. if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) {
  305. if (!this._localDirection) {
  306. this._localDirection = BABYLON.Vector3.Zero();
  307. this._transformedDirection = BABYLON.Vector3.Zero();
  308. }
  309. this.inertialPanningX *= this.inertia;
  310. this.inertialPanningY *= this.inertia;
  311. if (Math.abs(this.inertialPanningX) < BABYLON.Epsilon)
  312. this.inertialPanningX = 0;
  313. if (Math.abs(this.inertialPanningY) < BABYLON.Epsilon)
  314. this.inertialPanningY = 0;
  315. this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY);
  316. this._localDirection.multiplyInPlace(this.panningAxis);
  317. this._viewMatrix.invertToRef(this._cameraTransformMatrix);
  318. BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection);
  319. //Eliminate y if map panning is enabled (panningAxis == 1,0,1)
  320. if (!this.panningAxis.y) {
  321. this._transformedDirection.y = 0;
  322. }
  323. if (!this.target.getAbsolutePosition) {
  324. this.target.addInPlace(this._transformedDirection);
  325. }
  326. }
  327. // Limits
  328. this._checkLimits();
  329. _super.prototype._checkInputs.call(this);
  330. };
  331. ArcRotateCamera.prototype._checkLimits = function () {
  332. if (this.lowerBetaLimit === null || this.lowerBetaLimit === undefined) {
  333. if (this.allowUpsideDown && this.beta > Math.PI) {
  334. this.beta = this.beta - (2 * Math.PI);
  335. }
  336. }
  337. else {
  338. if (this.beta < this.lowerBetaLimit) {
  339. this.beta = this.lowerBetaLimit;
  340. }
  341. }
  342. if (this.upperBetaLimit === null || this.upperBetaLimit === undefined) {
  343. if (this.allowUpsideDown && this.beta < -Math.PI) {
  344. this.beta = this.beta + (2 * Math.PI);
  345. }
  346. }
  347. else {
  348. if (this.beta > this.upperBetaLimit) {
  349. this.beta = this.upperBetaLimit;
  350. }
  351. }
  352. if (this.lowerAlphaLimit && this.alpha < this.lowerAlphaLimit) {
  353. this.alpha = this.lowerAlphaLimit;
  354. }
  355. if (this.upperAlphaLimit && this.alpha > this.upperAlphaLimit) {
  356. this.alpha = this.upperAlphaLimit;
  357. }
  358. if (this.lowerRadiusLimit && this.radius < this.lowerRadiusLimit) {
  359. this.radius = this.lowerRadiusLimit;
  360. }
  361. if (this.upperRadiusLimit && this.radius > this.upperRadiusLimit) {
  362. this.radius = this.upperRadiusLimit;
  363. }
  364. };
  365. ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
  366. var radiusv3 = this.position.subtract(this._getTargetPosition());
  367. this.radius = radiusv3.length();
  368. // Alpha
  369. this.alpha = Math.acos(radiusv3.x / Math.sqrt(Math.pow(radiusv3.x, 2) + Math.pow(radiusv3.z, 2)));
  370. if (radiusv3.z < 0) {
  371. this.alpha = 2 * Math.PI - this.alpha;
  372. }
  373. // Beta
  374. this.beta = Math.acos(radiusv3.y / this.radius);
  375. this._checkLimits();
  376. };
  377. ArcRotateCamera.prototype.setPosition = function (position) {
  378. if (this.position.equals(position)) {
  379. return;
  380. }
  381. this.position.copyFrom(position);
  382. this.rebuildAnglesAndRadius();
  383. };
  384. ArcRotateCamera.prototype.setTarget = function (target) {
  385. if (this._getTargetPosition().equals(target)) {
  386. return;
  387. }
  388. this.target = target;
  389. this.rebuildAnglesAndRadius();
  390. };
  391. ArcRotateCamera.prototype._getViewMatrix = function () {
  392. // Compute
  393. var cosa = Math.cos(this.alpha);
  394. var sina = Math.sin(this.alpha);
  395. var cosb = Math.cos(this.beta);
  396. var sinb = Math.sin(this.beta);
  397. if (sinb === 0) {
  398. sinb = 0.0001;
  399. }
  400. var target = this._getTargetPosition();
  401. target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
  402. if (this.getScene().collisionsEnabled && this.checkCollisions) {
  403. this._collider.radius = this.collisionRadius;
  404. this._newPosition.subtractToRef(this.position, this._collisionVelocity);
  405. this._collisionTriggered = true;
  406. this.getScene().collisionCoordinator.getNewPosition(this.position, this._collisionVelocity, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId);
  407. }
  408. else {
  409. this.position.copyFrom(this._newPosition);
  410. var up = this.upVector;
  411. if (this.allowUpsideDown && this.beta < 0) {
  412. up = up.clone();
  413. up = up.negate();
  414. }
  415. if (this.getScene().useRightHandedSystem) {
  416. BABYLON.Matrix.LookAtRHToRef(this.position, target, up, this._viewMatrix);
  417. }
  418. else {
  419. BABYLON.Matrix.LookAtLHToRef(this.position, target, up, this._viewMatrix);
  420. }
  421. this._viewMatrix.m[12] += this.targetScreenOffset.x;
  422. this._viewMatrix.m[13] += this.targetScreenOffset.y;
  423. }
  424. return this._viewMatrix;
  425. };
  426. ArcRotateCamera.prototype.zoomOn = function (meshes, doNotUpdateMaxZ) {
  427. if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
  428. meshes = meshes || this.getScene().meshes;
  429. var minMaxVector = BABYLON.Mesh.MinMax(meshes);
  430. var distance = BABYLON.Vector3.Distance(minMaxVector.min, minMaxVector.max);
  431. this.radius = distance * this.zoomOnFactor;
  432. this.focusOn({ min: minMaxVector.min, max: minMaxVector.max, distance: distance }, doNotUpdateMaxZ);
  433. };
  434. ArcRotateCamera.prototype.focusOn = function (meshesOrMinMaxVectorAndDistance, doNotUpdateMaxZ) {
  435. if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
  436. var meshesOrMinMaxVector;
  437. var distance;
  438. if (meshesOrMinMaxVectorAndDistance.min === undefined) {
  439. meshesOrMinMaxVector = meshesOrMinMaxVectorAndDistance || this.getScene().meshes;
  440. meshesOrMinMaxVector = BABYLON.Mesh.MinMax(meshesOrMinMaxVector);
  441. distance = BABYLON.Vector3.Distance(meshesOrMinMaxVector.min, meshesOrMinMaxVector.max);
  442. }
  443. else {
  444. meshesOrMinMaxVector = meshesOrMinMaxVectorAndDistance;
  445. distance = meshesOrMinMaxVectorAndDistance.distance;
  446. }
  447. this.target = BABYLON.Mesh.Center(meshesOrMinMaxVector);
  448. if (!doNotUpdateMaxZ) {
  449. this.maxZ = distance * 2;
  450. }
  451. };
  452. /**
  453. * @override
  454. * Override Camera.createRigCamera
  455. */
  456. ArcRotateCamera.prototype.createRigCamera = function (name, cameraIndex) {
  457. var alphaShift;
  458. switch (this.cameraRigMode) {
  459. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
  460. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
  461. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
  462. case BABYLON.Camera.RIG_MODE_VR:
  463. alphaShift = this._cameraRigParams.stereoHalfAngle * (cameraIndex === 0 ? 1 : -1);
  464. break;
  465. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
  466. alphaShift = this._cameraRigParams.stereoHalfAngle * (cameraIndex === 0 ? -1 : 1);
  467. break;
  468. }
  469. var rigCam = new ArcRotateCamera(name, this.alpha + alphaShift, this.beta, this.radius, this.target, this.getScene());
  470. rigCam._cameraRigParams = {};
  471. return rigCam;
  472. };
  473. /**
  474. * @override
  475. * Override Camera._updateRigCameras
  476. */
  477. ArcRotateCamera.prototype._updateRigCameras = function () {
  478. var camLeft = this._rigCameras[0];
  479. var camRight = this._rigCameras[1];
  480. camLeft.beta = camRight.beta = this.beta;
  481. camLeft.radius = camRight.radius = this.radius;
  482. switch (this.cameraRigMode) {
  483. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
  484. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
  485. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
  486. case BABYLON.Camera.RIG_MODE_VR:
  487. camLeft.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle;
  488. camRight.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle;
  489. break;
  490. case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
  491. camLeft.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle;
  492. camRight.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle;
  493. break;
  494. }
  495. _super.prototype._updateRigCameras.call(this);
  496. };
  497. ArcRotateCamera.prototype.dispose = function () {
  498. this.inputs.clear();
  499. _super.prototype.dispose.call(this);
  500. };
  501. ArcRotateCamera.prototype.getTypeName = function () {
  502. return "ArcRotateCamera";
  503. };
  504. __decorate([
  505. BABYLON.serialize()
  506. ], ArcRotateCamera.prototype, "alpha", void 0);
  507. __decorate([
  508. BABYLON.serialize()
  509. ], ArcRotateCamera.prototype, "beta", void 0);
  510. __decorate([
  511. BABYLON.serialize()
  512. ], ArcRotateCamera.prototype, "radius", void 0);
  513. __decorate([
  514. BABYLON.serializeAsVector3()
  515. ], ArcRotateCamera.prototype, "target", void 0);
  516. __decorate([
  517. BABYLON.serialize()
  518. ], ArcRotateCamera.prototype, "inertialAlphaOffset", void 0);
  519. __decorate([
  520. BABYLON.serialize()
  521. ], ArcRotateCamera.prototype, "inertialBetaOffset", void 0);
  522. __decorate([
  523. BABYLON.serialize()
  524. ], ArcRotateCamera.prototype, "inertialRadiusOffset", void 0);
  525. __decorate([
  526. BABYLON.serialize()
  527. ], ArcRotateCamera.prototype, "lowerAlphaLimit", void 0);
  528. __decorate([
  529. BABYLON.serialize()
  530. ], ArcRotateCamera.prototype, "upperAlphaLimit", void 0);
  531. __decorate([
  532. BABYLON.serialize()
  533. ], ArcRotateCamera.prototype, "lowerBetaLimit", void 0);
  534. __decorate([
  535. BABYLON.serialize()
  536. ], ArcRotateCamera.prototype, "upperBetaLimit", void 0);
  537. __decorate([
  538. BABYLON.serialize()
  539. ], ArcRotateCamera.prototype, "lowerRadiusLimit", void 0);
  540. __decorate([
  541. BABYLON.serialize()
  542. ], ArcRotateCamera.prototype, "upperRadiusLimit", void 0);
  543. __decorate([
  544. BABYLON.serialize()
  545. ], ArcRotateCamera.prototype, "inertialPanningX", void 0);
  546. __decorate([
  547. BABYLON.serialize()
  548. ], ArcRotateCamera.prototype, "inertialPanningY", void 0);
  549. __decorate([
  550. BABYLON.serialize()
  551. ], ArcRotateCamera.prototype, "zoomOnFactor", void 0);
  552. __decorate([
  553. BABYLON.serialize()
  554. ], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
  555. return ArcRotateCamera;
  556. })(BABYLON.TargetCamera);
  557. BABYLON.ArcRotateCamera = ArcRotateCamera;
  558. })(BABYLON || (BABYLON = {}));