Browse Source

Merge pull request #3232 from BabylonJS/master

Nightly
sebavan 7 years ago
parent
commit
0d1ca67140

File diff suppressed because it is too large
+ 7074 - 7071
Playground/babylon.d.txt


+ 2 - 2
Tools/Gulp/config.json

@@ -1566,12 +1566,12 @@
                     "../../gui/src/controls/ellipse.ts",
                     "../../gui/src/controls/line.ts",
                     "../../gui/src/controls/slider.ts",
-                    "../../gui/src/controls/checkBox.ts",
+                    "../../gui/src/controls/checkbox.ts",
                     "../../gui/src/controls/radioButton.ts",
                     "../../gui/src/controls/textBlock.ts",
                     "../../gui/src/controls/image.ts",
                     "../../gui/src/controls/button.ts",
-                    "../../gui/src/controls/colorPicker.ts",
+                    "../../gui/src/controls/colorpicker.ts",
                     "../../gui/src/controls/inputText.ts",
                     "../../gui/src/controls/virtualKeyboard.ts"
                 ],

File diff suppressed because it is too large
+ 7333 - 7330
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 22 - 22
dist/preview release/babylon.js


+ 35 - 14
dist/preview release/babylon.max.js

@@ -36762,6 +36762,7 @@ var BABYLON;
                  * Occlusion Channel Strenght.
                  */
                 _this.occlusionStrength = 1.0;
+                _this.useLightmapAsShadowmap = false;
                 _this._transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_OPAQUE;
                 _this._useAlphaFromAlbedoTexture = true;
                 _this._useAmbientInGrayScale = true;
@@ -36805,8 +36806,20 @@ var BABYLON;
                 if (this.occlusionTexture) {
                     activeTextures.push(this.occlusionTexture);
                 }
+                if (this.lightmapTexture) {
+                    activeTextures.push(this.lightmapTexture);
+                }
                 return activeTextures;
             };
+            PBRBaseSimpleMaterial.prototype.hasTexture = function (texture) {
+                if (_super.prototype.hasTexture.call(this, texture)) {
+                    return true;
+                }
+                if (this.lightmapTexture === texture) {
+                    return true;
+                }
+                return false;
+            };
             PBRBaseSimpleMaterial.prototype.getClassName = function () {
                 return "PBRBaseSimpleMaterial";
             };
@@ -36857,6 +36870,14 @@ var BABYLON;
             __decorate([
                 BABYLON.serialize()
             ], PBRBaseSimpleMaterial.prototype, "doubleSided", null);
+            __decorate([
+                BABYLON.serializeAsTexture(),
+                BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty", null)
+            ], PBRBaseSimpleMaterial.prototype, "lightmapTexture", void 0);
+            __decorate([
+                BABYLON.serialize(),
+                BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+            ], PBRBaseSimpleMaterial.prototype, "useLightmapAsShadowmap", void 0);
             return PBRBaseSimpleMaterial;
         }(BABYLON.PBRBaseMaterial));
         Internals.PBRBaseSimpleMaterial = PBRBaseSimpleMaterial;
@@ -67406,11 +67427,11 @@ var BABYLON;
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
-    var PhysicsRadialImpulseFallof;
-    (function (PhysicsRadialImpulseFallof) {
-        PhysicsRadialImpulseFallof[PhysicsRadialImpulseFallof["Constant"] = 0] = "Constant";
-        PhysicsRadialImpulseFallof[PhysicsRadialImpulseFallof["Linear"] = 1] = "Linear"; // impulse gets weaker if it's further from the origin
-    })(PhysicsRadialImpulseFallof = BABYLON.PhysicsRadialImpulseFallof || (BABYLON.PhysicsRadialImpulseFallof = {}));
+    var PhysicsRadialImpulseFalloff;
+    (function (PhysicsRadialImpulseFalloff) {
+        PhysicsRadialImpulseFalloff[PhysicsRadialImpulseFalloff["Constant"] = 0] = "Constant";
+        PhysicsRadialImpulseFalloff[PhysicsRadialImpulseFalloff["Linear"] = 1] = "Linear"; // impulse gets weaker if it's further from the origin
+    })(PhysicsRadialImpulseFalloff = BABYLON.PhysicsRadialImpulseFalloff || (BABYLON.PhysicsRadialImpulseFalloff = {}));
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
@@ -67431,10 +67452,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.applyRadialExplosionImpulse = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call this method.');
                 return null;
@@ -67458,10 +67479,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.applyRadialExplosionForce = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -67485,10 +67506,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.gravitationalField = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -67547,7 +67568,7 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear
          * @returns {Nullable<PhysicsForceAndContactPoint>}
          */
         PhysicsRadialExplosionEvent.prototype.getImpostorForceAndContactPoint = function (impostor, origin, radius, strength, falloff) {
@@ -67571,7 +67592,7 @@ var BABYLON;
             if (distanceFromOrigin > radius) {
                 return null;
             }
-            var multiplier = falloff === PhysicsRadialImpulseFallof.Constant
+            var multiplier = falloff === PhysicsRadialImpulseFalloff.Constant
                 ? strength
                 : strength * (1 - (distanceFromOrigin / radius));
             var force = direction.multiplyByFloats(multiplier, multiplier, multiplier);
@@ -67617,7 +67638,7 @@ var BABYLON;
     /***** Gravitational Field *****/
     var PhysicsGravitationalFieldEvent = /** @class */ (function () {
         function PhysicsGravitationalFieldEvent(physicsHelper, scene, origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             this._dataFetched = false; // check if the has been fetched the data. If not, do cleanup
             this._physicsHelper = physicsHelper;
             this._scene = scene;

File diff suppressed because it is too large
+ 22 - 22
dist/preview release/babylon.worker.js


File diff suppressed because it is too large
+ 6208 - 6205
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


File diff suppressed because it is too large
+ 25 - 25
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 35 - 14
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -36762,6 +36762,7 @@ var BABYLON;
                  * Occlusion Channel Strenght.
                  */
                 _this.occlusionStrength = 1.0;
+                _this.useLightmapAsShadowmap = false;
                 _this._transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_OPAQUE;
                 _this._useAlphaFromAlbedoTexture = true;
                 _this._useAmbientInGrayScale = true;
@@ -36805,8 +36806,20 @@ var BABYLON;
                 if (this.occlusionTexture) {
                     activeTextures.push(this.occlusionTexture);
                 }
+                if (this.lightmapTexture) {
+                    activeTextures.push(this.lightmapTexture);
+                }
                 return activeTextures;
             };
+            PBRBaseSimpleMaterial.prototype.hasTexture = function (texture) {
+                if (_super.prototype.hasTexture.call(this, texture)) {
+                    return true;
+                }
+                if (this.lightmapTexture === texture) {
+                    return true;
+                }
+                return false;
+            };
             PBRBaseSimpleMaterial.prototype.getClassName = function () {
                 return "PBRBaseSimpleMaterial";
             };
@@ -36857,6 +36870,14 @@ var BABYLON;
             __decorate([
                 BABYLON.serialize()
             ], PBRBaseSimpleMaterial.prototype, "doubleSided", null);
+            __decorate([
+                BABYLON.serializeAsTexture(),
+                BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty", null)
+            ], PBRBaseSimpleMaterial.prototype, "lightmapTexture", void 0);
+            __decorate([
+                BABYLON.serialize(),
+                BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+            ], PBRBaseSimpleMaterial.prototype, "useLightmapAsShadowmap", void 0);
             return PBRBaseSimpleMaterial;
         }(BABYLON.PBRBaseMaterial));
         Internals.PBRBaseSimpleMaterial = PBRBaseSimpleMaterial;
@@ -67252,11 +67273,11 @@ var BABYLON;
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
-    var PhysicsRadialImpulseFallof;
-    (function (PhysicsRadialImpulseFallof) {
-        PhysicsRadialImpulseFallof[PhysicsRadialImpulseFallof["Constant"] = 0] = "Constant";
-        PhysicsRadialImpulseFallof[PhysicsRadialImpulseFallof["Linear"] = 1] = "Linear"; // impulse gets weaker if it's further from the origin
-    })(PhysicsRadialImpulseFallof = BABYLON.PhysicsRadialImpulseFallof || (BABYLON.PhysicsRadialImpulseFallof = {}));
+    var PhysicsRadialImpulseFalloff;
+    (function (PhysicsRadialImpulseFalloff) {
+        PhysicsRadialImpulseFalloff[PhysicsRadialImpulseFalloff["Constant"] = 0] = "Constant";
+        PhysicsRadialImpulseFalloff[PhysicsRadialImpulseFalloff["Linear"] = 1] = "Linear"; // impulse gets weaker if it's further from the origin
+    })(PhysicsRadialImpulseFalloff = BABYLON.PhysicsRadialImpulseFalloff || (BABYLON.PhysicsRadialImpulseFalloff = {}));
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
@@ -67277,10 +67298,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.applyRadialExplosionImpulse = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call this method.');
                 return null;
@@ -67304,10 +67325,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.applyRadialExplosionForce = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -67331,10 +67352,10 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
         PhysicsHelper.prototype.gravitationalField = function (origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             if (!this._physicsEngine) {
                 BABYLON.Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -67393,7 +67414,7 @@ var BABYLON;
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear
          * @returns {Nullable<PhysicsForceAndContactPoint>}
          */
         PhysicsRadialExplosionEvent.prototype.getImpostorForceAndContactPoint = function (impostor, origin, radius, strength, falloff) {
@@ -67417,7 +67438,7 @@ var BABYLON;
             if (distanceFromOrigin > radius) {
                 return null;
             }
-            var multiplier = falloff === PhysicsRadialImpulseFallof.Constant
+            var multiplier = falloff === PhysicsRadialImpulseFalloff.Constant
                 ? strength
                 : strength * (1 - (distanceFromOrigin / radius));
             var force = direction.multiplyByFloats(multiplier, multiplier, multiplier);
@@ -67463,7 +67484,7 @@ var BABYLON;
     /***** Gravitational Field *****/
     var PhysicsGravitationalFieldEvent = /** @class */ (function () {
         function PhysicsGravitationalFieldEvent(physicsHelper, scene, origin, radius, strength, falloff) {
-            if (falloff === void 0) { falloff = PhysicsRadialImpulseFallof.Constant; }
+            if (falloff === void 0) { falloff = PhysicsRadialImpulseFalloff.Constant; }
             this._dataFetched = false; // check if the has been fetched the data. If not, do cleanup
             this._physicsHelper = physicsHelper;
             this._scene = scene;

+ 1 - 1
dist/preview release/gui/babylon.gui.js

@@ -2987,7 +2987,7 @@ var BABYLON;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=checkBox.js.map
+//# sourceMappingURL=checkbox.js.map
 
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 

File diff suppressed because it is too large
+ 6 - 6
dist/preview release/inspector/babylon.inspector.bundle.js


+ 7 - 1
dist/preview release/inspector/babylon.inspector.js

@@ -1699,7 +1699,13 @@ var INSPECTOR;
                     var objToDetail = this.value;
                     // Display all properties that are not functions
                     var propToDisplay = INSPECTOR.Helpers.GetAllLinesPropertiesAsString(objToDetail);
-                    propToDisplay.sort().reverse();
+                    // special case for color3
+                    if ((propToDisplay.indexOf('r') && propToDisplay.indexOf('g') && propToDisplay.indexOf('b')) == 0) {
+                        propToDisplay.sort();
+                    }
+                    else {
+                        propToDisplay.sort().reverse();
+                    }
                     for (var _b = 0, propToDisplay_1 = propToDisplay; _b < propToDisplay_1.length; _b++) {
                         var prop = propToDisplay_1[_b];
                         var infos = new INSPECTOR.Property(prop, this._property.value);

File diff suppressed because it is too large
+ 4 - 4
dist/preview release/inspector/babylon.inspector.min.js


+ 7 - 1
inspector/src/details/PropertyLine.ts

@@ -388,7 +388,13 @@ module INSPECTOR {
                     let objToDetail = this.value;
                     // Display all properties that are not functions
                     let propToDisplay = Helpers.GetAllLinesPropertiesAsString(objToDetail);
-                    propToDisplay.sort().reverse();
+
+                    // special case for color3
+                    if ((propToDisplay.indexOf('r') && propToDisplay.indexOf('g') && propToDisplay.indexOf('b')) == 0) {
+                        propToDisplay.sort();
+                    } else {
+                        propToDisplay.sort().reverse();
+                    }
 
                     for (let prop of propToDisplay) {
                         let infos = new Property(prop, this._property.value);

+ 2 - 2
localDev/index.html

@@ -7,7 +7,7 @@
 	<script src="https://preview.babylonjs.com/cannon.js"></script>
 	<script src="https://preview.babylonjs.com/Oimo.js"></script>
 	<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
-	<script src="../tools/DevLoader/BabylonLoader.js"></script>
+	<script src="../Tools/DevLoader/BabylonLoader.js"></script>
 	<script src="src/webgl-debug.js"></script>
 
 	<style>
@@ -108,4 +108,4 @@
 			});
 	</script>
 </body>
-</html>
+</html>

+ 24 - 0
src/Materials/PBR/babylon.pbrBaseSimpleMaterial.ts

@@ -103,6 +103,14 @@
             this._markAllSubMeshesAsTexturesDirty();
         }
 
+        @serializeAsTexture()
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", null)
+        public lightmapTexture: BaseTexture;
+
+        @serialize()
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        public useLightmapAsShadowmap = false;
+
         /**
          * Return the active textures of the material.
          */
@@ -125,9 +133,25 @@
                 activeTextures.push(this.occlusionTexture);
             }
 
+            if (this.lightmapTexture) {
+                activeTextures.push(this.lightmapTexture);
+            }
+
             return activeTextures;
         }
 
+        public hasTexture(texture: BaseTexture): boolean {
+            if (super.hasTexture(texture)) {
+                return true;
+            }
+
+            if (this.lightmapTexture === texture) {
+                return true;
+            }
+
+            return false;
+        }
+
         /**
          * Instantiates a new PBRMaterial instance.
          * 

+ 12 - 12
src/Physics/babylon.physicsHelper.ts

@@ -3,7 +3,7 @@ module BABYLON {
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
-    export enum PhysicsRadialImpulseFallof {
+    export enum PhysicsRadialImpulseFalloff {
         Constant, // impulse is constant in strength across it's whole radius
         Linear // impulse gets weaker if it's further from the origin
     }
@@ -34,9 +34,9 @@ module BABYLON {
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
-        public applyRadialExplosionImpulse(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof = PhysicsRadialImpulseFallof.Constant): Nullable<PhysicsRadialExplosionEvent> {
+        public applyRadialExplosionImpulse(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff = PhysicsRadialImpulseFalloff.Constant): Nullable<PhysicsRadialExplosionEvent> {
             if (!this._physicsEngine) {
                 Tools.Warn('Physics engine not enabled. Please enable the physics before you call this method.');
                 return null;
@@ -67,9 +67,9 @@ module BABYLON {
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
-        public applyRadialExplosionForce(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof = PhysicsRadialImpulseFallof.Constant): Nullable<PhysicsRadialExplosionEvent> {
+        public applyRadialExplosionForce(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff = PhysicsRadialImpulseFalloff.Constant): Nullable<PhysicsRadialExplosionEvent> {
             if (!this._physicsEngine) {
                 Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -100,9 +100,9 @@ module BABYLON {
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
          */
-        public gravitationalField(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof = PhysicsRadialImpulseFallof.Constant): Nullable<PhysicsGravitationalFieldEvent> {
+        public gravitationalField(origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff = PhysicsRadialImpulseFalloff.Constant): Nullable<PhysicsGravitationalFieldEvent> {
             if (!this._physicsEngine) {
                 Tools.Warn('Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.');
                 return null;
@@ -177,10 +177,10 @@ module BABYLON {
          * @param {Vector3} origin the origin of the explosion
          * @param {number} radius the explosion radius
          * @param {number} strength the explosion strength
-         * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear
+         * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear
          * @returns {Nullable<PhysicsForceAndContactPoint>}
          */
-        public getImpostorForceAndContactPoint(impostor: PhysicsImpostor, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof): Nullable<PhysicsForceAndContactPoint> {
+        public getImpostorForceAndContactPoint(impostor: PhysicsImpostor, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff): Nullable<PhysicsForceAndContactPoint> {
             if (impostor.mass === 0) {
                 return null;
             }
@@ -207,7 +207,7 @@ module BABYLON {
                 return null;
             }
 
-            var multiplier = falloff === PhysicsRadialImpulseFallof.Constant
+            var multiplier = falloff === PhysicsRadialImpulseFalloff.Constant
                 ? strength
                 : strength * (1 - (distanceFromOrigin / radius));
 
@@ -265,12 +265,12 @@ module BABYLON {
         private _origin: Vector3;
         private _radius: number;
         private _strength: number;
-        private _falloff: PhysicsRadialImpulseFallof;
+        private _falloff: PhysicsRadialImpulseFalloff;
         private _tickCallback: any;
         private _sphere: Mesh;
         private _dataFetched: boolean = false; // check if the has been fetched the data. If not, do cleanup
 
-        constructor(physicsHelper: PhysicsHelper, scene: Scene, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof = PhysicsRadialImpulseFallof.Constant) {
+        constructor(physicsHelper: PhysicsHelper, scene: Scene, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff = PhysicsRadialImpulseFalloff.Constant) {
             this._physicsHelper = physicsHelper;
             this._scene = scene;
             this._origin = origin;