浏览代码

Added all code documentation for GUI

David Catuhe 7 年之前
父节点
当前提交
f4c4b4b584
共有 44 个文件被更改,包括 14549 次插入10257 次删除
  1. 8732 7978
      Playground/babylon.d.txt
  2. 二进制
      Playground/textures/down.png
  3. 二进制
      Playground/textures/up.png
  4. 7 0
      Tools/Gulp/gulp-validateTypedoc.js
  5. 3 1
      Tools/Gulp/gulpfile.js
  6. 2155 2070
      dist/preview release/babylon.d.ts
  7. 74 4
      dist/preview release/babylon.max.js
  8. 74 4
      dist/preview release/babylon.no-module.max.js
  9. 74 4
      dist/preview release/es6.js
  10. 696 13
      dist/preview release/gui/babylon.gui.d.ts
  11. 668 22
      dist/preview release/gui/babylon.gui.js
  12. 4 4
      dist/preview release/gui/babylon.gui.min.js
  13. 696 13
      dist/preview release/gui/babylon.gui.module.d.ts
  14. 55 12
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  15. 54 12
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  16. 55 12
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  17. 54 12
      dist/preview release/loaders/babylon.glTFFileLoader.js
  18. 55 12
      dist/preview release/loaders/babylonjs.loaders.d.ts
  19. 54 12
      dist/preview release/loaders/babylonjs.loaders.js
  20. 55 12
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  21. 128 16
      dist/preview release/viewer/babylon.viewer.max.js
  22. 134 10
      gui/src/2D/advancedDynamicTexture.ts
  23. 50 0
      gui/src/2D/controls/button.ts
  24. 17 0
      gui/src/2D/controls/checkbox.ts
  25. 13 0
      gui/src/2D/controls/colorpicker.ts
  26. 53 0
      gui/src/2D/controls/container.ts
  27. 229 3
      gui/src/2D/controls/control.ts
  28. 6 0
      gui/src/2D/controls/ellipse.ts
  29. 49 1
      gui/src/2D/controls/image.ts
  30. 28 0
      gui/src/2D/controls/inputText.ts
  31. 7 0
      gui/src/2D/controls/line.ts
  32. 9 1
      gui/src/2D/math2D.ts
  33. 31 1
      gui/src/2D/measure.ts
  34. 18 0
      gui/src/2D/multiLinePoint.ts
  35. 44 1
      gui/src/2D/valueAndUnit.ts
  36. 6 6
      gui/src/3D/controls/holographicButton.ts
  37. 13 2
      gui/src/3D/gui3DManager.ts
  38. 8 0
      gui/src/3D/vector3WithInfo.ts
  39. 1 0
      loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
  40. 54 12
      loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts
  41. 19 0
      src/Debug/babylon.axesViewer.ts
  42. 22 0
      src/Debug/babylon.boneAxesViewer.ts
  43. 20 4
      src/Debug/babylon.physicsViewer.ts
  44. 25 3
      src/Debug/babylon.skeletonViewer.ts

文件差异内容过多而无法显示
+ 8732 - 7978
Playground/babylon.d.txt


二进制
Playground/textures/down.png


二进制
Playground/textures/up.png


+ 7 - 0
Tools/Gulp/gulp-validateTypedoc.js

@@ -270,10 +270,17 @@ Validate.prototype.validateTypedocNamespaces = function (namespaces) {
         return;
     }
 
+    // Check first sub module like BABYLON.Debug or BABYLON.GUI
+    var firstChild = namespace.children[0];
+    if (firstChild.kindString === "Module") {
+        namespace = firstChild;
+    }
+
     // Validate Classes
     for (var a in namespace.children) {
         containerNode = namespace.children[a];
 
+
         // Account for undefined access modifiers.
         if (!containerNode.flags.isPublic &&
             !containerNode.flags.isPrivate &&

+ 3 - 1
Tools/Gulp/gulpfile.js

@@ -898,7 +898,9 @@ gulp.task("modules", ["prepare-dependency-tree"], function () {
  */
 gulp.task("typedoc-generate", function () {
     return gulp
-        .src(["../../dist/preview release/babylon.d.ts",
+        .src([
+            "../../dist/preview release/babylon.d.ts",
+            "../../dist/preview release/gui/babylon.gui.d.ts",
             "../../dist/preview release/loaders/babylon.glTF2FileLoader.d.ts",
             "../../dist/preview release/serializers/babylon.glTF2Serializer.d.ts",
             "../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"])

文件差异内容过多而无法显示
+ 2155 - 2070
dist/preview release/babylon.d.ts


+ 74 - 4
dist/preview release/babylon.max.js

@@ -86077,16 +86077,34 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-        * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
-        */
+         * Class used to render a debug view of a given skeleton
+         * @see http://www.babylonjs-playground.com/#1BZJVJ#8
+         */
         var SkeletonViewer = /** @class */ (function () {
-            function SkeletonViewer(skeleton, mesh, scene, autoUpdateBonesMatrices, renderingGroupId) {
+            /**
+             * Creates a new SkeletonViewer
+             * @param skeleton defines the skeleton to render
+             * @param mesh defines the mesh attached to the skeleton
+             * @param scene defines the hosting scene
+             * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
+             * @param renderingGroupId defines the rendering group id to use with the viewer
+             */
+            function SkeletonViewer(
+            /** defines the skeleton to render */
+            skeleton, 
+            /** defines the mesh attached to the skeleton */
+            mesh, scene, 
+            /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)  */
+            autoUpdateBonesMatrices, 
+            /** defines the rendering group id to use with the viewer */
+            renderingGroupId) {
                 if (autoUpdateBonesMatrices === void 0) { autoUpdateBonesMatrices = true; }
                 if (renderingGroupId === void 0) { renderingGroupId = 1; }
                 this.skeleton = skeleton;
                 this.mesh = mesh;
                 this.autoUpdateBonesMatrices = autoUpdateBonesMatrices;
                 this.renderingGroupId = renderingGroupId;
+                /** Gets or sets the color used to render the skeleton */
                 this.color = BABYLON.Color3.White();
                 this._debugLines = new Array();
                 this._isEnabled = false;
@@ -86098,6 +86116,7 @@ var BABYLON;
                 get: function () {
                     return this._isEnabled;
                 },
+                /** Gets or sets a boolean indicating if the viewer is enabled */
                 set: function (value) {
                     if (this._isEnabled === value) {
                         return;
@@ -86174,6 +86193,7 @@ var BABYLON;
                     boneNum++;
                 }
             };
+            /** Update the viewer to sync with current skeleton state */
             SkeletonViewer.prototype.update = function () {
                 if (this.autoUpdateBonesMatrices) {
                     this.skeleton.computeAbsoluteTransforms();
@@ -86194,6 +86214,7 @@ var BABYLON;
                 this._debugMesh.position.copyFrom(this.mesh.position);
                 this._debugMesh.color = this.color;
             };
+            /** Release associated resources */
             SkeletonViewer.prototype.dispose = function () {
                 if (this._debugMesh) {
                     this.isEnabled = false;
@@ -86220,11 +86241,19 @@ var BABYLON;
          * The Axes viewer will show 3 axes in a specific point in space
          */
         var AxesViewer = /** @class */ (function () {
+            /**
+             * Creates a new AxesViewer
+             * @param scene defines the hosting scene
+             * @param scaleLines defines a number used to scale line length (1 by default)
+             */
             function AxesViewer(scene, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 this._xline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._yline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._zline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                /**
+                 * Gets or sets a number used to scale line length
+                 */
                 this.scaleLines = 1;
                 this.scaleLines = scaleLines;
                 this._xmesh = BABYLON.Mesh.CreateLines("xline", this._xline, scene, true);
@@ -86241,6 +86270,13 @@ var BABYLON;
                 this._zmesh.color = new BABYLON.Color3(0, 0, 1);
                 this.scene = scene;
             }
+            /**
+             * Force the viewer to update
+             * @param position defines the position of the viewer
+             * @param xaxis defines the x axis of the viewer
+             * @param yaxis defines the y axis of the viewer
+             * @param zaxis defines the z axis of the viewer
+             */
             AxesViewer.prototype.update = function (position, xaxis, yaxis, zaxis) {
                 var scaleLines = this.scaleLines;
                 if (this._xmesh) {
@@ -86268,6 +86304,7 @@ var BABYLON;
                 point2.z = zaxis.z * scaleLines;
                 BABYLON.Mesh.CreateLines("", this._zline, null, false, this._zmesh);
             };
+            /** Releases resources */
             AxesViewer.prototype.dispose = function () {
                 if (this._xmesh) {
                     this._xmesh.dispose();
@@ -86298,20 +86335,35 @@ var BABYLON;
     (function (Debug) {
         /**
          * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
+         * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
          */
         var BoneAxesViewer = /** @class */ (function (_super) {
             __extends(BoneAxesViewer, _super);
+            /**
+             * Creates a new BoneAxesViewer
+             * @param scene defines the hosting scene
+             * @param bone defines the target bone
+             * @param mesh defines the target mesh
+             * @param scaleLines defines a scaling factor for line length (1 by default)
+             */
             function BoneAxesViewer(scene, bone, mesh, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 var _this = _super.call(this, scene, scaleLines) || this;
+                /** Gets current position */
                 _this.pos = BABYLON.Vector3.Zero();
+                /** Gets direction of X axis */
                 _this.xaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Y axis */
                 _this.yaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Z axis */
                 _this.zaxis = BABYLON.Vector3.Zero();
                 _this.mesh = mesh;
                 _this.bone = bone;
                 return _this;
             }
+            /**
+             * Force the viewer to update
+             */
             BoneAxesViewer.prototype.update = function () {
                 if (!this.mesh || !this.bone) {
                     return;
@@ -86323,6 +86375,7 @@ var BABYLON;
                 bone.getDirectionToRef(BABYLON.Axis.Z, this.mesh, this.zaxis);
                 _super.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis);
             };
+            /** Releases resources */
             BoneAxesViewer.prototype.dispose = function () {
                 if (this.mesh) {
                     this.mesh = null;
@@ -86525,12 +86578,19 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-         * Used to show the physics impostor around the specific mesh.
+         * Used to show the physics impostor around the specific mesh
          */
         var PhysicsViewer = /** @class */ (function () {
+            /**
+             * Creates a new PhysicsViewer
+             * @param scene defines the hosting scene
+             */
             function PhysicsViewer(scene) {
+                /** @hidden */
                 this._impostors = [];
+                /** @hidden */
                 this._meshes = [];
+                /** @hidden */
                 this._numMeshes = 0;
                 this._scene = scene || BABYLON.Engine.LastCreatedScene;
                 var physicEngine = this._scene.getPhysicsEngine();
@@ -86538,6 +86598,7 @@ var BABYLON;
                     this._physicsEnginePlugin = physicEngine.getPhysicsPlugin();
                 }
             }
+            /** @hidden */
             PhysicsViewer.prototype._updateDebugMeshes = function () {
                 var plugin = this._physicsEnginePlugin;
                 for (var i = 0; i < this._numMeshes; i++) {
@@ -86556,6 +86617,10 @@ var BABYLON;
                     }
                 }
             };
+            /**
+             * Renders a specified physic impostor
+             * @param impostor defines the impostor to render
+             */
             PhysicsViewer.prototype.showImpostor = function (impostor) {
                 if (!this._scene) {
                     return;
@@ -86576,6 +86641,10 @@ var BABYLON;
                     this._numMeshes++;
                 }
             };
+            /**
+             * Hides a specified physic impostor
+             * @param impostor defines the impostor to hide
+             */
             PhysicsViewer.prototype.hideImpostor = function (impostor) {
                 if (!impostor || !this._scene) {
                     return;
@@ -86650,6 +86719,7 @@ var BABYLON;
                 }
                 return mesh;
             };
+            /** Releases all resources */
             PhysicsViewer.prototype.dispose = function () {
                 for (var i = 0; i < this._numMeshes; i++) {
                     this.hideImpostor(this._impostors[i]);

+ 74 - 4
dist/preview release/babylon.no-module.max.js

@@ -86044,16 +86044,34 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-        * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
-        */
+         * Class used to render a debug view of a given skeleton
+         * @see http://www.babylonjs-playground.com/#1BZJVJ#8
+         */
         var SkeletonViewer = /** @class */ (function () {
-            function SkeletonViewer(skeleton, mesh, scene, autoUpdateBonesMatrices, renderingGroupId) {
+            /**
+             * Creates a new SkeletonViewer
+             * @param skeleton defines the skeleton to render
+             * @param mesh defines the mesh attached to the skeleton
+             * @param scene defines the hosting scene
+             * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
+             * @param renderingGroupId defines the rendering group id to use with the viewer
+             */
+            function SkeletonViewer(
+            /** defines the skeleton to render */
+            skeleton, 
+            /** defines the mesh attached to the skeleton */
+            mesh, scene, 
+            /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)  */
+            autoUpdateBonesMatrices, 
+            /** defines the rendering group id to use with the viewer */
+            renderingGroupId) {
                 if (autoUpdateBonesMatrices === void 0) { autoUpdateBonesMatrices = true; }
                 if (renderingGroupId === void 0) { renderingGroupId = 1; }
                 this.skeleton = skeleton;
                 this.mesh = mesh;
                 this.autoUpdateBonesMatrices = autoUpdateBonesMatrices;
                 this.renderingGroupId = renderingGroupId;
+                /** Gets or sets the color used to render the skeleton */
                 this.color = BABYLON.Color3.White();
                 this._debugLines = new Array();
                 this._isEnabled = false;
@@ -86065,6 +86083,7 @@ var BABYLON;
                 get: function () {
                     return this._isEnabled;
                 },
+                /** Gets or sets a boolean indicating if the viewer is enabled */
                 set: function (value) {
                     if (this._isEnabled === value) {
                         return;
@@ -86141,6 +86160,7 @@ var BABYLON;
                     boneNum++;
                 }
             };
+            /** Update the viewer to sync with current skeleton state */
             SkeletonViewer.prototype.update = function () {
                 if (this.autoUpdateBonesMatrices) {
                     this.skeleton.computeAbsoluteTransforms();
@@ -86161,6 +86181,7 @@ var BABYLON;
                 this._debugMesh.position.copyFrom(this.mesh.position);
                 this._debugMesh.color = this.color;
             };
+            /** Release associated resources */
             SkeletonViewer.prototype.dispose = function () {
                 if (this._debugMesh) {
                     this.isEnabled = false;
@@ -86187,11 +86208,19 @@ var BABYLON;
          * The Axes viewer will show 3 axes in a specific point in space
          */
         var AxesViewer = /** @class */ (function () {
+            /**
+             * Creates a new AxesViewer
+             * @param scene defines the hosting scene
+             * @param scaleLines defines a number used to scale line length (1 by default)
+             */
             function AxesViewer(scene, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 this._xline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._yline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._zline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                /**
+                 * Gets or sets a number used to scale line length
+                 */
                 this.scaleLines = 1;
                 this.scaleLines = scaleLines;
                 this._xmesh = BABYLON.Mesh.CreateLines("xline", this._xline, scene, true);
@@ -86208,6 +86237,13 @@ var BABYLON;
                 this._zmesh.color = new BABYLON.Color3(0, 0, 1);
                 this.scene = scene;
             }
+            /**
+             * Force the viewer to update
+             * @param position defines the position of the viewer
+             * @param xaxis defines the x axis of the viewer
+             * @param yaxis defines the y axis of the viewer
+             * @param zaxis defines the z axis of the viewer
+             */
             AxesViewer.prototype.update = function (position, xaxis, yaxis, zaxis) {
                 var scaleLines = this.scaleLines;
                 if (this._xmesh) {
@@ -86235,6 +86271,7 @@ var BABYLON;
                 point2.z = zaxis.z * scaleLines;
                 BABYLON.Mesh.CreateLines("", this._zline, null, false, this._zmesh);
             };
+            /** Releases resources */
             AxesViewer.prototype.dispose = function () {
                 if (this._xmesh) {
                     this._xmesh.dispose();
@@ -86265,20 +86302,35 @@ var BABYLON;
     (function (Debug) {
         /**
          * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
+         * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
          */
         var BoneAxesViewer = /** @class */ (function (_super) {
             __extends(BoneAxesViewer, _super);
+            /**
+             * Creates a new BoneAxesViewer
+             * @param scene defines the hosting scene
+             * @param bone defines the target bone
+             * @param mesh defines the target mesh
+             * @param scaleLines defines a scaling factor for line length (1 by default)
+             */
             function BoneAxesViewer(scene, bone, mesh, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 var _this = _super.call(this, scene, scaleLines) || this;
+                /** Gets current position */
                 _this.pos = BABYLON.Vector3.Zero();
+                /** Gets direction of X axis */
                 _this.xaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Y axis */
                 _this.yaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Z axis */
                 _this.zaxis = BABYLON.Vector3.Zero();
                 _this.mesh = mesh;
                 _this.bone = bone;
                 return _this;
             }
+            /**
+             * Force the viewer to update
+             */
             BoneAxesViewer.prototype.update = function () {
                 if (!this.mesh || !this.bone) {
                     return;
@@ -86290,6 +86342,7 @@ var BABYLON;
                 bone.getDirectionToRef(BABYLON.Axis.Z, this.mesh, this.zaxis);
                 _super.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis);
             };
+            /** Releases resources */
             BoneAxesViewer.prototype.dispose = function () {
                 if (this.mesh) {
                     this.mesh = null;
@@ -86492,12 +86545,19 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-         * Used to show the physics impostor around the specific mesh.
+         * Used to show the physics impostor around the specific mesh
          */
         var PhysicsViewer = /** @class */ (function () {
+            /**
+             * Creates a new PhysicsViewer
+             * @param scene defines the hosting scene
+             */
             function PhysicsViewer(scene) {
+                /** @hidden */
                 this._impostors = [];
+                /** @hidden */
                 this._meshes = [];
+                /** @hidden */
                 this._numMeshes = 0;
                 this._scene = scene || BABYLON.Engine.LastCreatedScene;
                 var physicEngine = this._scene.getPhysicsEngine();
@@ -86505,6 +86565,7 @@ var BABYLON;
                     this._physicsEnginePlugin = physicEngine.getPhysicsPlugin();
                 }
             }
+            /** @hidden */
             PhysicsViewer.prototype._updateDebugMeshes = function () {
                 var plugin = this._physicsEnginePlugin;
                 for (var i = 0; i < this._numMeshes; i++) {
@@ -86523,6 +86584,10 @@ var BABYLON;
                     }
                 }
             };
+            /**
+             * Renders a specified physic impostor
+             * @param impostor defines the impostor to render
+             */
             PhysicsViewer.prototype.showImpostor = function (impostor) {
                 if (!this._scene) {
                     return;
@@ -86543,6 +86608,10 @@ var BABYLON;
                     this._numMeshes++;
                 }
             };
+            /**
+             * Hides a specified physic impostor
+             * @param impostor defines the impostor to hide
+             */
             PhysicsViewer.prototype.hideImpostor = function (impostor) {
                 if (!impostor || !this._scene) {
                     return;
@@ -86617,6 +86686,7 @@ var BABYLON;
                 }
                 return mesh;
             };
+            /** Releases all resources */
             PhysicsViewer.prototype.dispose = function () {
                 for (var i = 0; i < this._numMeshes; i++) {
                     this.hideImpostor(this._impostors[i]);

+ 74 - 4
dist/preview release/es6.js

@@ -86044,16 +86044,34 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-        * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
-        */
+         * Class used to render a debug view of a given skeleton
+         * @see http://www.babylonjs-playground.com/#1BZJVJ#8
+         */
         var SkeletonViewer = /** @class */ (function () {
-            function SkeletonViewer(skeleton, mesh, scene, autoUpdateBonesMatrices, renderingGroupId) {
+            /**
+             * Creates a new SkeletonViewer
+             * @param skeleton defines the skeleton to render
+             * @param mesh defines the mesh attached to the skeleton
+             * @param scene defines the hosting scene
+             * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
+             * @param renderingGroupId defines the rendering group id to use with the viewer
+             */
+            function SkeletonViewer(
+            /** defines the skeleton to render */
+            skeleton, 
+            /** defines the mesh attached to the skeleton */
+            mesh, scene, 
+            /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)  */
+            autoUpdateBonesMatrices, 
+            /** defines the rendering group id to use with the viewer */
+            renderingGroupId) {
                 if (autoUpdateBonesMatrices === void 0) { autoUpdateBonesMatrices = true; }
                 if (renderingGroupId === void 0) { renderingGroupId = 1; }
                 this.skeleton = skeleton;
                 this.mesh = mesh;
                 this.autoUpdateBonesMatrices = autoUpdateBonesMatrices;
                 this.renderingGroupId = renderingGroupId;
+                /** Gets or sets the color used to render the skeleton */
                 this.color = BABYLON.Color3.White();
                 this._debugLines = new Array();
                 this._isEnabled = false;
@@ -86065,6 +86083,7 @@ var BABYLON;
                 get: function () {
                     return this._isEnabled;
                 },
+                /** Gets or sets a boolean indicating if the viewer is enabled */
                 set: function (value) {
                     if (this._isEnabled === value) {
                         return;
@@ -86141,6 +86160,7 @@ var BABYLON;
                     boneNum++;
                 }
             };
+            /** Update the viewer to sync with current skeleton state */
             SkeletonViewer.prototype.update = function () {
                 if (this.autoUpdateBonesMatrices) {
                     this.skeleton.computeAbsoluteTransforms();
@@ -86161,6 +86181,7 @@ var BABYLON;
                 this._debugMesh.position.copyFrom(this.mesh.position);
                 this._debugMesh.color = this.color;
             };
+            /** Release associated resources */
             SkeletonViewer.prototype.dispose = function () {
                 if (this._debugMesh) {
                     this.isEnabled = false;
@@ -86187,11 +86208,19 @@ var BABYLON;
          * The Axes viewer will show 3 axes in a specific point in space
          */
         var AxesViewer = /** @class */ (function () {
+            /**
+             * Creates a new AxesViewer
+             * @param scene defines the hosting scene
+             * @param scaleLines defines a number used to scale line length (1 by default)
+             */
             function AxesViewer(scene, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 this._xline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._yline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._zline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                /**
+                 * Gets or sets a number used to scale line length
+                 */
                 this.scaleLines = 1;
                 this.scaleLines = scaleLines;
                 this._xmesh = BABYLON.Mesh.CreateLines("xline", this._xline, scene, true);
@@ -86208,6 +86237,13 @@ var BABYLON;
                 this._zmesh.color = new BABYLON.Color3(0, 0, 1);
                 this.scene = scene;
             }
+            /**
+             * Force the viewer to update
+             * @param position defines the position of the viewer
+             * @param xaxis defines the x axis of the viewer
+             * @param yaxis defines the y axis of the viewer
+             * @param zaxis defines the z axis of the viewer
+             */
             AxesViewer.prototype.update = function (position, xaxis, yaxis, zaxis) {
                 var scaleLines = this.scaleLines;
                 if (this._xmesh) {
@@ -86235,6 +86271,7 @@ var BABYLON;
                 point2.z = zaxis.z * scaleLines;
                 BABYLON.Mesh.CreateLines("", this._zline, null, false, this._zmesh);
             };
+            /** Releases resources */
             AxesViewer.prototype.dispose = function () {
                 if (this._xmesh) {
                     this._xmesh.dispose();
@@ -86265,20 +86302,35 @@ var BABYLON;
     (function (Debug) {
         /**
          * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
+         * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
          */
         var BoneAxesViewer = /** @class */ (function (_super) {
             __extends(BoneAxesViewer, _super);
+            /**
+             * Creates a new BoneAxesViewer
+             * @param scene defines the hosting scene
+             * @param bone defines the target bone
+             * @param mesh defines the target mesh
+             * @param scaleLines defines a scaling factor for line length (1 by default)
+             */
             function BoneAxesViewer(scene, bone, mesh, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 var _this = _super.call(this, scene, scaleLines) || this;
+                /** Gets current position */
                 _this.pos = BABYLON.Vector3.Zero();
+                /** Gets direction of X axis */
                 _this.xaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Y axis */
                 _this.yaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Z axis */
                 _this.zaxis = BABYLON.Vector3.Zero();
                 _this.mesh = mesh;
                 _this.bone = bone;
                 return _this;
             }
+            /**
+             * Force the viewer to update
+             */
             BoneAxesViewer.prototype.update = function () {
                 if (!this.mesh || !this.bone) {
                     return;
@@ -86290,6 +86342,7 @@ var BABYLON;
                 bone.getDirectionToRef(BABYLON.Axis.Z, this.mesh, this.zaxis);
                 _super.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis);
             };
+            /** Releases resources */
             BoneAxesViewer.prototype.dispose = function () {
                 if (this.mesh) {
                     this.mesh = null;
@@ -86492,12 +86545,19 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-         * Used to show the physics impostor around the specific mesh.
+         * Used to show the physics impostor around the specific mesh
          */
         var PhysicsViewer = /** @class */ (function () {
+            /**
+             * Creates a new PhysicsViewer
+             * @param scene defines the hosting scene
+             */
             function PhysicsViewer(scene) {
+                /** @hidden */
                 this._impostors = [];
+                /** @hidden */
                 this._meshes = [];
+                /** @hidden */
                 this._numMeshes = 0;
                 this._scene = scene || BABYLON.Engine.LastCreatedScene;
                 var physicEngine = this._scene.getPhysicsEngine();
@@ -86505,6 +86565,7 @@ var BABYLON;
                     this._physicsEnginePlugin = physicEngine.getPhysicsPlugin();
                 }
             }
+            /** @hidden */
             PhysicsViewer.prototype._updateDebugMeshes = function () {
                 var plugin = this._physicsEnginePlugin;
                 for (var i = 0; i < this._numMeshes; i++) {
@@ -86523,6 +86584,10 @@ var BABYLON;
                     }
                 }
             };
+            /**
+             * Renders a specified physic impostor
+             * @param impostor defines the impostor to render
+             */
             PhysicsViewer.prototype.showImpostor = function (impostor) {
                 if (!this._scene) {
                     return;
@@ -86543,6 +86608,10 @@ var BABYLON;
                     this._numMeshes++;
                 }
             };
+            /**
+             * Hides a specified physic impostor
+             * @param impostor defines the impostor to hide
+             */
             PhysicsViewer.prototype.hideImpostor = function (impostor) {
                 if (!impostor || !this._scene) {
                     return;
@@ -86617,6 +86686,7 @@ var BABYLON;
                 }
                 return mesh;
             };
+            /** Releases all resources */
             PhysicsViewer.prototype.dispose = function () {
                 for (var i = 0; i < this._numMeshes; i++) {
                     this.hideImpostor(this._impostors[i]);

文件差异内容过多而无法显示
+ 696 - 13
dist/preview release/gui/babylon.gui.d.ts


文件差异内容过多而无法显示
+ 668 - 22
dist/preview release/gui/babylon.gui.js


文件差异内容过多而无法显示
+ 4 - 4
dist/preview release/gui/babylon.gui.min.js


文件差异内容过多而无法显示
+ 696 - 13
dist/preview release/gui/babylon.gui.module.d.ts


+ 55 - 12
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -696,36 +696,78 @@ declare module BABYLON.GLTF2 {
      * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
+        /** Gets or sets a boolean indicating if the extension is enabled */
         enabled: boolean;
+        /** Gets or sets extension name */
         readonly abstract name: string;
         protected _loader: GLTFLoader;
+        /**
+         * Creates new GLTFLoaderExtension
+         * @param loader defines the GLTFLoader to use
+         */
         constructor(loader: GLTFLoader);
+        /** Release all resources */
         dispose(): void;
-        /** Override this method to modify the default behavior for loading scenes. */
+        /**
+         * Override this method to modify the default behavior for loading scenes.
+         * @hidden
+         */
         protected _loadSceneAsync(context: string, node: _ILoaderScene): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading nodes. */
+        /**
+         * Override this method to modify the default behavior for loading nodes.
+         * @hidden
+         */
         protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>>;
         /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
         protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Override this method to modify the default behavior for loading materials. */
+        /** Override this method to modify the default behavior for loading materials.
+         * @hidden
+         */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading textures. */
+        /**
+         * Override this method to modify the default behavior for loading textures.
+         * @hidden
+         */
         protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading uris. */
+        /**
+         * Override this method to modify the default behavior for loading uris.
+         * @hidden
+         */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
-        /** Helper method called by a loader extension to load an glTF extension. */
+        /**
+         * Helper method called by a loader extension to load an glTF extension.
+         * @hidden
+         */
         protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>>;
-        /** Helper method called by the loader to allow extensions to override loading scenes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading scenes.
+         * @hidden
+         */
         static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading nodes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading nodes.
+         * @hidden
+         */
         static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+         * @hidden
+         */
         static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Helper method called by the loader to allow extensions to override loading materials. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading materials.
+         * @hidden
+         */
         static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading textures. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading textures.
+         * @hidden
+         */
         static _LoadTextureAsync(loader: GLTFLoader, context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading uris. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading uris.
+         * @hidden
+         */
         static _LoadUriAsync(loader: GLTFLoader, context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
     }
 }
@@ -817,6 +859,7 @@ declare module BABYLON.GLTF2.Extensions {
      */
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
+        /** @hidden */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }

+ 54 - 12
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -2189,28 +2189,51 @@ var BABYLON;
          * Abstract class that can be implemented to extend existing glTF loader behavior.
          */
         var GLTFLoaderExtension = /** @class */ (function () {
+            /**
+             * Creates new GLTFLoaderExtension
+             * @param loader defines the GLTFLoader to use
+             */
             function GLTFLoaderExtension(loader) {
+                /** Gets or sets a boolean indicating if the extension is enabled */
                 this.enabled = true;
                 this._loader = loader;
             }
+            /** Release all resources */
             GLTFLoaderExtension.prototype.dispose = function () {
                 delete this._loader;
             };
             // #region Overridable Methods
-            /** Override this method to modify the default behavior for loading scenes. */
+            /**
+             * Override this method to modify the default behavior for loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadSceneAsync = function (context, node) { return null; };
-            /** Override this method to modify the default behavior for loading nodes. */
+            /**
+             * Override this method to modify the default behavior for loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadNodeAsync = function (context, node) { return null; };
             /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
             GLTFLoaderExtension.prototype._loadVertexDataAsync = function (context, primitive, babylonMesh) { return null; };
-            /** Override this method to modify the default behavior for loading materials. */
+            /** Override this method to modify the default behavior for loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) { return null; };
-            /** Override this method to modify the default behavior for loading textures. */
+            /**
+             * Override this method to modify the default behavior for loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadTextureAsync = function (context, textureInfo, assign) { return null; };
-            /** Override this method to modify the default behavior for loading uris. */
+            /**
+             * Override this method to modify the default behavior for loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadUriAsync = function (context, uri) { return null; };
             // #endregion
-            /** Helper method called by a loader extension to load an glTF extension. */
+            /**
+             * Helper method called by a loader extension to load an glTF extension.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadExtensionAsync = function (context, property, actionAsync) {
                 if (!property.extensions) {
                     return null;
@@ -2230,27 +2253,45 @@ var BABYLON;
                     extensions[this.name] = extension;
                 }
             };
-            /** Helper method called by the loader to allow extensions to override loading scenes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadSceneAsync = function (loader, context, scene) {
                 return loader._applyExtensions(function (extension) { return extension._loadSceneAsync(context, scene); });
             };
-            /** Helper method called by the loader to allow extensions to override loading nodes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadNodeAsync = function (loader, context, node) {
                 return loader._applyExtensions(function (extension) { return extension._loadNodeAsync(context, node); });
             };
-            /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadVertexDataAsync = function (loader, context, primitive, babylonMesh) {
                 return loader._applyExtensions(function (extension) { return extension._loadVertexDataAsync(context, primitive, babylonMesh); });
             };
-            /** Helper method called by the loader to allow extensions to override loading materials. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadMaterialAsync = function (loader, context, material, babylonMesh, babylonDrawMode, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading textures. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadTextureAsync = function (loader, context, textureInfo, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadTextureAsync(context, textureInfo, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading uris. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadUriAsync = function (loader, context, uri) {
                 return loader._applyExtensions(function (extension) { return extension._loadUriAsync(context, uri); });
             };
@@ -2715,6 +2756,7 @@ var BABYLON;
                     _this.name = NAME;
                     return _this;
                 }
+                /** @hidden */
                 KHR_materials_pbrSpecularGlossiness.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                     var _this = this;
                     return this._loadExtensionAsync(context, material, function (extensionContext, extension) {

+ 55 - 12
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -1273,36 +1273,78 @@ declare module BABYLON.GLTF2 {
      * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
+        /** Gets or sets a boolean indicating if the extension is enabled */
         enabled: boolean;
+        /** Gets or sets extension name */
         readonly abstract name: string;
         protected _loader: GLTFLoader;
+        /**
+         * Creates new GLTFLoaderExtension
+         * @param loader defines the GLTFLoader to use
+         */
         constructor(loader: GLTFLoader);
+        /** Release all resources */
         dispose(): void;
-        /** Override this method to modify the default behavior for loading scenes. */
+        /**
+         * Override this method to modify the default behavior for loading scenes.
+         * @hidden
+         */
         protected _loadSceneAsync(context: string, node: _ILoaderScene): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading nodes. */
+        /**
+         * Override this method to modify the default behavior for loading nodes.
+         * @hidden
+         */
         protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>>;
         /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
         protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Override this method to modify the default behavior for loading materials. */
+        /** Override this method to modify the default behavior for loading materials.
+         * @hidden
+         */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading textures. */
+        /**
+         * Override this method to modify the default behavior for loading textures.
+         * @hidden
+         */
         protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading uris. */
+        /**
+         * Override this method to modify the default behavior for loading uris.
+         * @hidden
+         */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
-        /** Helper method called by a loader extension to load an glTF extension. */
+        /**
+         * Helper method called by a loader extension to load an glTF extension.
+         * @hidden
+         */
         protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>>;
-        /** Helper method called by the loader to allow extensions to override loading scenes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading scenes.
+         * @hidden
+         */
         static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading nodes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading nodes.
+         * @hidden
+         */
         static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+         * @hidden
+         */
         static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Helper method called by the loader to allow extensions to override loading materials. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading materials.
+         * @hidden
+         */
         static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading textures. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading textures.
+         * @hidden
+         */
         static _LoadTextureAsync(loader: GLTFLoader, context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading uris. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading uris.
+         * @hidden
+         */
         static _LoadUriAsync(loader: GLTFLoader, context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
     }
 }
@@ -1394,6 +1436,7 @@ declare module BABYLON.GLTF2.Extensions {
      */
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
+        /** @hidden */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }

+ 54 - 12
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -4405,28 +4405,51 @@ var BABYLON;
          * Abstract class that can be implemented to extend existing glTF loader behavior.
          */
         var GLTFLoaderExtension = /** @class */ (function () {
+            /**
+             * Creates new GLTFLoaderExtension
+             * @param loader defines the GLTFLoader to use
+             */
             function GLTFLoaderExtension(loader) {
+                /** Gets or sets a boolean indicating if the extension is enabled */
                 this.enabled = true;
                 this._loader = loader;
             }
+            /** Release all resources */
             GLTFLoaderExtension.prototype.dispose = function () {
                 delete this._loader;
             };
             // #region Overridable Methods
-            /** Override this method to modify the default behavior for loading scenes. */
+            /**
+             * Override this method to modify the default behavior for loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadSceneAsync = function (context, node) { return null; };
-            /** Override this method to modify the default behavior for loading nodes. */
+            /**
+             * Override this method to modify the default behavior for loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadNodeAsync = function (context, node) { return null; };
             /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
             GLTFLoaderExtension.prototype._loadVertexDataAsync = function (context, primitive, babylonMesh) { return null; };
-            /** Override this method to modify the default behavior for loading materials. */
+            /** Override this method to modify the default behavior for loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) { return null; };
-            /** Override this method to modify the default behavior for loading textures. */
+            /**
+             * Override this method to modify the default behavior for loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadTextureAsync = function (context, textureInfo, assign) { return null; };
-            /** Override this method to modify the default behavior for loading uris. */
+            /**
+             * Override this method to modify the default behavior for loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadUriAsync = function (context, uri) { return null; };
             // #endregion
-            /** Helper method called by a loader extension to load an glTF extension. */
+            /**
+             * Helper method called by a loader extension to load an glTF extension.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadExtensionAsync = function (context, property, actionAsync) {
                 if (!property.extensions) {
                     return null;
@@ -4446,27 +4469,45 @@ var BABYLON;
                     extensions[this.name] = extension;
                 }
             };
-            /** Helper method called by the loader to allow extensions to override loading scenes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadSceneAsync = function (loader, context, scene) {
                 return loader._applyExtensions(function (extension) { return extension._loadSceneAsync(context, scene); });
             };
-            /** Helper method called by the loader to allow extensions to override loading nodes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadNodeAsync = function (loader, context, node) {
                 return loader._applyExtensions(function (extension) { return extension._loadNodeAsync(context, node); });
             };
-            /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadVertexDataAsync = function (loader, context, primitive, babylonMesh) {
                 return loader._applyExtensions(function (extension) { return extension._loadVertexDataAsync(context, primitive, babylonMesh); });
             };
-            /** Helper method called by the loader to allow extensions to override loading materials. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadMaterialAsync = function (loader, context, material, babylonMesh, babylonDrawMode, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading textures. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadTextureAsync = function (loader, context, textureInfo, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadTextureAsync(context, textureInfo, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading uris. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadUriAsync = function (loader, context, uri) {
                 return loader._applyExtensions(function (extension) { return extension._loadUriAsync(context, uri); });
             };
@@ -4931,6 +4972,7 @@ var BABYLON;
                     _this.name = NAME;
                     return _this;
                 }
+                /** @hidden */
                 KHR_materials_pbrSpecularGlossiness.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                     var _this = this;
                     return this._loadExtensionAsync(context, material, function (extensionContext, extension) {

+ 55 - 12
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -1369,36 +1369,78 @@ declare module BABYLON.GLTF2 {
      * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
+        /** Gets or sets a boolean indicating if the extension is enabled */
         enabled: boolean;
+        /** Gets or sets extension name */
         readonly abstract name: string;
         protected _loader: GLTFLoader;
+        /**
+         * Creates new GLTFLoaderExtension
+         * @param loader defines the GLTFLoader to use
+         */
         constructor(loader: GLTFLoader);
+        /** Release all resources */
         dispose(): void;
-        /** Override this method to modify the default behavior for loading scenes. */
+        /**
+         * Override this method to modify the default behavior for loading scenes.
+         * @hidden
+         */
         protected _loadSceneAsync(context: string, node: _ILoaderScene): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading nodes. */
+        /**
+         * Override this method to modify the default behavior for loading nodes.
+         * @hidden
+         */
         protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>>;
         /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
         protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Override this method to modify the default behavior for loading materials. */
+        /** Override this method to modify the default behavior for loading materials.
+         * @hidden
+         */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading textures. */
+        /**
+         * Override this method to modify the default behavior for loading textures.
+         * @hidden
+         */
         protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading uris. */
+        /**
+         * Override this method to modify the default behavior for loading uris.
+         * @hidden
+         */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
-        /** Helper method called by a loader extension to load an glTF extension. */
+        /**
+         * Helper method called by a loader extension to load an glTF extension.
+         * @hidden
+         */
         protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>>;
-        /** Helper method called by the loader to allow extensions to override loading scenes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading scenes.
+         * @hidden
+         */
         static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading nodes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading nodes.
+         * @hidden
+         */
         static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+         * @hidden
+         */
         static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Helper method called by the loader to allow extensions to override loading materials. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading materials.
+         * @hidden
+         */
         static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading textures. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading textures.
+         * @hidden
+         */
         static _LoadTextureAsync(loader: GLTFLoader, context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading uris. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading uris.
+         * @hidden
+         */
         static _LoadUriAsync(loader: GLTFLoader, context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
     }
 }
@@ -1490,6 +1532,7 @@ declare module BABYLON.GLTF2.Extensions {
      */
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
+        /** @hidden */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }

+ 54 - 12
dist/preview release/loaders/babylonjs.loaders.js

@@ -5387,28 +5387,51 @@ var BABYLON;
          * Abstract class that can be implemented to extend existing glTF loader behavior.
          */
         var GLTFLoaderExtension = /** @class */ (function () {
+            /**
+             * Creates new GLTFLoaderExtension
+             * @param loader defines the GLTFLoader to use
+             */
             function GLTFLoaderExtension(loader) {
+                /** Gets or sets a boolean indicating if the extension is enabled */
                 this.enabled = true;
                 this._loader = loader;
             }
+            /** Release all resources */
             GLTFLoaderExtension.prototype.dispose = function () {
                 delete this._loader;
             };
             // #region Overridable Methods
-            /** Override this method to modify the default behavior for loading scenes. */
+            /**
+             * Override this method to modify the default behavior for loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadSceneAsync = function (context, node) { return null; };
-            /** Override this method to modify the default behavior for loading nodes. */
+            /**
+             * Override this method to modify the default behavior for loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadNodeAsync = function (context, node) { return null; };
             /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
             GLTFLoaderExtension.prototype._loadVertexDataAsync = function (context, primitive, babylonMesh) { return null; };
-            /** Override this method to modify the default behavior for loading materials. */
+            /** Override this method to modify the default behavior for loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) { return null; };
-            /** Override this method to modify the default behavior for loading textures. */
+            /**
+             * Override this method to modify the default behavior for loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadTextureAsync = function (context, textureInfo, assign) { return null; };
-            /** Override this method to modify the default behavior for loading uris. */
+            /**
+             * Override this method to modify the default behavior for loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadUriAsync = function (context, uri) { return null; };
             // #endregion
-            /** Helper method called by a loader extension to load an glTF extension. */
+            /**
+             * Helper method called by a loader extension to load an glTF extension.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadExtensionAsync = function (context, property, actionAsync) {
                 if (!property.extensions) {
                     return null;
@@ -5428,27 +5451,45 @@ var BABYLON;
                     extensions[this.name] = extension;
                 }
             };
-            /** Helper method called by the loader to allow extensions to override loading scenes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadSceneAsync = function (loader, context, scene) {
                 return loader._applyExtensions(function (extension) { return extension._loadSceneAsync(context, scene); });
             };
-            /** Helper method called by the loader to allow extensions to override loading nodes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadNodeAsync = function (loader, context, node) {
                 return loader._applyExtensions(function (extension) { return extension._loadNodeAsync(context, node); });
             };
-            /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadVertexDataAsync = function (loader, context, primitive, babylonMesh) {
                 return loader._applyExtensions(function (extension) { return extension._loadVertexDataAsync(context, primitive, babylonMesh); });
             };
-            /** Helper method called by the loader to allow extensions to override loading materials. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadMaterialAsync = function (loader, context, material, babylonMesh, babylonDrawMode, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading textures. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadTextureAsync = function (loader, context, textureInfo, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadTextureAsync(context, textureInfo, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading uris. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadUriAsync = function (loader, context, uri) {
                 return loader._applyExtensions(function (extension) { return extension._loadUriAsync(context, uri); });
             };
@@ -5868,6 +5909,7 @@ var BABYLON;
                     _this.name = NAME;
                     return _this;
                 }
+                /** @hidden */
                 KHR_materials_pbrSpecularGlossiness.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                     var _this = this;
                     return this._loadExtensionAsync(context, material, function (extensionContext, extension) {

+ 55 - 12
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -1376,36 +1376,78 @@ declare module BABYLON.GLTF2 {
      * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
+        /** Gets or sets a boolean indicating if the extension is enabled */
         enabled: boolean;
+        /** Gets or sets extension name */
         readonly abstract name: string;
         protected _loader: GLTFLoader;
+        /**
+         * Creates new GLTFLoaderExtension
+         * @param loader defines the GLTFLoader to use
+         */
         constructor(loader: GLTFLoader);
+        /** Release all resources */
         dispose(): void;
-        /** Override this method to modify the default behavior for loading scenes. */
+        /**
+         * Override this method to modify the default behavior for loading scenes.
+         * @hidden
+         */
         protected _loadSceneAsync(context: string, node: _ILoaderScene): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading nodes. */
+        /**
+         * Override this method to modify the default behavior for loading nodes.
+         * @hidden
+         */
         protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>>;
         /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
         protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Override this method to modify the default behavior for loading materials. */
+        /** Override this method to modify the default behavior for loading materials.
+         * @hidden
+         */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading textures. */
+        /**
+         * Override this method to modify the default behavior for loading textures.
+         * @hidden
+         */
         protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Override this method to modify the default behavior for loading uris. */
+        /**
+         * Override this method to modify the default behavior for loading uris.
+         * @hidden
+         */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
-        /** Helper method called by a loader extension to load an glTF extension. */
+        /**
+         * Helper method called by a loader extension to load an glTF extension.
+         * @hidden
+         */
         protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>>;
-        /** Helper method called by the loader to allow extensions to override loading scenes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading scenes.
+         * @hidden
+         */
         static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading nodes. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading nodes.
+         * @hidden
+         */
         static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+         * @hidden
+         */
         static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
-        /** Helper method called by the loader to allow extensions to override loading materials. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading materials.
+         * @hidden
+         */
         static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading textures. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading textures.
+         * @hidden
+         */
         static _LoadTextureAsync(loader: GLTFLoader, context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>>;
-        /** Helper method called by the loader to allow extensions to override loading uris. */
+        /**
+         * Helper method called by the loader to allow extensions to override loading uris.
+         * @hidden
+         */
         static _LoadUriAsync(loader: GLTFLoader, context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
     }
 }
@@ -1497,6 +1539,7 @@ declare module BABYLON.GLTF2.Extensions {
      */
     class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
+        /** @hidden */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync(context, material, properties, babylonMaterial);
     }

+ 128 - 16
dist/preview release/viewer/babylon.viewer.max.js

@@ -86165,16 +86165,34 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-        * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
-        */
+         * Class used to render a debug view of a given skeleton
+         * @see http://www.babylonjs-playground.com/#1BZJVJ#8
+         */
         var SkeletonViewer = /** @class */ (function () {
-            function SkeletonViewer(skeleton, mesh, scene, autoUpdateBonesMatrices, renderingGroupId) {
+            /**
+             * Creates a new SkeletonViewer
+             * @param skeleton defines the skeleton to render
+             * @param mesh defines the mesh attached to the skeleton
+             * @param scene defines the hosting scene
+             * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
+             * @param renderingGroupId defines the rendering group id to use with the viewer
+             */
+            function SkeletonViewer(
+            /** defines the skeleton to render */
+            skeleton, 
+            /** defines the mesh attached to the skeleton */
+            mesh, scene, 
+            /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)  */
+            autoUpdateBonesMatrices, 
+            /** defines the rendering group id to use with the viewer */
+            renderingGroupId) {
                 if (autoUpdateBonesMatrices === void 0) { autoUpdateBonesMatrices = true; }
                 if (renderingGroupId === void 0) { renderingGroupId = 1; }
                 this.skeleton = skeleton;
                 this.mesh = mesh;
                 this.autoUpdateBonesMatrices = autoUpdateBonesMatrices;
                 this.renderingGroupId = renderingGroupId;
+                /** Gets or sets the color used to render the skeleton */
                 this.color = BABYLON.Color3.White();
                 this._debugLines = new Array();
                 this._isEnabled = false;
@@ -86186,6 +86204,7 @@ var BABYLON;
                 get: function () {
                     return this._isEnabled;
                 },
+                /** Gets or sets a boolean indicating if the viewer is enabled */
                 set: function (value) {
                     if (this._isEnabled === value) {
                         return;
@@ -86262,6 +86281,7 @@ var BABYLON;
                     boneNum++;
                 }
             };
+            /** Update the viewer to sync with current skeleton state */
             SkeletonViewer.prototype.update = function () {
                 if (this.autoUpdateBonesMatrices) {
                     this.skeleton.computeAbsoluteTransforms();
@@ -86282,6 +86302,7 @@ var BABYLON;
                 this._debugMesh.position.copyFrom(this.mesh.position);
                 this._debugMesh.color = this.color;
             };
+            /** Release associated resources */
             SkeletonViewer.prototype.dispose = function () {
                 if (this._debugMesh) {
                     this.isEnabled = false;
@@ -86308,11 +86329,19 @@ var BABYLON;
          * The Axes viewer will show 3 axes in a specific point in space
          */
         var AxesViewer = /** @class */ (function () {
+            /**
+             * Creates a new AxesViewer
+             * @param scene defines the hosting scene
+             * @param scaleLines defines a number used to scale line length (1 by default)
+             */
             function AxesViewer(scene, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 this._xline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._yline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
                 this._zline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                /**
+                 * Gets or sets a number used to scale line length
+                 */
                 this.scaleLines = 1;
                 this.scaleLines = scaleLines;
                 this._xmesh = BABYLON.Mesh.CreateLines("xline", this._xline, scene, true);
@@ -86329,6 +86358,13 @@ var BABYLON;
                 this._zmesh.color = new BABYLON.Color3(0, 0, 1);
                 this.scene = scene;
             }
+            /**
+             * Force the viewer to update
+             * @param position defines the position of the viewer
+             * @param xaxis defines the x axis of the viewer
+             * @param yaxis defines the y axis of the viewer
+             * @param zaxis defines the z axis of the viewer
+             */
             AxesViewer.prototype.update = function (position, xaxis, yaxis, zaxis) {
                 var scaleLines = this.scaleLines;
                 if (this._xmesh) {
@@ -86356,6 +86392,7 @@ var BABYLON;
                 point2.z = zaxis.z * scaleLines;
                 BABYLON.Mesh.CreateLines("", this._zline, null, false, this._zmesh);
             };
+            /** Releases resources */
             AxesViewer.prototype.dispose = function () {
                 if (this._xmesh) {
                     this._xmesh.dispose();
@@ -86386,20 +86423,35 @@ var BABYLON;
     (function (Debug) {
         /**
          * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
+         * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
          */
         var BoneAxesViewer = /** @class */ (function (_super) {
             __extends(BoneAxesViewer, _super);
+            /**
+             * Creates a new BoneAxesViewer
+             * @param scene defines the hosting scene
+             * @param bone defines the target bone
+             * @param mesh defines the target mesh
+             * @param scaleLines defines a scaling factor for line length (1 by default)
+             */
             function BoneAxesViewer(scene, bone, mesh, scaleLines) {
                 if (scaleLines === void 0) { scaleLines = 1; }
                 var _this = _super.call(this, scene, scaleLines) || this;
+                /** Gets current position */
                 _this.pos = BABYLON.Vector3.Zero();
+                /** Gets direction of X axis */
                 _this.xaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Y axis */
                 _this.yaxis = BABYLON.Vector3.Zero();
+                /** Gets direction of Z axis */
                 _this.zaxis = BABYLON.Vector3.Zero();
                 _this.mesh = mesh;
                 _this.bone = bone;
                 return _this;
             }
+            /**
+             * Force the viewer to update
+             */
             BoneAxesViewer.prototype.update = function () {
                 if (!this.mesh || !this.bone) {
                     return;
@@ -86411,6 +86463,7 @@ var BABYLON;
                 bone.getDirectionToRef(BABYLON.Axis.Z, this.mesh, this.zaxis);
                 _super.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis);
             };
+            /** Releases resources */
             BoneAxesViewer.prototype.dispose = function () {
                 if (this.mesh) {
                     this.mesh = null;
@@ -86613,12 +86666,19 @@ var BABYLON;
     var Debug;
     (function (Debug) {
         /**
-         * Used to show the physics impostor around the specific mesh.
+         * Used to show the physics impostor around the specific mesh
          */
         var PhysicsViewer = /** @class */ (function () {
+            /**
+             * Creates a new PhysicsViewer
+             * @param scene defines the hosting scene
+             */
             function PhysicsViewer(scene) {
+                /** @hidden */
                 this._impostors = [];
+                /** @hidden */
                 this._meshes = [];
+                /** @hidden */
                 this._numMeshes = 0;
                 this._scene = scene || BABYLON.Engine.LastCreatedScene;
                 var physicEngine = this._scene.getPhysicsEngine();
@@ -86626,6 +86686,7 @@ var BABYLON;
                     this._physicsEnginePlugin = physicEngine.getPhysicsPlugin();
                 }
             }
+            /** @hidden */
             PhysicsViewer.prototype._updateDebugMeshes = function () {
                 var plugin = this._physicsEnginePlugin;
                 for (var i = 0; i < this._numMeshes; i++) {
@@ -86644,6 +86705,10 @@ var BABYLON;
                     }
                 }
             };
+            /**
+             * Renders a specified physic impostor
+             * @param impostor defines the impostor to render
+             */
             PhysicsViewer.prototype.showImpostor = function (impostor) {
                 if (!this._scene) {
                     return;
@@ -86664,6 +86729,10 @@ var BABYLON;
                     this._numMeshes++;
                 }
             };
+            /**
+             * Hides a specified physic impostor
+             * @param impostor defines the impostor to hide
+             */
             PhysicsViewer.prototype.hideImpostor = function (impostor) {
                 if (!impostor || !this._scene) {
                     return;
@@ -86738,6 +86807,7 @@ var BABYLON;
                 }
                 return mesh;
             };
+            /** Releases all resources */
             PhysicsViewer.prototype.dispose = function () {
                 for (var i = 0; i < this._numMeshes; i++) {
                     this.hideImpostor(this._impostors[i]);
@@ -107952,28 +108022,51 @@ var BABYLON;
          * Abstract class that can be implemented to extend existing glTF loader behavior.
          */
         var GLTFLoaderExtension = /** @class */ (function () {
+            /**
+             * Creates new GLTFLoaderExtension
+             * @param loader defines the GLTFLoader to use
+             */
             function GLTFLoaderExtension(loader) {
+                /** Gets or sets a boolean indicating if the extension is enabled */
                 this.enabled = true;
                 this._loader = loader;
             }
+            /** Release all resources */
             GLTFLoaderExtension.prototype.dispose = function () {
                 delete this._loader;
             };
             // #region Overridable Methods
-            /** Override this method to modify the default behavior for loading scenes. */
+            /**
+             * Override this method to modify the default behavior for loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadSceneAsync = function (context, node) { return null; };
-            /** Override this method to modify the default behavior for loading nodes. */
+            /**
+             * Override this method to modify the default behavior for loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadNodeAsync = function (context, node) { return null; };
             /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
             GLTFLoaderExtension.prototype._loadVertexDataAsync = function (context, primitive, babylonMesh) { return null; };
-            /** Override this method to modify the default behavior for loading materials. */
+            /** Override this method to modify the default behavior for loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) { return null; };
-            /** Override this method to modify the default behavior for loading textures. */
+            /**
+             * Override this method to modify the default behavior for loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadTextureAsync = function (context, textureInfo, assign) { return null; };
-            /** Override this method to modify the default behavior for loading uris. */
+            /**
+             * Override this method to modify the default behavior for loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadUriAsync = function (context, uri) { return null; };
             // #endregion
-            /** Helper method called by a loader extension to load an glTF extension. */
+            /**
+             * Helper method called by a loader extension to load an glTF extension.
+             * @hidden
+             */
             GLTFLoaderExtension.prototype._loadExtensionAsync = function (context, property, actionAsync) {
                 if (!property.extensions) {
                     return null;
@@ -107993,27 +108086,45 @@ var BABYLON;
                     extensions[this.name] = extension;
                 }
             };
-            /** Helper method called by the loader to allow extensions to override loading scenes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading scenes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadSceneAsync = function (loader, context, scene) {
                 return loader._applyExtensions(function (extension) { return extension._loadSceneAsync(context, scene); });
             };
-            /** Helper method called by the loader to allow extensions to override loading nodes. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading nodes.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadNodeAsync = function (loader, context, node) {
                 return loader._applyExtensions(function (extension) { return extension._loadNodeAsync(context, node); });
             };
-            /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadVertexDataAsync = function (loader, context, primitive, babylonMesh) {
                 return loader._applyExtensions(function (extension) { return extension._loadVertexDataAsync(context, primitive, babylonMesh); });
             };
-            /** Helper method called by the loader to allow extensions to override loading materials. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading materials.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadMaterialAsync = function (loader, context, material, babylonMesh, babylonDrawMode, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading textures. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading textures.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadTextureAsync = function (loader, context, textureInfo, assign) {
                 return loader._applyExtensions(function (extension) { return extension._loadTextureAsync(context, textureInfo, assign); });
             };
-            /** Helper method called by the loader to allow extensions to override loading uris. */
+            /**
+             * Helper method called by the loader to allow extensions to override loading uris.
+             * @hidden
+             */
             GLTFLoaderExtension._LoadUriAsync = function (loader, context, uri) {
                 return loader._applyExtensions(function (extension) { return extension._loadUriAsync(context, uri); });
             };
@@ -108433,6 +108544,7 @@ var BABYLON;
                     _this.name = NAME;
                     return _this;
                 }
+                /** @hidden */
                 KHR_materials_pbrSpecularGlossiness.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                     var _this = this;
                     return this._loadExtensionAsync(context, material, function (extensionContext, extension) {

+ 134 - 10
gui/src/2D/advancedDynamicTexture.ts

@@ -1,12 +1,33 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
+/**
+ * This module hosts all controls for 2D and 3D GUIs
+ * @see http://doc.babylonjs.com/how_to/gui
+ */
 module BABYLON.GUI {
+    /**
+     * Interface used to define a control that can receive focus
+     */
     export interface IFocusableControl {
+        /**
+         * Function called when the control receives the focus
+         */
         onFocus(): void;
+        /**
+         * Function called when the control loses the focus
+         */
         onBlur(): void;
+        /**
+         * Function called to let the control handle keyboard events
+         * @param evt defines the current keyboard event
+         */
         processKeyboard(evt: KeyboardEvent): void;
     }
 
+    /**
+     * Class used to create texture to support 2D GUI elements
+     * @see http://doc.babylonjs.com/how_to/gui
+     */
     export class AdvancedDynamicTexture extends DynamicTexture {
         private _isDirty = false;
         private _renderObserver: Nullable<Observer<Camera>>;
@@ -16,13 +37,21 @@ module BABYLON.GUI {
         private _pointerObserver: Nullable<Observer<PointerInfo>>;
         private _canvasPointerOutObserver: Nullable<Observer<PointerEvent>>;
         private _background: string;
+        /** @hidden */
         public _rootContainer = new Container("root");
+        /** @hidden */
         public _lastPickedControl: Control;
+        /** @hidden */
         public _lastControlOver: {[pointerId:number]:Control} = {};
+        /** @hidden */
         public _lastControlDown: {[pointerId:number]:Control} = {};
+        /** @hidden */
         public _capturingControl: {[pointerId:number]:Control} = {};
+        /** @hidden */
         public _shouldBlockPointer: boolean;
+        /** @hidden */
         public _layerToDispose: Nullable<Layer>;
+        /** @hidden */
         public _linkedControls = new Array<Control>();
         private _isFullscreen = false;
         private _fullscreenViewport = new Viewport(0, 0, 1, 1);
@@ -39,6 +68,10 @@ module BABYLON.GUI {
          */
         public premulAlpha = false;
 
+        /**
+         * Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
+         * Useful when you want more antialiasing
+         */
         public get renderScale(): number {
             return this._renderScale;
         }
@@ -53,6 +86,7 @@ module BABYLON.GUI {
             this._onResize();
         }
 
+        /** Gets or sets the background color */
         public get background(): string {
             return this._background;
         }
@@ -66,6 +100,11 @@ module BABYLON.GUI {
             this.markAsDirty();
         }
 
+        /**
+         * Gets or sets the ideal width used to design controls.
+         * The GUI will then rescale everything accordingly
+         * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
+         */
         public get idealWidth(): number {
             return this._idealWidth;
         }
@@ -80,6 +119,11 @@ module BABYLON.GUI {
             this._rootContainer._markAllAsDirty();
         }
 
+        /**
+         * Gets or sets the ideal height used to design controls.
+         * The GUI will then rescale everything accordingly
+         * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
+         */        
         public get idealHeight(): number {
             return this._idealHeight;
         }
@@ -94,6 +138,10 @@ module BABYLON.GUI {
             this._rootContainer._markAllAsDirty();
         }
 
+        /**
+         * Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
+         * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
+         */
         public get useSmallestIdeal(): boolean {
             return this._useSmallestIdeal;
         }
@@ -108,6 +156,10 @@ module BABYLON.GUI {
             this._rootContainer._markAllAsDirty();
         }
 
+        /**
+         * Gets or sets a boolean indicating if adaptive scaling must be used
+         * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
+         */
         public get renderAtIdealSize(): boolean {
             return this._renderAtIdealSize;
         }
@@ -121,14 +173,23 @@ module BABYLON.GUI {
             this._onResize();
         }
 
+        /**
+         * Gets the underlying layer used to render the texture when in fullscreen mode
+         */
         public get layer(): Nullable<Layer> {
             return this._layerToDispose;
         }
 
+        /**
+         * Gets the root container control
+         */
         public get rootContainer(): Container {
             return this._rootContainer;
         }
 
+        /**
+         * Gets or sets the current focused control
+         */
         public get focusedControl(): Nullable<IFocusableControl> {
             return this._focusedControl;
         }
@@ -149,6 +210,9 @@ module BABYLON.GUI {
             this._focusedControl = control;
         }
 
+        /**
+         * Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
+         */
         public get isForeground(): boolean {
             if (!this.layer) {
                 return true;
@@ -166,6 +230,15 @@ module BABYLON.GUI {
             this.layer.isBackground = !value;
         }
 
+        /**
+         * Creates a new AdvancedDynamicTexture
+         * @param name defines the name of the texture
+         * @param width defines the width of the texture
+         * @param height defines the height of the texture
+         * @param scene defines the hosting scene
+         * @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
+         * @param samplingMode defines the texture sampling mode (BABYLON.Texture.NEAREST_SAMPLINGMODE by default)
+         */
         constructor(name: string, width = 0, height = 0, scene: Nullable<Scene>, generateMipMaps = false, samplingMode = Texture.NEAREST_SAMPLINGMODE) {
             super(name, { width: width, height: height }, scene, generateMipMaps, samplingMode, Engine.TEXTUREFORMAT_RGBA);
 
@@ -200,6 +273,11 @@ module BABYLON.GUI {
             this._texture.isReady = true;
         }
 
+        /**
+         * Function used to execute a function on all controls
+         * @param func defines the function to execute
+         * @param container defines the container where controls belong. If null the root container will be used
+         */
         public executeOnAllControls(func: (control: Control) => void, container?: Container) {
             if (!container) {
                 container = this._rootContainer;
@@ -214,6 +292,9 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Marks the texture as dirty forcing a complete update
+         */
         public markAsDirty() {
             this._isDirty = true;
 
@@ -226,22 +307,37 @@ module BABYLON.GUI {
 
         /**
          * Helper function used to create a new style
+         * @returns a new style
+         * @see http://doc.babylonjs.com/how_to/gui#styles
          */
         public createStyle(): Style {
             return new Style(this);
         }
 
+        /**
+         * Adds a new control to the root container
+         * @param control defines the control to add
+         * @returns the current texture
+         */
         public addControl(control: Control): AdvancedDynamicTexture {
             this._rootContainer.addControl(control);
 
             return this;
         }
 
+        /**
+         * Removes a control from the root container
+         * @param control defines the control to remove
+         * @returns the current texture
+         */        
         public removeControl(control: Control): AdvancedDynamicTexture {
             this._rootContainer.removeControl(control);
             return this;
         }
 
+        /**
+         * Release all resources
+         */
         public dispose(): void {
             let scene = this.getScene();
 
@@ -316,11 +412,18 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         public _getGlobalViewport(scene: Scene): Viewport {
             var engine = scene.getEngine();
             return this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
         }
 
+        /**
+         * Get screen coordinates for a vector3
+         * @param position defines the position to project
+         * @param worldMatrix defines the world matrix to use
+         * @returns the projected position
+         */
         public getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2 {
             var scene = this.getScene();
 
@@ -446,6 +549,7 @@ module BABYLON.GUI {
             this._manageFocus();
         }
 
+        /** @hidden */
         public _cleanControlAfterRemovalFromList(list: {[pointerId:number]:Control}, control:Control) {
             for (var pointerId in list) {
                 if (!list.hasOwnProperty(pointerId)) {
@@ -459,11 +563,13 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         public _cleanControlAfterRemoval(control: Control) {
             this._cleanControlAfterRemovalFromList(this._lastControlDown, control);
             this._cleanControlAfterRemovalFromList(this._lastControlOver, control);
         }
 
+        /** Attach to all scene events required to support pointer events */
         public attach(): void {
             var scene = this.getScene();
             if (!scene) {
@@ -504,6 +610,11 @@ module BABYLON.GUI {
             this._attachToOnPointerOut(scene);
         }
 
+        /**
+         * Connect the texture to a hosting mesh to enable interactions
+         * @param mesh defines the mesh to attach to
+         * @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
+         */
         public attachToMesh(mesh: AbstractMesh, supportPointerMove = true): void {
             var scene = this.getScene();
             if (!scene) {
@@ -526,7 +637,7 @@ module BABYLON.GUI {
                     }
                 } else if (pi.type === BABYLON.PointerEventTypes.POINTERUP) {
                     if (this._lastControlDown[pointerId]) {
-                        this._lastControlDown[pointerId].forcePointerUp(pointerId);
+                        this._lastControlDown[pointerId]._forcePointerUp(pointerId);
                     }
                     delete this._lastControlDown[pointerId];
 
@@ -543,6 +654,10 @@ module BABYLON.GUI {
             this._attachToOnPointerOut(scene);
         }
 
+        /**
+         * Move the focus to a specific control
+         * @param control defines the control which will receive the focus
+         */
         public moveFocusToControl(control: IFocusableControl): void {
             this.focusedControl = control;
             this._lastPickedControl = <any>control;
@@ -576,13 +691,21 @@ module BABYLON.GUI {
                 delete this._lastControlOver[pointerEvent.pointerId];
 
                 if (this._lastControlDown[pointerEvent.pointerId]) {
-                    this._lastControlDown[pointerEvent.pointerId].forcePointerUp();
+                    this._lastControlDown[pointerEvent.pointerId]._forcePointerUp();
                 }
                 delete this._lastControlDown[pointerEvent.pointerId];
             });
         }
 
         // Statics
+        /**
+         * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
+         * @param mesh defines the mesh which will receive the texture
+         * @param width defines the texture width (1024 by default)
+         * @param height defines the texture height (1024 by default)
+         * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
+         * @returns a new AdvancedDynamicTexture
+         */
         public static CreateForMesh(mesh: AbstractMesh, width = 1024, height = 1024, supportPointerMove = true): AdvancedDynamicTexture {
             var result = new AdvancedDynamicTexture(mesh.name + " AdvancedDynamicTexture", width, height, mesh.getScene(), true, Texture.TRILINEAR_SAMPLINGMODE);
 
@@ -601,15 +724,16 @@ module BABYLON.GUI {
         }
 
         /**
-         * FullScreenUI is created in a layer. This allows it to be treated like any other layer.
+         * Creates a new AdvancedDynamicTexture in fullscreen mode.
+         * In this mode the texture will rely on a layer for its rendering.
+         * This allows it to be treated like any other layer.
          * As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
-         * When the GUI is not Created as FullscreenUI it does not respect the layerMask.
-         * layerMask is set through advancedTexture.layer.layerMask
-		 * @param name name for the Texture
-		 * @param foreground render in foreground (default is true)
-		 * @param scene scene to be rendered in
-		 * @param sampling method for scaling to fit screen
-		 * @returns AdvancedDynamicTexture
+         * LayerMask is set through advancedTexture.layer.layerMask
+		 * @param name defines name for the texture
+		 * @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
+		 * @param scene defines the hsoting scene
+		 * @param sampling defines the texture sampling mode (BABYLON.Texture.BILINEAR_SAMPLINGMODE by default)
+		 * @returns a new AdvancedDynamicTexture
          */
         public static CreateFullscreenUI(name: string, foreground: boolean = true, scene: Nullable<Scene> = null, sampling = Texture.BILINEAR_SAMPLINGMODE): AdvancedDynamicTexture {
             var result = new AdvancedDynamicTexture(name, 0, 0, scene, false, sampling);

+ 50 - 0
gui/src/2D/controls/button.ts

@@ -1,12 +1,31 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to create 2D buttons
+     */
     export class Button extends Rectangle {    
+        /**
+         * Function called to generate a pointer enter animation
+         */
         public pointerEnterAnimation: () => void;
+        /**
+         * Function called to generate a pointer out animation
+         */        
         public pointerOutAnimation: () => void;
+        /**
+         * Function called to generate a pointer down animation
+         */        
         public pointerDownAnimation: () => void;
+        /**
+         * Function called to generate a pointer up animation
+         */        
         public pointerUpAnimation: () => void;
 
+        /**
+         * Creates a new Button
+         * @param name defines the name of the button
+         */
         constructor(public name?: string) {
             super(name);
           
@@ -37,6 +56,7 @@ module BABYLON.GUI {
         }
 
         // While being a container, the button behaves like a control.
+        /** @hidden */
         public _processPicking(x: number, y: number, type: number, pointerId:number, buttonIndex: number): boolean {
             if (!this.isHitTestVisible || !this.isVisible || this.notRenderable) {
                 return false;
@@ -51,6 +71,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerEnter(target: Control): boolean {
             if (!super._onPointerEnter(target)) {
                 return false;
@@ -63,6 +84,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerOut(target: Control): void {
             if (this.pointerOutAnimation) {
                 this.pointerOutAnimation();
@@ -71,6 +93,7 @@ module BABYLON.GUI {
             super._onPointerOut(target);
         }
 
+        /** @hidden */
         public _onPointerDown(target: Control, coordinates: Vector2, pointerId:number, buttonIndex: number): boolean {
             if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex)) {
                 return false;
@@ -84,6 +107,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerUp(target: Control, coordinates: Vector2, pointerId:number, buttonIndex: number, notifyClick: boolean): void {
             if (this.pointerUpAnimation) {
                 this.pointerUpAnimation();
@@ -93,6 +117,13 @@ module BABYLON.GUI {
         }        
 
         // Statics
+        /**
+         * Creates a new button made with an image and a text
+         * @param name defines the name of the button
+         * @param text defines the text of the button
+         * @param imageUrl defines the url of the image
+         * @returns a new Button
+         */
         public static CreateImageButton(name: string, text: string, imageUrl: string): Button {
             var result = new Button(name);
 
@@ -113,6 +144,12 @@ module BABYLON.GUI {
             return result;
         }
 
+        /**
+         * Creates a new button made with an image
+         * @param name defines the name of the button
+         * @param imageUrl defines the url of the image
+         * @returns a new Button
+         */
         public static CreateImageOnlyButton(name: string, imageUrl: string): Button {
             var result = new Button(name);
 
@@ -125,6 +162,12 @@ module BABYLON.GUI {
             return result;
         }
 
+        /**
+         * Creates a new button made with a text
+         * @param name defines the name of the button
+         * @param text defines the text of the button
+         * @returns a new Button
+         */        
         public static CreateSimpleButton(name: string, text: string): Button {
             var result = new Button(name);
 
@@ -137,6 +180,13 @@ module BABYLON.GUI {
             return result;
         }
         
+        /**
+         * Creates a new button made with an image and a centered text
+         * @param name defines the name of the button
+         * @param text defines the text of the button
+         * @param imageUrl defines the url of the image
+         * @returns a new Button
+         */        
         public static CreateImageWithCenterTextButton(name: string, text: string, imageUrl: string): Button {
             var result = new Button(name);
 

+ 17 - 0
gui/src/2D/controls/checkbox.ts

@@ -1,12 +1,16 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to represent a 2D checkbox
+     */
     export class Checkbox extends Control {
         private _isChecked = false;
         private _background = "black";   
         private _checkSizeRatio = 0.8;
         private _thickness = 1;
         
+        /** Gets or sets border thickness  */
         public get thickness(): number {
             return this._thickness;
         }
@@ -20,8 +24,12 @@ module BABYLON.GUI {
             this._markAsDirty();
         }           
 
+        /**
+         * Observable raised when isChecked property changes
+         */
         public onIsCheckedChangedObservable = new Observable<boolean>();
 
+        /** Gets or sets a value indicating the ratio between overall size and check size */
         public get checkSizeRatio(): number {
             return this._checkSizeRatio;
         }
@@ -37,6 +45,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }             
 
+        /** Gets or sets background color */
         public get background(): string {
             return this._background;
         }
@@ -50,6 +59,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }     
 
+        /** Gets or sets a boolean indicating if the checkbox is checked or not */
         public get isChecked(): boolean {
             return this._isChecked;
         }
@@ -65,6 +75,10 @@ module BABYLON.GUI {
             this.onIsCheckedChangedObservable.notifyObservers(value);
         }                             
 
+        /**
+         * Creates a new CheckBox
+         * @param name defines the control name
+         */
         constructor(public name?: string) {
             super(name);
             this.isPointerBlocker = true;
@@ -74,6 +88,7 @@ module BABYLON.GUI {
             return "CheckBox";
         }
         
+        /** @hidden */
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             context.save();
 
@@ -115,6 +130,8 @@ module BABYLON.GUI {
         }
 
         // Events
+
+        /** @hidden */
         public _onPointerDown(target: Control, coordinates: Vector2, pointerId:number, buttonIndex: number): boolean {
             if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex)) {
                 return false;

+ 13 - 0
gui/src/2D/controls/colorpicker.ts

@@ -1,6 +1,7 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /** Class used to create color pickers */
     export class ColorPicker extends Control {
         private _colorWheelCanvas: HTMLCanvasElement;
         
@@ -18,8 +19,12 @@ module BABYLON.GUI {
         private _s = 1;
         private _v = 1;
         
+        /**
+         * Observable raised when the value changes
+         */
         public onValueChangedObservable = new Observable<Color3>();
 
+        /** Gets or sets the color of the color picker */
         public get value(): Color3 {
             return this._value;
         }
@@ -42,6 +47,7 @@ module BABYLON.GUI {
             this.onValueChangedObservable.notifyObservers(this._value);
         }
 
+        /** Gets or sets control width */
         public set width(value: string | number ) {
             if (this._width.toString(this._host) === value) {
                 return;
@@ -53,6 +59,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets control height */
         public set height(value: string | number ) {
             if (this._height.toString(this._host) === value) {
                 return;
@@ -64,6 +71,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets control size */
         public get size(): string | number {
             return this.width;
         }
@@ -72,6 +80,10 @@ module BABYLON.GUI {
             this.width = value;
         }              
 
+        /**
+         * Creates a new ColorPicker
+         * @param name defines the control name
+         */
         constructor(public name?: string) {
             super(name);
             this.value = new BABYLON.Color3(.88, .1, .1);
@@ -259,6 +271,7 @@ module BABYLON.GUI {
             result.set((r+m), (g+m), (b+m));            
         }
 
+        /** @hidden */
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             context.save();
 

+ 53 - 0
gui/src/2D/controls/container.ts

@@ -1,13 +1,23 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Root class for 2D containers
+     * @see http://doc.babylonjs.com/how_to/gui#containers
+     */
     export class Container extends Control {
+        /** @hidden */
         protected _children = new Array<Control>();
+        /** @hidden */
         protected _measureForChildren = Measure.Empty();  
+        /** @hidden */
         protected _background: string;   
+        /** @hidden */
         protected _adaptWidthToChildren = false;
+        /** @hidden */
         protected _adaptHeightToChildren = false;
 
+        /** Gets or sets a boolean indicating if the container should try to adapt to its children height */
         public get adaptHeightToChildren(): boolean {
             return this._adaptHeightToChildren;
         }
@@ -26,6 +36,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }       
         
+        /** Gets or sets a boolean indicating if the container should try to adapt to its children width */
         public get adaptWidthToChildren(): boolean {
             return this._adaptWidthToChildren;
         }
@@ -44,6 +55,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }           
 
+        /** Gets or sets background color */
         public get background(): string {
             return this._background;
         }
@@ -57,10 +69,15 @@ module BABYLON.GUI {
             this._markAsDirty();
         }  
 
+        /** Gets the list of children */
         public get children(): Control[] {
             return this._children;
         }        
 
+        /**
+         * Creates a new Container
+         * @param name defines the name of the container
+         */
         constructor(public name?: string) {
             super(name);
         }
@@ -69,6 +86,11 @@ module BABYLON.GUI {
             return "Container";
         }           
 
+        /**
+         * Gets a child using its name
+         * @param name defines the child name to look for
+         * @returns the child control if found
+         */
         public getChildByName(name: string): Nullable<Control> {
             for (var child of this._children) {
                 if (child.name === name) {
@@ -79,6 +101,12 @@ module BABYLON.GUI {
             return null;
         }       
 
+        /**
+         * Gets a child using its type and its name
+         * @param name defines the child name to look for
+         * @param type defines the child type to look for
+         * @returns the child control if found
+         */        
         public getChildByType(name: string, type: string): Nullable<Control> {
             for (var child of this._children) {
                 if (child.typeName === type) {
@@ -89,10 +117,20 @@ module BABYLON.GUI {
             return null;
         }            
 
+        /**
+         * Search for a specific control in children
+         * @param control defines the control to look for
+         * @returns true if the control is in child list
+         */
         public containsControl(control: Control): boolean {
             return this._children.indexOf(control) !== -1;
         }
 
+        /**
+         * Adds a new control to the current container
+         * @param control defines the control to add
+         * @returns the current container
+         */
         public addControl(control: Control): Container {
            var index = this._children.indexOf(control);
 
@@ -109,6 +147,11 @@ module BABYLON.GUI {
             return this;
         }
 
+        /**
+         * Removes a control from the current container
+         * @param control defines the control to remove
+         * @returns the current container
+         */        
         public removeControl(control: Control): Container {
             var index = this._children.indexOf(control);
 
@@ -128,6 +171,7 @@ module BABYLON.GUI {
             return this;
         }
 
+        /** @hidden */
         public _reOrderControl(control: Control): void {
             this.removeControl(control);
 
@@ -145,6 +189,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** @hidden */       
         public _markMatrixAsDirty(): void {
             super._markMatrixAsDirty();
 
@@ -153,6 +198,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */ 
         public _markAllAsDirty(): void {
             super._markAllAsDirty();
 
@@ -161,6 +207,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */ 
         protected _localDraw(context: CanvasRenderingContext2D): void {
             if (this._background) {
                 if(this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY){
@@ -181,6 +228,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */ 
         public _link(root: Nullable<Container>, host: AdvancedDynamicTexture): void {
             super._link(root, host);
 
@@ -189,6 +237,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */ 
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {      
             if (!this.isVisible || this.notRenderable) {
                 return;
@@ -237,6 +286,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */ 
         public _processPicking(x: number, y: number, type: number, pointerId:number, buttonIndex: number): boolean {
             if (!this.isVisible || this.notRenderable) {
                 return false;
@@ -261,16 +311,19 @@ module BABYLON.GUI {
             return this._processObservables(type, x, y, pointerId, buttonIndex);
         }
 
+        /** @hidden */ 
         protected _clipForChildren(context: CanvasRenderingContext2D): void {
             // DO nothing
         }
 
+        /** @hidden */ 
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void {  
             super._additionalProcessing(parentMeasure, context);
 
             this._measureForChildren.copyFrom(this._currentMeasure);
         }
 
+        /** Releases associated resources */
         public dispose() {
             super.dispose();
 

+ 229 - 3
gui/src/2D/controls/control.ts

@@ -1,35 +1,52 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Root class used for all 2D controls
+     * @see http://doc.babylonjs.com/how_to/gui#controls
+     */
     export class Control {
         private _alpha = 1;
         private _alphaSet = false;
         private _zIndex = 0;
+        /** @hidden */
         public _root: Nullable<Container>;
+        /** @hidden */
         public _host: AdvancedDynamicTexture;
+        /** Gets or sets the control parent */
         public parent: Nullable<Container>;
+        /** @hidden */
         public _currentMeasure = Measure.Empty();
         private _fontFamily = "Arial";
         private _fontStyle = "";
         private _fontWeight = "";
         private _fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);
         private _font: string;
+        /** @hidden */
         public _width = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
+        /** @hidden */
         public _height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
+        /** @hidden */
         protected _fontOffset: { ascent: number, height: number, descent: number };
         private _color = "";
         private _style: BABYLON.Nullable<Style> = null;
         private _styleObserver: BABYLON.Nullable<BABYLON.Observer<Style>>;
+        /** @hidden */
         protected _horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
+        /** @hidden */
         protected _verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
         private _isDirty = true;
+        /** @hidden */
         public _tempParentMeasure = Measure.Empty();
+        /** @hidden */
         protected _cachedParentMeasure = Measure.Empty();
         private _paddingLeft = new ValueAndUnit(0);
         private _paddingRight = new ValueAndUnit(0);
         private _paddingTop = new ValueAndUnit(0);
         private _paddingBottom = new ValueAndUnit(0);
+        /** @hidden */
         public _left = new ValueAndUnit(0);
+        /** @hidden */
         public _top = new ValueAndUnit(0);
         private _scaleX = 1.0;
         private _scaleY = 1.0;
@@ -37,13 +54,16 @@ module BABYLON.GUI {
         private _transformCenterX = 0.5;
         private _transformCenterY = 0.5;
         private _transformMatrix = Matrix2D.Identity();
+        /** @hidden */
         protected _invertTransformMatrix = Matrix2D.Identity();
+        /** @hidden */
         protected _transformedPosition = Vector2.Zero();
         private _onlyMeasureMode = false;
         private _isMatrixDirty = true;
         private _cachedOffsetX: number;
         private _cachedOffsetY: number;
         private _isVisible = true;
+        /** @hidden */
         public _linkedMesh: Nullable<AbstractMesh>;
         private _fontSet = false;
         private _dummyVector2 = Vector2.Zero();
@@ -52,20 +72,30 @@ module BABYLON.GUI {
         private _doNotRender = false;
         private _downPointerIds:{[id:number] : boolean} = {};
 
+        /** Gets or sets a boolean indicating if the control can be hit with pointer events */
         public isHitTestVisible = true;
+        /** Gets or sets a boolean indicating if the control can block pointer events */
         public isPointerBlocker = false;
+        /** Gets or sets a boolean indicating if the control can be focusable */
         public isFocusInvisible = false;
 
+        /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
         public shadowOffsetX = 0;
+        /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
         public shadowOffsetY = 0;
+        /** Gets or sets a value indicating the amount of blur to use to render the shadow */
         public shadowBlur = 0;
+        /** Gets or sets a value indicating the color of the shadow (black by default ie. "#000") */
         public shadowColor = '#000';
 
+         /** @hidden */
         protected _linkOffsetX = new ValueAndUnit(0);
+         /** @hidden */
         protected _linkOffsetY = new ValueAndUnit(0);
 
         // Properties
 
+        /** Gets the control type name */
         public get typeName(): string {
             return this._getTypeName();
         }
@@ -119,6 +149,7 @@ module BABYLON.GUI {
             this._fontOffset = offset;
         }
 
+        /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */
         public get alpha(): number {
             return this._alpha;
         }
@@ -132,6 +163,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets a value indicating the scale factor on X axis (1 by default) 
+         * @see http://doc.babylonjs.com/how_to/gui#rotation-and-scaling
+        */
         public get scaleX(): number {
             return this._scaleX;
         }
@@ -146,6 +180,9 @@ module BABYLON.GUI {
             this._markMatrixAsDirty();
         }
 
+        /** Gets or sets a value indicating the scale factor on Y axis (1 by default) 
+         * @see http://doc.babylonjs.com/how_to/gui#rotation-and-scaling
+        */
         public get scaleY(): number {
             return this._scaleY;
         }
@@ -160,6 +197,9 @@ module BABYLON.GUI {
             this._markMatrixAsDirty();
         }
 
+        /** Gets or sets the rotation angle (0 by default) 
+         * @see http://doc.babylonjs.com/how_to/gui#rotation-and-scaling
+        */
         public get rotation(): number {
             return this._rotation;
         }
@@ -174,6 +214,9 @@ module BABYLON.GUI {
             this._markMatrixAsDirty();
         }
 
+        /** Gets or sets the transformation center on Y axis (0 by default)
+         * @see http://doc.babylonjs.com/how_to/gui#rotation-and-scaling
+        */
         public get transformCenterY(): number {
             return this._transformCenterY;
         }
@@ -188,6 +231,9 @@ module BABYLON.GUI {
             this._markMatrixAsDirty();
         }
 
+        /** Gets or sets the transformation center on X axis (0 by default)
+         * @see http://doc.babylonjs.com/how_to/gui#rotation-and-scaling
+        */
         public get transformCenterX(): number {
             return this._transformCenterX;
         }
@@ -202,6 +248,10 @@ module BABYLON.GUI {
             this._markMatrixAsDirty();
         }
 
+        /** 
+         * Gets or sets the horizontal alignment 
+         * @see http://doc.babylonjs.com/how_to/gui#alignments
+         */
         public get horizontalAlignment(): number {
             return this._horizontalAlignment;
         }
@@ -215,6 +265,10 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** 
+         * Gets or sets the vertical alignment 
+         * @see http://doc.babylonjs.com/how_to/gui#alignments
+         */        
         public get verticalAlignment(): number {
             return this._verticalAlignment;
         }
@@ -228,10 +282,18 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** 
+         * Gets or sets control width 
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */
         public get width(): string | number {
             return this._width.toString(this._host);
         }
 
+        /** 
+         * Gets control width in pixel
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get widthInPixels(): number {
             return this._width.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -246,10 +308,18 @@ module BABYLON.GUI {
             }
         }
 
+        /** 
+         * Gets or sets control height 
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get height(): string | number {
             return this._height.toString(this._host);
         }
 
+        /** 
+         * Gets control height in pixel
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get heightInPixels(): number {
             return this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);
         }
@@ -264,6 +334,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or set font family */
         public get fontFamily(): string {
             return this._fontFamily;
         }
@@ -305,6 +376,10 @@ module BABYLON.GUI {
             this._resetFontCache();
         }        
 
+        /**
+         * Gets or sets style
+         * @see http://doc.babylonjs.com/how_to/gui#styles
+         */
         public get style(): BABYLON.Nullable<Style> {
             return this._style;
         }
@@ -333,6 +408,7 @@ module BABYLON.GUI {
             return this._fontSize.isPercentage;
         }
 
+        /** Gets font size in pixels */
         public get fontSizeInPixels(): number {
             let fontSizeToUse =  this._style ? this._style._fontSize : this._fontSize;
 
@@ -343,6 +419,7 @@ module BABYLON.GUI {
             return fontSizeToUse.getValueInPixel(this._host, this._tempParentMeasure.height || this._cachedParentMeasure.height);
         }
 
+        /** Gets or sets font size */
         public get fontSize(): string | number {
             return this._fontSize.toString(this._host);
         }
@@ -358,6 +435,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets foreground color */
         public get color(): string {
             return this._color;
         }
@@ -371,6 +449,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets z index which is used to reorder controls on the z axis */
         public get zIndex(): number {
             return this._zIndex;
         }
@@ -387,6 +466,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets a boolean indicating if the control can be rendered */
         public get notRenderable(): boolean {
             return this._doNotRender;
         }
@@ -400,6 +480,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets a boolean indicating if the control is visible */
         public get isVisible(): boolean {
             return this._isVisible;
         }
@@ -413,14 +494,23 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets a boolean indicating that the control needs to update its rendering */
         public get isDirty(): boolean {
             return this._isDirty;
         }
 
+        /**
+         * Gets or sets a value indicating the padding to use on the left of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */
         public get paddingLeft(): string | number {
             return this._paddingLeft.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the padding in pixels to use on the left of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get paddingLeftInPixels(): number {
             return this._paddingLeft.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -431,10 +521,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the padding to use on the right of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get paddingRight(): string | number {
             return this._paddingRight.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the padding in pixels to use on the right of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */        
         public get paddingRightInPixels(): number {
             return this._paddingRight.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -445,10 +543,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the padding to use on the top of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */                
         public get paddingTop(): string | number {
             return this._paddingTop.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the padding in pixels to use on the top of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */                
         public get paddingTopInPixels(): number {
             return this._paddingTop.getValueInPixel(this._host, this._cachedParentMeasure.height);
         }
@@ -459,10 +565,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the padding to use on the bottom of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */                
         public get paddingBottom(): string | number {
             return this._paddingBottom.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the padding in pixels to use on the bottom of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */  
         public get paddingBottomInPixels(): number {
             return this._paddingBottom.getValueInPixel(this._host, this._cachedParentMeasure.height);
         }
@@ -473,10 +587,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the left coordinate of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */  
         public get left(): string | number {
             return this._left.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the left coordinate in pixels of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */         
         public get leftInPixels(): number {
             return this._left.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -487,10 +609,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the top coordinate of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */         
         public get top(): string | number {
             return this._top.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the top coordinate in pixels of the control
+         * @see http://doc.babylonjs.com/how_to/gui#position-and-size
+         */           
         public get topInPixels(): number {
             return this._top.getValueInPixel(this._host, this._cachedParentMeasure.height);
         }
@@ -501,10 +631,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the offset on X axis to the linked mesh
+         * @see http://doc.babylonjs.com/how_to/gui#tracking-positions
+         */
         public get linkOffsetX(): string | number {
             return this._linkOffsetX.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the offset in pixels on X axis to the linked mesh
+         * @see http://doc.babylonjs.com/how_to/gui#tracking-positions
+         */        
         public get linkOffsetXInPixels(): number {
             return this._linkOffsetX.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -515,10 +653,18 @@ module BABYLON.GUI {
             }
         }
 
+        /**
+         * Gets or sets a value indicating the offset on Y axis to the linked mesh
+         * @see http://doc.babylonjs.com/how_to/gui#tracking-positions
+         */        
         public get linkOffsetY(): string | number {
             return this._linkOffsetY.toString(this._host);
         }
 
+        /**
+         * Gets a value indicating the offset in pixels on Y axis to the linked mesh
+         * @see http://doc.babylonjs.com/how_to/gui#tracking-positions
+         */         
         public get linkOffsetYInPixels(): number {
             return this._linkOffsetY.getValueInPixel(this._host, this._cachedParentMeasure.height);
         }
@@ -529,18 +675,28 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets the center coordinate on X axis */
         public get centerX(): number {
             return this._currentMeasure.left + this._currentMeasure.width / 2;
         }
 
+        /** Gets the center coordinate on Y axis */
         public get centerY(): number {
             return this._currentMeasure.top + this._currentMeasure.height / 2;
         }
 
         // Functions
-        constructor(public name?: string) {
+
+        /**
+         * Creates a new control
+         * @param name defines the name of the control
+         */
+        constructor(
+            /** defines the name of the control */
+            public name?: string) {
         }
 
+        /** @hidden */
         protected _getTypeName(): string {
             return "Control";
         }
@@ -550,6 +706,11 @@ module BABYLON.GUI {
             this._fontSet = true;
         }
 
+        /** 
+         * Gets coordinates in local control space 
+         * @param globalCoordinates defines the coordinates to transform
+         * @returns the new coordinates in local space
+         */
         public getLocalCoordinates(globalCoordinates: Vector2): Vector2 {
             var result = Vector2.Zero();
 
@@ -558,12 +719,23 @@ module BABYLON.GUI {
             return result;
         }
 
+        /** 
+         * Gets coordinates in local control space 
+         * @param globalCoordinates defines the coordinates to transform
+         * @param result defines the target vector2 where to store the result
+         * @returns the current control
+         */        
         public getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control {
             result.x = globalCoordinates.x - this._currentMeasure.left;
             result.y = globalCoordinates.y - this._currentMeasure.top;
             return this;
         }
 
+        /** 
+         * Gets coordinates in parent local control space 
+         * @param globalCoordinates defines the coordinates to transform
+         * @returns the new coordinates in parent local space
+         */
         public getParentLocalCoordinates(globalCoordinates: Vector2): Vector2 {
             var result = Vector2.Zero();
 
@@ -573,6 +745,11 @@ module BABYLON.GUI {
             return result;
         }
 
+        /**
+         * Move the current control to a vector3 position projected onto the screen.
+         * @param position defines the target position
+         * @param scene defines the hosting scene
+         */
         public moveToVector3(position: Vector3, scene: Scene): void {
             if (!this._host || this._root !== this._host._rootContainer) {
                 Tools.Error("Cannot move a control to a vector3 if the control is not at root level");
@@ -594,6 +771,11 @@ module BABYLON.GUI {
             this.notRenderable = false;
         }
 
+        /**
+         * Link current control with a target mesh
+         * @param mesh defines the mesh to link with
+         * @see http://doc.babylonjs.com/how_to/gui#tracking-positions
+         */
         public linkWithMesh(mesh: Nullable<AbstractMesh>): void {
             if (!this._host || this._root && this._root !== this._host._rootContainer) {
                 if (mesh) {
@@ -620,6 +802,7 @@ module BABYLON.GUI {
             this._host._linkedControls.push(this);
         }
 
+        /** @hidden */
         public _moveToProjectedPosition(projectedPosition: Vector3): void {
             let oldLeft = this._left.getValue(this._host);
             let oldTop = this._top.getValue(this._host);
@@ -644,11 +827,13 @@ module BABYLON.GUI {
             this._top.ignoreAdaptiveScaling = true;
         }
 
+        /** @hidden */
         public _markMatrixAsDirty(): void {
             this._isMatrixDirty = true;
             this._markAsDirty();
         }
 
+        /** @hidden */
         public _markAsDirty(): void {
             this._isDirty = true;
 
@@ -658,6 +843,7 @@ module BABYLON.GUI {
             this._host.markAsDirty();
         }
 
+        /** @hidden */
         public _markAllAsDirty(): void {
             this._markAsDirty();
 
@@ -666,11 +852,13 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         public _link(root: Nullable<Container>, host: AdvancedDynamicTexture): void {
             this._root = root;
             this._host = host;
         }
 
+        /** @hidden */
         protected _transform(context: CanvasRenderingContext2D): void {
             if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {
                 return;
@@ -702,6 +890,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         protected _applyStates(context: CanvasRenderingContext2D): void {
             if (this._fontSet) {
                 this._prepareFont();
@@ -721,6 +910,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         protected _processMeasures(parentMeasure: Measure, context: CanvasRenderingContext2D): boolean {
             if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {
                 this._isDirty = false;
@@ -779,6 +969,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         protected _clip(context: CanvasRenderingContext2D) {
             context.beginPath();
 
@@ -801,6 +992,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         public _measure(): void {
             // Width / Height
             if (this._width.isPixel) {
@@ -816,6 +1008,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         protected _computeAlignment(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             var width = this._currentMeasure.width;
             var height = this._currentMeasure.height;
@@ -895,18 +1088,27 @@ module BABYLON.GUI {
             this._currentMeasure.top += y;
         }
 
+        /** @hidden */
         protected _preMeasure(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             // Do nothing
         }
 
+        /** @hidden */
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             // Do nothing
         }
 
+        /** @hidden */
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             // Do nothing
         }
 
+        /**
+         * Tests if a given coordinates belong to the current control
+         * @param x defines x coordinate to test
+         * @param y defines y coordinate to test
+         * @returns true if the coordinates are inside the control
+         */
         public contains(x: number, y: number): boolean {
             // Invert transform
             this._invertTransformMatrix.transformCoordinates(x, y, this._transformedPosition);
@@ -937,6 +1139,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _processPicking(x: number, y: number, type: number, pointerId:number, buttonIndex: number): boolean {
             if (!this.isHitTestVisible || !this.isVisible || this._doNotRender) {
                 return false;
@@ -951,12 +1154,14 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerMove(target: Control, coordinates: Vector2): void {
             var canNotify: boolean = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this);
 
             if (canNotify && this.parent != null) this.parent._onPointerMove(target, coordinates);
         }
 
+        /** @hidden */
         public _onPointerEnter(target: Control): boolean {
             if (this._enterCount !== 0) {
                 return false;
@@ -971,6 +1176,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerOut(target: Control): void {
             this._enterCount = 0;
 
@@ -979,6 +1185,7 @@ module BABYLON.GUI {
             if (canNotify && this.parent != null) this.parent._onPointerOut(target);
         }
 
+        /** @hidden */
         public _onPointerDown(target: Control, coordinates: Vector2, pointerId:number, buttonIndex: number): boolean {
             if (this._downCount !== 0) {
                 return false;
@@ -995,6 +1202,7 @@ module BABYLON.GUI {
             return true;
         }
 
+        /** @hidden */
         public _onPointerUp(target: Control, coordinates: Vector2, pointerId:number, buttonIndex: number, notifyClick: boolean): void {
             this._downCount = 0;
 
@@ -1009,7 +1217,8 @@ module BABYLON.GUI {
             if (canNotify && this.parent != null) this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick);
         }
 
-        public forcePointerUp(pointerId:Nullable<number> = null) {
+        /** @hidden */
+        public _forcePointerUp(pointerId:Nullable<number> = null) {
             if(pointerId !== null){
                 this._onPointerUp(this, Vector2.Zero(), pointerId, 0, true);
             }else{
@@ -1019,6 +1228,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */
         public _processObservables(type: number, x: number, y: number, pointerId:number, buttonIndex: number): boolean {
             this._dummyVector2.copyFromFloats(x, y);
             if (type === BABYLON.PointerEventTypes.POINTERMOVE) {
@@ -1055,7 +1265,6 @@ module BABYLON.GUI {
             return false;
         }
 
-
         private _prepareFont() {
             if (!this._font && !this._fontSet) {
                 return;
@@ -1070,6 +1279,7 @@ module BABYLON.GUI {
             this._fontOffset = Control._GetFontOffset(this._font);
         }
 
+        /** Releases associated resources */
         public dispose() {
             this.onDirtyObservable.clear();
             this.onAfterDrawObservable.clear();
@@ -1105,32 +1315,39 @@ module BABYLON.GUI {
         private static _VERTICAL_ALIGNMENT_BOTTOM = 1;
         private static _VERTICAL_ALIGNMENT_CENTER = 2;
 
+        /** HORIZONTAL_ALIGNMENT_LEFT */
         public static get HORIZONTAL_ALIGNMENT_LEFT(): number {
             return Control._HORIZONTAL_ALIGNMENT_LEFT;
         }
 
+        /** HORIZONTAL_ALIGNMENT_RIGHT */
         public static get HORIZONTAL_ALIGNMENT_RIGHT(): number {
             return Control._HORIZONTAL_ALIGNMENT_RIGHT;
         }
 
+        /** HORIZONTAL_ALIGNMENT_CENTER */
         public static get HORIZONTAL_ALIGNMENT_CENTER(): number {
             return Control._HORIZONTAL_ALIGNMENT_CENTER;
         }
 
+        /** VERTICAL_ALIGNMENT_TOP */
         public static get VERTICAL_ALIGNMENT_TOP(): number {
             return Control._VERTICAL_ALIGNMENT_TOP;
         }
 
+        /** VERTICAL_ALIGNMENT_BOTTOM */
         public static get VERTICAL_ALIGNMENT_BOTTOM(): number {
             return Control._VERTICAL_ALIGNMENT_BOTTOM;
         }
 
+        /** VERTICAL_ALIGNMENT_CENTER */
         public static get VERTICAL_ALIGNMENT_CENTER(): number {
             return Control._VERTICAL_ALIGNMENT_CENTER;
         }
 
         private static _FontHeightSizes: { [key: string]: { ascent: number, height: number, descent: number } } = {};
 
+        /** @hidden */
         public static _GetFontOffset(font: string): { ascent: number, height: number, descent: number } {
 
             if (Control._FontHeightSizes[font]) {
@@ -1168,6 +1385,14 @@ module BABYLON.GUI {
             return result;
         };
 
+        /**
+         * Creates a stack panel that can be used to render headers
+         * @param control defines the control to associate with the header
+         * @param text defines the text of the header
+         * @param size defines the size of the header
+         * @param options defines options used to configure the header
+         * @returns a new StackPanel
+         */
         public static AddHeader(control: Control, text: string, size: string | number, options: { isHorizontal: boolean, controlFirst: boolean }): StackPanel {
             let panel = new BABYLON.GUI.StackPanel("panel");
             let isHorizontal = options ? options.isHorizontal : true;
@@ -1202,6 +1427,7 @@ module BABYLON.GUI {
             return panel;
         }
 
+        /** @hidden */
         protected static drawEllipse(x: number, y: number, width: number, height: number, context: CanvasRenderingContext2D): void {
             context.translate(x, y);
             context.scale(width, height);

+ 6 - 0
gui/src/2D/controls/ellipse.ts

@@ -1,9 +1,11 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /** Class used to render 2D ellipses */
     export class Ellipse extends Container {
         private _thickness = 1;       
         
+        /** Gets or sets border thickness */
         public get thickness(): number {
             return this._thickness;
         }
@@ -17,6 +19,10 @@ module BABYLON.GUI {
             this._markAsDirty();
         }                
      
+        /**
+         * Creates a new Ellipse
+         * @param name defines the control name
+         */
         constructor(public name?: string) {
             super(name);
         }

+ 49 - 1
gui/src/2D/controls/image.ts

@@ -3,6 +3,9 @@
 var DOMImage = Image;
 
 module BABYLON.GUI {
+    /**
+     * Class used to create 2D images
+     */
     export class Image extends Control {
         private _domImage: HTMLImageElement;
         private _imageWidth: number;
@@ -21,6 +24,9 @@ module BABYLON.GUI {
         private _cellHeight: number = 0;
         private _cellId: number = -1;
 
+        /**
+         * Gets or sets the left coordinate in the source image
+         */
         public get sourceLeft(): number {
             return this._sourceLeft;
         }
@@ -35,6 +41,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Gets or sets the top coordinate in the source image
+         */        
         public get sourceTop(): number {
             return this._sourceTop;
         }
@@ -49,6 +58,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Gets or sets the width to capture in the source image
+         */        
         public get sourceWidth(): number {
             return this._sourceWidth;
         }
@@ -63,6 +75,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Gets or sets the height to capture in the source image
+         */        
         public get sourceHeight(): number {
             return this._sourceHeight;
         }
@@ -77,6 +92,10 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** 
+         * Gets or sets a boolean indicating if the image can force its container to adapt its size 
+         * @see http://doc.babylonjs.com/how_to/gui#image
+         */
         public get autoScale(): boolean {
             return this._autoScale;
         }
@@ -93,6 +112,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets the streching mode used by the image */
         public get stretch(): number {
             return this._stretch;
         }
@@ -107,6 +127,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Gets or sets the internal DOM image used to render the control
+         */
         public set domImage(value: HTMLImageElement) {
             this._domImage = value;
             this._loaded = false;
@@ -136,6 +159,9 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Gets or sets image source url
+         */
         public set source(value: Nullable<string>) {
             if (this._source === value) {
                 return;
@@ -155,6 +181,10 @@ module BABYLON.GUI {
             }
         }
 
+        /** 
+         * Gets or sets the cell width to use when animation sheet is enabled 
+         * @see http://doc.babylonjs.com/how_to/gui#image
+         */
         get cellWidth(): number {
             return this._cellWidth;
         }
@@ -167,6 +197,10 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** 
+         * Gets or sets the cell height to use when animation sheet is enabled 
+         * @see http://doc.babylonjs.com/how_to/gui#image
+         */
         get cellHeight(): number {
             return this._cellHeight;
         }
@@ -178,7 +212,11 @@ module BABYLON.GUI {
             this._cellHeight = value;
             this._markAsDirty();
         }
-
+    
+        /** 
+         * Gets or sets the cell id to use (this will turn on the animation sheet mode)
+         * @see http://doc.babylonjs.com/how_to/gui#image
+         */
         get cellId(): number {
             return this._cellId;
         }
@@ -191,6 +229,11 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /**
+         * Creates a new Image
+         * @param name defines the control name
+         * @param url defines the image url
+         */
         constructor(public name?: string, url: Nullable<string> = null) {
             super(name);
 
@@ -201,6 +244,7 @@ module BABYLON.GUI {
             return "Image";
         }
 
+        /** Force the control to synchronize with its content */
         public synchronizeSizeWithContent() {
             if (!this._loaded) {
                 return;
@@ -284,18 +328,22 @@ module BABYLON.GUI {
         private static _STRETCH_UNIFORM = 2;
         private static _STRETCH_EXTEND = 3;
 
+        /** STRETCH_NONE */
         public static get STRETCH_NONE(): number {
             return Image._STRETCH_NONE;
         }
 
+        /** STRETCH_FILL */
         public static get STRETCH_FILL(): number {
             return Image._STRETCH_FILL;
         }
 
+        /** STRETCH_UNIFORM */
         public static get STRETCH_UNIFORM(): number {
             return Image._STRETCH_UNIFORM;
         }
 
+        /** STRETCH_EXTEND */
         public static get STRETCH_EXTEND(): number {
             return Image._STRETCH_EXTEND;
         }

+ 28 - 0
gui/src/2D/controls/inputText.ts

@@ -1,6 +1,9 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to create input text control
+     */
     export class InputText extends Control implements IFocusableControl {
         private _text = "";
         private _placeholderText = "";
@@ -19,16 +22,22 @@ module BABYLON.GUI {
         private _textWidth: number;
         private _clickedCoordinate: Nullable<number>;
 
+        /** Gets or sets a string representing the message displayed on mobile when the control gets the focus */
         public promptMessage = "Please enter text:";
 
+        /** Observable raised when the text changes */
         public onTextChangedObservable = new Observable<InputText>();
+        /** Observable raised when the control gets the focus */
         public onFocusObservable = new Observable<InputText>();
+        /** Observable raised when the control loses the focus */
         public onBlurObservable = new Observable<InputText>();
 
+        /** Gets or sets the maximum width allowed by the control */
         public get maxWidth(): string | number {
             return this._maxWidth.toString(this._host);
         }
 
+        /** Gets the maximum width allowed by the control in pixels */
         public get maxWidthInPixels(): number {
             return this._maxWidth.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -43,10 +52,12 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets control margin */
         public get margin(): string {
             return this._margin.toString(this._host);
         }
 
+        /** Gets control margin in pixels */
         public get marginInPixels(): number {
             return this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);
         }
@@ -61,6 +72,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets a boolean indicating if the control can auto stretch its width to adapt to the text */
         public get autoStretchWidth(): boolean {
             return this._autoStretchWidth;
         }
@@ -74,6 +86,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets border thickness */
         public get thickness(): number {
             return this._thickness;
         }
@@ -87,6 +100,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the background color when focused */
         public get focusedBackground(): string {
             return this._focusedBackground;
         }
@@ -100,6 +114,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the background color */
         public get background(): string {
             return this._background;
         }
@@ -113,6 +128,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the placeholder color */
         public get placeholderColor(): string {
             return this._placeholderColor;
         }
@@ -126,6 +142,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the text displayed when the control is empty */
         public get placeholderText(): string {
             return this._placeholderText;
         }
@@ -138,6 +155,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
+        /** Gets or sets the text displayed in the control */
         public get text(): string {
             return this._text;
         }
@@ -152,6 +170,7 @@ module BABYLON.GUI {
             this.onTextChangedObservable.notifyObservers(this);
         }
 
+        /** Gets or sets control width */
         public get width(): string | number {
             return this._width.toString(this._host);
         }
@@ -168,12 +187,18 @@ module BABYLON.GUI {
             this.autoStretchWidth = false;
         }
 
+        /**
+         * Creates a new InputText
+         * @param name defines the control name
+         * @param text defines the text of the control
+         */
         constructor(public name?: string, text: string = "") {
             super(name);
 
             this.text = text;
         }
 
+        /** @hidden */
         public onBlur(): void {
             this._isFocused = false;
             this._scrollLeft = null;
@@ -184,6 +209,7 @@ module BABYLON.GUI {
             this.onBlurObservable.notifyObservers(this);
         }
 
+        /** @hidden */
         public onFocus(): void {
             this._scrollLeft = null;
             this._isFocused = true;
@@ -208,6 +234,7 @@ module BABYLON.GUI {
             return "InputText";
         }
 
+        /** @hidden */
         public processKey(keyCode: number, key?: string) {
             // Specific cases
             switch (keyCode) {
@@ -283,6 +310,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** @hidden */       
         public processKeyboard(evt: KeyboardEvent): void {
             this.processKey(evt.keyCode, evt.key);
         }

+ 7 - 0
gui/src/2D/controls/line.ts

@@ -1,6 +1,7 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /** Class used to render 2D lines */
     export class Line extends Control {
         private _lineWidth = 1;
         private _x1 = new ValueAndUnit(0);
@@ -11,6 +12,7 @@ module BABYLON.GUI {
         private _connectedControl: Control;
         private _connectedControlDirtyObserver: Nullable<Observer<Control>>;
 
+        /** Gets or sets the dash pattern */
         public get dash(): Array<number> {
             return this._dash;
         }
@@ -24,6 +26,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }     
 
+        /** Gets or sets the control connected with the line end */
         public get connectedControl(): Control {
             return this._connectedControl;
         }
@@ -46,6 +49,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }              
 
+        /** Gets or sets start coordinates on X axis */
         public get x1(): string | number  {
             return this._x1.toString(this._host);
         }
@@ -60,6 +64,7 @@ module BABYLON.GUI {
             }
         }    
 
+        /** Gets or sets start coordinates on Y axis */        
         public get y1(): string | number  {
             return this._y1.toString(this._host);
         }
@@ -74,6 +79,7 @@ module BABYLON.GUI {
             }
         }     
 
+        /** Gets or sets end coordinates on X axis */        
         public get x2(): string | number  {
             return this._x2.toString(this._host);
         }
@@ -88,6 +94,7 @@ module BABYLON.GUI {
             }
         }    
 
+        /** Gets or sets end coordinates on Y axis */        
         public get y2(): string | number  {
             return this._y2.toString(this._host);
         }

+ 9 - 1
gui/src/2D/math2D.ts

@@ -1,7 +1,15 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
-    export class Vector2WithInfo extends Vector2 {        
+    /**
+     * Class used to transport Vector2 information for pointer events
+     */    
+    export class Vector2WithInfo extends Vector2 {    
+        /**
+         * Creates a new Vector2WithInfo
+         * @param source defines the vector2 data to transport
+         * @param buttonIndex defines the current mouse button index
+         */    
         public constructor(source: Vector2, public buttonIndex: number = 0) {
             super(source.x, source.y);
         }

+ 31 - 1
gui/src/2D/measure.ts

@@ -1,11 +1,33 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to store 2D control sizes
+     */
     export class Measure {
-        public constructor(public left: number, public top: number, public width: number, public height: number) {
+        /**
+         * Creates a new measure
+         * @param left defines left coordinate
+         * @param top defines top coordinate 
+         * @param width defines width dimension
+         * @param height defines height dimension
+         */
+        public constructor(
+            /** defines left coordinate */
+            public left: number, 
+            /** defines top coordinate  */
+            public top: number, 
+            /** defines width dimension  */
+            public width: number, 
+            /** defines height dimension */
+            public height: number) {
 
         }
 
+        /**
+         * Copy from another measure
+         * @param other defines the other measure to copy from
+         */
         public copyFrom(other: Measure): void {
             this.left = other.left;
             this.top = other.top;
@@ -13,6 +35,11 @@ module BABYLON.GUI {
             this.height = other.height;
         }
 
+        /**
+         * Check equality between this measure and another one
+         * @param other defines the other measures
+         * @returns true if both measures are equals
+         */
         public isEqualsTo(other: Measure): boolean {
 
             if (this.left !== other.left) {
@@ -34,6 +61,9 @@ module BABYLON.GUI {
             return true;
         }
 
+        /**
+         * Creates an empty measure
+         */
         public static Empty(): Measure {
             return new Measure(0, 0, 0, 0);
         }

+ 18 - 0
gui/src/2D/multiLinePoint.ts

@@ -2,6 +2,10 @@
 
 module BABYLON.GUI {
 
+    /**
+     * Class used to store a point for a MultiLine object.
+     * The point can be pure 2D coordinates, a mesh or a control
+     */
     export class MultiLinePoint {
 
         private _multiLine: MultiLine;
@@ -14,8 +18,13 @@ module BABYLON.GUI {
         private _controlObserver: Nullable< Observer<Control> >;
         private _meshObserver: Nullable< Observer<Camera> >;
 
+        /** @hidden */
         public _point: Vector2;
 
+        /**
+         * Creates a new MultiLinePoint
+         * @param multiLine defines the source MultiLine object
+         */
         constructor(multiLine: MultiLine) {
             this._multiLine = multiLine;
 
@@ -25,6 +34,7 @@ module BABYLON.GUI {
             this._point = new Vector2(0, 0);
         }
 
+        /** Gets or sets x coordinate */
         public get x(): string | number {
             return this._x.toString(this._multiLine._host);
         }
@@ -39,6 +49,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets y coordinate */
         public get y(): string | number {
             return this._y.toString(this._multiLine._host);
         }
@@ -53,6 +64,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Gets or sets the control associated with this point */
         public get control(): Nullable<Control> {
             return this._control;
         }
@@ -77,6 +89,7 @@ module BABYLON.GUI {
             this._multiLine._markAsDirty();
         }
 
+        /** Gets or sets the mesh associated with this point */
         public get mesh(): Nullable<AbstractMesh> {
             return this._mesh;
         }
@@ -99,6 +112,10 @@ module BABYLON.GUI {
             this._multiLine._markAsDirty();
         }
 
+        /** 
+         * Gets a translation vector
+         * @returns the translation vector
+         */
         public translate(): Vector2 {
             this._point = this._translatePoint();
 
@@ -122,6 +139,7 @@ module BABYLON.GUI {
             }
         }
 
+        /** Release associated resources */
         public dispose(): void {
             this.control = null;
             this.mesh = null;

+ 44 - 1
gui/src/2D/valueAndUnit.ts

@@ -1,26 +1,52 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to specific a value and its associated unit
+     */
     export class ValueAndUnit {
         private _value = 1;
+        /**
+         * Gets or sets a value indicating that this value will not scale accordingly with adaptive scaling property
+         * @see http://doc.babylonjs.com/how_to/gui#adaptive-scaling
+         */
         public ignoreAdaptiveScaling = false;
 
-        public constructor(value: number, public unit = ValueAndUnit.UNITMODE_PIXEL, public negativeValueAllowed = true) {
+        /**
+         * Creates a new ValueAndUnit
+         * @param value defines the value to store
+         * @param unit defines the unit to store
+         * @param negativeValueAllowed defines a boolean indicating if the value can be negative
+         */
+        public constructor(value: number, 
+            /** defines the unit to store */
+            public unit = ValueAndUnit.UNITMODE_PIXEL, 
+            /** defines a boolean indicating if the value can be negative */
+            public negativeValueAllowed = true) {
             this._value = value;
         }
 
+        /** Gets a boolean indicating if the value is a percentage */
         public get isPercentage(): boolean {
             return this.unit === ValueAndUnit.UNITMODE_PERCENTAGE;
         }
 
+        /** Gets a boolean indicating if the value is store as pixel */
         public get isPixel(): boolean {
             return this.unit === ValueAndUnit.UNITMODE_PIXEL;
         }
 
+        /** Gets direct internal value */
         public get internalValue(): number {
             return this._value;
         }
 
+        /**
+         * Gets value as pixel
+         * @param host defines the root host
+         * @param refValue defines the reference value for percentages
+         * @returns the value as pixel
+         */
         public getValueInPixel(host: AdvancedDynamicTexture, refValue: number): number {
             if (this.isPixel) {
                 return this.getValue(host);
@@ -29,6 +55,11 @@ module BABYLON.GUI {
             return this.getValue(host) * refValue;
         }
 
+        /**
+         * Gets the value accordingly to its unit
+         * @param host  defines the root host
+         * @returns the value
+         */
         public getValue(host: AdvancedDynamicTexture): number {
             if (host && !this.ignoreAdaptiveScaling && this.unit !== ValueAndUnit.UNITMODE_PERCENTAGE) {
                 var width: number = 0;
@@ -57,6 +88,11 @@ module BABYLON.GUI {
             return this._value;
         }
 
+        /**
+         * Gets a string representation of the value
+         * @param host defines the root host
+         * @returns a string
+         */
         public toString(host: AdvancedDynamicTexture): string {
             switch (this.unit) {
                 case ValueAndUnit.UNITMODE_PERCENTAGE:
@@ -68,6 +104,11 @@ module BABYLON.GUI {
             return this.unit.toString();
         }
 
+        /**
+         * Store a value parsed from a string
+         * @param source defines the source string
+         * @returns true if the value was successfully parsed
+         */
         public fromString(source: string | number ): boolean {
             var match = ValueAndUnit._Regex.exec(source.toString());
 
@@ -111,10 +152,12 @@ module BABYLON.GUI {
         private static _UNITMODE_PERCENTAGE = 0;
         private static _UNITMODE_PIXEL = 1;
 
+        /** UNITMODE_PERCENTAGE */
         public static get UNITMODE_PERCENTAGE(): number {
             return ValueAndUnit._UNITMODE_PERCENTAGE;
         }
 
+        /** UNITMODE_PIXEL */
         public static get UNITMODE_PIXEL(): number {
             return ValueAndUnit._UNITMODE_PIXEL;
         }   

+ 6 - 6
gui/src/3D/controls/holographicButton.ts

@@ -195,19 +195,19 @@ module BABYLON.GUI {
         protected _affectMaterial(mesh: Mesh) {
             // Back
             if (this._shareMaterials) {
-                if (!this._host.sharedMaterials["backFluentMaterial"]) {
+                if (!this._host._sharedMaterials["backFluentMaterial"]) {
                     this._createBackMaterial(mesh);
-                    this._host.sharedMaterials["backFluentMaterial"] =  this._backMaterial;
+                    this._host._sharedMaterials["backFluentMaterial"] =  this._backMaterial;
                 } else {
-                    this._backMaterial = this._host.sharedMaterials["backFluentMaterial"] as FluentMaterial;
+                    this._backMaterial = this._host._sharedMaterials["backFluentMaterial"] as FluentMaterial;
                 }
 
                 // Front
-                if (!this._host.sharedMaterials["frontFluentMaterial"]) {
+                if (!this._host._sharedMaterials["frontFluentMaterial"]) {
                     this._createFrontMaterial(mesh);
-                    this._host.sharedMaterials["frontFluentMaterial"] = this._frontMaterial;                
+                    this._host._sharedMaterials["frontFluentMaterial"] = this._frontMaterial;                
                 } else {
-                    this._frontMaterial = this._host.sharedMaterials["frontFluentMaterial"] as FluentMaterial;
+                    this._frontMaterial = this._host._sharedMaterials["frontFluentMaterial"] as FluentMaterial;
                 }  
             } else {
                 this._createBackMaterial(mesh);

+ 13 - 2
gui/src/3D/gui3DManager.ts

@@ -10,6 +10,7 @@ module BABYLON.GUI {
         private _utilityLayer: Nullable<UtilityLayerRenderer>;
         private _rootContainer: Container3D;
         private _pointerObserver: Nullable<Observer<PointerInfoPre>>;
+        /** @hidden */
         public _lastPickedControl: Control3D;
         /** @hidden */
         public _lastControlOver: {[pointerId:number]: Control3D} = {};
@@ -22,13 +23,15 @@ module BABYLON.GUI {
         public onPickedPointChangedObservable = new Observable<Nullable<Vector3>>();
 
         // Shared resources
-        public sharedMaterials: {[key:string]: Material} = {};     
+        /** @hidden */
+        public _sharedMaterials: {[key:string]: Material} = {};     
 
         /** Gets the hosting scene */
         public get scene(): Scene {
             return this._scene;
         }
 
+        /** Gets associated utility layer */
         public get utilityLayer(): Nullable<UtilityLayerRenderer> {
             return this._utilityLayer;
         }
@@ -175,7 +178,15 @@ module BABYLON.GUI {
         public dispose() {
             this._rootContainer.dispose();
 
-            this.sharedMaterials = {};
+            for (var materialName in this._sharedMaterials) {
+                if (!this._sharedMaterials.hasOwnProperty(materialName)) {
+                    continue;
+                }
+
+                this._sharedMaterials[materialName].dispose();
+            }
+
+            this._sharedMaterials = {};
 
             this.onPickedPointChangedObservable.clear();
 

+ 8 - 0
gui/src/3D/vector3WithInfo.ts

@@ -1,7 +1,15 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GUI {
+    /**
+     * Class used to transport Vector3 information for pointer events
+     */
     export class Vector3WithInfo extends Vector3 {        
+        /**
+         * Creates a new Vector3WithInfo
+         * @param source defines the vector3 data to transport
+         * @param buttonIndex defines the current mouse button index
+         */
         public constructor(source: Vector3, public buttonIndex: number = 0) {
             super(source.x, source.y, source.z);
         }

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

@@ -17,6 +17,7 @@ module BABYLON.GLTF2.Extensions {
     export class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         public readonly name = NAME;
 
+        /** @hidden */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
             return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => {
                 material._babylonData = material._babylonData || {};

+ 54 - 12
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts

@@ -5,42 +5,66 @@ module BABYLON.GLTF2 {
      * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
     export abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
+        /** Gets or sets a boolean indicating if the extension is enabled */
         public enabled = true;
+        /** Gets or sets extension name */
         public abstract readonly name: string;
 
         protected _loader: GLTFLoader;
 
+        /**
+         * Creates new GLTFLoaderExtension
+         * @param loader defines the GLTFLoader to use
+         */
         constructor(loader: GLTFLoader) {
             this._loader = loader;
         }
 
+        /** Release all resources */
         public dispose(): void {
             delete this._loader;
         }
 
         // #region Overridable Methods
 
-        /** Override this method to modify the default behavior for loading scenes. */
+        /** 
+         * Override this method to modify the default behavior for loading scenes. 
+         * @hidden
+         */
         protected _loadSceneAsync(context: string, node: _ILoaderScene): Nullable<Promise<void>> { return null; }
 
-        /** Override this method to modify the default behavior for loading nodes. */
+        /** 
+         * Override this method to modify the default behavior for loading nodes. 
+         * @hidden
+         */
         protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>> { return null; }
 
         /** Override this method to modify the default behavior for loading mesh primitive vertex data. */
         protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> { return null; }
 
-        /** Override this method to modify the default behavior for loading materials. */
+        /** Override this method to modify the default behavior for loading materials. 
+         * @hidden
+         */
         protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> { return null; }
 
-        /** Override this method to modify the default behavior for loading textures. */
+        /** 
+         * Override this method to modify the default behavior for loading textures. 
+         * @hidden
+         */ 
         protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>> { return null; }
 
-        /** Override this method to modify the default behavior for loading uris. */
+        /** 
+         * Override this method to modify the default behavior for loading uris. 
+         * @hidden
+         */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>> { return null; }
 
         // #endregion
 
-        /** Helper method called by a loader extension to load an glTF extension. */
+        /** 
+         * Helper method called by a loader extension to load an glTF extension. 
+         * @hidden
+         */
         protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>> {
             if (!property.extensions) {
                 return null;
@@ -65,32 +89,50 @@ module BABYLON.GLTF2 {
             }
         }
 
-        /** Helper method called by the loader to allow extensions to override loading scenes. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading scenes. 
+         * @hidden
+         */
         public static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadSceneAsync(context, scene));
         }
 
-        /** Helper method called by the loader to allow extensions to override loading nodes. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading nodes. 
+         * @hidden
+         */
         public static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadNodeAsync(context, node));
         }
 
-        /** Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading mesh primitive vertex data. 
+         * @hidden
+         */
         public static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
             return loader._applyExtensions(extension => extension._loadVertexDataAsync(context, primitive, babylonMesh));
         }
 
-        /** Helper method called by the loader to allow extensions to override loading materials. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading materials. 
+         * @hidden
+         */
         public static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign));
         }
 
-        /** Helper method called by the loader to allow extensions to override loading textures. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading textures. 
+         * @hidden
+         */
         public static _LoadTextureAsync(loader: GLTFLoader, context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadTextureAsync(context, textureInfo, assign));
         }
 
-        /** Helper method called by the loader to allow extensions to override loading uris. */
+        /** 
+         * Helper method called by the loader to allow extensions to override loading uris. 
+         * @hidden
+         */
         public static _LoadUriAsync(loader: GLTFLoader, context: string, uri: string): Nullable<Promise<ArrayBufferView>> {
             return loader._applyExtensions(extension => extension._loadUriAsync(context, uri));
         }

+ 19 - 0
src/Debug/babylon.axesViewer.ts

@@ -16,9 +16,20 @@ module BABYLON.Debug {
         private _ymesh: Nullable<LinesMesh>;
         private _zmesh: Nullable<LinesMesh>;
 
+        /**
+         * Gets the hosting scene
+         */
         public scene: Nullable<Scene>;
+        /**
+         * Gets or sets a number used to scale line length
+         */
         public scaleLines = 1;
 
+        /**
+         * Creates a new AxesViewer
+         * @param scene defines the hosting scene
+         * @param scaleLines defines a number used to scale line length (1 by default)
+         */
         constructor(scene: Scene, scaleLines = 1) {
 
             this.scaleLines = scaleLines;
@@ -42,6 +53,13 @@ module BABYLON.Debug {
 
         }
 
+        /**
+         * Force the viewer to update 
+         * @param position defines the position of the viewer
+         * @param xaxis defines the x axis of the viewer
+         * @param yaxis defines the y axis of the viewer
+         * @param zaxis defines the z axis of the viewer
+         */        
         public update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void {
 
             var scaleLines = this.scaleLines;
@@ -76,6 +94,7 @@ module BABYLON.Debug {
 
         }
 
+        /** Releases resources */
         public dispose() {
 
             if (this._xmesh) {

+ 22 - 0
src/Debug/babylon.boneAxesViewer.ts

@@ -2,17 +2,35 @@ module BABYLON.Debug {
 
     /**
      * The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
+     * @see demo here: https://www.babylonjs-playground.com/#0DE8F4#8
      */
     export class BoneAxesViewer extends AxesViewer {
 
+        /**
+         * Gets or sets the target mesh where to display the axes viewer
+         */
         public mesh: Nullable<Mesh>;
+        /**
+         * Gets or sets the target bone where to display the axes viewer
+         */
         public bone: Nullable<Bone>;
 
+        /** Gets current position */
         public pos = Vector3.Zero();
+        /** Gets direction of X axis */
         public xaxis = Vector3.Zero();
+        /** Gets direction of Y axis */
         public yaxis = Vector3.Zero();
+        /** Gets direction of Z axis */
         public zaxis = Vector3.Zero();
 
+        /**
+         * Creates a new BoneAxesViewer
+         * @param scene defines the hosting scene
+         * @param bone defines the target bone
+         * @param mesh defines the target mesh
+         * @param scaleLines defines a scaling factor for line length (1 by default)
+         */
         constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines = 1) {
 
             super(scene, scaleLines);
@@ -22,6 +40,9 @@ module BABYLON.Debug {
 
         }
 
+        /**
+         * Force the viewer to update 
+         */
         public update(): void {
 
             if (!this.mesh || !this.bone) {
@@ -38,6 +59,7 @@ module BABYLON.Debug {
 
         }
 
+        /** Releases resources */
         public dispose() {
 
             if (this.mesh) {

+ 20 - 4
src/Debug/babylon.physicsViewer.ts

@@ -1,14 +1,19 @@
 module BABYLON.Debug {
 
     /**
-     * Used to show the physics impostor around the specific mesh.
+     * Used to show the physics impostor around the specific mesh
      */
     export class PhysicsViewer {
 
+        /** @hidden */
         protected _impostors: Array<Nullable<PhysicsImpostor>> = [];
+        /** @hidden */
         protected _meshes: Array<Nullable<AbstractMesh>> = [];
+        /** @hidden */
         protected _scene: Nullable<Scene>;
+        /** @hidden */
         protected _numMeshes = 0;
+        /** @hidden */
         protected _physicsEnginePlugin: Nullable<IPhysicsEnginePlugin>;
         private _renderFunction: () => void;
 
@@ -16,6 +21,10 @@ module BABYLON.Debug {
         private _debugSphereMesh: Mesh;
         private _debugMaterial: StandardMaterial;
 
+        /**
+         * Creates a new PhysicsViewer
+         * @param scene defines the hosting scene
+         */
         constructor(scene: Scene) {
             this._scene = scene || Engine.LastCreatedScene;
             let physicEngine = this._scene.getPhysicsEngine();
@@ -25,6 +34,7 @@ module BABYLON.Debug {
             }
         }
 
+        /** @hidden */
         protected _updateDebugMeshes(): void {
 
             var plugin = this._physicsEnginePlugin;
@@ -49,6 +59,10 @@ module BABYLON.Debug {
 
         }
 
+        /**
+         * Renders a specified physic impostor
+         * @param impostor defines the impostor to render
+         */
         public showImpostor(impostor: PhysicsImpostor): void {
 
             if (!this._scene) {
@@ -77,6 +91,10 @@ module BABYLON.Debug {
 
         }
 
+        /**
+         * Hides a specified physic impostor
+         * @param impostor defines the impostor to hide
+         */        
         public hideImpostor(impostor: Nullable<PhysicsImpostor>) {
 
             if (!impostor || !this._scene) {
@@ -166,8 +184,8 @@ module BABYLON.Debug {
             return mesh;
         }
 
+        /** Releases all resources */
         public dispose() {
-
             for (var i = 0; i < this._numMeshes; i++) {
                 this.hideImpostor(this._impostors[i]);
             }
@@ -185,8 +203,6 @@ module BABYLON.Debug {
             this._impostors.length = 0;
             this._scene = null;
             this._physicsEnginePlugin = null;
-
         }
-
     }
 }

+ 25 - 3
src/Debug/babylon.skeletonViewer.ts

@@ -1,8 +1,10 @@
 module BABYLON.Debug {
     /**
-    * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
-    */
+     * Class used to render a debug view of a given skeleton
+     * @see http://www.babylonjs-playground.com/#1BZJVJ#8
+     */
     export class SkeletonViewer {
+        /** Gets or sets the color used to render the skeleton */
         public color: Color3 = Color3.White();
 
         private _scene: Scene;
@@ -11,7 +13,24 @@ module BABYLON.Debug {
         private _isEnabled = false;
         private _renderFunction: () => void;
 
-        constructor(public skeleton: Skeleton, public mesh: AbstractMesh, scene: Scene, public autoUpdateBonesMatrices = true, public renderingGroupId = 1) {
+        /**
+         * Creates a new SkeletonViewer
+         * @param skeleton defines the skeleton to render
+         * @param mesh defines the mesh attached to the skeleton
+         * @param scene defines the hosting scene
+         * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default) 
+         * @param renderingGroupId defines the rendering group id to use with the viewer
+         */
+        constructor(
+            /** defines the skeleton to render */
+            public skeleton: Skeleton, 
+            /** defines the mesh attached to the skeleton */
+            public mesh: AbstractMesh, 
+            scene: Scene, 
+            /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)  */
+            public autoUpdateBonesMatrices = true, 
+            /** defines the rendering group id to use with the viewer */
+            public renderingGroupId = 1) {
             this._scene = scene;
 
             this.update();
@@ -19,6 +38,7 @@ module BABYLON.Debug {
             this._renderFunction = this.update.bind(this);
         }
 
+        /** Gets or sets a boolean indicating if the viewer is enabled */
         public set isEnabled(value: boolean) {
             if (this._isEnabled === value) {
                 return;
@@ -102,6 +122,7 @@ module BABYLON.Debug {
             }
         }
 
+        /** Update the viewer to sync with current skeleton state */
         public update() {
             if (this.autoUpdateBonesMatrices) {
                 this.skeleton.computeAbsoluteTransforms();
@@ -123,6 +144,7 @@ module BABYLON.Debug {
             this._debugMesh.color = this.color;
         }
 
+        /** Release associated resources */
         public dispose() {
             if (this._debugMesh) {
                 this.isEnabled = false;