David Catuhe 7 anni fa
parent
commit
48801632de

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


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


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


+ 283 - 7
dist/preview release/babylon.max.js

@@ -3442,6 +3442,13 @@ var BABYLON;
             return new Vector3(0.0, 0.0, 1.0);
         };
         /**
+         * Returns a new Vector3 set to (0.0, 0.0, -1.0)
+         * @returns a new forward Vector3
+         */
+        Vector3.Backward = function () {
+            return new Vector3(0.0, 0.0, -1.0);
+        };
+        /**
          * Returns a new Vector3 set to (1.0, 0.0, 0.0)
          * @returns a new right Vector3
          */
@@ -7034,11 +7041,23 @@ var BABYLON;
         return Angle;
     }());
     BABYLON.Angle = Angle;
+    /**
+     * This represents an arc in a 2d space.
+     */
     var Arc2 = /** @class */ (function () {
         /**
          * Creates an Arc object from the three given points : start, middle and end.
-         */
-        function Arc2(startPoint, midPoint, endPoint) {
+         * @param startPoint Defines the start point of the arc
+         * @param midPoint Defines the midlle point of the arc
+         * @param endPoint Defines the end point of the arc
+         */
+        function Arc2(
+        /** Defines the start point of the arc */
+        startPoint, 
+        /** Defines the mid point of the arc */
+        midPoint, 
+        /** Defines the end point of the arc */
+        endPoint) {
             this.startPoint = startPoint;
             this.midPoint = midPoint;
             this.endPoint = endPoint;
@@ -17686,7 +17705,7 @@ var BABYLON;
             this._parentRenderId = -1;
             this._childRenderId = -1;
             /** @hidden */
-            this._worldMatrix = BABYLON.Matrix.Zero();
+            this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
             this._animationPropertiesOverride = null;
@@ -47591,36 +47610,135 @@ var BABYLON;
     BABYLON.Node.AddNodeConstructor("ArcRotateCamera", function (name, scene) {
         return function () { return new ArcRotateCamera(name, 0, 0, 1.0, BABYLON.Vector3.Zero(), scene); };
     });
+    /**
+     * This represents an orbital type of camera.
+     *
+     * This camera always points towards a given target position and can be rotated around that target with the target as the centre of rotation. It can be controlled with cursors and mouse, or with touch events.
+     * Think of this camera as one orbiting its target position, or more imaginatively as a spy satellite orbiting the earth. Its position relative to the target (earth) can be set by three parameters, alpha (radians) the longitudinal rotation, beta (radians) the latitudinal rotation and radius the distance from the target position.
+     * @see http://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera
+     */
     var ArcRotateCamera = /** @class */ (function (_super) {
         __extends(ArcRotateCamera, _super);
+        /**
+         * Instantiates a new ArcRotateCamera in a given scene
+         * @param name Defines the name of the camera
+         * @param alpha Defines the camera rotation along the logitudinal axis
+         * @param beta Defines the camera rotation along the latitudinal axis
+         * @param radius Defines the camera distance from its target
+         * @param target Defines the camera target
+         * @param scene Defines the scene the camera belongs to
+         * @param setActiveOnSceneIfNoneActive Defines wheter the camera should be marked as active if not other active cameras have been defined
+         */
         function ArcRotateCamera(name, alpha, beta, radius, target, scene, setActiveOnSceneIfNoneActive) {
             if (setActiveOnSceneIfNoneActive === void 0) { setActiveOnSceneIfNoneActive = true; }
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene, setActiveOnSceneIfNoneActive) || this;
+            /**
+             * Current inertia value on the longitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialAlphaOffset = 0;
+            /**
+             * Current inertia value on the latitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialBetaOffset = 0;
+            /**
+             * Current inertia value on the radius axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialRadiusOffset = 0;
+            /**
+             * Minimum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerAlphaLimit = null;
+            /**
+             * Maximum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperAlphaLimit = null;
+            /**
+             * Minimum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerBetaLimit = 0.01;
+            /**
+             * Maximum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperBetaLimit = Math.PI;
+            /**
+             * Minimum allowed distance of the camera to the target (The camera can not get closer).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerRadiusLimit = null;
+            /**
+             * Maximum allowed distance of the camera to the target (The camera can not get further).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperRadiusLimit = null;
+            /**
+             * Defines the current inertia value used during panning of the camera along the X axis.
+             */
             _this.inertialPanningX = 0;
+            /**
+             * Defines the current inertia value used during panning of the camera along the Y axis.
+             */
             _this.inertialPanningY = 0;
+            /**
+             * Defines the distance used to consider the camera in pan mode vs pinch/zoom.
+             * Basically if your fingers moves away from more than this distance you will be considered
+             * in pinch mode.
+             */
             _this.pinchToPanMaxDistance = 20;
+            /**
+             * Defines the maximum distance the camera can pan.
+             * This could help keeping the cammera always in your scene.
+             */
             _this.panningDistanceLimit = null;
+            /**
+             * Defines the target of the camera before paning.
+             */
             _this.panningOriginTarget = BABYLON.Vector3.Zero();
+            /**
+             * Defines the value of the inertia used during panning.
+             * 0 would mean stop inertia and one would mean no decelleration at all.
+             */
             _this.panningInertia = 0.9;
             //-- end properties for backward compatibility for inputs
+            /**
+             * Defines how much the radius should be scaled while zomming on a particular mesh (through the zoomOn function)
+             */
             _this.zoomOnFactor = 1;
+            /**
+             * Defines a screen offset for the camera position.
+             */
             _this.targetScreenOffset = BABYLON.Vector2.Zero();
+            /**
+             * Allows the camera to be completely reversed.
+             * If false the camera can not arrive upside down.
+             */
             _this.allowUpsideDown = true;
             /** @hidden */
             _this._viewMatrix = new BABYLON.Matrix();
-            // Panning
+            /**
+             * Defines the allowed panning axis.
+             */
             _this.panningAxis = new BABYLON.Vector3(1, 1, 0);
+            /**
+             * Observable triggered when the mesh target has been changed on the camera.
+             */
             _this.onMeshTargetChangedObservable = new BABYLON.Observable();
+            /**
+             * Defines whether the camera should check collision with the objects oh the scene.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#how-can-i-do-this
+             */
             _this.checkCollisions = false;
+            /**
+             * Defines the collision radius of the camera.
+             * This simulates a sphere around the camera.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#arcrotatecamera
+             */
             _this.collisionRadius = new BABYLON.Vector3(0.5, 0.5, 0.5);
             _this._previousPosition = BABYLON.Vector3.Zero();
             _this._collisionVelocity = BABYLON.Vector3.Zero();
@@ -47675,6 +47793,10 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ArcRotateCamera.prototype, "target", {
+            /**
+             * Defines the target point of the camera.
+             * The camera looks towards it form the radius distance.
+             */
             get: function () {
                 return this._target;
             },
@@ -47686,6 +47808,9 @@ var BABYLON;
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityX", {
             //-- begin properties for backward compatibility for inputs
+            /**
+             * Gets or Set the pointer angular sensibility  along the X axis  or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47702,6 +47827,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityY", {
+            /**
+             * Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47718,6 +47846,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchPrecision", {
+            /**
+             * Gets or Set the pointer pinch precision or how fast is the camera zooming.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47734,6 +47865,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchDeltaPercentage", {
+            /**
+             * Gets or Set the pointer pinch delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47750,6 +47886,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "panningSensibility", {
+            /**
+             * Gets or Set the pointer panning sensibility or how fast is the camera moving.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47766,6 +47905,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysUp", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47781,6 +47923,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysDown", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47796,6 +47941,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysLeft", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47811,6 +47959,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysRight", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47826,6 +47977,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelPrecision", {
+            /**
+             * Gets or Set the mouse wheel precision or how fast is the camera zooming.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47841,6 +47995,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelDeltaPercentage", {
+            /**
+             * Gets or Set the mouse wheel delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47856,6 +48015,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "bouncingBehavior", {
+            /**
+             * Gets the bouncing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior;
             },
@@ -47863,6 +48026,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useBouncingBehavior", {
+            /**
+             * Defines if the bouncing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior != null;
             },
@@ -47883,6 +48050,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "framingBehavior", {
+            /**
+             * Gets the framing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior;
             },
@@ -47890,6 +48061,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useFramingBehavior", {
+            /**
+             * Defines if the framing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior != null;
             },
@@ -47910,6 +48085,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "autoRotationBehavior", {
+            /**
+             * Gets the auto rotation behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior;
             },
@@ -47917,6 +48096,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useAutoRotationBehavior", {
+            /**
+             * Defines if the auto rotation behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior != null;
             },
@@ -47973,6 +48156,10 @@ var BABYLON;
             }
             return this._target;
         };
+        /**
+         * Stores the current state of the camera (alpha, beta, radius and target)
+         * @returns the camera itself
+         */
         ArcRotateCamera.prototype.storeState = function () {
             this._storedAlpha = this.alpha;
             this._storedBeta = this.beta;
@@ -48010,7 +48197,13 @@ var BABYLON;
                 && this._cache.radius === this.radius
                 && this._cache.targetScreenOffset.equals(this.targetScreenOffset);
         };
-        // Methods
+        /**
+         * Attached controls to the current camera.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         * @param useCtrlForPanning  Defines whether ctrl is used for paning within the controls
+         * @param panningMouseButton Defines whether panning is allowed through mouse click button
+         */
         ArcRotateCamera.prototype.attachControl = function (element, noPreventDefault, useCtrlForPanning, panningMouseButton) {
             var _this = this;
             if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
@@ -48026,6 +48219,11 @@ var BABYLON;
                 _this.inertialPanningY = 0;
             };
         };
+        /**
+         * Detach the current controls from the camera.
+         * The camera will stop reacting to inputs.
+         * @param element Defines the element to stop listening the inputs from
+         */
         ArcRotateCamera.prototype.detachControl = function (element) {
             this.inputs.detachElement(element);
             if (this._reset) {
@@ -48132,6 +48330,9 @@ var BABYLON;
                 this.radius = this.upperRadiusLimit;
             }
         };
+        /**
+         * Rebuilds angles (alpha, beta) and radius from the give position and target.
+         */
         ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
             this.position.subtractToRef(this._getTargetPosition(), this._computationVector);
             this.radius = this._computationVector.length();
@@ -48147,6 +48348,10 @@ var BABYLON;
             this.beta = Math.acos(this._computationVector.y / this.radius);
             this._checkLimits();
         };
+        /**
+         * Use a position to define the current camera related information like aplha, beta and radius
+         * @param position Defines the position to set the camera at
+         */
         ArcRotateCamera.prototype.setPosition = function (position) {
             if (this.position.equals(position)) {
                 return;
@@ -48154,6 +48359,13 @@ var BABYLON;
             this.position.copyFrom(position);
             this.rebuildAnglesAndRadius();
         };
+        /**
+         * Defines the target the camera should look at.
+         * This will automatically adapt alpha beta and radius to fit within the new target.
+         * @param target Defines the new target as a Vector or a mesh
+         * @param toBoundingCenter In case of a mesh target, defines wether to target the mesh position or its bounding information center
+         * @param allowSamePosition If false, prevents reapplying the new computed position if it is identical to the current one (optim)
+         */
         ArcRotateCamera.prototype.setTarget = function (target, toBoundingCenter, allowSamePosition) {
             if (toBoundingCenter === void 0) { toBoundingCenter = false; }
             if (allowSamePosition === void 0) { allowSamePosition = false; }
@@ -48217,6 +48429,11 @@ var BABYLON;
             this._currentTarget = target;
             return this._viewMatrix;
         };
+        /**
+         * Zooms on a mesh to be at the min distance where we could see it fully in the current viewport.
+         * @param meshes Defines the mesh to zoom on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.zoomOn = function (meshes, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             meshes = meshes || this.getScene().meshes;
@@ -48225,6 +48442,12 @@ var BABYLON;
             this.radius = distance * this.zoomOnFactor;
             this.focusOn({ min: minMaxVector.min, max: minMaxVector.max, distance: distance }, doNotUpdateMaxZ);
         };
+        /**
+         * Focus on a mesh or a bounding box. This adapts the target and maxRadius if necessary but does not update the current radius.
+         * The target will be changed but the radius
+         * @param meshesOrMinMaxVectorAndDistance Defines the mesh or bounding info to focus on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.focusOn = function (meshesOrMinMaxVectorAndDistance, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             var meshesOrMinMaxVector;
@@ -48290,10 +48513,17 @@ var BABYLON;
             }
             _super.prototype._updateRigCameras.call(this);
         };
+        /**
+         * Destroy the camera and release the current resources hold by it.
+         */
         ArcRotateCamera.prototype.dispose = function () {
             this.inputs.clear();
             _super.prototype.dispose.call(this);
         };
+        /**
+         * Gets the current object class name.
+         * @return the class name
+         */
         ArcRotateCamera.prototype.getClassName = function () {
             return "ArcRotateCamera";
         };
@@ -48359,6 +48589,9 @@ var BABYLON;
         ], ArcRotateCamera.prototype, "zoomOnFactor", void 0);
         __decorate([
             BABYLON.serialize()
+        ], ArcRotateCamera.prototype, "targetScreenOffset", void 0);
+        __decorate([
+            BABYLON.serialize()
         ], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
         return ArcRotateCamera;
     }(BABYLON.TargetCamera));
@@ -50683,7 +50916,16 @@ var BABYLON;
      * Use this class to create coordinated animations on multiple targets
      */
     var AnimationGroup = /** @class */ (function () {
-        function AnimationGroup(name, scene) {
+        /**
+         * Instantiates a new Animation Group.
+         * This helps managing several animations at once.
+         * @see http://doc.babylonjs.com/how_to/group
+         * @param name Defines the name of the group
+         * @param scene Defines the scene the group belongs to
+         */
+        function AnimationGroup(
+        /** The name of the animation group */
+        name, scene) {
             if (scene === void 0) { scene = null; }
             this.name = name;
             this._targetedAnimations = new Array();
@@ -50691,6 +50933,9 @@ var BABYLON;
             this._from = Number.MAX_VALUE;
             this._to = -Number.MAX_VALUE;
             this._speedRatio = 1;
+            /**
+             * This observable will notify when one animation have ended.
+             */
             this.onAnimationEndObservable = new BABYLON.Observable();
             /**
              * This observable will notify when all animations have ended.
@@ -50802,6 +51047,7 @@ var BABYLON;
          * It can add constant keys at begin or end
          * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)
          * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)
+         * @returns the animation group
          */
         AnimationGroup.prototype.normalize = function (beginFrame, endFrame) {
             if (beginFrame === void 0) { beginFrame = null; }
@@ -50874,6 +51120,7 @@ var BABYLON;
         };
         /**
          * Pause all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.pause = function () {
             if (!this._isStarted) {
@@ -50890,6 +51137,7 @@ var BABYLON;
          * Play all animations to initial state
          * This function will start() the animations if they were not started or will restart() them if they were paused
          * @param loop defines if animations must loop
+         * @returns the animation group
          */
         AnimationGroup.prototype.play = function (loop) {
             // only if all animatables are ready and exist
@@ -50910,6 +51158,7 @@ var BABYLON;
         };
         /**
          * Reset all animations to initial state
+         * @returns the animation group
          */
         AnimationGroup.prototype.reset = function () {
             if (!this._isStarted) {
@@ -50923,6 +51172,7 @@ var BABYLON;
         };
         /**
          * Restart animations from key 0
+         * @returns the animation group
          */
         AnimationGroup.prototype.restart = function () {
             if (!this._isStarted) {
@@ -50936,6 +51186,7 @@ var BABYLON;
         };
         /**
          * Stop all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.stop = function () {
             if (!this._isStarted) {
@@ -77851,9 +78102,30 @@ var BABYLON;
         return FollowCamera;
     }(BABYLON.TargetCamera));
     BABYLON.FollowCamera = FollowCamera;
+    /**
+     * Arc Rotate version of the follow camera.
+     * It still follows a defined mesh but in an Arc Rotate Camera fashion.
+     */
     var ArcFollowCamera = /** @class */ (function (_super) {
         __extends(ArcFollowCamera, _super);
-        function ArcFollowCamera(name, alpha, beta, radius, target, scene) {
+        /**
+         * Instantiates a new ArcFollowCamera
+         * @param name Defines the name of the camera
+         * @param alpha Defines the rotation angle of the camera around the logitudinal axis
+         * @param beta Defines the rotation angle of the camera around the elevation axis
+         * @param radius Defines the radius of the camera from its target point
+         * @param target Defines the target of the camera
+         * @param scene Defines the scene the camera belongs to
+         */
+        function ArcFollowCamera(name, 
+        /** The longitudinal angle of the camera */
+        alpha, 
+        /** The latitudinal angle of the camera */
+        beta, 
+        /** The radius of the camera from its target */
+        radius, 
+        /** Defines the camera target (the messh it should follow) */
+        target, scene) {
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene) || this;
             _this.alpha = alpha;
             _this.beta = beta;
@@ -77879,6 +78151,10 @@ var BABYLON;
             _super.prototype._checkInputs.call(this);
             this.follow();
         };
+        /**
+         * Returns the class name of the object.
+         * It is mostly used internally for serialization purposes.
+         */
         ArcFollowCamera.prototype.getClassName = function () {
             return "ArcFollowCamera";
         };

+ 283 - 7
dist/preview release/babylon.no-module.max.js

@@ -3409,6 +3409,13 @@ var BABYLON;
             return new Vector3(0.0, 0.0, 1.0);
         };
         /**
+         * Returns a new Vector3 set to (0.0, 0.0, -1.0)
+         * @returns a new forward Vector3
+         */
+        Vector3.Backward = function () {
+            return new Vector3(0.0, 0.0, -1.0);
+        };
+        /**
          * Returns a new Vector3 set to (1.0, 0.0, 0.0)
          * @returns a new right Vector3
          */
@@ -7001,11 +7008,23 @@ var BABYLON;
         return Angle;
     }());
     BABYLON.Angle = Angle;
+    /**
+     * This represents an arc in a 2d space.
+     */
     var Arc2 = /** @class */ (function () {
         /**
          * Creates an Arc object from the three given points : start, middle and end.
-         */
-        function Arc2(startPoint, midPoint, endPoint) {
+         * @param startPoint Defines the start point of the arc
+         * @param midPoint Defines the midlle point of the arc
+         * @param endPoint Defines the end point of the arc
+         */
+        function Arc2(
+        /** Defines the start point of the arc */
+        startPoint, 
+        /** Defines the mid point of the arc */
+        midPoint, 
+        /** Defines the end point of the arc */
+        endPoint) {
             this.startPoint = startPoint;
             this.midPoint = midPoint;
             this.endPoint = endPoint;
@@ -17653,7 +17672,7 @@ var BABYLON;
             this._parentRenderId = -1;
             this._childRenderId = -1;
             /** @hidden */
-            this._worldMatrix = BABYLON.Matrix.Zero();
+            this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
             this._animationPropertiesOverride = null;
@@ -47558,36 +47577,135 @@ var BABYLON;
     BABYLON.Node.AddNodeConstructor("ArcRotateCamera", function (name, scene) {
         return function () { return new ArcRotateCamera(name, 0, 0, 1.0, BABYLON.Vector3.Zero(), scene); };
     });
+    /**
+     * This represents an orbital type of camera.
+     *
+     * This camera always points towards a given target position and can be rotated around that target with the target as the centre of rotation. It can be controlled with cursors and mouse, or with touch events.
+     * Think of this camera as one orbiting its target position, or more imaginatively as a spy satellite orbiting the earth. Its position relative to the target (earth) can be set by three parameters, alpha (radians) the longitudinal rotation, beta (radians) the latitudinal rotation and radius the distance from the target position.
+     * @see http://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera
+     */
     var ArcRotateCamera = /** @class */ (function (_super) {
         __extends(ArcRotateCamera, _super);
+        /**
+         * Instantiates a new ArcRotateCamera in a given scene
+         * @param name Defines the name of the camera
+         * @param alpha Defines the camera rotation along the logitudinal axis
+         * @param beta Defines the camera rotation along the latitudinal axis
+         * @param radius Defines the camera distance from its target
+         * @param target Defines the camera target
+         * @param scene Defines the scene the camera belongs to
+         * @param setActiveOnSceneIfNoneActive Defines wheter the camera should be marked as active if not other active cameras have been defined
+         */
         function ArcRotateCamera(name, alpha, beta, radius, target, scene, setActiveOnSceneIfNoneActive) {
             if (setActiveOnSceneIfNoneActive === void 0) { setActiveOnSceneIfNoneActive = true; }
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene, setActiveOnSceneIfNoneActive) || this;
+            /**
+             * Current inertia value on the longitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialAlphaOffset = 0;
+            /**
+             * Current inertia value on the latitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialBetaOffset = 0;
+            /**
+             * Current inertia value on the radius axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialRadiusOffset = 0;
+            /**
+             * Minimum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerAlphaLimit = null;
+            /**
+             * Maximum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperAlphaLimit = null;
+            /**
+             * Minimum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerBetaLimit = 0.01;
+            /**
+             * Maximum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperBetaLimit = Math.PI;
+            /**
+             * Minimum allowed distance of the camera to the target (The camera can not get closer).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerRadiusLimit = null;
+            /**
+             * Maximum allowed distance of the camera to the target (The camera can not get further).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperRadiusLimit = null;
+            /**
+             * Defines the current inertia value used during panning of the camera along the X axis.
+             */
             _this.inertialPanningX = 0;
+            /**
+             * Defines the current inertia value used during panning of the camera along the Y axis.
+             */
             _this.inertialPanningY = 0;
+            /**
+             * Defines the distance used to consider the camera in pan mode vs pinch/zoom.
+             * Basically if your fingers moves away from more than this distance you will be considered
+             * in pinch mode.
+             */
             _this.pinchToPanMaxDistance = 20;
+            /**
+             * Defines the maximum distance the camera can pan.
+             * This could help keeping the cammera always in your scene.
+             */
             _this.panningDistanceLimit = null;
+            /**
+             * Defines the target of the camera before paning.
+             */
             _this.panningOriginTarget = BABYLON.Vector3.Zero();
+            /**
+             * Defines the value of the inertia used during panning.
+             * 0 would mean stop inertia and one would mean no decelleration at all.
+             */
             _this.panningInertia = 0.9;
             //-- end properties for backward compatibility for inputs
+            /**
+             * Defines how much the radius should be scaled while zomming on a particular mesh (through the zoomOn function)
+             */
             _this.zoomOnFactor = 1;
+            /**
+             * Defines a screen offset for the camera position.
+             */
             _this.targetScreenOffset = BABYLON.Vector2.Zero();
+            /**
+             * Allows the camera to be completely reversed.
+             * If false the camera can not arrive upside down.
+             */
             _this.allowUpsideDown = true;
             /** @hidden */
             _this._viewMatrix = new BABYLON.Matrix();
-            // Panning
+            /**
+             * Defines the allowed panning axis.
+             */
             _this.panningAxis = new BABYLON.Vector3(1, 1, 0);
+            /**
+             * Observable triggered when the mesh target has been changed on the camera.
+             */
             _this.onMeshTargetChangedObservable = new BABYLON.Observable();
+            /**
+             * Defines whether the camera should check collision with the objects oh the scene.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#how-can-i-do-this
+             */
             _this.checkCollisions = false;
+            /**
+             * Defines the collision radius of the camera.
+             * This simulates a sphere around the camera.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#arcrotatecamera
+             */
             _this.collisionRadius = new BABYLON.Vector3(0.5, 0.5, 0.5);
             _this._previousPosition = BABYLON.Vector3.Zero();
             _this._collisionVelocity = BABYLON.Vector3.Zero();
@@ -47642,6 +47760,10 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ArcRotateCamera.prototype, "target", {
+            /**
+             * Defines the target point of the camera.
+             * The camera looks towards it form the radius distance.
+             */
             get: function () {
                 return this._target;
             },
@@ -47653,6 +47775,9 @@ var BABYLON;
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityX", {
             //-- begin properties for backward compatibility for inputs
+            /**
+             * Gets or Set the pointer angular sensibility  along the X axis  or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47669,6 +47794,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityY", {
+            /**
+             * Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47685,6 +47813,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchPrecision", {
+            /**
+             * Gets or Set the pointer pinch precision or how fast is the camera zooming.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47701,6 +47832,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchDeltaPercentage", {
+            /**
+             * Gets or Set the pointer pinch delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47717,6 +47853,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "panningSensibility", {
+            /**
+             * Gets or Set the pointer panning sensibility or how fast is the camera moving.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47733,6 +47872,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysUp", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47748,6 +47890,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysDown", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47763,6 +47908,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysLeft", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47778,6 +47926,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysRight", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47793,6 +47944,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelPrecision", {
+            /**
+             * Gets or Set the mouse wheel precision or how fast is the camera zooming.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47808,6 +47962,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelDeltaPercentage", {
+            /**
+             * Gets or Set the mouse wheel delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47823,6 +47982,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "bouncingBehavior", {
+            /**
+             * Gets the bouncing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior;
             },
@@ -47830,6 +47993,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useBouncingBehavior", {
+            /**
+             * Defines if the bouncing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior != null;
             },
@@ -47850,6 +48017,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "framingBehavior", {
+            /**
+             * Gets the framing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior;
             },
@@ -47857,6 +48028,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useFramingBehavior", {
+            /**
+             * Defines if the framing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior != null;
             },
@@ -47877,6 +48052,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "autoRotationBehavior", {
+            /**
+             * Gets the auto rotation behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior;
             },
@@ -47884,6 +48063,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useAutoRotationBehavior", {
+            /**
+             * Defines if the auto rotation behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior != null;
             },
@@ -47940,6 +48123,10 @@ var BABYLON;
             }
             return this._target;
         };
+        /**
+         * Stores the current state of the camera (alpha, beta, radius and target)
+         * @returns the camera itself
+         */
         ArcRotateCamera.prototype.storeState = function () {
             this._storedAlpha = this.alpha;
             this._storedBeta = this.beta;
@@ -47977,7 +48164,13 @@ var BABYLON;
                 && this._cache.radius === this.radius
                 && this._cache.targetScreenOffset.equals(this.targetScreenOffset);
         };
-        // Methods
+        /**
+         * Attached controls to the current camera.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         * @param useCtrlForPanning  Defines whether ctrl is used for paning within the controls
+         * @param panningMouseButton Defines whether panning is allowed through mouse click button
+         */
         ArcRotateCamera.prototype.attachControl = function (element, noPreventDefault, useCtrlForPanning, panningMouseButton) {
             var _this = this;
             if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
@@ -47993,6 +48186,11 @@ var BABYLON;
                 _this.inertialPanningY = 0;
             };
         };
+        /**
+         * Detach the current controls from the camera.
+         * The camera will stop reacting to inputs.
+         * @param element Defines the element to stop listening the inputs from
+         */
         ArcRotateCamera.prototype.detachControl = function (element) {
             this.inputs.detachElement(element);
             if (this._reset) {
@@ -48099,6 +48297,9 @@ var BABYLON;
                 this.radius = this.upperRadiusLimit;
             }
         };
+        /**
+         * Rebuilds angles (alpha, beta) and radius from the give position and target.
+         */
         ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
             this.position.subtractToRef(this._getTargetPosition(), this._computationVector);
             this.radius = this._computationVector.length();
@@ -48114,6 +48315,10 @@ var BABYLON;
             this.beta = Math.acos(this._computationVector.y / this.radius);
             this._checkLimits();
         };
+        /**
+         * Use a position to define the current camera related information like aplha, beta and radius
+         * @param position Defines the position to set the camera at
+         */
         ArcRotateCamera.prototype.setPosition = function (position) {
             if (this.position.equals(position)) {
                 return;
@@ -48121,6 +48326,13 @@ var BABYLON;
             this.position.copyFrom(position);
             this.rebuildAnglesAndRadius();
         };
+        /**
+         * Defines the target the camera should look at.
+         * This will automatically adapt alpha beta and radius to fit within the new target.
+         * @param target Defines the new target as a Vector or a mesh
+         * @param toBoundingCenter In case of a mesh target, defines wether to target the mesh position or its bounding information center
+         * @param allowSamePosition If false, prevents reapplying the new computed position if it is identical to the current one (optim)
+         */
         ArcRotateCamera.prototype.setTarget = function (target, toBoundingCenter, allowSamePosition) {
             if (toBoundingCenter === void 0) { toBoundingCenter = false; }
             if (allowSamePosition === void 0) { allowSamePosition = false; }
@@ -48184,6 +48396,11 @@ var BABYLON;
             this._currentTarget = target;
             return this._viewMatrix;
         };
+        /**
+         * Zooms on a mesh to be at the min distance where we could see it fully in the current viewport.
+         * @param meshes Defines the mesh to zoom on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.zoomOn = function (meshes, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             meshes = meshes || this.getScene().meshes;
@@ -48192,6 +48409,12 @@ var BABYLON;
             this.radius = distance * this.zoomOnFactor;
             this.focusOn({ min: minMaxVector.min, max: minMaxVector.max, distance: distance }, doNotUpdateMaxZ);
         };
+        /**
+         * Focus on a mesh or a bounding box. This adapts the target and maxRadius if necessary but does not update the current radius.
+         * The target will be changed but the radius
+         * @param meshesOrMinMaxVectorAndDistance Defines the mesh or bounding info to focus on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.focusOn = function (meshesOrMinMaxVectorAndDistance, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             var meshesOrMinMaxVector;
@@ -48257,10 +48480,17 @@ var BABYLON;
             }
             _super.prototype._updateRigCameras.call(this);
         };
+        /**
+         * Destroy the camera and release the current resources hold by it.
+         */
         ArcRotateCamera.prototype.dispose = function () {
             this.inputs.clear();
             _super.prototype.dispose.call(this);
         };
+        /**
+         * Gets the current object class name.
+         * @return the class name
+         */
         ArcRotateCamera.prototype.getClassName = function () {
             return "ArcRotateCamera";
         };
@@ -48326,6 +48556,9 @@ var BABYLON;
         ], ArcRotateCamera.prototype, "zoomOnFactor", void 0);
         __decorate([
             BABYLON.serialize()
+        ], ArcRotateCamera.prototype, "targetScreenOffset", void 0);
+        __decorate([
+            BABYLON.serialize()
         ], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
         return ArcRotateCamera;
     }(BABYLON.TargetCamera));
@@ -50650,7 +50883,16 @@ var BABYLON;
      * Use this class to create coordinated animations on multiple targets
      */
     var AnimationGroup = /** @class */ (function () {
-        function AnimationGroup(name, scene) {
+        /**
+         * Instantiates a new Animation Group.
+         * This helps managing several animations at once.
+         * @see http://doc.babylonjs.com/how_to/group
+         * @param name Defines the name of the group
+         * @param scene Defines the scene the group belongs to
+         */
+        function AnimationGroup(
+        /** The name of the animation group */
+        name, scene) {
             if (scene === void 0) { scene = null; }
             this.name = name;
             this._targetedAnimations = new Array();
@@ -50658,6 +50900,9 @@ var BABYLON;
             this._from = Number.MAX_VALUE;
             this._to = -Number.MAX_VALUE;
             this._speedRatio = 1;
+            /**
+             * This observable will notify when one animation have ended.
+             */
             this.onAnimationEndObservable = new BABYLON.Observable();
             /**
              * This observable will notify when all animations have ended.
@@ -50769,6 +51014,7 @@ var BABYLON;
          * It can add constant keys at begin or end
          * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)
          * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)
+         * @returns the animation group
          */
         AnimationGroup.prototype.normalize = function (beginFrame, endFrame) {
             if (beginFrame === void 0) { beginFrame = null; }
@@ -50841,6 +51087,7 @@ var BABYLON;
         };
         /**
          * Pause all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.pause = function () {
             if (!this._isStarted) {
@@ -50857,6 +51104,7 @@ var BABYLON;
          * Play all animations to initial state
          * This function will start() the animations if they were not started or will restart() them if they were paused
          * @param loop defines if animations must loop
+         * @returns the animation group
          */
         AnimationGroup.prototype.play = function (loop) {
             // only if all animatables are ready and exist
@@ -50877,6 +51125,7 @@ var BABYLON;
         };
         /**
          * Reset all animations to initial state
+         * @returns the animation group
          */
         AnimationGroup.prototype.reset = function () {
             if (!this._isStarted) {
@@ -50890,6 +51139,7 @@ var BABYLON;
         };
         /**
          * Restart animations from key 0
+         * @returns the animation group
          */
         AnimationGroup.prototype.restart = function () {
             if (!this._isStarted) {
@@ -50903,6 +51153,7 @@ var BABYLON;
         };
         /**
          * Stop all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.stop = function () {
             if (!this._isStarted) {
@@ -77818,9 +78069,30 @@ var BABYLON;
         return FollowCamera;
     }(BABYLON.TargetCamera));
     BABYLON.FollowCamera = FollowCamera;
+    /**
+     * Arc Rotate version of the follow camera.
+     * It still follows a defined mesh but in an Arc Rotate Camera fashion.
+     */
     var ArcFollowCamera = /** @class */ (function (_super) {
         __extends(ArcFollowCamera, _super);
-        function ArcFollowCamera(name, alpha, beta, radius, target, scene) {
+        /**
+         * Instantiates a new ArcFollowCamera
+         * @param name Defines the name of the camera
+         * @param alpha Defines the rotation angle of the camera around the logitudinal axis
+         * @param beta Defines the rotation angle of the camera around the elevation axis
+         * @param radius Defines the radius of the camera from its target point
+         * @param target Defines the target of the camera
+         * @param scene Defines the scene the camera belongs to
+         */
+        function ArcFollowCamera(name, 
+        /** The longitudinal angle of the camera */
+        alpha, 
+        /** The latitudinal angle of the camera */
+        beta, 
+        /** The radius of the camera from its target */
+        radius, 
+        /** Defines the camera target (the messh it should follow) */
+        target, scene) {
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene) || this;
             _this.alpha = alpha;
             _this.beta = beta;
@@ -77846,6 +78118,10 @@ var BABYLON;
             _super.prototype._checkInputs.call(this);
             this.follow();
         };
+        /**
+         * Returns the class name of the object.
+         * It is mostly used internally for serialization purposes.
+         */
         ArcFollowCamera.prototype.getClassName = function () {
             return "ArcFollowCamera";
         };

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


+ 283 - 7
dist/preview release/es6.js

@@ -3409,6 +3409,13 @@ var BABYLON;
             return new Vector3(0.0, 0.0, 1.0);
         };
         /**
+         * Returns a new Vector3 set to (0.0, 0.0, -1.0)
+         * @returns a new forward Vector3
+         */
+        Vector3.Backward = function () {
+            return new Vector3(0.0, 0.0, -1.0);
+        };
+        /**
          * Returns a new Vector3 set to (1.0, 0.0, 0.0)
          * @returns a new right Vector3
          */
@@ -7001,11 +7008,23 @@ var BABYLON;
         return Angle;
     }());
     BABYLON.Angle = Angle;
+    /**
+     * This represents an arc in a 2d space.
+     */
     var Arc2 = /** @class */ (function () {
         /**
          * Creates an Arc object from the three given points : start, middle and end.
-         */
-        function Arc2(startPoint, midPoint, endPoint) {
+         * @param startPoint Defines the start point of the arc
+         * @param midPoint Defines the midlle point of the arc
+         * @param endPoint Defines the end point of the arc
+         */
+        function Arc2(
+        /** Defines the start point of the arc */
+        startPoint, 
+        /** Defines the mid point of the arc */
+        midPoint, 
+        /** Defines the end point of the arc */
+        endPoint) {
             this.startPoint = startPoint;
             this.midPoint = midPoint;
             this.endPoint = endPoint;
@@ -17653,7 +17672,7 @@ var BABYLON;
             this._parentRenderId = -1;
             this._childRenderId = -1;
             /** @hidden */
-            this._worldMatrix = BABYLON.Matrix.Zero();
+            this._worldMatrix = BABYLON.Matrix.Identity();
             /** @hidden */
             this._worldMatrixDeterminant = 0;
             this._animationPropertiesOverride = null;
@@ -47558,36 +47577,135 @@ var BABYLON;
     BABYLON.Node.AddNodeConstructor("ArcRotateCamera", function (name, scene) {
         return function () { return new ArcRotateCamera(name, 0, 0, 1.0, BABYLON.Vector3.Zero(), scene); };
     });
+    /**
+     * This represents an orbital type of camera.
+     *
+     * This camera always points towards a given target position and can be rotated around that target with the target as the centre of rotation. It can be controlled with cursors and mouse, or with touch events.
+     * Think of this camera as one orbiting its target position, or more imaginatively as a spy satellite orbiting the earth. Its position relative to the target (earth) can be set by three parameters, alpha (radians) the longitudinal rotation, beta (radians) the latitudinal rotation and radius the distance from the target position.
+     * @see http://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera
+     */
     var ArcRotateCamera = /** @class */ (function (_super) {
         __extends(ArcRotateCamera, _super);
+        /**
+         * Instantiates a new ArcRotateCamera in a given scene
+         * @param name Defines the name of the camera
+         * @param alpha Defines the camera rotation along the logitudinal axis
+         * @param beta Defines the camera rotation along the latitudinal axis
+         * @param radius Defines the camera distance from its target
+         * @param target Defines the camera target
+         * @param scene Defines the scene the camera belongs to
+         * @param setActiveOnSceneIfNoneActive Defines wheter the camera should be marked as active if not other active cameras have been defined
+         */
         function ArcRotateCamera(name, alpha, beta, radius, target, scene, setActiveOnSceneIfNoneActive) {
             if (setActiveOnSceneIfNoneActive === void 0) { setActiveOnSceneIfNoneActive = true; }
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene, setActiveOnSceneIfNoneActive) || this;
+            /**
+             * Current inertia value on the longitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialAlphaOffset = 0;
+            /**
+             * Current inertia value on the latitudinal axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialBetaOffset = 0;
+            /**
+             * Current inertia value on the radius axis.
+             * The bigger this number the longer it will take for the camera to stop.
+             */
             _this.inertialRadiusOffset = 0;
+            /**
+             * Minimum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerAlphaLimit = null;
+            /**
+             * Maximum allowed angle on the longitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperAlphaLimit = null;
+            /**
+             * Minimum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerBetaLimit = 0.01;
+            /**
+             * Maximum allowed angle on the latitudinal axis.
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperBetaLimit = Math.PI;
+            /**
+             * Minimum allowed distance of the camera to the target (The camera can not get closer).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.lowerRadiusLimit = null;
+            /**
+             * Maximum allowed distance of the camera to the target (The camera can not get further).
+             * This can help limiting how the Camera is able to move in the scene.
+             */
             _this.upperRadiusLimit = null;
+            /**
+             * Defines the current inertia value used during panning of the camera along the X axis.
+             */
             _this.inertialPanningX = 0;
+            /**
+             * Defines the current inertia value used during panning of the camera along the Y axis.
+             */
             _this.inertialPanningY = 0;
+            /**
+             * Defines the distance used to consider the camera in pan mode vs pinch/zoom.
+             * Basically if your fingers moves away from more than this distance you will be considered
+             * in pinch mode.
+             */
             _this.pinchToPanMaxDistance = 20;
+            /**
+             * Defines the maximum distance the camera can pan.
+             * This could help keeping the cammera always in your scene.
+             */
             _this.panningDistanceLimit = null;
+            /**
+             * Defines the target of the camera before paning.
+             */
             _this.panningOriginTarget = BABYLON.Vector3.Zero();
+            /**
+             * Defines the value of the inertia used during panning.
+             * 0 would mean stop inertia and one would mean no decelleration at all.
+             */
             _this.panningInertia = 0.9;
             //-- end properties for backward compatibility for inputs
+            /**
+             * Defines how much the radius should be scaled while zomming on a particular mesh (through the zoomOn function)
+             */
             _this.zoomOnFactor = 1;
+            /**
+             * Defines a screen offset for the camera position.
+             */
             _this.targetScreenOffset = BABYLON.Vector2.Zero();
+            /**
+             * Allows the camera to be completely reversed.
+             * If false the camera can not arrive upside down.
+             */
             _this.allowUpsideDown = true;
             /** @hidden */
             _this._viewMatrix = new BABYLON.Matrix();
-            // Panning
+            /**
+             * Defines the allowed panning axis.
+             */
             _this.panningAxis = new BABYLON.Vector3(1, 1, 0);
+            /**
+             * Observable triggered when the mesh target has been changed on the camera.
+             */
             _this.onMeshTargetChangedObservable = new BABYLON.Observable();
+            /**
+             * Defines whether the camera should check collision with the objects oh the scene.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#how-can-i-do-this
+             */
             _this.checkCollisions = false;
+            /**
+             * Defines the collision radius of the camera.
+             * This simulates a sphere around the camera.
+             * @see http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#arcrotatecamera
+             */
             _this.collisionRadius = new BABYLON.Vector3(0.5, 0.5, 0.5);
             _this._previousPosition = BABYLON.Vector3.Zero();
             _this._collisionVelocity = BABYLON.Vector3.Zero();
@@ -47642,6 +47760,10 @@ var BABYLON;
             return _this;
         }
         Object.defineProperty(ArcRotateCamera.prototype, "target", {
+            /**
+             * Defines the target point of the camera.
+             * The camera looks towards it form the radius distance.
+             */
             get: function () {
                 return this._target;
             },
@@ -47653,6 +47775,9 @@ var BABYLON;
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityX", {
             //-- begin properties for backward compatibility for inputs
+            /**
+             * Gets or Set the pointer angular sensibility  along the X axis  or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47669,6 +47794,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "angularSensibilityY", {
+            /**
+             * Gets or Set the pointer angular sensibility along the Y axis or how fast is the camera rotating.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47685,6 +47813,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchPrecision", {
+            /**
+             * Gets or Set the pointer pinch precision or how fast is the camera zooming.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47701,6 +47832,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "pinchDeltaPercentage", {
+            /**
+             * Gets or Set the pointer pinch delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47717,6 +47853,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "panningSensibility", {
+            /**
+             * Gets or Set the pointer panning sensibility or how fast is the camera moving.
+             */
             get: function () {
                 var pointers = this.inputs.attached["pointers"];
                 if (pointers)
@@ -47733,6 +47872,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysUp", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47748,6 +47890,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysDown", {
+            /**
+             * Gets or Set the list of keyboard keys used to control beta angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47763,6 +47908,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysLeft", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a negative direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47778,6 +47926,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "keysRight", {
+            /**
+             * Gets or Set the list of keyboard keys used to control alpha angle in a positive direction.
+             */
             get: function () {
                 var keyboard = this.inputs.attached["keyboard"];
                 if (keyboard)
@@ -47793,6 +47944,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelPrecision", {
+            /**
+             * Gets or Set the mouse wheel precision or how fast is the camera zooming.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47808,6 +47962,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "wheelDeltaPercentage", {
+            /**
+             * Gets or Set the mouse wheel delta percentage or how fast is the camera zooming.
+             * It will be used instead of pinchDeltaPrecision if different from 0.
+             * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
+             */
             get: function () {
                 var mousewheel = this.inputs.attached["mousewheel"];
                 if (mousewheel)
@@ -47823,6 +47982,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "bouncingBehavior", {
+            /**
+             * Gets the bouncing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior;
             },
@@ -47830,6 +47993,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useBouncingBehavior", {
+            /**
+             * Defines if the bouncing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
+             */
             get: function () {
                 return this._bouncingBehavior != null;
             },
@@ -47850,6 +48017,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "framingBehavior", {
+            /**
+             * Gets the framing behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior;
             },
@@ -47857,6 +48028,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useFramingBehavior", {
+            /**
+             * Defines if the framing behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+             */
             get: function () {
                 return this._framingBehavior != null;
             },
@@ -47877,6 +48052,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "autoRotationBehavior", {
+            /**
+             * Gets the auto rotation behavior of the camera if it has been enabled.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior;
             },
@@ -47884,6 +48063,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(ArcRotateCamera.prototype, "useAutoRotationBehavior", {
+            /**
+             * Defines if the auto rotation behavior of the camera is enabled on the camera.
+             * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+             */
             get: function () {
                 return this._autoRotationBehavior != null;
             },
@@ -47940,6 +48123,10 @@ var BABYLON;
             }
             return this._target;
         };
+        /**
+         * Stores the current state of the camera (alpha, beta, radius and target)
+         * @returns the camera itself
+         */
         ArcRotateCamera.prototype.storeState = function () {
             this._storedAlpha = this.alpha;
             this._storedBeta = this.beta;
@@ -47977,7 +48164,13 @@ var BABYLON;
                 && this._cache.radius === this.radius
                 && this._cache.targetScreenOffset.equals(this.targetScreenOffset);
         };
-        // Methods
+        /**
+         * Attached controls to the current camera.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         * @param useCtrlForPanning  Defines whether ctrl is used for paning within the controls
+         * @param panningMouseButton Defines whether panning is allowed through mouse click button
+         */
         ArcRotateCamera.prototype.attachControl = function (element, noPreventDefault, useCtrlForPanning, panningMouseButton) {
             var _this = this;
             if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
@@ -47993,6 +48186,11 @@ var BABYLON;
                 _this.inertialPanningY = 0;
             };
         };
+        /**
+         * Detach the current controls from the camera.
+         * The camera will stop reacting to inputs.
+         * @param element Defines the element to stop listening the inputs from
+         */
         ArcRotateCamera.prototype.detachControl = function (element) {
             this.inputs.detachElement(element);
             if (this._reset) {
@@ -48099,6 +48297,9 @@ var BABYLON;
                 this.radius = this.upperRadiusLimit;
             }
         };
+        /**
+         * Rebuilds angles (alpha, beta) and radius from the give position and target.
+         */
         ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
             this.position.subtractToRef(this._getTargetPosition(), this._computationVector);
             this.radius = this._computationVector.length();
@@ -48114,6 +48315,10 @@ var BABYLON;
             this.beta = Math.acos(this._computationVector.y / this.radius);
             this._checkLimits();
         };
+        /**
+         * Use a position to define the current camera related information like aplha, beta and radius
+         * @param position Defines the position to set the camera at
+         */
         ArcRotateCamera.prototype.setPosition = function (position) {
             if (this.position.equals(position)) {
                 return;
@@ -48121,6 +48326,13 @@ var BABYLON;
             this.position.copyFrom(position);
             this.rebuildAnglesAndRadius();
         };
+        /**
+         * Defines the target the camera should look at.
+         * This will automatically adapt alpha beta and radius to fit within the new target.
+         * @param target Defines the new target as a Vector or a mesh
+         * @param toBoundingCenter In case of a mesh target, defines wether to target the mesh position or its bounding information center
+         * @param allowSamePosition If false, prevents reapplying the new computed position if it is identical to the current one (optim)
+         */
         ArcRotateCamera.prototype.setTarget = function (target, toBoundingCenter, allowSamePosition) {
             if (toBoundingCenter === void 0) { toBoundingCenter = false; }
             if (allowSamePosition === void 0) { allowSamePosition = false; }
@@ -48184,6 +48396,11 @@ var BABYLON;
             this._currentTarget = target;
             return this._viewMatrix;
         };
+        /**
+         * Zooms on a mesh to be at the min distance where we could see it fully in the current viewport.
+         * @param meshes Defines the mesh to zoom on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.zoomOn = function (meshes, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             meshes = meshes || this.getScene().meshes;
@@ -48192,6 +48409,12 @@ var BABYLON;
             this.radius = distance * this.zoomOnFactor;
             this.focusOn({ min: minMaxVector.min, max: minMaxVector.max, distance: distance }, doNotUpdateMaxZ);
         };
+        /**
+         * Focus on a mesh or a bounding box. This adapts the target and maxRadius if necessary but does not update the current radius.
+         * The target will be changed but the radius
+         * @param meshesOrMinMaxVectorAndDistance Defines the mesh or bounding info to focus on
+         * @param doNotUpdateMaxZ Defines whether or not maxZ should be updated whilst zooming on the mesh (this can happen if the mesh is big and the maxradius pretty small for instance)
+         */
         ArcRotateCamera.prototype.focusOn = function (meshesOrMinMaxVectorAndDistance, doNotUpdateMaxZ) {
             if (doNotUpdateMaxZ === void 0) { doNotUpdateMaxZ = false; }
             var meshesOrMinMaxVector;
@@ -48257,10 +48480,17 @@ var BABYLON;
             }
             _super.prototype._updateRigCameras.call(this);
         };
+        /**
+         * Destroy the camera and release the current resources hold by it.
+         */
         ArcRotateCamera.prototype.dispose = function () {
             this.inputs.clear();
             _super.prototype.dispose.call(this);
         };
+        /**
+         * Gets the current object class name.
+         * @return the class name
+         */
         ArcRotateCamera.prototype.getClassName = function () {
             return "ArcRotateCamera";
         };
@@ -48326,6 +48556,9 @@ var BABYLON;
         ], ArcRotateCamera.prototype, "zoomOnFactor", void 0);
         __decorate([
             BABYLON.serialize()
+        ], ArcRotateCamera.prototype, "targetScreenOffset", void 0);
+        __decorate([
+            BABYLON.serialize()
         ], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
         return ArcRotateCamera;
     }(BABYLON.TargetCamera));
@@ -50650,7 +50883,16 @@ var BABYLON;
      * Use this class to create coordinated animations on multiple targets
      */
     var AnimationGroup = /** @class */ (function () {
-        function AnimationGroup(name, scene) {
+        /**
+         * Instantiates a new Animation Group.
+         * This helps managing several animations at once.
+         * @see http://doc.babylonjs.com/how_to/group
+         * @param name Defines the name of the group
+         * @param scene Defines the scene the group belongs to
+         */
+        function AnimationGroup(
+        /** The name of the animation group */
+        name, scene) {
             if (scene === void 0) { scene = null; }
             this.name = name;
             this._targetedAnimations = new Array();
@@ -50658,6 +50900,9 @@ var BABYLON;
             this._from = Number.MAX_VALUE;
             this._to = -Number.MAX_VALUE;
             this._speedRatio = 1;
+            /**
+             * This observable will notify when one animation have ended.
+             */
             this.onAnimationEndObservable = new BABYLON.Observable();
             /**
              * This observable will notify when all animations have ended.
@@ -50769,6 +51014,7 @@ var BABYLON;
          * It can add constant keys at begin or end
          * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)
          * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)
+         * @returns the animation group
          */
         AnimationGroup.prototype.normalize = function (beginFrame, endFrame) {
             if (beginFrame === void 0) { beginFrame = null; }
@@ -50841,6 +51087,7 @@ var BABYLON;
         };
         /**
          * Pause all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.pause = function () {
             if (!this._isStarted) {
@@ -50857,6 +51104,7 @@ var BABYLON;
          * Play all animations to initial state
          * This function will start() the animations if they were not started or will restart() them if they were paused
          * @param loop defines if animations must loop
+         * @returns the animation group
          */
         AnimationGroup.prototype.play = function (loop) {
             // only if all animatables are ready and exist
@@ -50877,6 +51125,7 @@ var BABYLON;
         };
         /**
          * Reset all animations to initial state
+         * @returns the animation group
          */
         AnimationGroup.prototype.reset = function () {
             if (!this._isStarted) {
@@ -50890,6 +51139,7 @@ var BABYLON;
         };
         /**
          * Restart animations from key 0
+         * @returns the animation group
          */
         AnimationGroup.prototype.restart = function () {
             if (!this._isStarted) {
@@ -50903,6 +51153,7 @@ var BABYLON;
         };
         /**
          * Stop all animations
+         * @returns the animation group
          */
         AnimationGroup.prototype.stop = function () {
             if (!this._isStarted) {
@@ -77818,9 +78069,30 @@ var BABYLON;
         return FollowCamera;
     }(BABYLON.TargetCamera));
     BABYLON.FollowCamera = FollowCamera;
+    /**
+     * Arc Rotate version of the follow camera.
+     * It still follows a defined mesh but in an Arc Rotate Camera fashion.
+     */
     var ArcFollowCamera = /** @class */ (function (_super) {
         __extends(ArcFollowCamera, _super);
-        function ArcFollowCamera(name, alpha, beta, radius, target, scene) {
+        /**
+         * Instantiates a new ArcFollowCamera
+         * @param name Defines the name of the camera
+         * @param alpha Defines the rotation angle of the camera around the logitudinal axis
+         * @param beta Defines the rotation angle of the camera around the elevation axis
+         * @param radius Defines the radius of the camera from its target point
+         * @param target Defines the target of the camera
+         * @param scene Defines the scene the camera belongs to
+         */
+        function ArcFollowCamera(name, 
+        /** The longitudinal angle of the camera */
+        alpha, 
+        /** The latitudinal angle of the camera */
+        beta, 
+        /** The radius of the camera from its target */
+        radius, 
+        /** Defines the camera target (the messh it should follow) */
+        target, scene) {
             var _this = _super.call(this, name, BABYLON.Vector3.Zero(), scene) || this;
             _this.alpha = alpha;
             _this.beta = beta;
@@ -77846,6 +78118,10 @@ var BABYLON;
             _super.prototype._checkInputs.call(this);
             this.follow();
         };
+        /**
+         * Returns the class name of the object.
+         * It is mostly used internally for serialization purposes.
+         */
         ArcFollowCamera.prototype.getClassName = function () {
             return "ArcFollowCamera";
         };

+ 3 - 5
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -1094,7 +1094,7 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
     class KHR_lights implements IGLTFLoaderExtension {
         /** The name of this extension. */
@@ -1110,8 +1110,6 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
-        /** @hidden */
         loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
 }
@@ -1139,9 +1137,9 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](TODO) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
-    class EXT_lights_imageBased implements IGLTFLoaderExtension {
+    class EXT_lights_image_based implements IGLTFLoaderExtension {
         /** The name of this extension. */
         readonly name: string;
         /** Defines whether this extension is enabled. */

+ 22 - 37
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -3396,16 +3396,15 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "KHR_lights";
+            var NAME = "KHR_lights_punctual";
             var LightType;
             (function (LightType) {
-                LightType["AMBIENT"] = "ambient";
                 LightType["DIRECTIONAL"] = "directional";
                 LightType["POINT"] = "point";
                 LightType["SPOT"] = "spot";
             })(LightType || (LightType = {}));
             /**
-             * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
              */
             var KHR_lights = /** @class */ (function () {
                 /** @hidden */
@@ -3430,19 +3429,6 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                KHR_lights.prototype.loadSceneAsync = function (context, scene) {
-                    var _this = this;
-                    return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
-                        var promise = _this._loader.loadSceneAsync(context, scene);
-                        var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
-                        if (light.type !== LightType.AMBIENT) {
-                            throw new Error(extensionContext + ": Only ambient lights are allowed on a scene");
-                        }
-                        _this._loader.babylonScene.ambientColor = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.Black();
-                        return promise;
-                    });
-                };
-                /** @hidden */
                 KHR_lights.prototype.loadNodeAsync = function (context, node, assign) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, node, this.name, function (extensionContext, extension) {
@@ -3451,11 +3437,8 @@ var BABYLON;
                             var name = babylonMesh.name;
                             var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
                             switch (light.type) {
-                                case LightType.AMBIENT: {
-                                    throw new Error(extensionContext + ": Ambient lights are not allowed on a node");
-                                }
                                 case LightType.DIRECTIONAL: {
-                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Forward(), _this._loader.babylonScene);
+                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Backward(), _this._loader.babylonScene);
                                     break;
                                 }
                                 case LightType.POINT: {
@@ -3463,18 +3446,20 @@ var BABYLON;
                                     break;
                                 }
                                 case LightType.SPOT: {
-                                    // TODO: support inner and outer cone angles
-                                    //const innerConeAngle = spotLight.innerConeAngle || 0;
-                                    var outerConeAngle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
-                                    babylonLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Forward(), outerConeAngle, 2, _this._loader.babylonScene);
+                                    var babylonSpotLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Backward(), 0, 2, _this._loader.babylonScene);
+                                    babylonSpotLight.angle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
+                                    babylonSpotLight.innerAngle = light.spot && light.spot.innerConeAngle || 0;
+                                    babylonLight = babylonSpotLight;
                                     break;
                                 }
                                 default: {
                                     throw new Error(extensionContext + ": Invalid light type (" + light.type + ")");
                                 }
                             }
+                            babylonLight.falloffType = BABYLON.Light.FALLOFF_GLTF;
                             babylonLight.diffuse = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.White();
                             babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;
+                            babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;
                             babylonLight.parent = babylonMesh;
                             assign(babylonMesh);
                         });
@@ -3488,7 +3473,7 @@ var BABYLON;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=KHR_lights.js.map
+//# sourceMappingURL=KHR_lights_punctual.js.map
 
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
@@ -3560,13 +3545,13 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "EXT_lights_imageBased";
+            var NAME = "EXT_lights_image_based";
             /**
-             * [Specification](TODO) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
              */
-            var EXT_lights_imageBased = /** @class */ (function () {
+            var EXT_lights_image_based = /** @class */ (function () {
                 /** @hidden */
-                function EXT_lights_imageBased(loader) {
+                function EXT_lights_image_based(loader) {
                     /** The name of this extension. */
                     this.name = NAME;
                     /** Defines whether this extension is enabled. */
@@ -3574,12 +3559,12 @@ var BABYLON;
                     this._loader = loader;
                 }
                 /** @hidden */
-                EXT_lights_imageBased.prototype.dispose = function () {
+                EXT_lights_image_based.prototype.dispose = function () {
                     delete this._loader;
                     delete this._lights;
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.onLoading = function () {
+                EXT_lights_image_based.prototype.onLoading = function () {
                     var extensions = this._loader.gltf.extensions;
                     if (extensions && extensions[this.name]) {
                         var extension = extensions[this.name];
@@ -3587,7 +3572,7 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.loadSceneAsync = function (context, scene) {
+                EXT_lights_image_based.prototype.loadSceneAsync = function (context, scene) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
                         var promises = new Array();
@@ -3601,7 +3586,7 @@ var BABYLON;
                         return Promise.all(promises).then(function () { });
                     });
                 };
-                EXT_lights_imageBased.prototype._loadLightAsync = function (context, light) {
+                EXT_lights_image_based.prototype._loadLightAsync = function (context, light) {
                     var _this = this;
                     if (!light._loaded) {
                         var promises = new Array();
@@ -3656,12 +3641,12 @@ var BABYLON;
                         return light._babylonTexture;
                     });
                 };
-                return EXT_lights_imageBased;
+                return EXT_lights_image_based;
             }());
-            Extensions.EXT_lights_imageBased = EXT_lights_imageBased;
-            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_imageBased(loader); });
+            Extensions.EXT_lights_image_based = EXT_lights_image_based;
+            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_image_based(loader); });
         })(Extensions = GLTF2.Extensions || (GLTF2.Extensions = {}));
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=EXT_lights_imageBased.js.map
+//# sourceMappingURL=EXT_lights_image_based.js.map

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 3 - 5
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -1656,7 +1656,7 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
     class KHR_lights implements IGLTFLoaderExtension {
         /** The name of this extension. */
@@ -1672,8 +1672,6 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
-        /** @hidden */
         loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
 }
@@ -1701,9 +1699,9 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](TODO) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
-    class EXT_lights_imageBased implements IGLTFLoaderExtension {
+    class EXT_lights_image_based implements IGLTFLoaderExtension {
         /** The name of this extension. */
         readonly name: string;
         /** Defines whether this extension is enabled. */

+ 22 - 37
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -5603,16 +5603,15 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "KHR_lights";
+            var NAME = "KHR_lights_punctual";
             var LightType;
             (function (LightType) {
-                LightType["AMBIENT"] = "ambient";
                 LightType["DIRECTIONAL"] = "directional";
                 LightType["POINT"] = "point";
                 LightType["SPOT"] = "spot";
             })(LightType || (LightType = {}));
             /**
-             * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
              */
             var KHR_lights = /** @class */ (function () {
                 /** @hidden */
@@ -5637,19 +5636,6 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                KHR_lights.prototype.loadSceneAsync = function (context, scene) {
-                    var _this = this;
-                    return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
-                        var promise = _this._loader.loadSceneAsync(context, scene);
-                        var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
-                        if (light.type !== LightType.AMBIENT) {
-                            throw new Error(extensionContext + ": Only ambient lights are allowed on a scene");
-                        }
-                        _this._loader.babylonScene.ambientColor = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.Black();
-                        return promise;
-                    });
-                };
-                /** @hidden */
                 KHR_lights.prototype.loadNodeAsync = function (context, node, assign) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, node, this.name, function (extensionContext, extension) {
@@ -5658,11 +5644,8 @@ var BABYLON;
                             var name = babylonMesh.name;
                             var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
                             switch (light.type) {
-                                case LightType.AMBIENT: {
-                                    throw new Error(extensionContext + ": Ambient lights are not allowed on a node");
-                                }
                                 case LightType.DIRECTIONAL: {
-                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Forward(), _this._loader.babylonScene);
+                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Backward(), _this._loader.babylonScene);
                                     break;
                                 }
                                 case LightType.POINT: {
@@ -5670,18 +5653,20 @@ var BABYLON;
                                     break;
                                 }
                                 case LightType.SPOT: {
-                                    // TODO: support inner and outer cone angles
-                                    //const innerConeAngle = spotLight.innerConeAngle || 0;
-                                    var outerConeAngle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
-                                    babylonLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Forward(), outerConeAngle, 2, _this._loader.babylonScene);
+                                    var babylonSpotLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Backward(), 0, 2, _this._loader.babylonScene);
+                                    babylonSpotLight.angle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
+                                    babylonSpotLight.innerAngle = light.spot && light.spot.innerConeAngle || 0;
+                                    babylonLight = babylonSpotLight;
                                     break;
                                 }
                                 default: {
                                     throw new Error(extensionContext + ": Invalid light type (" + light.type + ")");
                                 }
                             }
+                            babylonLight.falloffType = BABYLON.Light.FALLOFF_GLTF;
                             babylonLight.diffuse = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.White();
                             babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;
+                            babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;
                             babylonLight.parent = babylonMesh;
                             assign(babylonMesh);
                         });
@@ -5695,7 +5680,7 @@ var BABYLON;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=KHR_lights.js.map
+//# sourceMappingURL=KHR_lights_punctual.js.map
 
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
@@ -5767,13 +5752,13 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "EXT_lights_imageBased";
+            var NAME = "EXT_lights_image_based";
             /**
-             * [Specification](TODO) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
              */
-            var EXT_lights_imageBased = /** @class */ (function () {
+            var EXT_lights_image_based = /** @class */ (function () {
                 /** @hidden */
-                function EXT_lights_imageBased(loader) {
+                function EXT_lights_image_based(loader) {
                     /** The name of this extension. */
                     this.name = NAME;
                     /** Defines whether this extension is enabled. */
@@ -5781,12 +5766,12 @@ var BABYLON;
                     this._loader = loader;
                 }
                 /** @hidden */
-                EXT_lights_imageBased.prototype.dispose = function () {
+                EXT_lights_image_based.prototype.dispose = function () {
                     delete this._loader;
                     delete this._lights;
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.onLoading = function () {
+                EXT_lights_image_based.prototype.onLoading = function () {
                     var extensions = this._loader.gltf.extensions;
                     if (extensions && extensions[this.name]) {
                         var extension = extensions[this.name];
@@ -5794,7 +5779,7 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.loadSceneAsync = function (context, scene) {
+                EXT_lights_image_based.prototype.loadSceneAsync = function (context, scene) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
                         var promises = new Array();
@@ -5808,7 +5793,7 @@ var BABYLON;
                         return Promise.all(promises).then(function () { });
                     });
                 };
-                EXT_lights_imageBased.prototype._loadLightAsync = function (context, light) {
+                EXT_lights_image_based.prototype._loadLightAsync = function (context, light) {
                     var _this = this;
                     if (!light._loaded) {
                         var promises = new Array();
@@ -5863,12 +5848,12 @@ var BABYLON;
                         return light._babylonTexture;
                     });
                 };
-                return EXT_lights_imageBased;
+                return EXT_lights_image_based;
             }());
-            Extensions.EXT_lights_imageBased = EXT_lights_imageBased;
-            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_imageBased(loader); });
+            Extensions.EXT_lights_image_based = EXT_lights_image_based;
+            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_image_based(loader); });
         })(Extensions = GLTF2.Extensions || (GLTF2.Extensions = {}));
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=EXT_lights_imageBased.js.map
+//# sourceMappingURL=EXT_lights_image_based.js.map

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 3 - 5
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -1786,7 +1786,7 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
     class KHR_lights implements IGLTFLoaderExtension {
         /** The name of this extension. */
@@ -1802,8 +1802,6 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
-        /** @hidden */
         loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
 }
@@ -1831,9 +1829,9 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](TODO) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
-    class EXT_lights_imageBased implements IGLTFLoaderExtension {
+    class EXT_lights_image_based implements IGLTFLoaderExtension {
         /** The name of this extension. */
         readonly name: string;
         /** Defines whether this extension is enabled. */

+ 22 - 37
dist/preview release/loaders/babylonjs.loaders.js

@@ -6662,16 +6662,15 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "KHR_lights";
+            var NAME = "KHR_lights_punctual";
             var LightType;
             (function (LightType) {
-                LightType["AMBIENT"] = "ambient";
                 LightType["DIRECTIONAL"] = "directional";
                 LightType["POINT"] = "point";
                 LightType["SPOT"] = "spot";
             })(LightType || (LightType = {}));
             /**
-             * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
              */
             var KHR_lights = /** @class */ (function () {
                 /** @hidden */
@@ -6696,19 +6695,6 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                KHR_lights.prototype.loadSceneAsync = function (context, scene) {
-                    var _this = this;
-                    return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
-                        var promise = _this._loader.loadSceneAsync(context, scene);
-                        var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
-                        if (light.type !== LightType.AMBIENT) {
-                            throw new Error(extensionContext + ": Only ambient lights are allowed on a scene");
-                        }
-                        _this._loader.babylonScene.ambientColor = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.Black();
-                        return promise;
-                    });
-                };
-                /** @hidden */
                 KHR_lights.prototype.loadNodeAsync = function (context, node, assign) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, node, this.name, function (extensionContext, extension) {
@@ -6717,11 +6703,8 @@ var BABYLON;
                             var name = babylonMesh.name;
                             var light = GLTF2.ArrayItem.Get(extensionContext, _this._lights, extension.light);
                             switch (light.type) {
-                                case LightType.AMBIENT: {
-                                    throw new Error(extensionContext + ": Ambient lights are not allowed on a node");
-                                }
                                 case LightType.DIRECTIONAL: {
-                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Forward(), _this._loader.babylonScene);
+                                    babylonLight = new BABYLON.DirectionalLight(name, BABYLON.Vector3.Backward(), _this._loader.babylonScene);
                                     break;
                                 }
                                 case LightType.POINT: {
@@ -6729,18 +6712,20 @@ var BABYLON;
                                     break;
                                 }
                                 case LightType.SPOT: {
-                                    // TODO: support inner and outer cone angles
-                                    //const innerConeAngle = spotLight.innerConeAngle || 0;
-                                    var outerConeAngle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
-                                    babylonLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Forward(), outerConeAngle, 2, _this._loader.babylonScene);
+                                    var babylonSpotLight = new BABYLON.SpotLight(name, BABYLON.Vector3.Zero(), BABYLON.Vector3.Backward(), 0, 2, _this._loader.babylonScene);
+                                    babylonSpotLight.angle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
+                                    babylonSpotLight.innerAngle = light.spot && light.spot.innerConeAngle || 0;
+                                    babylonLight = babylonSpotLight;
                                     break;
                                 }
                                 default: {
                                     throw new Error(extensionContext + ": Invalid light type (" + light.type + ")");
                                 }
                             }
+                            babylonLight.falloffType = BABYLON.Light.FALLOFF_GLTF;
                             babylonLight.diffuse = light.color ? BABYLON.Color3.FromArray(light.color) : BABYLON.Color3.White();
                             babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;
+                            babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;
                             babylonLight.parent = babylonMesh;
                             assign(babylonMesh);
                         });
@@ -6754,7 +6739,7 @@ var BABYLON;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=KHR_lights.js.map
+//# sourceMappingURL=KHR_lights_punctual.js.map
 
 
 var BABYLON;
@@ -6826,13 +6811,13 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var NAME = "EXT_lights_imageBased";
+            var NAME = "EXT_lights_image_based";
             /**
-             * [Specification](TODO) (Experimental)
+             * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
              */
-            var EXT_lights_imageBased = /** @class */ (function () {
+            var EXT_lights_image_based = /** @class */ (function () {
                 /** @hidden */
-                function EXT_lights_imageBased(loader) {
+                function EXT_lights_image_based(loader) {
                     /** The name of this extension. */
                     this.name = NAME;
                     /** Defines whether this extension is enabled. */
@@ -6840,12 +6825,12 @@ var BABYLON;
                     this._loader = loader;
                 }
                 /** @hidden */
-                EXT_lights_imageBased.prototype.dispose = function () {
+                EXT_lights_image_based.prototype.dispose = function () {
                     delete this._loader;
                     delete this._lights;
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.onLoading = function () {
+                EXT_lights_image_based.prototype.onLoading = function () {
                     var extensions = this._loader.gltf.extensions;
                     if (extensions && extensions[this.name]) {
                         var extension = extensions[this.name];
@@ -6853,7 +6838,7 @@ var BABYLON;
                     }
                 };
                 /** @hidden */
-                EXT_lights_imageBased.prototype.loadSceneAsync = function (context, scene) {
+                EXT_lights_image_based.prototype.loadSceneAsync = function (context, scene) {
                     var _this = this;
                     return GLTF2.GLTFLoader.LoadExtensionAsync(context, scene, this.name, function (extensionContext, extension) {
                         var promises = new Array();
@@ -6867,7 +6852,7 @@ var BABYLON;
                         return Promise.all(promises).then(function () { });
                     });
                 };
-                EXT_lights_imageBased.prototype._loadLightAsync = function (context, light) {
+                EXT_lights_image_based.prototype._loadLightAsync = function (context, light) {
                     var _this = this;
                     if (!light._loaded) {
                         var promises = new Array();
@@ -6922,15 +6907,15 @@ var BABYLON;
                         return light._babylonTexture;
                     });
                 };
-                return EXT_lights_imageBased;
+                return EXT_lights_image_based;
             }());
-            Extensions.EXT_lights_imageBased = EXT_lights_imageBased;
-            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_imageBased(loader); });
+            Extensions.EXT_lights_image_based = EXT_lights_image_based;
+            GLTF2.GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_lights_image_based(loader); });
         })(Extensions = GLTF2.Extensions || (GLTF2.Extensions = {}));
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=EXT_lights_imageBased.js.map
+//# sourceMappingURL=EXT_lights_image_based.js.map
 
     
 

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 3 - 5
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -1793,7 +1793,7 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
     class KHR_lights implements IGLTFLoaderExtension {
         /** The name of this extension. */
@@ -1809,8 +1809,6 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         onLoading(): void;
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
-        /** @hidden */
         loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
 }
@@ -1838,9 +1836,9 @@ declare module BABYLON.GLTF2.Extensions {
 
 declare module BABYLON.GLTF2.Extensions {
     /**
-     * [Specification](TODO) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
-    class EXT_lights_imageBased implements IGLTFLoaderExtension {
+    class EXT_lights_image_based implements IGLTFLoaderExtension {
         /** The name of this extension. */
         readonly name: string;
         /** Defines whether this extension is enabled. */

+ 2 - 427
dist/preview release/typedocValidationBaseline.json

@@ -1,432 +1,7 @@
 {
-  "errors": 3750,
+  "errors": 3671,
   "babylon.typedoc.json": {
-    "errors": 3750,
-    "AnimationGroup": {
-      "Constructor": {
-        "new AnimationGroup": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "name": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "scene": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      },
-      "Property": {
-        "name": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onAnimationEndObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "normalize": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        },
-        "pause": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        },
-        "play": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        },
-        "reset": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        },
-        "restart": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        },
-        "stop": {
-          "Comments": {
-            "MissingReturn": true
-          }
-        }
-      }
-    },
-    "Arc2": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Property": {
-        "angle": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "centerPoint": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "endPoint": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "midPoint": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "orientation": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "radius": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "startAngle": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "startPoint": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "ArcFollowCamera": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Property": {
-        "alpha": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "beta": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "radius": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "target": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "ArcRotateCamera": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Property": {
-        "allowUpsideDown": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "alpha": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "angularSensibilityX": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "angularSensibilityY": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "autoRotationBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "beta": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "bouncingBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "checkCollisions": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "collisionRadius": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "framingBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "inertialAlphaOffset": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "inertialBetaOffset": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "inertialPanningX": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "inertialPanningY": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "inertialRadiusOffset": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "keysDown": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "keysLeft": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "keysRight": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "keysUp": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "lowerAlphaLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "lowerBetaLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "lowerRadiusLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onCollide": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onMeshTargetChangedObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "panningAxis": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "panningDistanceLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "panningInertia": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "panningOriginTarget": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "panningSensibility": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "pinchDeltaPercentage": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "pinchPrecision": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "pinchToPanMaxDistance": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "radius": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "target": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "targetScreenOffset": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "upperAlphaLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "upperBetaLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "upperRadiusLimit": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "useAutoRotationBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "useBouncingBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "useFramingBehavior": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "wheelDeltaPercentage": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "wheelPrecision": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "zoomOnFactor": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "focusOn": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "meshesOrMinMaxVectorAndDistance": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "doNotUpdateMaxZ": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "rebuildAnglesAndRadius": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "setPosition": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "position": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "zoomOn": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "meshes": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "doNotUpdateMaxZ": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      }
-    },
+    "errors": 3671,
     "ArcRotateCameraGamepadInput": {
       "Class": {
         "Comments": {

+ 202 - 0
dist/preview release/viewer/babylon.viewer.d.ts

@@ -674,6 +674,208 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    /**
+        * BABYLON.Animation play mode enum - is the animation looping or playing once
+        */
+    export const enum AnimationPlayMode {
+            ONCE = 0,
+            LOOP = 1
+    }
+    /**
+        * An enum representing the current state of an animation object
+        */
+    export const enum AnimationState {
+            INIT = 0,
+            PLAYING = 1,
+            PAUSED = 2,
+            STOPPED = 3,
+            ENDED = 4
+    }
+    /**
+        * The different type of easing functions available
+        */
+    export const enum EasingFunction {
+            Linear = 0,
+            CircleEase = 1,
+            BackEase = 2,
+            BounceEase = 3,
+            CubicEase = 4,
+            ElasticEase = 5,
+            ExponentialEase = 6,
+            PowerEase = 7,
+            QuadraticEase = 8,
+            QuarticEase = 9,
+            QuinticEase = 10,
+            SineEase = 11
+    }
+    /**
+        * Defines a simple animation to be applied to a model (scale).
+        */
+    export interface ModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: BABYLON.Vector3;
+            /**
+                * Easing function to apply
+                * See SPECTRE.EasingFunction
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+    /**
+        * This interface can be implemented to define new types of ModelAnimation objects.
+        */
+    export interface IModelAnimation {
+            /**
+                * Current animation state (playing, stopped etc')
+                */
+            readonly state: AnimationState;
+            /**
+                * the name of the animation
+                */
+            readonly name: string;
+            /**
+                * Get the max numbers of frame available in the animation group
+                *
+                * In correlation to an arry, this would be ".length"
+                */
+            readonly frames: number;
+            /**
+                * Get the current frame playing right now.
+                * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
+                *
+                * In correlation to an array, this would be the current index
+                */
+            readonly currentFrame: number;
+            /**
+                * BABYLON.Animation's FPS value
+                */
+            readonly fps: number;
+            /**
+                * Get or set the animation's speed ration (Frame-to-fps)
+                */
+            speedRatio: number;
+            /**
+                * Gets or sets the aimation's play mode.
+                */
+            playMode: AnimationPlayMode;
+            /**
+                * Start the animation
+                */
+            start(): any;
+            /**
+                * Stop the animation.
+                * This will fail silently if the animation group is already stopped.
+                */
+            stop(): any;
+            /**
+                * Pause the animation
+                * This will fail silently if the animation is not currently playing
+                */
+            pause(): any;
+            /**
+                * Reset this animation
+                */
+            reset(): any;
+            /**
+                * Restart the animation
+                */
+            restart(): any;
+            /**
+                * Go to a specific
+                * @param frameNumber the frame number to go to
+                */
+            goToFrame(frameNumber: number): any;
+            /**
+                * Dispose this animation
+                */
+            dispose(): any;
+    }
+    /**
+        * The GroupModelAnimation is an implementation of the IModelAnimation interface using BABYLON's
+        * native GroupAnimation class.
+        */
+    export class GroupModelAnimation implements IModelAnimation {
+            /**
+                * Create a new GroupModelAnimation object using an BABYLON.AnimationGroup object
+                * @param _animationGroup The aniamtion group to base the class on
+                */
+            constructor(_animationGroup: BABYLON.AnimationGroup);
+            /**
+                * Get the animation's name
+                */
+            readonly name: string;
+            /**
+                * Get the current animation's state
+                */
+            readonly state: AnimationState;
+            /**
+             * Sets the speed ratio to use for all animations
+             */
+            speedRatio: number;
+            /**
+                * Get the max numbers of frame available in the animation group
+                *
+                * In correlation to an arry, this would be ".length"
+                */
+            readonly frames: number;
+            /**
+                * Get the current frame playing right now.
+                * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
+                *
+                * In correlation to an array, this would be the current index
+                */
+            readonly currentFrame: number;
+            /**
+                * Get the FPS value of this animation
+                */
+            readonly fps: number;
+            /**
+             * Set the play mode.
+             * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
+             * If the animation is not set, the will be initialized and will wait for the user to start playing it.
+             */
+            playMode: AnimationPlayMode;
+            /**
+                * Reset the animation group
+                */
+            reset(): void;
+            /**
+                * Restart the animation group
+                */
+            restart(): void;
+            /**
+                *
+                * @param frameNumber Go to a specific frame in the animation
+                */
+            goToFrame(frameNumber: number): void;
+            /**
+                * Start playing the animation.
+                */
+            start(): void;
+            /**
+                * Pause the animation
+                */
+            pause(): void;
+            /**
+                * Stop the animation.
+                * This will fail silently if the animation group is already stopped.
+                */
+            stop(): void;
+            /**
+                * Dispose this animation object.
+                */
+            dispose(): void;
+    }
 }
 declare module BabylonViewer {
     /**

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


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


+ 203 - 1
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -732,7 +732,209 @@ declare module 'babylonjs-viewer/model/viewerModel' {
 }
 
 declare module 'babylonjs-viewer/model/modelAnimation' {
-    
+    import { AnimationGroup, Vector3 } from 'babylonjs';
+    /**
+        * Animation play mode enum - is the animation looping or playing once
+        */
+    export const enum AnimationPlayMode {
+            ONCE = 0,
+            LOOP = 1
+    }
+    /**
+        * An enum representing the current state of an animation object
+        */
+    export const enum AnimationState {
+            INIT = 0,
+            PLAYING = 1,
+            PAUSED = 2,
+            STOPPED = 3,
+            ENDED = 4
+    }
+    /**
+        * The different type of easing functions available
+        */
+    export const enum EasingFunction {
+            Linear = 0,
+            CircleEase = 1,
+            BackEase = 2,
+            BounceEase = 3,
+            CubicEase = 4,
+            ElasticEase = 5,
+            ExponentialEase = 6,
+            PowerEase = 7,
+            QuadraticEase = 8,
+            QuarticEase = 9,
+            QuinticEase = 10,
+            SineEase = 11
+    }
+    /**
+        * Defines a simple animation to be applied to a model (scale).
+        */
+    export interface ModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: Vector3;
+            /**
+                * Easing function to apply
+                * See SPECTRE.EasingFunction
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+    /**
+        * This interface can be implemented to define new types of ModelAnimation objects.
+        */
+    export interface IModelAnimation {
+            /**
+                * Current animation state (playing, stopped etc')
+                */
+            readonly state: AnimationState;
+            /**
+                * the name of the animation
+                */
+            readonly name: string;
+            /**
+                * Get the max numbers of frame available in the animation group
+                *
+                * In correlation to an arry, this would be ".length"
+                */
+            readonly frames: number;
+            /**
+                * Get the current frame playing right now.
+                * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
+                *
+                * In correlation to an array, this would be the current index
+                */
+            readonly currentFrame: number;
+            /**
+                * Animation's FPS value
+                */
+            readonly fps: number;
+            /**
+                * Get or set the animation's speed ration (Frame-to-fps)
+                */
+            speedRatio: number;
+            /**
+                * Gets or sets the aimation's play mode.
+                */
+            playMode: AnimationPlayMode;
+            /**
+                * Start the animation
+                */
+            start(): any;
+            /**
+                * Stop the animation.
+                * This will fail silently if the animation group is already stopped.
+                */
+            stop(): any;
+            /**
+                * Pause the animation
+                * This will fail silently if the animation is not currently playing
+                */
+            pause(): any;
+            /**
+                * Reset this animation
+                */
+            reset(): any;
+            /**
+                * Restart the animation
+                */
+            restart(): any;
+            /**
+                * Go to a specific
+                * @param frameNumber the frame number to go to
+                */
+            goToFrame(frameNumber: number): any;
+            /**
+                * Dispose this animation
+                */
+            dispose(): any;
+    }
+    /**
+        * The GroupModelAnimation is an implementation of the IModelAnimation interface using BABYLON's
+        * native GroupAnimation class.
+        */
+    export class GroupModelAnimation implements IModelAnimation {
+            /**
+                * Create a new GroupModelAnimation object using an AnimationGroup object
+                * @param _animationGroup The aniamtion group to base the class on
+                */
+            constructor(_animationGroup: AnimationGroup);
+            /**
+                * Get the animation's name
+                */
+            readonly name: string;
+            /**
+                * Get the current animation's state
+                */
+            readonly state: AnimationState;
+            /**
+             * Sets the speed ratio to use for all animations
+             */
+            speedRatio: number;
+            /**
+                * Get the max numbers of frame available in the animation group
+                *
+                * In correlation to an arry, this would be ".length"
+                */
+            readonly frames: number;
+            /**
+                * Get the current frame playing right now.
+                * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
+                *
+                * In correlation to an array, this would be the current index
+                */
+            readonly currentFrame: number;
+            /**
+                * Get the FPS value of this animation
+                */
+            readonly fps: number;
+            /**
+             * Set the play mode.
+             * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
+             * If the animation is not set, the will be initialized and will wait for the user to start playing it.
+             */
+            playMode: AnimationPlayMode;
+            /**
+                * Reset the animation group
+                */
+            reset(): void;
+            /**
+                * Restart the animation group
+                */
+            restart(): void;
+            /**
+                *
+                * @param frameNumber Go to a specific frame in the animation
+                */
+            goToFrame(frameNumber: number): void;
+            /**
+                * Start playing the animation.
+                */
+            start(): void;
+            /**
+                * Pause the animation
+                */
+            pause(): void;
+            /**
+                * Stop the animation.
+                * This will fail silently if the animation group is already stopped.
+                */
+            stop(): void;
+            /**
+                * Dispose this animation object.
+                */
+            dispose(): void;
+    }
 }
 
 declare module 'babylonjs-viewer/loader/plugins/loaderPlugin' {

+ 1 - 0
loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts

@@ -23,6 +23,7 @@ module BABYLON.GLTF2.Extensions {
             outerConeAngle?: number;
         };
     }
+    
 
     interface ILights {
         lights: ILight[];