David Catuhe 10 年之前
父节点
当前提交
435added1a
共有 80 个文件被更改,包括 38514 次插入649 次删除
  1. 220 194
      babylon.2.1-rc.debug.js
  2. 29 0
      2.2/babylon.2.2-alpha.js
  3. 28 0
      2.2/babylon.2.2-alpha.noworker.js
  4. 5854 0
      2.2/babylon.2.2.d.ts
  5. 1 1
      Babylon/Actions/babylon.condition.js
  6. 1 1
      Babylon/Actions/babylon.directActions.js
  7. 1 1
      Babylon/Actions/babylon.interpolateValueAction.js
  8. 1 1
      Babylon/Animations/babylon.easing.js
  9. 2 2
      Babylon/Cameras/VR/babylon.vrDeviceOrientationCamera.js
  10. 2 2
      Babylon/Cameras/VR/babylon.webVRCamera.js
  11. 29 14
      Babylon/Cameras/babylon.arcRotateCamera.js
  12. 99 92
      Babylon/Cameras/babylon.camera.js
  13. 1 13
      Babylon/Cameras/babylon.camera.ts
  14. 1 1
      Babylon/Cameras/babylon.deviceOrientationCamera.js
  15. 1 1
      Babylon/Cameras/babylon.followCamera.js
  16. 1 1
      Babylon/Cameras/babylon.freeCamera.js
  17. 1 1
      Babylon/Cameras/babylon.gamepadCamera.js
  18. 64 0
      Babylon/Cameras/babylon.stereoscopicCameras.js
  19. 47 35
      Babylon/Cameras/babylon.targetCamera.js
  20. 1 1
      Babylon/Cameras/babylon.touchCamera.js
  21. 1 1
      Babylon/Cameras/babylon.virtualJoysticksCamera.js
  22. 1 1
      Babylon/Lights/babylon.directionalLight.js
  23. 1 1
      Babylon/Lights/babylon.hemisphericLight.js
  24. 1 1
      Babylon/Lights/babylon.light.js
  25. 1 1
      Babylon/Lights/babylon.pointLight.js
  26. 1 1
      Babylon/Lights/babylon.spotLight.js
  27. 4 4
      Babylon/Loading/Plugins/babylon.babylonFileLoader.js
  28. 1 1
      Babylon/Materials/Textures/Procedurals/babylon.customProceduralTexture.js
  29. 1 1
      Babylon/Materials/Textures/Procedurals/babylon.proceduralTexture.js
  30. 1 1
      Babylon/Materials/Textures/Procedurals/babylon.standardProceduralTexture.js
  31. 1 1
      Babylon/Materials/Textures/babylon.cubeTexture.js
  32. 1 1
      Babylon/Materials/Textures/babylon.dynamicTexture.js
  33. 1 1
      Babylon/Materials/Textures/babylon.mirrorTexture.js
  34. 1 1
      Babylon/Materials/Textures/babylon.rawTexture.js
  35. 1 1
      Babylon/Materials/Textures/babylon.renderTargetTexture.js
  36. 1 1
      Babylon/Materials/Textures/babylon.texture.js
  37. 1 1
      Babylon/Materials/Textures/babylon.videoTexture.js
  38. 1 1
      Babylon/Materials/babylon.multiMaterial.js
  39. 1 1
      Babylon/Materials/babylon.shaderMaterial.js
  40. 1 1
      Babylon/Materials/babylon.standardMaterial.js
  41. 0 3
      Babylon/Math/babylon.math.js
  42. 0 4
      Babylon/Math/babylon.math.ts
  43. 4 1
      Babylon/Mesh/babylon.abstractMesh.js
  44. 1 1
      Babylon/Mesh/babylon.geometry.js
  45. 1 1
      Babylon/Mesh/babylon.groundMesh.js
  46. 1 1
      Babylon/Mesh/babylon.instancedMesh.js
  47. 1 1
      Babylon/Mesh/babylon.linesMesh.js
  48. 1 1
      Babylon/Mesh/babylon.mesh.js
  49. 1 1
      Babylon/Mesh/babylon.polygonmesh.js
  50. 1 1
      Babylon/PostProcess/babylon.anaglyphPostProcess.js
  51. 1 1
      Babylon/PostProcess/babylon.blackAndWhitePostProcess.js
  52. 1 1
      Babylon/PostProcess/babylon.blurPostProcess.js
  53. 1 1
      Babylon/PostProcess/babylon.colorCorrectionPostProcess.js
  54. 1 1
      Babylon/PostProcess/babylon.convolutionPostProcess.js
  55. 1 1
      Babylon/PostProcess/babylon.displayPassPostProcess.js
  56. 1 1
      Babylon/PostProcess/babylon.filterPostProcess.js
  57. 1 1
      Babylon/PostProcess/babylon.fxaaPostProcess.js
  58. 1 1
      Babylon/PostProcess/babylon.lensRenderingPipeline.js
  59. 1 1
      Babylon/PostProcess/babylon.passPostProcess.js
  60. 1 1
      Babylon/PostProcess/babylon.refractionPostProcess.js
  61. 1 1
      Babylon/PostProcess/babylon.ssaoRenderingPipeline.js
  62. 1 1
      Babylon/PostProcess/babylon.stereoscopicInterlacePostProcess.js
  63. 1 1
      Babylon/PostProcess/babylon.volumetricLightScatteringPostProcess.js
  64. 1 1
      Babylon/PostProcess/babylon.vrDistortionCorrectionPostProcess.js
  65. 1 1
      Babylon/Tools/babylon.gamepads.js
  66. 1 1
      Babylon/Tools/babylon.sceneOptimizer.js
  67. 2 2
      Babylon/Tools/babylon.sceneSerializer.js
  68. 4 4
      Babylon/babylon.scene.js
  69. 0 0
      Previous releases/babylon.2.0.d.ts
  70. 0 0
      Previous releases/babylon.2.0.debug.js
  71. 0 0
      Previous releases/babylon.2.0.js
  72. 0 28
      babylon.2.1-rc.js
  73. 0 27
      babylon.2.1-rc.noworker.js
  74. 116 71
      babylon.2.1.d.ts
  75. 31831 0
      babylon.2.1.debug.js
  76. 29 0
      babylon.2.1.js
  77. 28 0
      babylon.2.1.noworker.js
  78. 0 33
      documentation v2.0 - wish list.md
  79. 0 69
      what's new - 2.1 - proposal.md
  80. 70 0
      what's new.md

文件差异内容过多而无法显示
+ 220 - 194
babylon.2.1-rc.debug.js


文件差异内容过多而无法显示
+ 29 - 0
2.2/babylon.2.2-alpha.js


文件差异内容过多而无法显示
+ 28 - 0
2.2/babylon.2.2-alpha.noworker.js


文件差异内容过多而无法显示
+ 5854 - 0
2.2/babylon.2.2.d.ts


+ 1 - 1
Babylon/Actions/babylon.condition.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Actions/babylon.directActions.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Actions/babylon.interpolateValueAction.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Animations/babylon.easing.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 2 - 2
Babylon/Cameras/VR/babylon.vrDeviceOrientationCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -16,7 +16,7 @@ var BABYLON;
             this._gamma = 0;
             var metrics = BABYLON.VRCameraMetrics.GetDefault();
             metrics.compensateDistorsion = compensateDistorsion;
-            this.setSubCameraMode(BABYLON.Camera.SUB_CAMERA_MODE_VR, 0, metrics);
+            this.setCameraRigMode(BABYLON.Camera.RIG_MODE_VR, { vrCameraMetrics: metrics });
             this._deviceOrientationHandler = this._onOrientationEvent.bind(this);
         }
         VRDeviceOrientationFreeCamera.prototype._onOrientationEvent = function (evt) {

+ 2 - 2
Babylon/Cameras/VR/babylon.webVRCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -19,7 +19,7 @@ var BABYLON;
             this._vrEnabled = false;
             var metrics = BABYLON.VRCameraMetrics.GetDefault();
             metrics.compensateDistorsion = compensateDistorsion;
-            this.setSubCameraMode(BABYLON.Camera.SUB_CAMERA_MODE_VR, 0, metrics);
+            this.setCameraRigMode(BABYLON.Camera.RIG_MODE_VR, { vrCameraMetrics: metrics });
             this._getWebVRDevices = this._getWebVRDevices.bind(this);
         }
         WebVRFreeCamera.prototype._getWebVRDevices = function (devices) {

+ 29 - 14
Babylon/Cameras/babylon.arcRotateCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -448,24 +448,39 @@ var BABYLON;
         };
         /**
          * @override
-         * needs to be overridden, so sub has required properties to be copied
+         * Override Camera.createRigCamera
          */
-        ArcRotateCamera.prototype.getSubCamera = function (name, isA) {
-            var alphaSpace = this._subCamHalfSpace * (isA ? -1 : 1);
-            return new ArcRotateCamera(name, this.alpha + alphaSpace, this.beta, this.radius, this.target, this.getScene());
+        ArcRotateCamera.prototype.createRigCamera = function (name, cameraIndex) {
+            switch (this.cameraRigMode) {
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
+                case BABYLON.Camera.RIG_MODE_VR:
+                    var alphaShift = this._cameraRigParams.stereoHalfAngle * (cameraIndex === 0 ? 1 : -1);
+                    return new ArcRotateCamera(name, this.alpha + alphaShift, this.beta, this.radius, this.target, this.getScene());
+            }
         };
         /**
          * @override
-         * needs to be overridden, adding copy of alpha, beta & radius
+         * Override Camera._updateRigCameras
          */
-        ArcRotateCamera.prototype._updateSubCameras = function () {
-            var camA = this.subCameras[BABYLON.Camera.SUB_CAMERAID_A];
-            var camB = this.subCameras[BABYLON.Camera.SUB_CAMERAID_B];
-            camA.alpha = this.alpha - this._subCamHalfSpace;
-            camB.alpha = this.alpha + this._subCamHalfSpace;
-            camA.beta = camB.beta = this.beta;
-            camA.radius = camB.radius = this.radius;
-            _super.prototype._updateSubCameras.call(this);
+        ArcRotateCamera.prototype._updateRigCameras = function () {
+            switch (this.cameraRigMode) {
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
+                case BABYLON.Camera.RIG_MODE_VR:
+                    var camLeft = this._rigCameras[0];
+                    var camRight = this._rigCameras[1];
+                    camLeft.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle;
+                    camRight.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle;
+                    camLeft.beta = camRight.beta = this.beta;
+                    camLeft.radius = camRight.radius = this.radius;
+                    break;
+            }
+            _super.prototype._updateRigCameras.call(this);
         };
         return ArcRotateCamera;
     })(BABYLON.Camera);

+ 99 - 92
Babylon/Cameras/babylon.camera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -95,9 +95,9 @@ var BABYLON;
             this.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0);
             this.layerMask = 0x0FFFFFFF;
             this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
-            // Subcamera members
-            this.subCameras = new Array();
-            this._subCameraMode = Camera.SUB_CAMERA_MODE_NONE;
+            // Camera rig members
+            this.cameraRigMode = Camera.RIG_MODE_NONE;
+            this._rigCameras = new Array();
             // Cache
             this._computedViewMatrix = BABYLON.Matrix.Identity();
             this._projectionMatrix = new BABYLON.Matrix();
@@ -138,51 +138,44 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERA_MODE_NONE", {
+        Object.defineProperty(Camera, "RIG_MODE_NONE", {
             get: function () {
-                return Camera._SUB_CAMERA_MODE_NONE;
+                return Camera._RIG_MODE_NONE;
             },
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERA_MODE_ANAGLYPH", {
+        Object.defineProperty(Camera, "RIG_MODE_STEREOSCOPIC_ANAGLYPH", {
             get: function () {
-                return Camera._SUB_CAMERA_MODE_ANAGLYPH;
+                return Camera._RIG_MODE_STEREOSCOPIC_ANAGLYPH;
             },
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERA_MODE_CROSSEDSIDEBYSIDE_STEREOSCOPIC", {
+        Object.defineProperty(Camera, "RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL", {
             get: function () {
-                return Camera._SUB_CAMERA_MODE_CROSSEDSIDEBYSIDE_STEREOSCOPIC;
+                return Camera._RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL;
             },
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERA_MODE_OVERUNDER_STEREOSCOPIC", {
+        Object.defineProperty(Camera, "RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED", {
             get: function () {
-                return Camera._SUB_CAMERA_MODE_OVERUNDER_STEREOSCOPIC;
+                return Camera._RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;
             },
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERA_MODE_VR", {
+        Object.defineProperty(Camera, "RIG_MODE_STEREOSCOPIC_OVERUNDER", {
             get: function () {
-                return Camera._SUB_CAMERA_MODE_VR;
+                return Camera._RIG_MODE_STEREOSCOPIC_OVERUNDER;
             },
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(Camera, "SUB_CAMERAID_A", {
+        Object.defineProperty(Camera, "RIG_MODE_VR", {
             get: function () {
-                return Camera._SUB_CAMERAID_A;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Camera, "SUB_CAMERAID_B", {
-            get: function () {
-                return Camera._SUB_CAMERAID_B;
+                return Camera._RIG_MODE_VR;
             },
             enumerable: true,
             configurable: true
@@ -280,8 +273,8 @@ var BABYLON;
         };
         Camera.prototype._update = function () {
             this._checkInputs();
-            if (this._subCameraMode !== Camera.SUB_CAMERA_MODE_NONE) {
-                this._updateSubCameras();
+            if (this.cameraRigMode !== Camera.RIG_MODE_NONE) {
+                this._updateRigCameras();
             }
         };
         Camera.prototype._checkInputs = function () {
@@ -412,95 +405,110 @@ var BABYLON;
         Camera.prototype.dispose = function () {
             // Remove from scene
             this.getScene().removeCamera(this);
-            while (this.subCameras.length > 0) {
-                this.subCameras.pop().dispose();
+            while (this._rigCameras.length > 0) {
+                this._rigCameras.pop().dispose();
             }
             // Postprocesses
             for (var i = 0; i < this._postProcessesTakenIndices.length; ++i) {
                 this._postProcesses[this._postProcessesTakenIndices[i]].dispose(this);
             }
         };
-        // ---- 3D cameras section ----
-        Camera.prototype.setSubCameraMode = function (mode, halfSpace, metrics) {
-            if (halfSpace === void 0) { halfSpace = 0; }
-            while (this.subCameras.length > 0) {
-                this.subCameras.pop().dispose();
+        // ---- Camera rigs section ----
+        Camera.prototype.setCameraRigMode = function (mode, rigParams) {
+            while (this._rigCameras.length > 0) {
+                this._rigCameras.pop().dispose();
             }
-            this._subCameraMode = mode;
-            this._subCamHalfSpace = BABYLON.Tools.ToRadians(halfSpace);
-            var camA = this.getSubCamera(this.name + "_A", true);
-            var camB = this.getSubCamera(this.name + "_B", false);
-            var postProcessA;
-            var postProcessB;
-            switch (this._subCameraMode) {
-                case Camera.SUB_CAMERA_MODE_ANAGLYPH:
-                    postProcessA = new BABYLON.PassPostProcess(this.name + "_leftTexture", 1.0, camA);
-                    camA.isIntermediate = true;
-                    postProcessB = new BABYLON.AnaglyphPostProcess(this.name + "_anaglyph", 1.0, camB);
-                    postProcessB.onApply = function (effect) {
-                        effect.setTextureFromPostProcess("leftSampler", postProcessA);
+            this.cameraRigMode = mode;
+            this._cameraRigParams = {};
+            switch (this.cameraRigMode) {
+                case Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
+                case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
+                case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
+                case Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
+                    this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637;
+                    //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target, 
+                    //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced
+                    this._cameraRigParams.stereoHalfAngle = BABYLON.Tools.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637);
+                    this._rigCameras.push(this.createRigCamera(this.name + "_L", 0));
+                    this._rigCameras.push(this.createRigCamera(this.name + "_R", 1));
+                    break;
+            }
+            var postProcesses = new Array();
+            switch (this.cameraRigMode) {
+                case Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
+                    postProcesses.push(new BABYLON.PassPostProcess(this.name + "_passthru", 1.0, this._rigCameras[0]));
+                    this._rigCameras[0].isIntermediate = true;
+                    postProcesses.push(new BABYLON.AnaglyphPostProcess(this.name + "_anaglyph", 1.0, this._rigCameras[1]));
+                    postProcesses[1].onApply = function (effect) {
+                        effect.setTextureFromPostProcess("leftSampler", postProcesses[0]);
                     };
                     break;
-                case Camera.SUB_CAMERA_MODE_CROSSEDSIDEBYSIDE_STEREOSCOPIC:
-                case Camera.SUB_CAMERA_MODE_OVERUNDER_STEREOSCOPIC:
-                    var isStereoscopicHoriz = this._subCameraMode === Camera.SUB_CAMERA_MODE_CROSSEDSIDEBYSIDE_STEREOSCOPIC;
-                    postProcessA = new BABYLON.PassPostProcess("passthru", 1.0, camA);
-                    camA.isIntermediate = true;
-                    postProcessB = new BABYLON.StereoscopicInterlacePostProcess("st_interlace", camB, postProcessA, isStereoscopicHoriz);
+                case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
+                case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
+                case Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
+                    var isStereoscopicHoriz = (this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL || this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED);
+                    var firstCamIndex = (this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED) ? 1 : 0;
+                    var secondCamIndex = 1 - firstCamIndex;
+                    postProcesses.push(new BABYLON.PassPostProcess(this.name + "_passthru", 1.0, this._rigCameras[firstCamIndex]));
+                    this._rigCameras[firstCamIndex].isIntermediate = true;
+                    postProcesses.push(new BABYLON.StereoscopicInterlacePostProcess(this.name + "_stereoInterlace", this._rigCameras[secondCamIndex], postProcesses[0], isStereoscopicHoriz));
                     break;
-                case Camera.SUB_CAMERA_MODE_VR:
-                    metrics = metrics || VRCameraMetrics.GetDefault();
-                    camA._vrMetrics = metrics;
-                    camA.viewport = new BABYLON.Viewport(0, 0, 0.5, 1.0);
-                    camA._vrWorkMatrix = new BABYLON.Matrix();
-                    camA._vrHMatrix = metrics.leftHMatrix;
-                    camA._vrPreViewMatrix = metrics.leftPreViewMatrix;
-                    camA.getProjectionMatrix = camA._getVRProjectionMatrix;
+                case Camera.RIG_MODE_VR:
+                    this._rigCameras.push(this.createRigCamera(this.name + "_L", 0));
+                    this._rigCameras.push(this.createRigCamera(this.name + "_R", 1));
+                    var metrics = rigParams.vrCameraMetrics || VRCameraMetrics.GetDefault();
+                    this._rigCameras[0]._cameraRigParams.vrMetrics = metrics;
+                    this._rigCameras[0].viewport = new BABYLON.Viewport(0, 0, 0.5, 1.0);
+                    this._rigCameras[0]._cameraRigParams.vrWorkMatrix = new BABYLON.Matrix();
+                    this._rigCameras[0]._cameraRigParams.vrHMatrix = metrics.leftHMatrix;
+                    this._rigCameras[0]._cameraRigParams.vrPreViewMatrix = metrics.leftPreViewMatrix;
+                    this._rigCameras[0].getProjectionMatrix = this._rigCameras[0]._getVRProjectionMatrix;
                     if (metrics.compensateDistorsion) {
-                        postProcessA = new BABYLON.VRDistortionCorrectionPostProcess("Distortion Compensation Left", camA, false, metrics);
+                        postProcesses.push(new BABYLON.VRDistortionCorrectionPostProcess("VR_Distort_Compensation_Left", this._rigCameras[0], false, metrics));
                     }
-                    camB._vrMetrics = camA._vrMetrics;
-                    camB.viewport = new BABYLON.Viewport(0.5, 0, 0.5, 1.0);
-                    camB._vrWorkMatrix = new BABYLON.Matrix();
-                    camB._vrHMatrix = metrics.rightHMatrix;
-                    camB._vrPreViewMatrix = metrics.rightPreViewMatrix;
-                    camB.getProjectionMatrix = camB._getVRProjectionMatrix;
+                    this._rigCameras[1]._cameraRigParams.vrMetrics = this._rigCameras[0]._cameraRigParams.vrMetrics;
+                    this._rigCameras[1].viewport = new BABYLON.Viewport(0.5, 0, 0.5, 1.0);
+                    this._rigCameras[1]._cameraRigParams.vrWorkMatrix = new BABYLON.Matrix();
+                    this._rigCameras[1]._cameraRigParams.vrHMatrix = metrics.rightHMatrix;
+                    this._rigCameras[1]._cameraRigParams.vrPreViewMatrix = metrics.rightPreViewMatrix;
+                    this._rigCameras[1].getProjectionMatrix = this._rigCameras[1]._getVRProjectionMatrix;
                     if (metrics.compensateDistorsion) {
-                        postProcessB = new BABYLON.VRDistortionCorrectionPostProcess("Distortion Compensation Right", camB, true, metrics);
+                        postProcesses.push(new BABYLON.VRDistortionCorrectionPostProcess("VR_Distort_Compensation_Right", this._rigCameras[1], true, metrics));
                     }
-            }
-            if (this._subCameraMode !== Camera.SUB_CAMERA_MODE_NONE) {
-                this.subCameras.push(camA);
-                this.subCameras.push(camB);
+                    break;
             }
             this._update();
         };
         Camera.prototype._getVRProjectionMatrix = function () {
-            BABYLON.Matrix.PerspectiveFovLHToRef(this._vrMetrics.aspectRatioFov, this._vrMetrics.aspectRatio, this.minZ, this.maxZ, this._vrWorkMatrix);
-            this._vrWorkMatrix.multiplyToRef(this._vrHMatrix, this._projectionMatrix);
+            BABYLON.Matrix.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov, this._cameraRigParams.vrMetrics.aspectRatio, this.minZ, this.maxZ, this._cameraRigParams.vrWorkMatrix);
+            this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix, this._projectionMatrix);
             return this._projectionMatrix;
         };
-        Camera.prototype.setSubCamHalfSpace = function (halfSpace) {
-            this._subCamHalfSpace = BABYLON.Tools.ToRadians(halfSpace);
+        Camera.prototype.setCameraRigParameter = function (name, value) {
+            this._cameraRigParams[name] = value;
+            //provisionnally:
+            if (name === "interaxialDistance") {
+                this._cameraRigParams.stereoHalfAngle = BABYLON.Tools.ToRadians(value);
+            }
         };
         /**
          * May needs to be overridden by children so sub has required properties to be copied
          */
-        Camera.prototype.getSubCamera = function (name, isA) {
+        Camera.prototype.createRigCamera = function (name, cameraIndex) {
             return null;
         };
         /**
          * May needs to be overridden by children
          */
-        Camera.prototype._updateSubCameras = function () {
-            var camA = this.subCameras[Camera.SUB_CAMERAID_A];
-            var camB = this.subCameras[Camera.SUB_CAMERAID_B];
-            camA.minZ = camB.minZ = this.minZ;
-            camA.maxZ = camB.maxZ = this.maxZ;
-            camA.fov = camB.fov = this.fov;
-            // only update viewport, when ANAGLYPH
-            if (this._subCameraMode === Camera.SUB_CAMERA_MODE_ANAGLYPH) {
-                camA.viewport = camB.viewport = this.viewport;
+        Camera.prototype._updateRigCameras = function () {
+            for (var i = 0; i < this._rigCameras.length; i++) {
+                this._rigCameras[i].minZ = this.minZ;
+                this._rigCameras[i].maxZ = this.maxZ;
+                this._rigCameras[i].fov = this.fov;
+            }
+            // only update viewport when ANAGLYPH
+            if (this.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH) {
+                this._rigCameras[0].viewport = this._rigCameras[1].viewport = this.viewport;
             }
         };
         // Statics
@@ -508,13 +516,12 @@ var BABYLON;
         Camera._ORTHOGRAPHIC_CAMERA = 1;
         Camera._FOVMODE_VERTICAL_FIXED = 0;
         Camera._FOVMODE_HORIZONTAL_FIXED = 1;
-        Camera._SUB_CAMERA_MODE_NONE = 0;
-        Camera._SUB_CAMERA_MODE_ANAGLYPH = 1;
-        Camera._SUB_CAMERA_MODE_CROSSEDSIDEBYSIDE_STEREOSCOPIC = 2;
-        Camera._SUB_CAMERA_MODE_OVERUNDER_STEREOSCOPIC = 3;
-        Camera._SUB_CAMERA_MODE_VR = 4;
-        Camera._SUB_CAMERAID_A = 0;
-        Camera._SUB_CAMERAID_B = 1;
+        Camera._RIG_MODE_NONE = 0;
+        Camera._RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;
+        Camera._RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;
+        Camera._RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;
+        Camera._RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;
+        Camera._RIG_MODE_VR = 20;
         return Camera;
     })(BABYLON.Node);
     BABYLON.Camera = Camera;

+ 1 - 13
Babylon/Cameras/babylon.camera.ts

@@ -78,8 +78,6 @@
         private static _RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;
         private static _RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;
         private static _RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;
-        private static _STEREOSCOPY_CONVERGENCE_MODE = 0;
-        private static _STEREOSCOPY_PARALLEL_MODE = 1;
         private static _RIG_MODE_VR = 20;
 
         public static get PERSPECTIVE_CAMERA(): number {
@@ -116,15 +114,7 @@
 
         public static get RIG_MODE_STEREOSCOPIC_OVERUNDER(): number {
             return Camera._RIG_MODE_STEREOSCOPIC_OVERUNDER;
-        }
-        
-        public static get STEREOSCOPY_CONVERGENCE_MODE(): number {
-            return Camera._STEREOSCOPY_CONVERGENCE_MODE;
-        }
-        
-        public static get STEREOSCOPY_PARALLEL_MODE(): number {
-            return Camera._STEREOSCOPY_PARALLEL_MODE;
-        }
+        }        
 
         public static get RIG_MODE_VR(): number {
             return Camera._RIG_MODE_VR;
@@ -487,8 +477,6 @@
                 case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
                 case Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
                 case Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
-                    this._cameraRigParams.stereoMode = Camera.STEREOSCOPY_CONVERGENCE_MODE; //by default, for now
-                    
                     this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637;
                     //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target, 
                     //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced

+ 1 - 1
Babylon/Cameras/babylon.deviceOrientationCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Cameras/babylon.followCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Cameras/babylon.freeCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Cameras/babylon.gamepadCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 64 - 0
Babylon/Cameras/babylon.stereoscopicCameras.js

@@ -0,0 +1,64 @@
+var __extends = (this && this.__extends) || function (d, b) {
+    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+    function __() { this.constructor = d; }
+    __.prototype = b.prototype;
+    d.prototype = new __();
+};
+var BABYLON;
+(function (BABYLON) {
+    var AnaglyphFreeCamera = (function (_super) {
+        __extends(AnaglyphFreeCamera, _super);
+        function AnaglyphFreeCamera(name, position, interaxialDistance, scene) {
+            _super.call(this, name, position, scene);
+            this.setCameraRigMode(BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: interaxialDistance });
+        }
+        return AnaglyphFreeCamera;
+    })(BABYLON.FreeCamera);
+    BABYLON.AnaglyphFreeCamera = AnaglyphFreeCamera;
+    var AnaglyphArcRotateCamera = (function (_super) {
+        __extends(AnaglyphArcRotateCamera, _super);
+        function AnaglyphArcRotateCamera(name, alpha, beta, radius, target, interaxialDistance, scene) {
+            _super.call(this, name, alpha, beta, radius, target, scene);
+            this.setCameraRigMode(BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: interaxialDistance });
+        }
+        return AnaglyphArcRotateCamera;
+    })(BABYLON.ArcRotateCamera);
+    BABYLON.AnaglyphArcRotateCamera = AnaglyphArcRotateCamera;
+    var AnaglyphGamepadCamera = (function (_super) {
+        __extends(AnaglyphGamepadCamera, _super);
+        function AnaglyphGamepadCamera(name, position, interaxialDistance, scene) {
+            _super.call(this, name, position, scene);
+            this.setCameraRigMode(BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: interaxialDistance });
+        }
+        return AnaglyphGamepadCamera;
+    })(BABYLON.GamepadCamera);
+    BABYLON.AnaglyphGamepadCamera = AnaglyphGamepadCamera;
+    var StereoscopicFreeCamera = (function (_super) {
+        __extends(StereoscopicFreeCamera, _super);
+        function StereoscopicFreeCamera(name, position, interaxialDistance, isSideBySide, scene) {
+            _super.call(this, name, position, scene);
+            this.setCameraRigMode(isSideBySide ? BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: interaxialDistance });
+        }
+        return StereoscopicFreeCamera;
+    })(BABYLON.FreeCamera);
+    BABYLON.StereoscopicFreeCamera = StereoscopicFreeCamera;
+    var StereoscopicArcRotateCamera = (function (_super) {
+        __extends(StereoscopicArcRotateCamera, _super);
+        function StereoscopicArcRotateCamera(name, alpha, beta, radius, target, interaxialDistance, isSideBySide, scene) {
+            _super.call(this, name, alpha, beta, radius, target, scene);
+            this.setCameraRigMode(isSideBySide ? BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: interaxialDistance });
+        }
+        return StereoscopicArcRotateCamera;
+    })(BABYLON.ArcRotateCamera);
+    BABYLON.StereoscopicArcRotateCamera = StereoscopicArcRotateCamera;
+    var StereoscopicGamepadCamera = (function (_super) {
+        __extends(StereoscopicGamepadCamera, _super);
+        function StereoscopicGamepadCamera(name, position, interaxialDistance, isSideBySide, scene) {
+            _super.call(this, name, position, scene);
+            this.setCameraRigMode(isSideBySide ? BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: interaxialDistance });
+        }
+        return StereoscopicGamepadCamera;
+    })(BABYLON.GamepadCamera);
+    BABYLON.StereoscopicGamepadCamera = StereoscopicGamepadCamera;
+})(BABYLON || (BABYLON = {}));
+//# sourceMappingURL=babylon.stereoscopicCameras.js.map

+ 47 - 35
Babylon/Cameras/babylon.targetCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -172,55 +172,67 @@ var BABYLON;
         TargetCamera.prototype._getVRViewMatrix = function () {
             BABYLON.Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix);
             BABYLON.Vector3.TransformCoordinatesToRef(this._referencePoint, this._cameraRotationMatrix, this._transformedReferencePoint);
-            BABYLON.Vector3.TransformNormalToRef(this.upVector, this._cameraRotationMatrix, this._vrActualUp);
+            BABYLON.Vector3.TransformNormalToRef(this.upVector, this._cameraRotationMatrix, this._cameraRigParams.vrActualUp);
             // Computing target and final matrix
             this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
-            BABYLON.Matrix.LookAtLHToRef(this.position, this._currentTarget, this._vrActualUp, this._vrWorkMatrix);
-            this._vrWorkMatrix.multiplyToRef(this._vrPreViewMatrix, this._viewMatrix);
+            BABYLON.Matrix.LookAtLHToRef(this.position, this._currentTarget, this._cameraRigParams.vrActualUp, this._cameraRigParams.vrWorkMatrix);
+            this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix, this._viewMatrix);
             return this._viewMatrix;
         };
         /**
          * @override
-         * needs to be overridden, so sub has required properties to be copied
+         * Override Camera.createRigCamera
          */
-        TargetCamera.prototype.getSubCamera = function (name, isA) {
-            var subCamera = new TargetCamera(name, this.position.clone(), this.getScene());
-            if (this._subCameraMode === BABYLON.Camera.SUB_CAMERA_MODE_VR) {
-                subCamera._vrActualUp = new BABYLON.Vector3(0, 0, 0);
-                subCamera._getViewMatrix = subCamera._getVRViewMatrix;
+        TargetCamera.prototype.createRigCamera = function (name, cameraIndex) {
+            if (this.cameraRigMode !== BABYLON.Camera.RIG_MODE_NONE) {
+                var rigCamera = new TargetCamera(name, this.position.clone(), this.getScene());
+                if (this.cameraRigMode === BABYLON.Camera.RIG_MODE_VR) {
+                    rigCamera._cameraRigParams.vrActualUp = new BABYLON.Vector3(0, 0, 0);
+                    rigCamera._getViewMatrix = rigCamera._getVRViewMatrix;
+                }
+                return rigCamera;
             }
-            return subCamera;
+            return null;
         };
         /**
          * @override
-         * needs to be overridden, adding copy of position, and rotation for VR, or target for rest
+         * Override Camera._updateRigCameras
          */
-        TargetCamera.prototype._updateSubCameras = function () {
-            var camA = this.subCameras[BABYLON.Camera.SUB_CAMERAID_A];
-            var camB = this.subCameras[BABYLON.Camera.SUB_CAMERAID_B];
-            if (this._subCameraMode === BABYLON.Camera.SUB_CAMERA_MODE_VR) {
-                camA.rotation.x = camB.rotation.x = this.rotation.x;
-                camA.rotation.y = camB.rotation.y = this.rotation.y;
-                camA.rotation.z = camB.rotation.z = this.rotation.z;
-                camA.position.copyFrom(this.position);
-                camB.position.copyFrom(this.position);
-            }
-            else {
-                camA.setTarget(this.getTarget());
-                camB.setTarget(this.getTarget());
-                this._getSubCamPosition(-this._subCamHalfSpace, camA.position);
-                this._getSubCamPosition(this._subCamHalfSpace, camB.position);
-            }
-            _super.prototype._updateSubCameras.call(this);
+        TargetCamera.prototype._updateRigCameras = function () {
+            switch (this.cameraRigMode) {
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:
+                case BABYLON.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:
+                case BABYLON.Camera.RIG_MODE_VR:
+                    var camLeft = this._rigCameras[0];
+                    var camRight = this._rigCameras[1];
+                    if (this.cameraRigMode === BABYLON.Camera.RIG_MODE_VR) {
+                        camLeft.rotation.x = camRight.rotation.x = this.rotation.x;
+                        camLeft.rotation.y = camRight.rotation.y = this.rotation.y;
+                        camLeft.rotation.z = camRight.rotation.z = this.rotation.z;
+                        camLeft.position.copyFrom(this.position);
+                        camRight.position.copyFrom(this.position);
+                    }
+                    else {
+                        camLeft.setTarget(this.getTarget());
+                        camRight.setTarget(this.getTarget());
+                        //provisionnaly using _cameraRigParams.stereoHalfAngle instead of calculations based on _cameraRigParams.interaxialDistance:
+                        this._getRigCamPosition(-this._cameraRigParams.stereoHalfAngle, camLeft.position);
+                        this._getRigCamPosition(this._cameraRigParams.stereoHalfAngle, camRight.position);
+                    }
+                    break;
+            }
+            _super.prototype._updateRigCameras.call(this);
         };
-        TargetCamera.prototype._getSubCamPosition = function (halfSpace, result) {
-            if (!this._subCamTransformMatrix) {
-                this._subCamTransformMatrix = new BABYLON.Matrix();
+        TargetCamera.prototype._getRigCamPosition = function (halfSpace, result) {
+            if (!this._rigCamTransformMatrix) {
+                this._rigCamTransformMatrix = new BABYLON.Matrix();
             }
             var target = this.getTarget();
-            BABYLON.Matrix.Translation(-target.x, -target.y, -target.z).multiplyToRef(BABYLON.Matrix.RotationY(halfSpace), this._subCamTransformMatrix);
-            this._subCamTransformMatrix = this._subCamTransformMatrix.multiply(BABYLON.Matrix.Translation(target.x, target.y, target.z));
-            BABYLON.Vector3.TransformCoordinatesToRef(this.position, this._subCamTransformMatrix, result);
+            BABYLON.Matrix.Translation(-target.x, -target.y, -target.z).multiplyToRef(BABYLON.Matrix.RotationY(halfSpace), this._rigCamTransformMatrix);
+            this._rigCamTransformMatrix = this._rigCamTransformMatrix.multiply(BABYLON.Matrix.Translation(target.x, target.y, target.z));
+            BABYLON.Vector3.TransformCoordinatesToRef(this.position, this._rigCamTransformMatrix, result);
         };
         return TargetCamera;
     })(BABYLON.Camera);

+ 1 - 1
Babylon/Cameras/babylon.touchCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Cameras/babylon.virtualJoysticksCamera.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Lights/babylon.directionalLight.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Lights/babylon.hemisphericLight.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Lights/babylon.light.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Lights/babylon.pointLight.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Lights/babylon.spotLight.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 4 - 4
Babylon/Loading/Plugins/babylon.babylonFileLoader.js

@@ -320,16 +320,16 @@ var BABYLON;
                 var beta = parsedCamera.beta;
                 var radius = parsedCamera.radius;
                 if (parsedCamera.type === "AnaglyphArcRotateCamera") {
-                    var eye_space = parsedCamera.eye_space;
-                    camera = new BABYLON.AnaglyphArcRotateCamera(parsedCamera.name, alpha, beta, radius, lockedTargetMesh, eye_space, scene);
+                    var interaxial_distance = parsedCamera.interaxial_distance;
+                    camera = new BABYLON.AnaglyphArcRotateCamera(parsedCamera.name, alpha, beta, radius, lockedTargetMesh, interaxial_distance, scene);
                 }
                 else {
                     camera = new BABYLON.ArcRotateCamera(parsedCamera.name, alpha, beta, radius, lockedTargetMesh, scene);
                 }
             }
             else if (parsedCamera.type === "AnaglyphFreeCamera") {
-                eye_space = parsedCamera.eye_space;
-                camera = new BABYLON.AnaglyphFreeCamera(parsedCamera.name, position, eye_space, scene);
+                interaxial_distance = parsedCamera.interaxial_distance;
+                camera = new BABYLON.AnaglyphFreeCamera(parsedCamera.name, position, interaxial_distance, scene);
             }
             else if (parsedCamera.type === "DeviceOrientationCamera") {
                 camera = new BABYLON.DeviceOrientationCamera(parsedCamera.name, position, scene);

+ 1 - 1
Babylon/Materials/Textures/Procedurals/babylon.customProceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/Procedurals/babylon.proceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/Procedurals/babylon.standardProceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.cubeTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.dynamicTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.mirrorTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.rawTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.renderTargetTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.texture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/Textures/babylon.videoTexture.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/babylon.multiMaterial.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/babylon.shaderMaterial.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Materials/babylon.standardMaterial.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 0 - 3
Babylon/Math/babylon.math.js

@@ -3003,8 +3003,5 @@ var BABYLON;
         return SIMDHelper;
     })();
     BABYLON.SIMDHelper = SIMDHelper;
-    if (window.SIMD !== undefined && window.SIMD.float32x4 && window.SIMD.float32x4.swizzle) {
-        SIMDHelper.EnableSIMD();
-    }
 })(BABYLON || (BABYLON = {}));
 //# sourceMappingURL=babylon.math.js.map

+ 0 - 4
Babylon/Math/babylon.math.ts

@@ -3694,8 +3694,4 @@
             SIMDHelper._isEnabled = true;
         }
     }
-
-    if (window.SIMD !== undefined && window.SIMD.float32x4 && window.SIMD.float32x4.swizzle) {
-        SIMDHelper.EnableSIMD();
-    }
 }

+ 4 - 1
Babylon/Mesh/babylon.abstractMesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -453,6 +453,7 @@ var BABYLON;
             this._updateBoundingInfo();
             // Absolute position
             this._absolutePosition.copyFromFloats(this._worldMatrix.m[12], this._worldMatrix.m[13], this._worldMatrix.m[14]);
+            // Callbacks
             for (var callbackIndex = 0; callbackIndex < this._onAfterWorldMatrixUpdate.length; callbackIndex++) {
                 this._onAfterWorldMatrixUpdate[callbackIndex](this);
             }
@@ -784,6 +785,7 @@ var BABYLON;
             if (this.getPhysicsImpostor() !== BABYLON.PhysicsEngine.NoImpostor) {
                 this.setPhysicsState(BABYLON.PhysicsEngine.NoImpostor);
             }
+            // Intersections in progress
             for (index = 0; index < this._intersectionsInProgress.length; index++) {
                 var other = this._intersectionsInProgress[index];
                 var pos = other._intersectionsInProgress.indexOf(this);
@@ -795,6 +797,7 @@ var BABYLON;
             // Remove from scene
             this.getScene().removeMesh(this);
             if (!doNotRecurse) {
+                // Particles
                 for (index = 0; index < this.getScene().particleSystems.length; index++) {
                     if (this.getScene().particleSystems[index].emitter === this) {
                         this.getScene().particleSystems[index].dispose();

+ 1 - 1
Babylon/Mesh/babylon.geometry.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Mesh/babylon.groundMesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Mesh/babylon.instancedMesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Mesh/babylon.linesMesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Mesh/babylon.mesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Mesh/babylon.polygonmesh.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.anaglyphPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.blackAndWhitePostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.blurPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.colorCorrectionPostProcess.js

@@ -11,7 +11,7 @@
 //  For explanations on color grading, see here:
 //      http://udn.epicgames.com/Three/ColorGrading.html
 //
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.convolutionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.displayPassPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.filterPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.fxaaPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.lensRenderingPipeline.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.passPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.refractionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.ssaoRenderingPipeline.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.stereoscopicInterlacePostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.volumetricLightScatteringPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/PostProcess/babylon.vrDistortionCorrectionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Tools/babylon.gamepads.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
Babylon/Tools/babylon.sceneOptimizer.js

@@ -1,4 +1,4 @@
-var __extends = this.__extends || function (d, b) {
+var __extends = (this && this.__extends) || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 2 - 2
Babylon/Tools/babylon.sceneSerializer.js

@@ -121,8 +121,8 @@ var BABYLON;
         }
         else if (camera instanceof BABYLON.AnaglyphFreeCamera || camera instanceof BABYLON.AnaglyphArcRotateCamera) {
             //eye space is a private member and can only be access like this. Without changing the implementation this is the best way to get it.
-            if (camera['_eyeSpace'] !== undefined) {
-                serializationObject.eye_space = BABYLON.Tools.ToDegrees(camera['_eyeSpace']);
+            if (camera['_interaxialDistance'] !== undefined) {
+                serializationObject.interaxial_distance = BABYLON.Tools.ToDegrees(camera['_interaxialDistance']);
             }
         }
         //general properties that not all cameras have. The [] is due to typescript's type safety

+ 4 - 4
Babylon/babylon.scene.js

@@ -1153,13 +1153,13 @@ var BABYLON;
             BABYLON.Tools.EndPerformanceCounter("Rendering camera " + this.activeCamera.name);
         };
         Scene.prototype._processSubCameras = function (camera) {
-            if (camera.subCameras.length === 0) {
+            if (camera.cameraRigMode === BABYLON.Camera.RIG_MODE_NONE) {
                 this._renderForCamera(camera);
                 return;
             }
-            // Sub-cameras
-            for (var index = 0; index < camera.subCameras.length; index++) {
-                this._renderForCamera(camera.subCameras[index]);
+            // rig cameras
+            for (var index = 0; index < camera._rigCameras.length; index++) {
+                this._renderForCamera(camera._rigCameras[index]);
             }
             this.activeCamera = camera;
             this.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix());

babylon.2.0.d.ts → Previous releases/babylon.2.0.d.ts


babylon.2.0.debug.js → Previous releases/babylon.2.0.debug.js


babylon.2.0.js → Previous releases/babylon.2.0.js


文件差异内容过多而无法显示
+ 0 - 28
babylon.2.1-rc.js


文件差异内容过多而无法显示
+ 0 - 27
babylon.2.1-rc.noworker.js


+ 116 - 71
babylon.2.1.d.ts

@@ -109,6 +109,7 @@ declare module BABYLON {
         private _glVersion;
         private _glRenderer;
         private _glVendor;
+        private _videoTextureSupported;
         private _renderingQueueLaunched;
         private _activeRenderLoops;
         private fpsRange;
@@ -128,7 +129,6 @@ declare module BABYLON {
         private _cachedIndexBuffer;
         private _cachedEffectForVertexBuffers;
         private _currentRenderTarget;
-        private _canvasClientRect;
         private _uintIndicesCurrentlySet;
         private _workingCanvas;
         private _workingContext;
@@ -258,7 +258,7 @@ declare module BABYLON {
         setSamplingMode(texture: WebGLTexture, samplingMode: number): void;
         createTexture(url: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode?: number, onLoad?: () => void, onError?: () => void, buffer?: any): WebGLTexture;
         createRawTexture(data: ArrayBufferView, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number): WebGLTexture;
-        createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number): WebGLTexture;
+        createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number, forceExponantOfTwo?: boolean): WebGLTexture;
         updateTextureSamplingMode(samplingMode: number, texture: WebGLTexture): void;
         updateDynamicTexture(texture: WebGLTexture, canvas: HTMLCanvasElement, invertY: boolean): void;
         updateVideoTexture(texture: WebGLTexture, video: HTMLVideoElement, invertY: boolean): void;
@@ -377,6 +377,10 @@ interface Navigator {
     mozGetVRDevices: (any) => any;
     isCocoonJS: boolean;
 }
+interface Screen {
+    orientation: string;
+    mozOrientation: string;
+}
 declare module BABYLON {
     /**
      * Node is the basic class for all scene objects (Mesh, Light Camera).
@@ -1304,7 +1308,7 @@ declare module BABYLON {
         private _scene;
         private _registerFunc;
         private _audioEngine;
-        constructor(scene: BABYLON.Scene);
+        constructor(scene: Scene);
         getFrequencyBinCount(): number;
         getByteFrequencyData(): Uint8Array;
         getByteTimeDomainData(): Uint8Array;
@@ -1384,6 +1388,7 @@ declare module BABYLON {
         setAudioBuffer(audioBuffer: AudioBuffer): void;
         updateOptions(options: any): void;
         private _createSpatialParameters();
+        private _updateSpatialParameters();
         switchPanningModelToHRTF(): void;
         switchPanningModelToEqualPower(): void;
         private _switchPanningModel();
@@ -1422,17 +1427,18 @@ declare module BABYLON {
 declare module BABYLON {
     class SoundTrack {
         private _audioEngine;
-        private _trackGain;
+        private _outputAudioNode;
+        private _inputAudioNode;
         private _trackConvolver;
         private _scene;
         id: number;
-        soundCollection: Array<BABYLON.Sound>;
+        soundCollection: Array<Sound>;
         private _isMainTrack;
         private _connectedAnalyser;
-        constructor(scene: BABYLON.Scene, options?: any);
+        constructor(scene: Scene, options?: any);
         dispose(): void;
-        AddSound(sound: BABYLON.Sound): void;
-        RemoveSound(sound: BABYLON.Sound): void;
+        AddSound(sound: Sound): void;
+        RemoveSound(sound: Sound): void;
         setVolume(newVolume: number): void;
         switchPanningModelToHRTF(): void;
         switchPanningModelToEqualPower(): void;
@@ -1486,7 +1492,10 @@ declare module BABYLON {
         constructor(name: string, position: Vector3, eyeSpace: number, scene: Scene);
     }
     class AnaglyphArcRotateCamera extends ArcRotateCamera {
-        constructor(name: string, alpha: number, beta: number, radius: number, target: any, eyeSpace: number, scene: any);
+        constructor(name: string, alpha: number, beta: number, radius: number, target: any, eyeSpace: number, scene: Scene);
+    }
+    class AnaglyphGamepadCamera extends GamepadCamera {
+        constructor(name: string, position: Vector3, eyeSpace: number, scene: Scene);
     }
 }
 declare module BABYLON {
@@ -1514,6 +1523,7 @@ declare module BABYLON {
         zoomOnFactor: number;
         targetScreenOffset: Vector2;
         pinchInwards: boolean;
+        allowUpsideDown: boolean;
         private _keys;
         private _viewMatrix;
         private _attachedElement;
@@ -1548,6 +1558,7 @@ declare module BABYLON {
         attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
         detachControl(element: HTMLElement): void;
         _checkInputs(): void;
+        private _checkLimits();
         setPosition(position: Vector3): void;
         _getViewMatrix(): Matrix;
         private _onCollisionPositionChange;
@@ -1555,14 +1566,14 @@ declare module BABYLON {
         focusOn(meshesOrMinMaxVectorAndDistance: any): void;
         /**
          * @override
-         * needs to be overridden, so sub has required properties to be copied
+         * Override Camera.createRigCamera
          */
-        getSubCamera(name: string, isA: boolean): Camera;
+        createRigCamera(name: string, cameraIndex: number): Camera;
         /**
          * @override
-         * needs to be overridden, adding copy of alpha, beta & radius
+         * Override Camera._updateRigCameras
          */
-        _updateSubCameras(): void;
+        _updateRigCameras(): void;
     }
 }
 declare module BABYLON {
@@ -1594,24 +1605,22 @@ declare module BABYLON {
         private static _ORTHOGRAPHIC_CAMERA;
         private static _FOVMODE_VERTICAL_FIXED;
         private static _FOVMODE_HORIZONTAL_FIXED;
-        private static _SUB_CAMERA_MODE_NONE;
-        private static _SUB_CAMERA_MODE_ANAGLYPH;
-        private static _SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM;
-        private static _SUB_CAMERA_MODE_VERTICAL_STEREOGRAM;
-        private static _SUB_CAMERA_MODE_VR;
-        private static _SUB_CAMERAID_A;
-        private static _SUB_CAMERAID_B;
+        private static _RIG_MODE_NONE;
+        private static _RIG_MODE_STEREOSCOPIC_ANAGLYPH;
+        private static _RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL;
+        private static _RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;
+        private static _RIG_MODE_STEREOSCOPIC_OVERUNDER;
+        private static _RIG_MODE_VR;
         static PERSPECTIVE_CAMERA: number;
         static ORTHOGRAPHIC_CAMERA: number;
         static FOVMODE_VERTICAL_FIXED: number;
         static FOVMODE_HORIZONTAL_FIXED: number;
-        static SUB_CAMERA_MODE_NONE: number;
-        static SUB_CAMERA_MODE_ANAGLYPH: number;
-        static SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM: number;
-        static SUB_CAMERA_MODE_VERTICAL_STEREOGRAM: number;
-        static SUB_CAMERA_MODE_VR: number;
-        static SUB_CAMERAID_A: number;
-        static SUB_CAMERAID_B: number;
+        static RIG_MODE_NONE: number;
+        static RIG_MODE_STEREOSCOPIC_ANAGLYPH: number;
+        static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: number;
+        static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: number;
+        static RIG_MODE_STEREOSCOPIC_OVERUNDER: number;
+        static RIG_MODE_VR: number;
         upVector: Vector3;
         orthoLeft: any;
         orthoRight: any;
@@ -1626,14 +1635,9 @@ declare module BABYLON {
         viewport: Viewport;
         layerMask: number;
         fovMode: number;
-        subCameras: Camera[];
-        _subCameraMode: number;
-        _subCamHalfSpace: number;
-        private _vrMetrics;
-        private _vrHMatrix;
-        _vrPreViewMatrix: Matrix;
-        _vrWorkMatrix: Matrix;
-        _vrActualUp: Vector3;
+        cameraRigMode: number;
+        _cameraRigParams: any;
+        _rigCameras: Camera[];
         private _computedViewMatrix;
         _projectionMatrix: Matrix;
         private _worldMatrix;
@@ -1663,17 +1667,17 @@ declare module BABYLON {
         _computeViewMatrix(force?: boolean): Matrix;
         getProjectionMatrix(force?: boolean): Matrix;
         dispose(): void;
-        setSubCameraMode(mode: number, halfSpace?: number, metrics?: VRCameraMetrics): void;
+        setCameraRigMode(mode: number, rigParams: any): void;
         private _getVRProjectionMatrix();
-        setSubCamHalfSapce(halfSapce: number): void;
+        setCameraRigParameter(name: string, value: any): void;
         /**
          * May needs to be overridden by children so sub has required properties to be copied
          */
-        getSubCamera(name: string, isA: boolean): Camera;
+        createRigCamera(name: string, cameraIndex: number): Camera;
         /**
          * May needs to be overridden by children
          */
-        _updateSubCameras(): void;
+        _updateRigCameras(): void;
     }
 }
 declare module BABYLON {
@@ -1759,6 +1763,48 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    class StereogramFreeCamera extends FreeCamera {
+        constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+    class StereogramArcRotateCamera extends ArcRotateCamera {
+        constructor(name: string, alpha: number, beta: number, radius: number, target: any, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+    class StereogramGamepadCamera extends GamepadCamera {
+        constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+}
+declare module BABYLON {
+    class StereoscopicFreeCamera extends FreeCamera {
+        constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+    class StereoscopicArcRotateCamera extends ArcRotateCamera {
+        constructor(name: string, alpha: number, beta: number, radius: number, target: any, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+    class StereoscopicGamepadCamera extends GamepadCamera {
+        constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene);
+    }
+}
+declare module BABYLON {
+    class AnaglyphFreeCamera extends FreeCamera {
+        constructor(name: string, position: Vector3, interaxialDistance: number, scene: Scene);
+    }
+    class AnaglyphArcRotateCamera extends ArcRotateCamera {
+        constructor(name: string, alpha: number, beta: number, radius: number, target: any, interaxialDistance: number, scene: Scene);
+    }
+    class AnaglyphGamepadCamera extends GamepadCamera {
+        constructor(name: string, position: Vector3, interaxialDistance: number, scene: Scene);
+    }
+    class StereoscopicFreeCamera extends FreeCamera {
+        constructor(name: string, position: Vector3, interaxialDistance: number, isSideBySide: boolean, scene: Scene);
+    }
+    class StereoscopicArcRotateCamera extends ArcRotateCamera {
+        constructor(name: string, alpha: number, beta: number, radius: number, target: any, interaxialDistance: number, isSideBySide: boolean, scene: Scene);
+    }
+    class StereoscopicGamepadCamera extends GamepadCamera {
+        constructor(name: string, position: Vector3, interaxialDistance: number, isSideBySide: boolean, scene: Scene);
+    }
+}
+declare module BABYLON {
     class TargetCamera extends Camera {
         cameraDirection: Vector3;
         cameraRotation: Vector2;
@@ -1771,7 +1817,7 @@ declare module BABYLON {
         _camMatrix: Matrix;
         _cameraTransformMatrix: Matrix;
         _cameraRotationMatrix: Matrix;
-        private _subCamTransformMatrix;
+        private _rigCamTransformMatrix;
         _referencePoint: Vector3;
         _transformedReferencePoint: Vector3;
         _lookAtTemp: Matrix;
@@ -1793,15 +1839,15 @@ declare module BABYLON {
         _getVRViewMatrix(): Matrix;
         /**
          * @override
-         * needs to be overridden, so sub has required properties to be copied
+         * Override Camera.createRigCamera
          */
-        getSubCamera(name: string, isA: boolean): Camera;
+        createRigCamera(name: string, cameraIndex: number): Camera;
         /**
          * @override
-         * needs to be overridden, adding copy of position, and rotation for VR, or target for rest
+         * Override Camera._updateRigCameras
          */
-        _updateSubCameras(): void;
-        private _getSubCamPosition(halfSpace, result);
+        _updateRigCameras(): void;
+        private _getRigCamPosition(halfSpace, result);
     }
 }
 declare module BABYLON {
@@ -1832,13 +1878,13 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class VRDeviceOrientationFreeCamera extends BABYLON.FreeCamera {
+    class VRDeviceOrientationFreeCamera extends FreeCamera {
         _alpha: number;
         _beta: number;
         _gamma: number;
         private _offsetOrientation;
         private _deviceOrientationHandler;
-        constructor(name: string, position: Vector3, scene: Scene);
+        constructor(name: string, position: Vector3, scene: Scene, compensateDistorsion?: boolean);
         _onOrientationEvent(evt: DeviceOrientationEvent): void;
         attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
         detachControl(element: HTMLElement): void;
@@ -1854,7 +1900,7 @@ declare module BABYLON {
         _cacheQuaternion: Quaternion;
         _cacheRotation: Vector3;
         _vrEnabled: boolean;
-        constructor(name: string, position: Vector3, scene: Scene);
+        constructor(name: string, position: Vector3, scene: Scene, compensateDistorsion?: boolean);
         private _getWebVRDevices(devices);
         _checkInputs(): void;
         attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
@@ -1900,7 +1946,7 @@ declare module BABYLON {
 declare module BABYLON {
     var CollisionWorker: string;
     interface ICollisionCoordinator {
-        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: BABYLON.Vector3, collidedMesh?: BABYLON.AbstractMesh) => void, collisionIndex: number): void;
+        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh?: AbstractMesh) => void, collisionIndex: number): void;
         init(scene: Scene): void;
         destroy(): void;
         onMeshAdded(mesh: AbstractMesh): any;
@@ -2003,7 +2049,7 @@ declare module BABYLON {
         constructor();
         static SerializeMesh: (mesh: AbstractMesh) => SerializedMesh;
         static SerializeGeometry: (geometry: Geometry) => SerializedGeometry;
-        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: BABYLON.Vector3, collidedMesh?: BABYLON.AbstractMesh) => void, collisionIndex: number): void;
+        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh?: AbstractMesh) => void, collisionIndex: number): void;
         init(scene: Scene): void;
         destroy(): void;
         onMeshAdded(mesh: AbstractMesh): void;
@@ -2020,7 +2066,7 @@ declare module BABYLON {
         private _scaledPosition;
         private _scaledVelocity;
         private _finalPosition;
-        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: BABYLON.Vector3, collidedMesh?: BABYLON.AbstractMesh) => void, collisionIndex: number): void;
+        getNewPosition(position: Vector3, velocity: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh?: AbstractMesh) => void, collisionIndex: number): void;
         init(scene: Scene): void;
         destroy(): void;
         onMeshAdded(mesh: AbstractMesh): void;
@@ -2049,13 +2095,13 @@ declare module BABYLON {
         addGeometry(geometry: SerializedGeometry): void;
     }
     class CollideWorker {
-        collider: BABYLON.Collider;
+        collider: Collider;
         private _collisionCache;
         private finalPosition;
         private collisionsScalingMatrix;
         private collisionTranformationMatrix;
-        constructor(collider: BABYLON.Collider, _collisionCache: CollisionCache, finalPosition: BABYLON.Vector3);
-        collideWithWorld(position: BABYLON.Vector3, velocity: BABYLON.Vector3, maximumRetry: number, excludedMeshUniqueId?: number): void;
+        constructor(collider: Collider, _collisionCache: CollisionCache, finalPosition: Vector3);
+        collideWithWorld(position: Vector3, velocity: Vector3, maximumRetry: number, excludedMeshUniqueId?: number): void;
         private checkCollision(mesh);
         private processCollisionsForSubMeshes(transformMatrix, mesh);
         private collideForSubMesh(subMesh, transformMatrix, meshGeometry);
@@ -2870,7 +2916,7 @@ declare module BABYLON {
         video: HTMLVideoElement;
         private _autoLaunch;
         private _lastUpdate;
-        constructor(name: string, urls: string[], size: any, scene: Scene, generateMipMaps: boolean, invertY: boolean, samplingMode?: number);
+        constructor(name: string, urls: string[], scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
         update(): boolean;
     }
 }
@@ -3534,7 +3580,6 @@ declare module BABYLON {
         showBoundingBox: boolean;
         showSubMeshesBoundingBox: boolean;
         onDispose: any;
-        checkCollisions: boolean;
         isBlocker: boolean;
         skeleton: Skeleton;
         renderingGroupId: number;
@@ -3559,6 +3604,7 @@ declare module BABYLON {
         _physicsMass: number;
         _physicsFriction: number;
         _physicRestitution: number;
+        private _checkCollisions;
         ellipsoid: Vector3;
         ellipsoidOffset: Vector3;
         private _collider;
@@ -3677,6 +3723,7 @@ declare module BABYLON {
         applyImpulse(force: Vector3, contactPoint: Vector3): void;
         setPhysicsLinkWith(otherMesh: Mesh, pivot1: Vector3, pivot2: Vector3, options?: any): void;
         updatePhysicsBodyPosition(): void;
+        checkCollisions: boolean;
         moveWithCollisions(velocity: Vector3): void;
         private _onCollisionPositionChange;
         /**
@@ -4083,9 +4130,11 @@ declare module BABYLON {
         static CreateTorus(name: string, diameter: number, thickness: number, tessellation: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh;
         static CreateTorusKnot(name: string, radius: number, tube: number, radialSegments: number, tubularSegments: number, p: number, q: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh;
         static CreateLines(name: string, points: Vector3[], scene: Scene, updatable?: boolean, linesInstance?: LinesMesh): LinesMesh;
+        static CreateDashedLines(name: string, points: Vector3[], dashSize: number, gapSize: number, dashNb: number, scene: Scene, updatable?: boolean, linesInstance?: LinesMesh): LinesMesh;
         static ExtrudeShape(name: string, shape: Vector3[], path: Vector3[], scale: number, rotation: number, cap: number, scene: Scene, updatable?: boolean, sideOrientation?: number, extrudedInstance?: Mesh): Mesh;
         static ExtrudeShapeCustom(name: string, shape: Vector3[], path: Vector3[], scaleFunction: any, rotationFunction: any, ribbonCloseArray: boolean, ribbonClosePath: boolean, cap: number, scene: Scene, updatable?: boolean, sideOrientation?: number, extrudedInstance?: Mesh): Mesh;
         private static _ExtrudeShapeGeneric(name, shape, curve, scale, rotation, scaleFunction, rotateFunction, rbCA, rbCP, cap, custom, scene, updtbl, side, instance);
+        static CreateLathe(name: string, shape: Vector3[], radius: number, tessellation: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh;
         static CreatePlane(name: string, size: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh;
         static CreateGround(name: string, width: number, height: number, subdivisions: number, scene: Scene, updatable?: boolean): Mesh;
         static CreateTiledGround(name: string, xmin: number, zmin: number, xmax: number, zmax: number, subdivisions: {
@@ -4151,6 +4200,7 @@ declare module BABYLON {
         static CreateCylinder(height: number, diameterTop: number, diameterBottom: number, tessellation: number, subdivisions?: number, sideOrientation?: number): VertexData;
         static CreateTorus(diameter: any, thickness: any, tessellation: any, sideOrientation?: number): VertexData;
         static CreateLines(points: Vector3[]): VertexData;
+        static CreateDashedLines(points: Vector3[], dashSize: number, gapSize: number, dashNb: number): VertexData;
         static CreateGround(width: number, height: number, subdivisions: number): VertexData;
         static CreateTiledGround(xmin: number, zmin: number, xmax: number, zmax: number, subdivisions?: {
             w: number;
@@ -4726,19 +4776,6 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class OculusDistortionCorrectionPostProcess extends PostProcess {
-        aspectRatio: number;
-        private _isRightEye;
-        private _distortionFactors;
-        private _postProcessScaleFactor;
-        private _lensCenterOffset;
-        private _scaleIn;
-        private _scaleFactor;
-        private _lensCenter;
-        constructor(name: string, camera: Camera, isRightEye: boolean, cameraSettings: any);
-    }
-}
-declare module BABYLON {
     class PassPostProcess extends PostProcess {
         constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
     }
@@ -4888,6 +4925,12 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    class StereoscopicInterlacePostProcess extends PostProcess {
+        private _stepSize;
+        constructor(name: string, camB: Camera, postProcessA: PostProcess, isStereoscopicHoriz: boolean, samplingMode?: number);
+    }
+}
+declare module BABYLON {
     class VolumetricLightScatteringPostProcess extends PostProcess {
         private _volumetricLightScatteringPass;
         private _volumetricLightScatteringRTT;
@@ -5299,7 +5342,8 @@ declare module BABYLON {
         private hasReachedQuota;
         private isSupported;
         private idbFactory;
-        static isUASupportingBlobStorage: boolean;
+        static IsUASupportingBlobStorage: boolean;
+        static IDBStorageEnabled: boolean;
         constructor(urlToScene: string, callbackManifestChecked: (boolean) => any);
         static parseURL: (url: string) => string;
         static ReturnFullUrlLocation: (url: string) => string;
@@ -5586,7 +5630,8 @@ declare module BABYLON {
     class Tools {
         static BaseUrl: string;
         static SetImmediate(action: () => void): void;
-        static GetExponantOfTwo: (value: number, max: number) => number;
+        static IsExponantOfTwo(value: number): boolean;
+        static GetExponantOfTwo(value: number, max: number): number;
         static GetFilename(path: string): string;
         static GetDOMTextContent(element: HTMLElement): string;
         static ToDegrees(angle: number): number;

文件差异内容过多而无法显示
+ 31831 - 0
babylon.2.1.debug.js


文件差异内容过多而无法显示
+ 29 - 0
babylon.2.1.js


文件差异内容过多而无法显示
+ 28 - 0
babylon.2.1.noworker.js


+ 0 - 33
documentation v2.0 - wish list.md

@@ -1,33 +0,0 @@
-* Must have:
- * Website available on Github to allow community to work on it
- * Deployment from Github to Azure directly (for my convenience :)): http://azure.microso...source-control/
- * Mobile version
- * Better visual design
- * Resizable TOC
- * Empty page should be redesigned
- * [API DOC] : Empty page in Classes should display the list of classes (For instance clicking on 2.0 should display all classes from 2.0 and so on)
- * [API + USER DOC] : Ability to deep link to all headers inside a page
- * [API DOC] : Ability to deep link to any function inside a class page
- * Fixing some display bugs like http://doc.babylonjs...age.php?p=25073
- * [API DOC] : Display inheritance and children in a class page
- * [API + USER DOC]Better (and faster) search
- * [API DOC] Correct class-hierarchy (Node -> Abstract Mesh -> Mesh , for example)
- * [API + USER DOC] :Syntax highlighting for javascript
- * [API + USER DOC] :For admins : Display differences between two pages in Pending validation
- * [API DOC] : Short sample code for each class member functions
- * [USER DOC] : image files upload
- * [API DOC] : a link to the relative github class/method code
- * [API DOC] : alphabetical order sort within each sub-section
- * [EDITOR] : save drafts before sending
- * [EDITOR] : re-edit at will pendind sudmission while they aren't validated
- * [EDITOR] : menu buttons (SAVE, CANCEL, SEND) independant from text scrolling
- * [EDITOR] : better markdown parser, github like
- * [PG] : tags ! => would help search engines
- 
-* Nice to have:
- * [USER DOC] : Ability to move page from one section to another
- * [API + USER DOC] : Ability to see page's history 
- * [USER DOC] :The tutorial's date updated in front of the author
- * [EDITOR] : draft auto-save and recovery
- * [EDITOR] : wysisyg editor forum-like
- * [API + USER DOC] : friendly URLs

+ 0 - 69
what's new - 2.1 - proposal.md

@@ -1,69 +0,0 @@
-- 2.1.0:
-  - **Major updates**
-    - Collisions can now be offloaded on webworkers ([raananw](http://www.github.com/raananw))
-    - SIMD.js support for math library. See [demo](http://www.babylonjs.com/scenes/simd.html) ([deltakosh](http://www.github.com/deltakosh))
-    - Unity 5  scene exporter. More info [here](https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Unity%205) ([davrous](http://www.github.com/davrous), [deltakosh](http://www.github.com/deltakosh))
-    - New ```Mesh.CreateDecal()``` function to create decals. See [demo](http://www.babylonjs.com/?DECALS). More info [here](http://doc.babylonjs.com/page.php?p=25094) ([deltakosh](http://www.github.com/deltakosh))
-    - New tool for debugLayer: You can now dump renderTargets to see their content ([deltakosh](http://www.github.com/deltakosh))
-    - Complete shadows code rework: New bias property for ShadowGenerator, new orthogonal shadows for directional shadows, automatic projection size for directional lights, new BlurVarianceShadowMap filter. See [demo](http://www.babylonjs.com/?SOFTSHADOWS). Documentation updated [here](http://babylondoc.azurewebsites.net/page.php?p=22151) ([deltakosh](http://www.github.com/deltakosh))
-    - New lens effects rendering pipeline. More info [here](http://doc.babylonjs.com/page.php?p=24841) ([jahow](https://github.com/jahow))
-    - New basic mesh type: Ribbons. See [demo](http://www.babylonjs.com/?RIBBONS). More info [here](http://doc.babylonjs.com/page.php?p=25088) ([jbousquie](https://github.com/jbousquie))
-    - New ```BABYLON.Mesh.ExtrudeShape``` and ```BABYLON.Mesh.ExtrudeShapeCustom```. More info [here](http://doc.babylonjs.com/page.php?p=24847) ([jbousquie](https://github.com/jbousquie))
-    - New Loaders folder with a first additionnal plugin: [STL](http://doc.babylonjs.com/page.php?p=25109)  ([raananw](http://www.github.com/raananw), [deltakosh](http://www.github.com/deltakosh))
-    - Gulp building process revamped, updated and simplified and now includes a config.json ([raananw](http://www.github.com/raananw)) 
- - **Updates**
- 	- Better beta angle support for ArcRotateCamera ([raananw](http://www.github.com/raananw))
-    - Better video textures support ([deltakosh](http://www.github.com/deltakosh))
-    - Cameras hierarchy rework ([deltakosh](http://www.github.com/deltakosh))
-    - New ```Camera.setSubCameraMode``` to control 3D rendering of any camera (Anaglyph, Stereo, VR) ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - VR cameras can disable distortion postprocess to get more performance ([deltakosh](http://www.github.com/deltakosh))
-    - New cameras: AnaglyphGamepadCamera, StereoscopicFreeCamera, StereoscopicArcRotateCamera, StereoscopicGamepadCamera ([deltakosh](http://www.github.com/deltakosh))
-    - New ```MultiMaterial.clone()``` function ([deltakosh](http://www.github.com/deltakosh))
-    - Faster ```mesh.computeNormals()``` function ([jbousquie](https://github.com/jbousquie))
-    - Added the ability [to dynamically update or to morph](http://doc.babylonjs.com/page.php?p=25096) an mesh instance ([jbousquie](https://github.com/jbousquie))
-    - Allow static Mesh.MergeMeshes to work with clones & Mesh subclasses ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Added mesh.freezeWorldMatrix() for static meshes ([deltakosh](http://www.github.com/deltakosh))
-    - Added mesh.freezeNormals() for parametric mesh updates ([jbousquie](http://www.github.com/jbousquie))
-    - Added Vector3.RotationFromAxis() to get Euler rotation angles from a target system ([jbousquie](http://www.github.com/jbousquie))
-    - Added mesh.alwaysSelectAsActiveMesh to disable frustum clipping for a specific mesh ([deltakosh](http://www.github.com/deltakosh))
-    - Added updateMeshPositions method ([jbousquie](https://github.com/jbousquie))
-    - Callbacks for geometry changes ([raananw](http://www.github.com/raananw))
-    - Allow Engine to run for CocoonJS with standard html, including devices where the hardware scaling != 1 ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Material onBind callback improvement ([jahow](http://www.github.com/jahow))
-    - New front/back/double side feature for meshes ([jbousquie](https://github.com/jbousquie)) 
-    - New basic mesh type: Disc ([jbousquie](https://github.com/jbousquie))
-    - New basic mesh type : Dashed Lines ([jbousquie](https://github.com/jbousquie))
-    - New basic mesh type : Lathe ([jbousquie](https://github.com/jbousquie))
-    - New basic mesh type: Tube. More info [here](http://doc.babylonjs.com/page.php?p=24847) ([jbousquie](https://github.com/jbousquie))
-    - Allow ComputeNormals to work with Typed Arrays & the Typescript Level ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Added uniqueId for nodes ([raananw](http://www.github.com/raananw))
-    - Added ```Mesh.onLODLevelSelection(distance: number, mesh: Mesh, selectedLevel: Mesh)``` callback ([deltakosh](http://www.github.com/deltakosh))
-    - Added ```Material.zOffset``` to help reducing z-fighting ([deltakosh](http://www.github.com/deltakosh))
-    - Added excludeWithLayerMask to lights ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Added includeOnlyWithLayerMask for filtering meshes ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Mesh Default layerMask changed to allow more "special cameras filtering" ([Palmer-JC](http://www.github.com/Palmer-JC))
-    - Sprite can now have .width and .height properties ([deltakosh](http://www.github.com/deltakosh))
-    - Ability to register events based on mesh/camera/light addition and deletion ([raananw](http://www.github.com/raananw))
-    - New ```Curve``` object ([jbousquie](https://github.com/jbousquie)) More info [here](http://doc.babylonjs.com/page.php?p=25091)
-    - New ```Path3D``` object ([jbousquie](https://github.com/jbousquie)) More info [here](http://doc.babylonjs.com/page.php?p=25090)
-    - New 'color correction' post process ([jahow](http://www.github.com/jahow))
-    - Added sampling mode as a parameter for SpriteManager ([jahow](http://www.github.com/jahow))
-    - RenderTexture can now be saved to a file ([deltakosh](http://www.github.com/deltakosh))
-    - Better attributes management ([deltakosh](http://www.github.com/deltakosh))
-    - Source conform to typescript 1.4 ([raananw](http://www.github.com/raananw)) 
-    - Adding subMeshId property in PickingInfo structure ([deltakosh](http://www.github.com/deltakosh))
-    - No more error when a manifest is not found ([deltakosh](http://www.github.com/deltakosh))
- - **Bug fixes**
-    - Initial quaternion fix for OIMO plugin ([raananw](http://www.github.com/raananw)) 
-    - ArcRotateCamera pinch zoom debug ([vousk](https://github.com/vousk)) 
-    - Fixing animatable bug when animation is over ([temechon](http://www.github.com/temechon))
-    - useCameraPostProcess whenever there is a special camera in use ([m0ppers](https://github.com/m0ppers))
-    - delta in BoundingBox's intersectsPoint is now calculated correctly ([raananw](http://www.github.com/raananw)) 
-    - textures cache fixed ([deltakosh](http://www.github.com/deltakosh))
-    - ImportMesh now imports referenced geometries of selected meshes ([raananw](http://www.github.com/raananw)) 
-    - CSG toMesh() and FromMesh() now support meshes without quaternion ([raananw](http://www.github.com/raananw)) 
- - **Breaking changes**
-    - OculusCamera was removed ([deltakosh](http://www.github.com/deltakosh))
-    - VRDeviceOrientationCamera was renamed to VRDeviceOrientationFreeCamera ([deltakosh](http://www.github.com/deltakosh))
-    - WebVRCamera was renamed to WebVRFreeCamera ([deltakosh](http://www.github.com/deltakosh))
-    - VideoTexture does not require a size parameter anymore. The new constructor is: ```constructor(name: string, urls: string[], scene: Scene, generateMipMaps = false, invertY = false, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE)```  ([deltakosh](http://www.github.com/deltakosh))

+ 70 - 0
what's new.md

@@ -1,5 +1,75 @@
 Changes list
 ============
+- 2.1.0:
+  - **Major updates**
+    - Collisions can now be offloaded on webworkers ([raananw](http://www.github.com/raananw))
+    - SIMD.js support for math library. See [demo](http://www.babylonjs.com/scenes/simd.html) ([deltakosh](http://www.github.com/deltakosh))
+    - Unity 5  scene exporter. More info [here](https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Unity%205) ([davrous](http://www.github.com/davrous), [deltakosh](http://www.github.com/deltakosh))
+    - New ```Mesh.CreateDecal()``` function to create decals. See [demo](http://www.babylonjs.com/?DECALS). More info [here](http://doc.babylonjs.com/page.php?p=25094) ([deltakosh](http://www.github.com/deltakosh))
+    - New tool for debugLayer: You can now dump renderTargets to see their content ([deltakosh](http://www.github.com/deltakosh))
+    - Complete shadows code rework: New bias property for ShadowGenerator, new orthogonal shadows for directional shadows, automatic projection size for directional lights, new BlurVarianceShadowMap filter. See [demo](http://www.babylonjs.com/?SOFTSHADOWS). Documentation updated [here](http://babylondoc.azurewebsites.net/page.php?p=22151) ([deltakosh](http://www.github.com/deltakosh))
+    - New lens effects rendering pipeline. More info [here](http://doc.babylonjs.com/page.php?p=24841) ([jahow](https://github.com/jahow))
+    - New basic mesh type: Ribbons. See [demo](http://www.babylonjs.com/?RIBBONS). More info [here](http://doc.babylonjs.com/page.php?p=25088) ([jbousquie](https://github.com/jbousquie))
+    - New ```BABYLON.Mesh.ExtrudeShape``` and ```BABYLON.Mesh.ExtrudeShapeCustom```. More info [here](http://doc.babylonjs.com/page.php?p=24847) ([jbousquie](https://github.com/jbousquie))
+    - New Loaders folder with a first additionnal plugin: [STL](http://doc.babylonjs.com/page.php?p=25109)  ([raananw](http://www.github.com/raananw), [deltakosh](http://www.github.com/deltakosh))
+    - Gulp building process revamped, updated and simplified and now includes a config.json ([raananw](http://www.github.com/raananw)) 
+ - **Updates**
+ 	- Better beta angle support for ArcRotateCamera ([raananw](http://www.github.com/raananw))
+    - Better video textures support ([deltakosh](http://www.github.com/deltakosh))
+    - Cameras hierarchy rework ([deltakosh](http://www.github.com/deltakosh))
+    - New ```Camera.setCameraRigMode``` to control 3D rendering of any camera (Anaglyph, Stereo, VR) ([Palmer-JC](http://www.github.com/Palmer-JC), [vousk](https://github.com/vousk))
+    - VR cameras can disable distortion postprocess to get more performance ([deltakosh](http://www.github.com/deltakosh))
+    - New cameras: AnaglyphGamepadCamera, StereoscopicFreeCamera, StereoscopicArcRotateCamera, StereoscopicGamepadCamera ([deltakosh](http://www.github.com/deltakosh))
+    - New ```MultiMaterial.clone()``` function ([deltakosh](http://www.github.com/deltakosh))
+    - Faster ```mesh.computeNormals()``` function ([jbousquie](https://github.com/jbousquie))
+    - Added the ability [to dynamically update or to morph](http://doc.babylonjs.com/page.php?p=25096) an mesh instance ([jbousquie](https://github.com/jbousquie))
+    - Allow static Mesh.MergeMeshes to work with clones & Mesh subclasses ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Added mesh.freezeWorldMatrix() for static meshes ([deltakosh](http://www.github.com/deltakosh))
+    - Added mesh.freezeNormals() for parametric mesh updates ([jbousquie](http://www.github.com/jbousquie))
+    - Added Vector3.RotationFromAxis() to get Euler rotation angles from a target system ([jbousquie](http://www.github.com/jbousquie))
+    - Added mesh.alwaysSelectAsActiveMesh to disable frustum clipping for a specific mesh ([deltakosh](http://www.github.com/deltakosh))
+    - Added updateMeshPositions method ([jbousquie](https://github.com/jbousquie))
+    - Callbacks for geometry changes ([raananw](http://www.github.com/raananw))
+    - Allow Engine to run for CocoonJS with standard html, including devices where the hardware scaling != 1 ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Material onBind callback improvement ([jahow](http://www.github.com/jahow))
+    - New front/back/double side feature for meshes ([jbousquie](https://github.com/jbousquie)) 
+    - New basic mesh type: Disc ([jbousquie](https://github.com/jbousquie))
+    - New basic mesh type : Dashed Lines ([jbousquie](https://github.com/jbousquie))
+    - New basic mesh type : Lathe ([jbousquie](https://github.com/jbousquie))
+    - New basic mesh type: Tube. More info [here](http://doc.babylonjs.com/page.php?p=24847) ([jbousquie](https://github.com/jbousquie))
+    - Allow ComputeNormals to work with Typed Arrays & the Typescript Level ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Added uniqueId for nodes ([raananw](http://www.github.com/raananw))
+    - Added ```Mesh.onLODLevelSelection(distance: number, mesh: Mesh, selectedLevel: Mesh)``` callback ([deltakosh](http://www.github.com/deltakosh))
+    - Added ```Material.zOffset``` to help reducing z-fighting ([deltakosh](http://www.github.com/deltakosh))
+    - Added excludeWithLayerMask to lights ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Added includeOnlyWithLayerMask for filtering meshes ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Mesh Default layerMask changed to allow more "special cameras filtering" ([Palmer-JC](http://www.github.com/Palmer-JC))
+    - Sprite can now have .width and .height properties ([deltakosh](http://www.github.com/deltakosh))
+    - Ability to register events based on mesh/camera/light addition and deletion ([raananw](http://www.github.com/raananw))
+    - New ```Curve``` object ([jbousquie](https://github.com/jbousquie)) More info [here](http://doc.babylonjs.com/page.php?p=25091)
+    - New ```Path3D``` object ([jbousquie](https://github.com/jbousquie)) More info [here](http://doc.babylonjs.com/page.php?p=25090)
+    - New 'color correction' post process ([jahow](http://www.github.com/jahow))
+    - Added sampling mode as a parameter for SpriteManager ([jahow](http://www.github.com/jahow))
+    - RenderTexture can now be saved to a file ([deltakosh](http://www.github.com/deltakosh))
+    - Better attributes management ([deltakosh](http://www.github.com/deltakosh))
+    - Source conform to typescript 1.4 ([raananw](http://www.github.com/raananw)) 
+    - Adding subMeshId property in PickingInfo structure ([deltakosh](http://www.github.com/deltakosh))
+    - No more error when a manifest is not found ([deltakosh](http://www.github.com/deltakosh))
+ - **Bug fixes**
+    - Initial quaternion fix for OIMO plugin ([raananw](http://www.github.com/raananw)) 
+    - ArcRotateCamera pinch zoom debug ([vousk](https://github.com/vousk)) 
+    - Fixing animatable bug when animation is over ([temechon](http://www.github.com/temechon))
+    - useCameraPostProcess whenever there is a special camera in use ([m0ppers](https://github.com/m0ppers))
+    - delta in BoundingBox's intersectsPoint is now calculated correctly ([raananw](http://www.github.com/raananw)) 
+    - textures cache fixed ([deltakosh](http://www.github.com/deltakosh))
+    - ImportMesh now imports referenced geometries of selected meshes ([raananw](http://www.github.com/raananw)) 
+    - CSG toMesh() and FromMesh() now support meshes without quaternion ([raananw](http://www.github.com/raananw)) 
+ - **Breaking changes**
+    - OculusCamera was removed ([deltakosh](http://www.github.com/deltakosh))
+    - VRDeviceOrientationCamera was renamed to VRDeviceOrientationFreeCamera ([deltakosh](http://www.github.com/deltakosh))
+    - WebVRCamera was renamed to WebVRFreeCamera ([deltakosh](http://www.github.com/deltakosh))
+    - VideoTexture does not require a size parameter anymore. The new constructor is: ```constructor(name: string, urls: string[], scene: Scene, generateMipMaps = false, invertY = false, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE)```  ([deltakosh](http://www.github.com/deltakosh))
+
 - 2.0.0:
  - **Major updates**
  - Support for WebAudio. More info [here](http://doc.babylonjs.com/page.php?p=24824) ([davrous](http://www.github.com/davrous))