Преглед изворни кода

Merge remote-tracking branch 'refs/remotes/BabylonJS/master'

Raanan Weber пре 9 година
родитељ
комит
1f4702e4bc

BIN
Exporters/3ds Max/Max2Babylon-0.4.2.zip


Разлика између датотеке није приказан због своје велике величине
+ 23 - 27
dist/preview release/babylon.core.js


Разлика између датотеке није приказан због своје велике величине
+ 565 - 379
dist/preview release/babylon.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 28 - 32
dist/preview release/babylon.js


Разлика између датотеке није приказан због своје велике величине
+ 7533 - 7220
dist/preview release/babylon.max.js


Разлика између датотеке није приказан због своје велике величине
+ 29 - 33
dist/preview release/babylon.noworker.js


+ 11 - 5
src/Cameras/babylon.arcRotateCamera.js

@@ -75,7 +75,7 @@ var BABYLON;
                 if (sinb === 0) {
                     sinb = 0.0001;
                 }
-                var target = _this.target;
+                var target = _this._getTargetPosition();
                 target.addToRef(new BABYLON.Vector3(_this.radius * cosa * sinb, _this.radius * cosb, _this.radius * sina * sinb), _this._newPosition);
                 _this.position.copyFrom(_this._newPosition);
                 var up = _this.upVector;
@@ -127,12 +127,18 @@ var BABYLON;
             if (!ignoreParentClass) {
                 _super.prototype._updateCache.call(this);
             }
-            this._cache.target.copyFrom(this.target);
+            this._cache.target.copyFrom(this._getTargetPosition());
             this._cache.alpha = this.alpha;
             this._cache.beta = this.beta;
             this._cache.radius = this.radius;
             this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset);
         };
+        ArcRotateCamera.prototype._getTargetPosition = function () {
+            if (this.target.getAbsolutePosition) {
+                return this.target.getAbsolutePosition();
+            }
+            return this.target;
+        };
         // Synchronized
         ArcRotateCamera.prototype._isSynchronizedViewMatrix = function () {
             if (!_super.prototype._isSynchronizedViewMatrix.call(this))
@@ -461,7 +467,7 @@ var BABYLON;
             }
         };
         ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
-            var radiusv3 = this.position.subtract(this.target);
+            var radiusv3 = this.position.subtract(this._getTargetPosition());
             this.radius = radiusv3.length();
             // Alpha
             this.alpha = Math.acos(radiusv3.x / Math.sqrt(Math.pow(radiusv3.x, 2) + Math.pow(radiusv3.z, 2)));
@@ -480,7 +486,7 @@ var BABYLON;
             this.rebuildAnglesAndRadius();
         };
         ArcRotateCamera.prototype.setTarget = function (target) {
-            if (this.target.equals(target)) {
+            if (this._getTargetPosition().equals(target)) {
                 return;
             }
             this.target = target;
@@ -495,7 +501,7 @@ var BABYLON;
             if (sinb === 0) {
                 sinb = 0.0001;
             }
-            var target = this.target;
+            var target = this._getTargetPosition();
             target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
             if (this.getScene().collisionsEnabled && this.checkCollisions) {
                 this._collider.radius = this.collisionRadius;

+ 13 - 5
src/Cameras/babylon.arcRotateCamera.ts

@@ -166,13 +166,21 @@
                 super._updateCache();
             }
 
-            this._cache.target.copyFrom(this.target);
+            this._cache.target.copyFrom(this._getTargetPosition());
             this._cache.alpha = this.alpha;
             this._cache.beta = this.beta;
             this._cache.radius = this.radius;
             this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset);
         }
 
+        private _getTargetPosition(): Vector3 {
+            if ((<any>this.target).getAbsolutePosition) {
+                return (<any>this.target).getAbsolutePosition();
+            }
+
+            return this.target;
+        }
+
         // Synchronized
         public _isSynchronizedViewMatrix(): boolean {
             if (!super._isSynchronizedViewMatrix())
@@ -551,7 +559,7 @@
         }
 
         public rebuildAnglesAndRadius() {
-            var radiusv3 = this.position.subtract(this.target);
+            var radiusv3 = this.position.subtract(this._getTargetPosition());
             this.radius = radiusv3.length();
 
             // Alpha
@@ -577,7 +585,7 @@
         }
 
         public setTarget(target: Vector3): void {
-            if (this.target.equals(target)) {
+            if (this._getTargetPosition().equals(target)) {
                 return;
             }
             this.target = target;
@@ -595,7 +603,7 @@
                 sinb = 0.0001;
             }
 
-            var target = this.target;
+            var target = this._getTargetPosition();
             target.addToRef(new Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
             if (this.getScene().collisionsEnabled && this.checkCollisions) {
                 this._collider.radius = this.collisionRadius;
@@ -644,7 +652,7 @@
                 sinb = 0.0001;
             }
 
-            var target = this.target;
+            var target = this._getTargetPosition();
             target.addToRef(new Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
             this.position.copyFrom(this._newPosition);
 

+ 24 - 24
src/Math/babylon.math.js

@@ -155,7 +155,7 @@ var BABYLON;
         Color3.Yellow = function () { return new Color3(1, 1, 0); };
         Color3.Gray = function () { return new Color3(0.5, 0.5, 0.5); };
         return Color3;
-    }());
+    })();
     BABYLON.Color3 = Color3;
     var Color4 = (function () {
         function Color4(r, g, b, a) {
@@ -276,7 +276,7 @@ var BABYLON;
             return colors;
         };
         return Color4;
-    }());
+    })();
     BABYLON.Color4 = Color4;
     var Vector2 = (function () {
         function Vector2(x, y) {
@@ -464,7 +464,7 @@ var BABYLON;
             return (x * x) + (y * y);
         };
         return Vector2;
-    }());
+    })();
     BABYLON.Vector2 = Vector2;
     var Vector3 = (function () {
         function Vector3(x, y, z) {
@@ -963,7 +963,7 @@ var BABYLON;
             ref.z = roll;
         };
         return Vector3;
-    }());
+    })();
     BABYLON.Vector3 = Vector3;
     //Vector4 class created for EulerAngle class conversion to Quaternion
     var Vector4 = (function () {
@@ -1220,7 +1220,7 @@ var BABYLON;
             return center;
         };
         return Vector4;
-    }());
+    })();
     BABYLON.Vector4 = Vector4;
     var Quaternion = (function () {
         function Quaternion(x, y, z, w) {
@@ -1492,7 +1492,7 @@ var BABYLON;
             return new Quaternion((num3 * left.x) + (num2 * right.x), (num3 * left.y) + (num2 * right.y), (num3 * left.z) + (num2 * right.z), (num3 * left.w) + (num2 * right.w));
         };
         return Quaternion;
-    }());
+    })();
     BABYLON.Quaternion = Quaternion;
     var Matrix = (function () {
         function Matrix() {
@@ -2127,7 +2127,7 @@ var BABYLON;
         Matrix._yAxis = Vector3.Zero();
         Matrix._zAxis = Vector3.Zero();
         return Matrix;
-    }());
+    })();
     BABYLON.Matrix = Matrix;
     var Plane = (function () {
         function Plane(a, b, c, d) {
@@ -2220,7 +2220,7 @@ var BABYLON;
             return Vector3.Dot(point, normal) + d;
         };
         return Plane;
-    }());
+    })();
     BABYLON.Plane = Plane;
     var Viewport = (function () {
         function Viewport(x, y, width, height) {
@@ -2240,7 +2240,7 @@ var BABYLON;
             return new Viewport(this.x * width, this.y * height, this.width * width, this.height * height);
         };
         return Viewport;
-    }());
+    })();
     BABYLON.Viewport = Viewport;
     var Frustum = (function () {
         function Frustum() {
@@ -2292,7 +2292,7 @@ var BABYLON;
             frustumPlanes[5].normalize();
         };
         return Frustum;
-    }());
+    })();
     BABYLON.Frustum = Frustum;
     var Ray = (function () {
         function Ray(origin, direction, length) {
@@ -2460,7 +2460,7 @@ var BABYLON;
             return new Ray(newOrigin, newDirection, ray.length);
         };
         return Ray;
-    }());
+    })();
     BABYLON.Ray = Ray;
     (function (Space) {
         Space[Space["LOCAL"] = 0] = "LOCAL";
@@ -2474,7 +2474,7 @@ var BABYLON;
         Axis.Y = new Vector3(0, 1, 0);
         Axis.Z = new Vector3(0, 0, 1);
         return Axis;
-    }());
+    })();
     BABYLON.Axis = Axis;
     ;
     var BezierCurve = (function () {
@@ -2500,7 +2500,7 @@ var BABYLON;
                 Math.pow(refinedT, 3);
         };
         return BezierCurve;
-    }());
+    })();
     BABYLON.BezierCurve = BezierCurve;
     (function (Orientation) {
         Orientation[Orientation["CW"] = 0] = "CW";
@@ -2528,7 +2528,7 @@ var BABYLON;
             return new Angle(degrees * Math.PI / 180);
         };
         return Angle;
-    }());
+    })();
     BABYLON.Angle = Angle;
     var Arc2 = (function () {
         function Arc2(startPoint, midPoint, endPoint) {
@@ -2558,7 +2558,7 @@ var BABYLON;
             this.angle = Angle.FromDegrees(this.orientation === Orientation.CW ? a1 - a3 : a3 - a1);
         }
         return Arc2;
-    }());
+    })();
     BABYLON.Arc2 = Arc2;
     var PathCursor = (function () {
         function PathCursor(path) {
@@ -2615,7 +2615,7 @@ var BABYLON;
             return this;
         };
         return PathCursor;
-    }());
+    })();
     BABYLON.PathCursor = PathCursor;
     var Path2 = (function () {
         function Path2(x, y) {
@@ -2700,7 +2700,7 @@ var BABYLON;
             return new Path2(x, y);
         };
         return Path2;
-    }());
+    })();
     BABYLON.Path2 = Path2;
     var Path3D = (function () {
         /**
@@ -2847,7 +2847,7 @@ var BABYLON;
             return normal0;
         };
         return Path3D;
-    }());
+    })();
     BABYLON.Path3D = Path3D;
     var Curve3 = (function () {
         function Curve3(points) {
@@ -2914,7 +2914,7 @@ var BABYLON;
             return l;
         };
         return Curve3;
-    }());
+    })();
     BABYLON.Curve3 = Curve3;
     // SphericalHarmonics
     var SphericalHarmonics = (function () {
@@ -2954,7 +2954,7 @@ var BABYLON;
             this.L22 = this.L22.scale(scale);
         };
         return SphericalHarmonics;
-    }());
+    })();
     BABYLON.SphericalHarmonics = SphericalHarmonics;
     // SphericalPolynomial
     var SphericalPolynomial = (function () {
@@ -2989,7 +2989,7 @@ var BABYLON;
             return result;
         };
         return SphericalPolynomial;
-    }());
+    })();
     BABYLON.SphericalPolynomial = SphericalPolynomial;
     // Vertex formats
     var PositionNormalVertex = (function () {
@@ -3003,7 +3003,7 @@ var BABYLON;
             return new PositionNormalVertex(this.position.clone(), this.normal.clone());
         };
         return PositionNormalVertex;
-    }());
+    })();
     BABYLON.PositionNormalVertex = PositionNormalVertex;
     var PositionNormalTextureVertex = (function () {
         function PositionNormalTextureVertex(position, normal, uv) {
@@ -3018,7 +3018,7 @@ var BABYLON;
             return new PositionNormalTextureVertex(this.position.clone(), this.normal.clone(), this.uv.clone());
         };
         return PositionNormalTextureVertex;
-    }());
+    })();
     BABYLON.PositionNormalTextureVertex = PositionNormalTextureVertex;
     // Temporary pre-allocated objects for engine internal use
     // usage in any internal function :
@@ -3038,6 +3038,6 @@ var BABYLON;
             Matrix.Zero(), Matrix.Zero(),
             Matrix.Zero(), Matrix.Zero()]; // 6 temp Matrices at once should be enough
         return Tmp;
-    }());
+    })();
     BABYLON.Tmp = Tmp;
 })(BABYLON || (BABYLON = {}));

+ 1 - 1
src/Mesh/babylon.abstractMesh.js

@@ -989,6 +989,6 @@ var BABYLON;
         AbstractMesh._BILLBOARDMODE_Z = 4;
         AbstractMesh._BILLBOARDMODE_ALL = 7;
         return AbstractMesh;
-    }(BABYLON.Node));
+    })(BABYLON.Node);
     BABYLON.AbstractMesh = AbstractMesh;
 })(BABYLON || (BABYLON = {}));

+ 2 - 2
src/Mesh/babylon.mesh.js

@@ -12,7 +12,7 @@ var BABYLON;
             this.renderSelf = new Array();
         }
         return _InstancesBatch;
-    }());
+    })();
     BABYLON._InstancesBatch = _InstancesBatch;
     var Mesh = (function (_super) {
         __extends(Mesh, _super);
@@ -1702,6 +1702,6 @@ var BABYLON;
         Mesh._CAP_END = 2;
         Mesh._CAP_ALL = 3;
         return Mesh;
-    }(BABYLON.AbstractMesh));
+    })(BABYLON.AbstractMesh);
     BABYLON.Mesh = Mesh;
 })(BABYLON || (BABYLON = {}));

+ 4 - 4
src/Physics/Plugins/babylon.cannonJSPlugin.js

@@ -63,13 +63,13 @@ var BABYLON;
                     this.removePhysicsBody(impostor);
                 }
                 //create the body and material
-                var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
+                var material = this._addMaterial(impostor.getParam("friction"), impostor.getParam("restitution"));
                 var bodyCreationObject = {
-                    mass: impostor.getOptions().mass,
+                    mass: impostor.getParam("mass"),
                     material: material
                 };
                 // A simple extend, in case native options were used.
-                var nativeOptions = impostor.getOptions().nativeOptions;
+                var nativeOptions = impostor.getParam("nativeOptions");
                 for (var key in nativeOptions) {
                     if (nativeOptions.hasOwnProperty(key)) {
                         bodyCreationObject[key] = nativeOptions[key];
@@ -350,6 +350,6 @@ var BABYLON;
             //nothing to do, actually.
         };
         return CannonJSPlugin;
-    }());
+    })();
     BABYLON.CannonJSPlugin = CannonJSPlugin;
 })(BABYLON || (BABYLON = {}));

+ 9 - 8
src/Physics/Plugins/babylon.cannonJSPlugin.ts

@@ -68,14 +68,14 @@
                 }
                 
                 //create the body and material
-                var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
+                var material = this._addMaterial(impostor.getParam("friction"), impostor.getParam("restitution"));
 
                 var bodyCreationObject = {
-                    mass: impostor.getOptions().mass,
+                    mass: impostor.getParam("mass"),
                     material: material
                 };
                 // A simple extend, in case native options were used.
-                var nativeOptions = impostor.getOptions().nativeOptions;
+                var nativeOptions = impostor.getParam("nativeOptions");
                 for (var key in nativeOptions) {
                     if (nativeOptions.hasOwnProperty(key)) {
                         bodyCreationObject[key] = nativeOptions[key];
@@ -91,7 +91,7 @@
                 //try to keep the body moving in the right direction by taking old properties.
                 //Should be tested!
                 if (oldBody) {
-                    ['force', 'torque', 'velocity', 'angularVelocity'].forEach(function(param) {
+                    ['force', 'torque', 'velocity', 'angularVelocity'].forEach(function (param) {
                         impostor.physicsBody[param].copy(oldBody[param]);
                     });
                 }
@@ -151,13 +151,13 @@
                 axisB: jointData.connectedAxis ? new CANNON.Vec3().copy(jointData.connectedAxis) : null,
                 maxForce: jointData.nativeParams.maxForce
             };
-            if(!jointData.collision) {
+            if (!jointData.collision) {
                 //add 1st body to a collision group of its own, if it is not in 1
-                if(mainBody.collisionFilterGroup === 1) {
+                if (mainBody.collisionFilterGroup === 1) {
                     mainBody.collisionFilterGroup = this._currentCollisionGroup;
                     this._currentCollisionGroup <<= 1;
                 }
-                if(connectedBody.collisionFilterGroup === 1) {
+                if (connectedBody.collisionFilterGroup === 1) {
                     connectedBody.collisionFilterGroup = this._currentCollisionGroup;
                     this._currentCollisionGroup <<= 1;
                 }
@@ -407,7 +407,7 @@
         public isSupported(): boolean {
             return window.CANNON !== undefined;
         }
-        
+
         public setVelocity(impostor: PhysicsImpostor, velocity: Vector3) {
             impostor.physicsBody.velocity.copy(velocity);
         }
@@ -418,3 +418,4 @@
     }
 }
 
+

+ 1 - 1
src/Physics/Plugins/babylon.oimoJSPlugin.js

@@ -257,6 +257,6 @@ var BABYLON;
             this.world.clear();
         };
         return OimoJSPlugin;
-    }());
+    })();
     BABYLON.OimoJSPlugin = OimoJSPlugin;
 })(BABYLON || (BABYLON = {}));

+ 1 - 1
src/Physics/babylon.physicsEngine.js

@@ -110,6 +110,6 @@ var BABYLON;
         PhysicsEngine.HeightmapImpostor = BABYLON.PhysicsImpostor.HeightmapImpostor;
         PhysicsEngine.Epsilon = 0.001;
         return PhysicsEngine;
-    }());
+    })();
     BABYLON.PhysicsEngine = PhysicsEngine;
 })(BABYLON || (BABYLON = {}));

+ 63 - 6
src/Physics/babylon.physicsImpostor.js

@@ -15,6 +15,9 @@ var BABYLON;
             this._deltaRotation = new BABYLON.Quaternion();
             this._tmpPositionWithDelta = BABYLON.Vector3.Zero();
             this._tmpRotationWithDelta = new BABYLON.Quaternion();
+            /**
+             * this function is executed by the physics engine.
+             */
             this.beforeStep = function () {
                 _this.mesh.position.subtractToRef(_this._deltaPosition, _this._tmpPositionWithDelta);
                 //conjugate deltaRotation
@@ -25,6 +28,9 @@ var BABYLON;
                     func(_this);
                 });
             };
+            /**
+             * this function is executed by the physics engine.
+             */
             this.afterStep = function () {
                 _this._onAfterPhysicsStepCallbacks.forEach(function (func) {
                     func(_this);
@@ -53,6 +59,12 @@ var BABYLON;
                 this._init();
             }
         }
+        /**
+         * This function will completly initialize this impostor.
+         * It will create a new body - but only if this mesh has no parent.
+         * If it has, this impostor will not be used other than to define the impostor
+         * of the child mesh.
+         */
         PhysicsImpostor.prototype._init = function () {
             this._physicsEngine.removeImpostor(this);
             this.physicsBody = null;
@@ -68,12 +80,19 @@ var BABYLON;
             }
             return;
         };
+        /**
+         * Should a new body be generated.
+         */
         PhysicsImpostor.prototype.isBodyInitRequired = function () {
             return this._bodyUpdateRequired || (!this._physicsBody && !this._parent);
         };
         PhysicsImpostor.prototype.setScalingUpdated = function (updated) {
             this.forceUpdate();
         };
+        /**
+         * Force a regeneration of this or the parent's impostor's body.
+         * Use under cautious - This will remove all joints already implemented.
+         */
         PhysicsImpostor.prototype.forceUpdate = function () {
             this._init();
             if (this.parent) {
@@ -88,9 +107,15 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(PhysicsImpostor.prototype, "physicsBody", {
+            /**
+             * Gets the body that holds this impostor. Either its own, or its parent.
+             */
             get: function () {
-                return this.parent ? this.parent.physicsBody : this._physicsBody;
+                return this._parent ? this._parent.physicsBody : this._physicsBody;
             },
+            /**
+             * Set the physics body. Used mainly by the physics engine/plugin
+             */
             set: function (physicsBody) {
                 if (this._physicsBody) {
                     this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this);
@@ -111,22 +136,37 @@ var BABYLON;
         PhysicsImpostor.prototype.resetUpdateFlags = function () {
             this._bodyUpdateRequired = false;
         };
-        PhysicsImpostor.prototype.getOptions = function () {
-            return this._options;
-        };
+        /**
+         * Get a specific parametes from the options parameter.
+         */
         PhysicsImpostor.prototype.getParam = function (paramName) {
             return this._options[paramName];
         };
+        /**
+         * Sets a specific parameter in the options given to the physics plugin
+         */
         PhysicsImpostor.prototype.setParam = function (paramName, value) {
             this._options[paramName] = value;
             this._bodyUpdateRequired = true;
         };
+        PhysicsImpostor.prototype.getOptions = function () {
+        };
+        /**
+         * Set the body's velocity.
+         */
         PhysicsImpostor.prototype.setVelocity = function (velocity) {
             this._physicsEngine.getPhysicsPlugin().setVelocity(this, velocity);
         };
+        /**
+         * Execute a function with the physics plugin native code.
+         * Provide a function the will have two variables - the world object and the physics body object.
+         */
         PhysicsImpostor.prototype.executeNativeFunction = function (func) {
             func(this._physicsEngine.getPhysicsPlugin().world, this.physicsBody);
         };
+        /**
+         * Register a function that will be executed before the physics world is stepping forward.
+         */
         PhysicsImpostor.prototype.registerBeforePhysicsStep = function (func) {
             this._onBeforePhysicsStepCallbacks.push(func);
         };
@@ -139,6 +179,9 @@ var BABYLON;
                 BABYLON.Tools.Warn("Function to remove was not found");
             }
         };
+        /**
+         * Register a function that will be executed after the physics step
+         */
         PhysicsImpostor.prototype.registerAfterPhysicsStep = function (func) {
             this._onAfterPhysicsStepCallbacks.push(func);
         };
@@ -151,6 +194,9 @@ var BABYLON;
                 BABYLON.Tools.Warn("Function to remove was not found");
             }
         };
+        /**
+         * register a function that will be executed when this impostor collides against a different body.
+         */
         PhysicsImpostor.prototype.registerOnPhysicsCollide = function (func) {
             this._onPhysicsCollideCallbacks.push(func);
         };
@@ -163,16 +209,28 @@ var BABYLON;
                 BABYLON.Tools.Warn("Function to remove was not found");
             }
         };
+        /**
+         * Apply a force
+         */
         PhysicsImpostor.prototype.applyForce = function (force, contactPoint) {
             this._physicsEngine.getPhysicsPlugin().applyForce(this, force, contactPoint);
         };
+        /**
+         * Apply an impulse
+         */
         PhysicsImpostor.prototype.applyImpulse = function (force, contactPoint) {
             this._physicsEngine.getPhysicsPlugin().applyImpulse(this, force, contactPoint);
         };
+        /**
+         * A help function to create a joint.
+         */
         PhysicsImpostor.prototype.createJoint = function (otherImpostor, jointType, jointData) {
             var joint = new BABYLON.PhysicsJoint(jointType, jointData);
             this.addJoint(otherImpostor, joint);
         };
+        /**
+         * Add a joint to this impostor with a different impostor.
+         */
         PhysicsImpostor.prototype.addJoint = function (otherImpostor, joint) {
             this._joints.push({
                 otherImpostor: otherImpostor,
@@ -180,7 +238,6 @@ var BABYLON;
             });
             this._physicsEngine.addJoint(this, otherImpostor, joint);
         };
-        //TODO
         PhysicsImpostor.prototype.dispose = function (disposeChildren) {
             if (disposeChildren === void 0) { disposeChildren = true; }
             this.physicsBody = null;
@@ -216,6 +273,6 @@ var BABYLON;
         PhysicsImpostor.ConvexHullImpostor = 8;
         PhysicsImpostor.HeightmapImpostor = 9;
         return PhysicsImpostor;
-    }());
+    })();
     BABYLON.PhysicsImpostor = PhysicsImpostor;
 })(BABYLON || (BABYLON = {}));

+ 3 - 0
src/Physics/babylon.physicsImpostor.ts

@@ -132,6 +132,9 @@ module BABYLON {
             this._bodyUpdateRequired = true;
         }
 
+        public getOptions(): any {
+        }
+
         /**
          * Set the body's velocity.
          */

+ 1 - 1
src/Physics/babylon.physicsJoint.js

@@ -35,6 +35,6 @@ var BABYLON;
         //TODO check!!
         PhysicsJoint.PointToPointJoint = 8;
         return PhysicsJoint;
-    }());
+    })();
     BABYLON.PhysicsJoint = PhysicsJoint;
 })(BABYLON || (BABYLON = {}));

+ 1 - 1
src/babylon.scene.js

@@ -2104,6 +2104,6 @@ var BABYLON;
         Scene.MinDeltaTime = 1.0;
         Scene.MaxDeltaTime = 1000.0;
         return Scene;
-    }());
+    })();
     BABYLON.Scene = Scene;
 })(BABYLON || (BABYLON = {}));