babylon.camera.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. var __extends = 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. __.prototype = b.prototype;
  5. d.prototype = new __();
  6. };
  7. var BABYLON;
  8. (function (BABYLON) {
  9. var VRCameraMetrics = (function () {
  10. function VRCameraMetrics() {
  11. this.compensateDistorsion = true;
  12. }
  13. Object.defineProperty(VRCameraMetrics.prototype, "aspectRatio", {
  14. get: function () {
  15. return this.hResolution / (2 * this.vResolution);
  16. },
  17. enumerable: true,
  18. configurable: true
  19. });
  20. Object.defineProperty(VRCameraMetrics.prototype, "aspectRatioFov", {
  21. get: function () {
  22. return (2 * Math.atan((this.postProcessScaleFactor * this.vScreenSize) / (2 * this.eyeToScreenDistance)));
  23. },
  24. enumerable: true,
  25. configurable: true
  26. });
  27. Object.defineProperty(VRCameraMetrics.prototype, "leftHMatrix", {
  28. get: function () {
  29. var meters = (this.hScreenSize / 4) - (this.lensSeparationDistance / 2);
  30. var h = (4 * meters) / this.hScreenSize;
  31. return BABYLON.Matrix.Translation(h, 0, 0);
  32. },
  33. enumerable: true,
  34. configurable: true
  35. });
  36. Object.defineProperty(VRCameraMetrics.prototype, "rightHMatrix", {
  37. get: function () {
  38. var meters = (this.hScreenSize / 4) - (this.lensSeparationDistance / 2);
  39. var h = (4 * meters) / this.hScreenSize;
  40. return BABYLON.Matrix.Translation(-h, 0, 0);
  41. },
  42. enumerable: true,
  43. configurable: true
  44. });
  45. Object.defineProperty(VRCameraMetrics.prototype, "leftPreViewMatrix", {
  46. get: function () {
  47. return BABYLON.Matrix.Translation(0.5 * this.interpupillaryDistance, 0, 0);
  48. },
  49. enumerable: true,
  50. configurable: true
  51. });
  52. Object.defineProperty(VRCameraMetrics.prototype, "rightPreViewMatrix", {
  53. get: function () {
  54. return BABYLON.Matrix.Translation(-0.5 * this.interpupillaryDistance, 0, 0);
  55. },
  56. enumerable: true,
  57. configurable: true
  58. });
  59. VRCameraMetrics.GetDefault = function () {
  60. var result = new VRCameraMetrics();
  61. result.hResolution = 1280;
  62. result.vResolution = 800;
  63. result.hScreenSize = 0.149759993;
  64. result.vScreenSize = 0.0935999975;
  65. result.vScreenCenter = 0.0467999987, result.eyeToScreenDistance = 0.0410000011;
  66. result.lensSeparationDistance = 0.0635000020;
  67. result.interpupillaryDistance = 0.0640000030;
  68. result.distortionK = [1.0, 0.219999999, 0.239999995, 0.0];
  69. result.chromaAbCorrection = [0.995999992, -0.00400000019, 1.01400006, 0.0];
  70. result.postProcessScaleFactor = 1.714605507808412;
  71. result.lensCenterOffset = 0.151976421;
  72. return result;
  73. };
  74. return VRCameraMetrics;
  75. })();
  76. BABYLON.VRCameraMetrics = VRCameraMetrics;
  77. var Camera = (function (_super) {
  78. __extends(Camera, _super);
  79. function Camera(name, position, scene) {
  80. _super.call(this, name, scene);
  81. this.position = position;
  82. // Members
  83. this.upVector = BABYLON.Vector3.Up();
  84. this.orthoLeft = null;
  85. this.orthoRight = null;
  86. this.orthoBottom = null;
  87. this.orthoTop = null;
  88. this.fov = 0.8;
  89. this.minZ = 1.0;
  90. this.maxZ = 10000.0;
  91. this.inertia = 0.9;
  92. this.mode = Camera.PERSPECTIVE_CAMERA;
  93. this.isIntermediate = false;
  94. this.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0);
  95. this.layerMask = 0x0FFFFFFF;
  96. this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
  97. // Subcamera members
  98. this.subCameras = new Array();
  99. this._subCameraMode = Camera.SUB_CAMERA_MODE_NONE;
  100. // Cache
  101. this._computedViewMatrix = BABYLON.Matrix.Identity();
  102. this._projectionMatrix = new BABYLON.Matrix();
  103. this._postProcesses = new Array();
  104. this._postProcessesTakenIndices = [];
  105. this._activeMeshes = new BABYLON.SmartArray(256);
  106. this._globalPosition = BABYLON.Vector3.Zero();
  107. scene.addCamera(this);
  108. if (!scene.activeCamera) {
  109. scene.activeCamera = this;
  110. }
  111. }
  112. Object.defineProperty(Camera, "PERSPECTIVE_CAMERA", {
  113. get: function () {
  114. return Camera._PERSPECTIVE_CAMERA;
  115. },
  116. enumerable: true,
  117. configurable: true
  118. });
  119. Object.defineProperty(Camera, "ORTHOGRAPHIC_CAMERA", {
  120. get: function () {
  121. return Camera._ORTHOGRAPHIC_CAMERA;
  122. },
  123. enumerable: true,
  124. configurable: true
  125. });
  126. Object.defineProperty(Camera, "FOVMODE_VERTICAL_FIXED", {
  127. get: function () {
  128. return Camera._FOVMODE_VERTICAL_FIXED;
  129. },
  130. enumerable: true,
  131. configurable: true
  132. });
  133. Object.defineProperty(Camera, "FOVMODE_HORIZONTAL_FIXED", {
  134. get: function () {
  135. return Camera._FOVMODE_HORIZONTAL_FIXED;
  136. },
  137. enumerable: true,
  138. configurable: true
  139. });
  140. Object.defineProperty(Camera, "SUB_CAMERA_MODE_NONE", {
  141. get: function () {
  142. return Camera._SUB_CAMERA_MODE_NONE;
  143. },
  144. enumerable: true,
  145. configurable: true
  146. });
  147. Object.defineProperty(Camera, "SUB_CAMERA_MODE_ANAGLYPH", {
  148. get: function () {
  149. return Camera._SUB_CAMERA_MODE_ANAGLYPH;
  150. },
  151. enumerable: true,
  152. configurable: true
  153. });
  154. Object.defineProperty(Camera, "SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM", {
  155. get: function () {
  156. return Camera._SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM;
  157. },
  158. enumerable: true,
  159. configurable: true
  160. });
  161. Object.defineProperty(Camera, "SUB_CAMERA_MODE_VERTICAL_STEREOGRAM", {
  162. get: function () {
  163. return Camera._SUB_CAMERA_MODE_VERTICAL_STEREOGRAM;
  164. },
  165. enumerable: true,
  166. configurable: true
  167. });
  168. Object.defineProperty(Camera, "SUB_CAMERA_MODE_VR", {
  169. get: function () {
  170. return Camera._SUB_CAMERA_MODE_VR;
  171. },
  172. enumerable: true,
  173. configurable: true
  174. });
  175. Object.defineProperty(Camera, "SUB_CAMERAID_A", {
  176. get: function () {
  177. return Camera._SUB_CAMERAID_A;
  178. },
  179. enumerable: true,
  180. configurable: true
  181. });
  182. Object.defineProperty(Camera, "SUB_CAMERAID_B", {
  183. get: function () {
  184. return Camera._SUB_CAMERAID_B;
  185. },
  186. enumerable: true,
  187. configurable: true
  188. });
  189. Object.defineProperty(Camera.prototype, "globalPosition", {
  190. get: function () {
  191. return this._globalPosition;
  192. },
  193. enumerable: true,
  194. configurable: true
  195. });
  196. Camera.prototype.getActiveMeshes = function () {
  197. return this._activeMeshes;
  198. };
  199. Camera.prototype.isActiveMesh = function (mesh) {
  200. return (this._activeMeshes.indexOf(mesh) !== -1);
  201. };
  202. //Cache
  203. Camera.prototype._initCache = function () {
  204. _super.prototype._initCache.call(this);
  205. this._cache.position = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
  206. this._cache.upVector = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
  207. this._cache.mode = undefined;
  208. this._cache.minZ = undefined;
  209. this._cache.maxZ = undefined;
  210. this._cache.fov = undefined;
  211. this._cache.aspectRatio = undefined;
  212. this._cache.orthoLeft = undefined;
  213. this._cache.orthoRight = undefined;
  214. this._cache.orthoBottom = undefined;
  215. this._cache.orthoTop = undefined;
  216. this._cache.renderWidth = undefined;
  217. this._cache.renderHeight = undefined;
  218. };
  219. Camera.prototype._updateCache = function (ignoreParentClass) {
  220. if (!ignoreParentClass) {
  221. _super.prototype._updateCache.call(this);
  222. }
  223. var engine = this.getEngine();
  224. this._cache.position.copyFrom(this.position);
  225. this._cache.upVector.copyFrom(this.upVector);
  226. this._cache.mode = this.mode;
  227. this._cache.minZ = this.minZ;
  228. this._cache.maxZ = this.maxZ;
  229. this._cache.fov = this.fov;
  230. this._cache.aspectRatio = engine.getAspectRatio(this);
  231. this._cache.orthoLeft = this.orthoLeft;
  232. this._cache.orthoRight = this.orthoRight;
  233. this._cache.orthoBottom = this.orthoBottom;
  234. this._cache.orthoTop = this.orthoTop;
  235. this._cache.renderWidth = engine.getRenderWidth();
  236. this._cache.renderHeight = engine.getRenderHeight();
  237. };
  238. Camera.prototype._updateFromScene = function () {
  239. this.updateCache();
  240. this._update();
  241. };
  242. // Synchronized
  243. Camera.prototype._isSynchronized = function () {
  244. return this._isSynchronizedViewMatrix() && this._isSynchronizedProjectionMatrix();
  245. };
  246. Camera.prototype._isSynchronizedViewMatrix = function () {
  247. if (!_super.prototype._isSynchronized.call(this))
  248. return false;
  249. return this._cache.position.equals(this.position) && this._cache.upVector.equals(this.upVector) && this.isSynchronizedWithParent();
  250. };
  251. Camera.prototype._isSynchronizedProjectionMatrix = function () {
  252. var check = this._cache.mode === this.mode && this._cache.minZ === this.minZ && this._cache.maxZ === this.maxZ;
  253. if (!check) {
  254. return false;
  255. }
  256. var engine = this.getEngine();
  257. if (this.mode === Camera.PERSPECTIVE_CAMERA) {
  258. check = this._cache.fov === this.fov && this._cache.aspectRatio === engine.getAspectRatio(this);
  259. }
  260. else {
  261. check = this._cache.orthoLeft === this.orthoLeft && this._cache.orthoRight === this.orthoRight && this._cache.orthoBottom === this.orthoBottom && this._cache.orthoTop === this.orthoTop && this._cache.renderWidth === engine.getRenderWidth() && this._cache.renderHeight === engine.getRenderHeight();
  262. }
  263. return check;
  264. };
  265. // Controls
  266. Camera.prototype.attachControl = function (element) {
  267. };
  268. Camera.prototype.detachControl = function (element) {
  269. };
  270. Camera.prototype._update = function () {
  271. this._checkInputs();
  272. if (this._subCameraMode !== Camera.SUB_CAMERA_MODE_NONE) {
  273. this._updateSubCameras();
  274. }
  275. };
  276. Camera.prototype._checkInputs = function () {
  277. };
  278. Camera.prototype.attachPostProcess = function (postProcess, insertAt) {
  279. if (insertAt === void 0) { insertAt = null; }
  280. if (!postProcess.isReusable() && this._postProcesses.indexOf(postProcess) > -1) {
  281. BABYLON.Tools.Error("You're trying to reuse a post process not defined as reusable.");
  282. return 0;
  283. }
  284. if (insertAt == null || insertAt < 0) {
  285. this._postProcesses.push(postProcess);
  286. this._postProcessesTakenIndices.push(this._postProcesses.length - 1);
  287. return this._postProcesses.length - 1;
  288. }
  289. var add = 0;
  290. if (this._postProcesses[insertAt]) {
  291. var start = this._postProcesses.length - 1;
  292. for (var i = start; i >= insertAt + 1; --i) {
  293. this._postProcesses[i + 1] = this._postProcesses[i];
  294. }
  295. add = 1;
  296. }
  297. for (i = 0; i < this._postProcessesTakenIndices.length; ++i) {
  298. if (this._postProcessesTakenIndices[i] < insertAt) {
  299. continue;
  300. }
  301. start = this._postProcessesTakenIndices.length - 1;
  302. for (var j = start; j >= i; --j) {
  303. this._postProcessesTakenIndices[j + 1] = this._postProcessesTakenIndices[j] + add;
  304. }
  305. this._postProcessesTakenIndices[i] = insertAt;
  306. break;
  307. }
  308. if (!add && this._postProcessesTakenIndices.indexOf(insertAt) == -1) {
  309. this._postProcessesTakenIndices.push(insertAt);
  310. }
  311. var result = insertAt + add;
  312. this._postProcesses[result] = postProcess;
  313. return result;
  314. };
  315. Camera.prototype.detachPostProcess = function (postProcess, atIndices) {
  316. if (atIndices === void 0) { atIndices = null; }
  317. var result = [];
  318. if (!atIndices) {
  319. var length = this._postProcesses.length;
  320. for (var i = 0; i < length; i++) {
  321. if (this._postProcesses[i] !== postProcess) {
  322. continue;
  323. }
  324. delete this._postProcesses[i];
  325. var index = this._postProcessesTakenIndices.indexOf(i);
  326. this._postProcessesTakenIndices.splice(index, 1);
  327. }
  328. }
  329. else {
  330. atIndices = (atIndices instanceof Array) ? atIndices : [atIndices];
  331. for (i = 0; i < atIndices.length; i++) {
  332. var foundPostProcess = this._postProcesses[atIndices[i]];
  333. if (foundPostProcess !== postProcess) {
  334. result.push(i);
  335. continue;
  336. }
  337. delete this._postProcesses[atIndices[i]];
  338. index = this._postProcessesTakenIndices.indexOf(atIndices[i]);
  339. this._postProcessesTakenIndices.splice(index, 1);
  340. }
  341. }
  342. return result;
  343. };
  344. Camera.prototype.getWorldMatrix = function () {
  345. if (!this._worldMatrix) {
  346. this._worldMatrix = BABYLON.Matrix.Identity();
  347. }
  348. var viewMatrix = this.getViewMatrix();
  349. viewMatrix.invertToRef(this._worldMatrix);
  350. return this._worldMatrix;
  351. };
  352. Camera.prototype._getViewMatrix = function () {
  353. return BABYLON.Matrix.Identity();
  354. };
  355. Camera.prototype.getViewMatrix = function (force) {
  356. this._computedViewMatrix = this._computeViewMatrix(force);
  357. if (!force && this._isSynchronizedViewMatrix()) {
  358. return this._computedViewMatrix;
  359. }
  360. if (!this.parent || !this.parent.getWorldMatrix) {
  361. this._globalPosition.copyFrom(this.position);
  362. }
  363. else {
  364. if (!this._worldMatrix) {
  365. this._worldMatrix = BABYLON.Matrix.Identity();
  366. }
  367. this._computedViewMatrix.invertToRef(this._worldMatrix);
  368. this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(), this._computedViewMatrix);
  369. this._globalPosition.copyFromFloats(this._computedViewMatrix.m[12], this._computedViewMatrix.m[13], this._computedViewMatrix.m[14]);
  370. this._computedViewMatrix.invert();
  371. this._markSyncedWithParent();
  372. }
  373. this._currentRenderId = this.getScene().getRenderId();
  374. return this._computedViewMatrix;
  375. };
  376. Camera.prototype._computeViewMatrix = function (force) {
  377. if (!force && this._isSynchronizedViewMatrix()) {
  378. return this._computedViewMatrix;
  379. }
  380. this._computedViewMatrix = this._getViewMatrix();
  381. this._currentRenderId = this.getScene().getRenderId();
  382. return this._computedViewMatrix;
  383. };
  384. Camera.prototype.getProjectionMatrix = function (force) {
  385. if (!force && this._isSynchronizedProjectionMatrix()) {
  386. return this._projectionMatrix;
  387. }
  388. var engine = this.getEngine();
  389. if (this.mode === Camera.PERSPECTIVE_CAMERA) {
  390. if (this.minZ <= 0) {
  391. this.minZ = 0.1;
  392. }
  393. BABYLON.Matrix.PerspectiveFovLHToRef(this.fov, engine.getAspectRatio(this), this.minZ, this.maxZ, this._projectionMatrix, this.fovMode);
  394. return this._projectionMatrix;
  395. }
  396. var halfWidth = engine.getRenderWidth() / 2.0;
  397. var halfHeight = engine.getRenderHeight() / 2.0;
  398. BABYLON.Matrix.OrthoOffCenterLHToRef(this.orthoLeft || -halfWidth, this.orthoRight || halfWidth, this.orthoBottom || -halfHeight, this.orthoTop || halfHeight, this.minZ, this.maxZ, this._projectionMatrix);
  399. return this._projectionMatrix;
  400. };
  401. Camera.prototype.dispose = function () {
  402. // Remove from scene
  403. this.getScene().removeCamera(this);
  404. while (this.subCameras.length > 0) {
  405. this.subCameras.pop().dispose();
  406. }
  407. for (var i = 0; i < this._postProcessesTakenIndices.length; ++i) {
  408. this._postProcesses[this._postProcessesTakenIndices[i]].dispose(this);
  409. }
  410. };
  411. // ---- 3D cameras section ----
  412. Camera.prototype.setSubCameraMode = function (mode, halfSpace, metrics) {
  413. if (halfSpace === void 0) { halfSpace = 0; }
  414. while (this.subCameras.length > 0) {
  415. this.subCameras.pop().dispose();
  416. }
  417. this._subCameraMode = mode;
  418. this._subCamHalfSpace = BABYLON.Tools.ToRadians(halfSpace);
  419. var camA = this.getSubCamera(this.name + "_A", true);
  420. var camB = this.getSubCamera(this.name + "_B", false);
  421. var postProcessA;
  422. var postProcessB;
  423. switch (this._subCameraMode) {
  424. case Camera.SUB_CAMERA_MODE_ANAGLYPH:
  425. postProcessA = new BABYLON.PassPostProcess(this.name + "_leftTexture", 1.0, camA);
  426. camA.isIntermediate = true;
  427. postProcessB = new BABYLON.AnaglyphPostProcess(this.name + "_anaglyph", 1.0, camB);
  428. postProcessB.onApply = function (effect) {
  429. effect.setTextureFromPostProcess("leftSampler", postProcessA);
  430. };
  431. break;
  432. case Camera.SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM:
  433. case Camera.SUB_CAMERA_MODE_VERTICAL_STEREOGRAM:
  434. var isStereogramHoriz = this._subCameraMode === Camera.SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM;
  435. postProcessA = new BABYLON.PassPostProcess("passthru", 1.0, camA);
  436. camA.isIntermediate = true;
  437. postProcessB = new BABYLON.StereogramInterlacePostProcess("st_interlace", camB, postProcessA, isStereogramHoriz);
  438. break;
  439. case Camera.SUB_CAMERA_MODE_VR:
  440. metrics = metrics || VRCameraMetrics.GetDefault();
  441. ;
  442. camA._vrMetrics = metrics;
  443. camA.viewport = new BABYLON.Viewport(0, 0, 0.5, 1.0);
  444. camA._vrWorkMatrix = new BABYLON.Matrix();
  445. camA._vrHMatrix = metrics.leftHMatrix;
  446. camA._vrPreViewMatrix = metrics.leftPreViewMatrix;
  447. camA.getProjectionMatrix = camA._getVRProjectionMatrix;
  448. if (metrics.compensateDistorsion) {
  449. postProcessA = new BABYLON.VRDistortionCorrectionPostProcess("Distortion Compensation Left", camA, false, metrics);
  450. }
  451. camB._vrMetrics = camA._vrMetrics;
  452. camB.viewport = new BABYLON.Viewport(0.5, 0, 0.5, 1.0);
  453. camB._vrWorkMatrix = new BABYLON.Matrix();
  454. camB._vrHMatrix = metrics.rightHMatrix;
  455. camB._vrPreViewMatrix = metrics.rightPreViewMatrix;
  456. camB.getProjectionMatrix = camB._getVRProjectionMatrix;
  457. if (metrics.compensateDistorsion) {
  458. postProcessB = new BABYLON.VRDistortionCorrectionPostProcess("Distortion Compensation Right", camB, true, metrics);
  459. }
  460. }
  461. if (this._subCameraMode !== Camera.SUB_CAMERA_MODE_NONE) {
  462. this.subCameras.push(camA);
  463. this.subCameras.push(camB);
  464. }
  465. this._update();
  466. };
  467. Camera.prototype._getVRProjectionMatrix = function () {
  468. BABYLON.Matrix.PerspectiveFovLHToRef(this._vrMetrics.aspectRatioFov, this._vrMetrics.aspectRatio, this.minZ, this.maxZ, this._vrWorkMatrix);
  469. this._vrWorkMatrix.multiplyToRef(this._vrHMatrix, this._projectionMatrix);
  470. return this._projectionMatrix;
  471. };
  472. Camera.prototype.setSubCamHalfSpace = function (halfSpace) {
  473. this._subCamHalfSpace = BABYLON.Tools.ToRadians(halfSpace);
  474. };
  475. /**
  476. * May needs to be overridden by children so sub has required properties to be copied
  477. */
  478. Camera.prototype.getSubCamera = function (name, isA) {
  479. return null;
  480. };
  481. /**
  482. * May needs to be overridden by children
  483. */
  484. Camera.prototype._updateSubCameras = function () {
  485. var camA = this.subCameras[Camera.SUB_CAMERAID_A];
  486. var camB = this.subCameras[Camera.SUB_CAMERAID_B];
  487. camA.minZ = camB.minZ = this.minZ;
  488. camA.maxZ = camB.maxZ = this.maxZ;
  489. camA.fov = camB.fov = this.fov;
  490. // only update viewport, when ANAGLYPH
  491. if (this._subCameraMode === Camera.SUB_CAMERA_MODE_ANAGLYPH) {
  492. camA.viewport = camB.viewport = this.viewport;
  493. }
  494. };
  495. // Statics
  496. Camera._PERSPECTIVE_CAMERA = 0;
  497. Camera._ORTHOGRAPHIC_CAMERA = 1;
  498. Camera._FOVMODE_VERTICAL_FIXED = 0;
  499. Camera._FOVMODE_HORIZONTAL_FIXED = 1;
  500. Camera._SUB_CAMERA_MODE_NONE = 0;
  501. Camera._SUB_CAMERA_MODE_ANAGLYPH = 1;
  502. Camera._SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM = 2;
  503. Camera._SUB_CAMERA_MODE_VERTICAL_STEREOGRAM = 3;
  504. Camera._SUB_CAMERA_MODE_VR = 4;
  505. Camera._SUB_CAMERAID_A = 0;
  506. Camera._SUB_CAMERAID_B = 1;
  507. return Camera;
  508. })(BABYLON.Node);
  509. BABYLON.Camera = Camera;
  510. })(BABYLON || (BABYLON = {}));
  511. //# sourceMappingURL=babylon.camera.js.map