Browse Source

Merge remote-tracking branch 'BabylonJS/master'

MackeyK24 7 years ago
parent
commit
8a58376abb
100 changed files with 42445 additions and 40338 deletions
  1. 9100 8337
      Playground/babylon.d.txt
  2. 0 23
      Playground/css/index.css
  3. 0 12
      Playground/debug.html
  4. 0 12
      Playground/index-local.html
  5. 0 12
      Playground/index.html
  6. 0 12
      Playground/indexStable.html
  7. 1 8
      Playground/js/index.js
  8. 0 3
      Playground/test.html
  9. 0 1
      Tools/Gulp/gulp-validateTypedoc.js
  10. 1 1
      dist/gui/readme.md
  11. 11588 10775
      dist/preview release/babylon.d.ts
  12. 35 35
      dist/preview release/babylon.js
  13. 1367 657
      dist/preview release/babylon.max.js
  14. 1367 657
      dist/preview release/babylon.no-module.max.js
  15. 35 35
      dist/preview release/babylon.worker.js
  16. 1367 657
      dist/preview release/es6.js
  17. 3 3
      dist/preview release/gui/babylon.gui.d.ts
  18. 3 3
      dist/preview release/gui/babylon.gui.js
  19. 3 3
      dist/preview release/gui/babylon.gui.module.d.ts
  20. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  21. 11 11
      dist/preview release/inspector/babylon.inspector.css
  22. 104 97
      dist/preview release/loaders/babylon.glTF1FileLoader.d.ts
  23. 55 55
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  24. 289 343
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  25. 291 271
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  26. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  27. 289 343
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  28. 291 271
      dist/preview release/loaders/babylon.glTFFileLoader.js
  29. 2 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  30. 289 343
      dist/preview release/loaders/babylonjs.loaders.d.ts
  31. 291 271
      dist/preview release/loaders/babylonjs.loaders.js
  32. 2 2
      dist/preview release/loaders/babylonjs.loaders.min.js
  33. 289 343
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  34. 3 1
      dist/preview release/serializers/babylon.glTF2Serializer.d.ts
  35. 3 1
      dist/preview release/serializers/babylon.glTF2Serializer.js
  36. 3 1
      dist/preview release/serializers/babylonjs.serializers.d.ts
  37. 3 1
      dist/preview release/serializers/babylonjs.serializers.js
  38. 3 1
      dist/preview release/serializers/babylonjs.serializers.module.d.ts
  39. 11579 14529
      dist/preview release/typedocValidationBaseline.json
  40. 28 28
      dist/preview release/viewer/babylon.viewer.js
  41. 1658 928
      dist/preview release/viewer/babylon.viewer.max.js
  42. 5 0
      dist/preview release/what's new.md
  43. 2 1
      gui/readme.md
  44. 2 2
      gui/src/controls/control.ts
  45. 1 1
      gui/src/controls/textBlock.ts
  46. 1 1
      inspector/sass/defines.scss
  47. 5 5
      loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts
  48. 5 4
      loaders/src/glTF/2.0/Extensions/KHR_lights.ts
  49. 5 4
      loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
  50. 5 4
      loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts
  51. 7 6
      loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
  52. 289 275
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  53. 15 9
      loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts
  54. 59 100
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  55. 7 6
      loaders/src/glTF/2.0/babylon.glTFLoaderUtilities.ts
  56. 126 98
      loaders/src/glTF/babylon.glTFFileLoader.ts
  57. 4 2
      serializers/src/glTF/2.0/babylon.glTFExporter.ts
  58. 5 2
      serializers/src/glTF/2.0/babylon.glTFMaterial.ts
  59. 8 8
      src/Actions/babylon.action.ts
  60. 17 17
      src/Actions/babylon.condition.ts
  61. 543 40
      src/Animations/babylon.animation.ts
  62. 121 138
      src/Animations/babylon.runtimeAnimation.ts
  63. 33 23
      src/Bones/babylon.bone.ts
  64. 4 4
      src/Bones/babylon.skeleton.ts
  65. 7 0
      src/Collisions/babylon.collisionCoordinator.ts
  66. 53 46
      src/Engine/babylon.engine.ts
  67. 1 1
      src/Gamepad/Controllers/babylon.poseEnabledController.ts
  68. 1 1
      src/Gamepad/Controllers/babylon.windowsMotionController.ts
  69. 98 2
      src/Gamepad/babylon.xboxGamepad.ts
  70. 4 23
      src/Helpers/babylon.environmentHelper.ts
  71. 3 0
      src/Instrumentation/babylon.timeToken.ts
  72. 1 1
      src/Layer/babylon.effectLayer.ts
  73. 1 1
      src/Lights/babylon.hemisphericLight.ts
  74. 6 6
      src/Lights/babylon.light.ts
  75. 1 1
      src/Lights/babylon.shadowLight.ts
  76. 2 1
      src/Lights/babylon.spotLight.ts
  77. 11 34
      src/Materials/Background/babylon.backgroundMaterial.ts
  78. 1 1
      src/Materials/PBR/babylon.pbrBaseMaterial.ts
  79. 1 1
      src/Materials/Textures/babylon.dynamicTexture.ts
  80. 35 35
      src/Materials/Textures/babylon.internalTexture.ts
  81. 6 6
      src/Materials/babylon.effect.ts
  82. 1 1
      src/Materials/babylon.imageProcessingConfiguration.ts
  83. 12 12
      src/Materials/babylon.material.ts
  84. 1 1
      src/Materials/babylon.materialHelper.ts
  85. 14 4
      src/Materials/babylon.standardMaterial.ts
  86. 16 1
      src/Math/babylon.math.ts
  87. 474 215
      src/Mesh/babylon.abstractMesh.ts
  88. 14 13
      src/Mesh/babylon.geometry.ts
  89. 4 74
      src/Mesh/babylon.mesh.ts
  90. 3 2
      src/Mesh/babylon.meshSimplification.ts
  91. 2 2
      src/Particles/babylon.gpuParticleSystem.ts
  92. 2 2
      src/Particles/babylon.particleSystem.ts
  93. 1 1
      src/Particles/babylon.solidParticle.ts
  94. 8 4
      src/Physics/babylon.physicsHelper.ts
  95. 21 1
      src/PostProcess/babylon.tonemapPostProcess.ts
  96. 0 3
      src/Shaders/ShadersInclude/lightsFragmentFunctions.fx
  97. 7 0
      src/Shaders/ShadersInclude/pbrLightFunctions.fx
  98. 5 1
      src/Shaders/default.fragment.fx
  99. 3 0
      src/States/babylon.alphaCullingState.ts
  100. 0 0
      src/States/babylon.depthCullingState.ts

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


+ 0 - 23
Playground/css/index.css

@@ -433,29 +433,6 @@ body {
 }
 }
 
 
 /* Save form & co */
 /* Save form & co */
-
-.save-message {
-    display: none;
-    position:absolute;
-    top:40px; /* navbar top */
-    width: 100%;
-    z-index:5;
-    text-align: center;
-    font-size: 0.8em;
-    line-height: 2em;
-    cursor:pointer;
-}
-
-.save-message.light {
-    background-color: rgba(239, 239, 239, 0.9);
-    color: #7283a0;
-}
-
-.save-message.dark {
-    background-color: rgba(51, 51, 51, 0.9);
-    color: #eee;
-}
-
 .save-layer {
 .save-layer {
     display: none;
     display: none;
     position: absolute;
     position: absolute;

+ 0 - 12
Playground/debug.html

@@ -176,9 +176,6 @@
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div class="save-message" id="saveMessage">
-            This PG has missing metadata. Click save to add them.
-        </div>
     </div>
     </div>
 
 
     <div class="navbar navBar1475">
     <div class="navbar navBar1475">
@@ -273,9 +270,6 @@
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div class="save-message" id="saveMessage">
-            This PG has missing metadata. Click save to add them.
-        </div>
     </div>
     </div>
 
 
     <div class="navbar navBar1030">
     <div class="navbar navBar1030">
@@ -363,9 +357,6 @@
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div class="save-message" id="saveMessage">
-            This PG has missing metadata. Click save to add them.
-        </div>
     </div>
     </div>
 
 
     <div class="navbar navBar750">
     <div class="navbar navBar750">
@@ -450,9 +441,6 @@
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div class="save-message" id="saveMessage">
-            This PG has missing metadata. Click save to add them.
-        </div>
     </div>
     </div>
 
 
     <div class="wrapper">
     <div class="wrapper">

+ 0 - 12
Playground/index-local.html

@@ -119,9 +119,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1475">
         <div class="navbar navBar1475">
@@ -215,9 +212,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1030">
         <div class="navbar navBar1030">
@@ -305,9 +299,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar750">
         <div class="navbar navBar750">
@@ -392,9 +383,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="wrapper">
         <div class="wrapper">

+ 0 - 12
Playground/index.html

@@ -154,9 +154,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1475">
         <div class="navbar navBar1475">
@@ -250,9 +247,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1030">
         <div class="navbar navBar1030">
@@ -340,9 +334,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar750">
         <div class="navbar navBar750">
@@ -427,9 +418,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="wrapper">
         <div class="wrapper">

+ 0 - 12
Playground/indexStable.html

@@ -144,9 +144,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1475">
         <div class="navbar navBar1475">
@@ -240,9 +237,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar1030">
         <div class="navbar navBar1030">
@@ -330,9 +324,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="navbar navBar750">
         <div class="navbar navBar750">
@@ -417,9 +408,6 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="save-message" id="saveMessage">
-                This PG has missing metadata. Click save to add them.
-            </div>
         </div>
         </div>
 
 
         <div class="wrapper">
         <div class="wrapper">

+ 1 - 8
Playground/js/index.js

@@ -53,8 +53,7 @@
         '.navbar .select .toDisplayBig a',
         '.navbar .select .toDisplayBig a',
         '.navbar .select .toDisplayBig ul li',
         '.navbar .select .toDisplayBig ul li',
         '.navbarBottom',
         '.navbarBottom',
-        '.navbarBottom .links .link',
-        '.save-message'];
+        '.navbarBottom .links .link'];
 
 
     var run = function () {
     var run = function () {
         var blockEditorChange = false;
         var blockEditorChange = false;
@@ -297,17 +296,14 @@
             }
             }
             document.getElementById("saveFormButtons").style.display = "block";
             document.getElementById("saveFormButtons").style.display = "block";
             document.getElementById("saveFormButtonOk").style.display = "inline-block";
             document.getElementById("saveFormButtonOk").style.display = "inline-block";
-            document.getElementById("saveMessage").style.display = "block";
         };
         };
         showNoMetadata();
         showNoMetadata();
-        document.getElementById("saveMessage").style.display = "none";
 
 
         var hideNoMetadata = function () {
         var hideNoMetadata = function () {
             document.getElementById("saveFormTitle").readOnly = true;
             document.getElementById("saveFormTitle").readOnly = true;
             document.getElementById("saveFormDescription").readOnly = true;
             document.getElementById("saveFormDescription").readOnly = true;
             document.getElementById("saveFormTags").readOnly = true;
             document.getElementById("saveFormTags").readOnly = true;
             document.getElementById("saveFormButtonOk").style.display = "none";
             document.getElementById("saveFormButtonOk").style.display = "none";
-            document.getElementById("saveMessage").style.display = "none";
             setToMultipleID("metadataButton", "display", "inline-block");
             setToMultipleID("metadataButton", "display", "inline-block");
         };
         };
 
 
@@ -864,9 +860,6 @@
         document.getElementById("saveFormButtonCancel").addEventListener("click", function () {
         document.getElementById("saveFormButtonCancel").addEventListener("click", function () {
             document.getElementById("saveLayer").style.display = "none";
             document.getElementById("saveLayer").style.display = "none";
         });
         });
-        document.getElementById("saveMessage").addEventListener("click", function () {
-            document.getElementById("saveMessage").style.display = "none";
-        });
         document.getElementById("mainTitle").innerHTML = "v" + BABYLON.Engine.Version;
         document.getElementById("mainTitle").innerHTML = "v" + BABYLON.Engine.Version;
 
 
         var previousHash = "";
         var previousHash = "";

+ 0 - 3
Playground/test.html

@@ -50,7 +50,4 @@
         </a>
         </a>
         <ul class="dropdown-menu" id="scriptsList"></ul>
         <ul class="dropdown-menu" id="scriptsList"></ul>
     </div>
     </div>
-</div>
-<div class="save-message" id="saveMessage">
-    This PG has missing metadata. Click save to add them.
 </div>
 </div>

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

@@ -698,7 +698,6 @@ function gulpValidateTypedoc(validationBaselineFileName, namespaceName, validate
         }
         }
 
 
         var jsFile = new Vinyl({
         var jsFile = new Vinyl({
-            cwd: process.cwd,
             base: null,
             base: null,
             path: validationBaselineFileName,
             path: validationBaselineFileName,
             contents: buffer
             contents: buffer

+ 1 - 1
dist/gui/readme.md

@@ -1,7 +1,7 @@
 Babylon.js GUI module
 Babylon.js GUI module
 =====================
 =====================
 
 
-For usage documentation please visit http://doc.babylonjs.com/overviews/gui
+For usage documentation please visit http://doc.babylonjs.com/how_to/gui
 
 
 # Installation instructions
 # Installation instructions
 
 

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


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


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


File diff suppressed because it is too large
+ 1367 - 657
dist/preview release/babylon.no-module.max.js


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


File diff suppressed because it is too large
+ 1367 - 657
dist/preview release/es6.js


+ 3 - 3
dist/preview release/gui/babylon.gui.d.ts

@@ -260,7 +260,7 @@ declare module BABYLON.GUI {
         readonly heightInPixels: number;
         readonly heightInPixels: number;
         fontFamily: string;
         fontFamily: string;
         fontStyle: string;
         fontStyle: string;
-        /** @ignore */
+        /** @hidden */
         readonly _isFontSizeInPercentage: boolean;
         readonly _isFontSizeInPercentage: boolean;
         readonly fontSizeInPixels: number;
         readonly fontSizeInPixels: number;
         fontSize: string | number;
         fontSize: string | number;
@@ -289,7 +289,7 @@ declare module BABYLON.GUI {
         readonly centerY: number;
         readonly centerY: number;
         constructor(name?: string | undefined);
         constructor(name?: string | undefined);
         protected _getTypeName(): string;
         protected _getTypeName(): string;
-        /** @ignore */
+        /** @hidden */
         _resetFontCache(): void;
         _resetFontCache(): void;
         getLocalCoordinates(globalCoordinates: Vector2): Vector2;
         getLocalCoordinates(globalCoordinates: Vector2): Vector2;
         getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
         getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
@@ -646,7 +646,7 @@ declare module BABYLON.GUI {
             name?: string | undefined, text?: string);
             name?: string | undefined, text?: string);
         protected _getTypeName(): string;
         protected _getTypeName(): string;
         private _drawText(text, textWidth, y, context);
         private _drawText(text, textWidth, y, context);
-        /** @ignore */
+        /** @hidden */
         _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         protected _applyStates(context: CanvasRenderingContext2D): void;
         protected _applyStates(context: CanvasRenderingContext2D): void;
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;

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

@@ -1159,7 +1159,7 @@ var BABYLON;
                 configurable: true
                 configurable: true
             });
             });
             Object.defineProperty(Control.prototype, "_isFontSizeInPercentage", {
             Object.defineProperty(Control.prototype, "_isFontSizeInPercentage", {
-                /** @ignore */
+                /** @hidden */
                 get: function () {
                 get: function () {
                     return this._fontSize.isPercentage;
                     return this._fontSize.isPercentage;
                 },
                 },
@@ -1426,7 +1426,7 @@ var BABYLON;
             Control.prototype._getTypeName = function () {
             Control.prototype._getTypeName = function () {
                 return "Control";
                 return "Control";
             };
             };
-            /** @ignore */
+            /** @hidden */
             Control.prototype._resetFontCache = function () {
             Control.prototype._resetFontCache = function () {
                 this._fontSet = true;
                 this._fontSet = true;
             };
             };
@@ -3625,7 +3625,7 @@ var BABYLON;
                 }
                 }
                 context.fillText(text, this._currentMeasure.left + x, y);
                 context.fillText(text, this._currentMeasure.left + x, y);
             };
             };
-            /** @ignore */
+            /** @hidden */
             TextBlock.prototype._draw = function (parentMeasure, context) {
             TextBlock.prototype._draw = function (parentMeasure, context) {
                 context.save();
                 context.save();
                 this._applyStates(context);
                 this._applyStates(context);

+ 3 - 3
dist/preview release/gui/babylon.gui.module.d.ts

@@ -265,7 +265,7 @@ declare module BABYLON.GUI {
         readonly heightInPixels: number;
         readonly heightInPixels: number;
         fontFamily: string;
         fontFamily: string;
         fontStyle: string;
         fontStyle: string;
-        /** @ignore */
+        /** @hidden */
         readonly _isFontSizeInPercentage: boolean;
         readonly _isFontSizeInPercentage: boolean;
         readonly fontSizeInPixels: number;
         readonly fontSizeInPixels: number;
         fontSize: string | number;
         fontSize: string | number;
@@ -294,7 +294,7 @@ declare module BABYLON.GUI {
         readonly centerY: number;
         readonly centerY: number;
         constructor(name?: string | undefined);
         constructor(name?: string | undefined);
         protected _getTypeName(): string;
         protected _getTypeName(): string;
-        /** @ignore */
+        /** @hidden */
         _resetFontCache(): void;
         _resetFontCache(): void;
         getLocalCoordinates(globalCoordinates: Vector2): Vector2;
         getLocalCoordinates(globalCoordinates: Vector2): Vector2;
         getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
         getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
@@ -651,7 +651,7 @@ declare module BABYLON.GUI {
             name?: string | undefined, text?: string);
             name?: string | undefined, text?: string);
         protected _getTypeName(): string;
         protected _getTypeName(): string;
         private _drawText(text, textWidth, y, context);
         private _drawText(text, textWidth, y, context);
-        /** @ignore */
+        /** @hidden */
         _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         protected _applyStates(context: CanvasRenderingContext2D): void;
         protected _applyStates(context: CanvasRenderingContext2D): void;
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
         protected _additionalProcessing(parentMeasure: Measure, context: CanvasRenderingContext2D): void;

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


+ 11 - 11
dist/preview release/inspector/babylon.inspector.css

@@ -44,11 +44,11 @@
       font-size: 1em; }
       font-size: 1em; }
       .insp-wrapper .insp-right-panel .top-panel .tab-panel-content {
       .insp-wrapper .insp-right-panel .top-panel .tab-panel-content {
         width: 100%;
         width: 100%;
-        height: calc(100% - 32px); }
+        height: calc(100% - 40px); }
       .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel {
       .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel {
         position: absolute;
         position: absolute;
         z-index: 10;
         z-index: 10;
-        top: 32px;
+        top: 40px;
         right: 0;
         right: 0;
         width: 100px;
         width: 100px;
         display: none;
         display: none;
@@ -70,7 +70,7 @@
             background-color: #454545; }
             background-color: #454545; }
   .insp-wrapper .tooltip {
   .insp-wrapper .tooltip {
     position: absolute;
     position: absolute;
-    top: 32px;
+    top: 40px;
     right: 0;
     right: 0;
     color: #f29766;
     color: #f29766;
     display: none;
     display: none;
@@ -249,7 +249,7 @@
   .insp-wrapper .insp-tree {
   .insp-wrapper .insp-tree {
     overflow-y: auto;
     overflow-y: auto;
     overflow-x: hidden;
     overflow-x: hidden;
-    height: calc(50% - 32px - 30px); }
+    height: calc(50% - 40px - 30px); }
     .insp-wrapper .insp-tree .line {
     .insp-wrapper .insp-tree .line {
       padding: 3px;
       padding: 3px;
       cursor: pointer; }
       cursor: pointer; }
@@ -368,7 +368,7 @@
           max-width: 110px;
           max-width: 110px;
           max-height: 110px; }
           max-height: 110px; }
   .insp-wrapper .tabbar {
   .insp-wrapper .tabbar {
-    height: 32px;
+    height: 40px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     border-bottom: 1px solid #383838;
     border-bottom: 1px solid #383838;
@@ -377,11 +377,11 @@
     overflow-y: hidden;
     overflow-y: hidden;
     box-sizing: border-box; }
     box-sizing: border-box; }
     .insp-wrapper .tabbar .tab {
     .insp-wrapper .tabbar .tab {
-      height: calc(32px - 2px);
+      height: calc(40px - 2px);
       width: auto;
       width: auto;
       padding: 0 10px 0 10px;
       padding: 0 10px 0 10px;
       color: #ccc;
       color: #ccc;
-      line-height: 32px;
+      line-height: 40px;
       text-align: center;
       text-align: center;
       cursor: pointer;
       cursor: pointer;
       margin: 0 5px 0 5px;
       margin: 0 5px 0 5px;
@@ -394,8 +394,8 @@
       .insp-wrapper .tabbar .tab.active {
       .insp-wrapper .tabbar .tab.active {
         border-bottom: 1px solid #f29766; }
         border-bottom: 1px solid #f29766; }
     .insp-wrapper .tabbar .more-tabs {
     .insp-wrapper .tabbar .more-tabs {
-      width: 32px;
-      height: 32px;
+      width: 40px;
+      height: 40px;
       display: flex;
       display: flex;
       justify-content: center;
       justify-content: center;
       align-items: center;
       align-items: center;
@@ -412,8 +412,8 @@
   .insp-wrapper .toolbar {
   .insp-wrapper .toolbar {
     display: flex; }
     display: flex; }
     .insp-wrapper .toolbar .tool {
     .insp-wrapper .toolbar .tool {
-      width: 32px;
-      height: 32px;
+      width: 40px;
+      height: 40px;
       display: flex;
       display: flex;
       justify-content: center;
       justify-content: center;
       align-items: center;
       align-items: center;

+ 104 - 97
dist/preview release/loaders/babylon.glTF1FileLoader.d.ts

@@ -1,8 +1,8 @@
 
 
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
-    * Coordinate system mode that will be used when loading from the gltf file
-    */
+     * Mode that determines the coordinate system to use.
+     */
     enum GLTFLoaderCoordinateSystemMode {
     enum GLTFLoaderCoordinateSystemMode {
         /**
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -14,8 +14,8 @@ declare module BABYLON {
         FORCE_RIGHT_HANDED = 1,
         FORCE_RIGHT_HANDED = 1,
     }
     }
     /**
     /**
-    * Animation mode that determines which animations should be started when a file is loaded
-    */
+     * Mode that determines what animations will start.
+     */
     enum GLTFLoaderAnimationStartMode {
     enum GLTFLoaderAnimationStartMode {
         /**
         /**
          * No animation will start.
          * No animation will start.
@@ -31,34 +31,34 @@ declare module BABYLON {
         ALL = 2,
         ALL = 2,
     }
     }
     /**
     /**
-    * Loaded gltf data
-    */
+     * Interface that contains the data for the glTF asset.
+     */
     interface IGLTFLoaderData {
     interface IGLTFLoaderData {
         /**
         /**
-        * Loaded json string converted to an object
-        */
+         * JSON that represents the glTF.
+         */
         json: Object;
         json: Object;
         /**
         /**
-        * Loaded ArrayBufferView
-        */
+         * The BIN chunk of a binary glTF
+         */
         bin: Nullable<ArrayBufferView>;
         bin: Nullable<ArrayBufferView>;
     }
     }
     /**
     /**
-    * Gltf extension interface
-    */
+     * Interface for extending the loader.
+     */
     interface IGLTFLoaderExtension {
     interface IGLTFLoaderExtension {
         /**
         /**
          * The name of this extension.
          * The name of this extension.
          */
          */
         readonly name: string;
         readonly name: string;
         /**
         /**
-         * Whether this extension is enabled.
+         * Defines whether this extension is enabled.
          */
          */
         enabled: boolean;
         enabled: boolean;
     }
     }
     /**
     /**
-    * Loading state
-    */
+     * Loader state.
+     */
     enum GLTFLoaderState {
     enum GLTFLoaderState {
         /**
         /**
          * The asset is loading.
          * The asset is loading.
@@ -74,60 +74,63 @@ declare module BABYLON {
         COMPLETE = 2,
         COMPLETE = 2,
     }
     }
     /**
     /**
-    * GLTF loader interface
-    */
+     * Loader interface.
+     */
     interface IGLTFLoader extends IDisposable {
     interface IGLTFLoader extends IDisposable {
         /**
         /**
-        * Coordinate system that will be used when loading from the gltf file
-        */
+         * Mode that determines the coordinate system to use.
+         */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
         /**
-        * Animation mode that determines which animations should be started when a file is loaded
-        */
+         * Mode that determines what animations will start.
+         */
         animationStartMode: GLTFLoaderAnimationStartMode;
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
         /**
-        * If the materials in the file should automatically be compiled
-        */
+         * Defines if the loader should compile materials.
+         */
         compileMaterials: boolean;
         compileMaterials: boolean;
         /**
         /**
-        * If a clip plane should be usede when loading meshes in the file
-        */
+         * Defines if the loader should also compile materials with clip planes.
+         */
         useClipPlane: boolean;
         useClipPlane: boolean;
         /**
         /**
-        * If shadow generators should automatically be compiled
-        */
+         * Defines if the loader should compile shadow generators.
+         */
         compileShadowGenerators: boolean;
         compileShadowGenerators: boolean;
         /**
         /**
-        * Observable that fires each time a mesh is loaded
-        */
+         * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+         */
         onMeshLoadedObservable: Observable<AbstractMesh>;
         onMeshLoadedObservable: Observable<AbstractMesh>;
         /**
         /**
-        * Observable that fires each time a texture is loaded
-        */
+         * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
+         */
         onTextureLoadedObservable: Observable<BaseTexture>;
         onTextureLoadedObservable: Observable<BaseTexture>;
         /**
         /**
-       * Observable that fires each time a material is loaded
-       */
+         * Observable raised when the loader creates a material after parsing the glTF properties of the material.
+         */
         onMaterialLoadedObservable: Observable<Material>;
         onMaterialLoadedObservable: Observable<Material>;
         /**
         /**
-        * Observable that fires when the load has completed
-        */
+         * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
+         * For assets with LODs, raised when all of the LODs are complete.
+         * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
+         */
         onCompleteObservable: Observable<IGLTFLoader>;
         onCompleteObservable: Observable<IGLTFLoader>;
         /**
         /**
-        * Observable that fires when the loader is disposed
-        */
+         * Observable raised after the loader is disposed.
+         */
         onDisposeObservable: Observable<IGLTFLoader>;
         onDisposeObservable: Observable<IGLTFLoader>;
         /**
         /**
-        * Observable that fire when an extension is loaded
-        */
+         * Observable raised after a loader extension is created.
+         * Set additional options for a loader extension in this event.
+         */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         /**
         /**
-        * Loader state
-        */
+         * Loader state or null if the loader is not active.
+         */
         state: Nullable<GLTFLoaderState>;
         state: Nullable<GLTFLoaderState>;
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        */
+         * Imports meshes from the given data and adds them to the scene.
+         */
         importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<{
         importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<{
             meshes: AbstractMesh[];
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
             particleSystems: ParticleSystem[];
@@ -135,122 +138,126 @@ declare module BABYLON {
             animationGroups: AnimationGroup[];
             animationGroups: AnimationGroup[];
         }>;
         }>;
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        */
+         * Loads all objects from the given data and adds them to the scene.
+         */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
     }
-    /** File loader to load gltf files into a babylon scene */
+    /**
+     * File loader for loading glTF files into a scene.
+     */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
-        /** Creates a gltf 1.0 file loader */
+        /**
+         * Factory function that creates a glTF 1.0 loader
+         */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
         static CreateGLTFLoaderV1: () => IGLTFLoader;
-        /** Creates a gltf 2.0 file loader */
+        /**
+         * Factory function that creates a glTF 2.0 loader
+         */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
         /**
-         * Raised when the asset has been parsed.
-         * The data.json property stores the glTF JSON.
-         * The data.bin property stores the BIN chunk from a glTF binary or null if the input is not a glTF binary.
+         * Raised when the asset has been parsed
          */
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
         private _onParsedObserver;
-        /** Raised when the asset has been parsed. */
+        /**
+         * Raised when the asset has been parsed
+         */
         onParsed: (loaderData: IGLTFLoaderData) => void;
         onParsed: (loaderData: IGLTFLoaderData) => void;
         /**
         /**
-         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders.
+         * Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled.
+         * Defaults to true.
          */
          */
         static IncrementalLoading: boolean;
         static IncrementalLoading: boolean;
         /**
         /**
-         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters.
+         * Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates.
          */
          */
         static HomogeneousCoordinates: boolean;
         static HomogeneousCoordinates: boolean;
         /**
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED). Defaults to AUTO.
-         * - AUTO - Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
-         * - FORCE_RIGHT_HANDED - Sets the useRightHandedSystem flag on the scene.
+         * The coordinate system mode. Defaults to AUTO.
          */
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
         /**
-        * The animation start mode (NONE, FIRST, ALL). Defaults to FIRST.
-        * - NONE - No animation will start.
-        * - FIRST - The first animation will start.
-        * - ALL - All animations will start.
+        * The animation start mode. Defaults to FIRST.
         */
         */
         animationStartMode: GLTFLoaderAnimationStartMode;
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
         /**
-         * Set to true to compile materials before raising the success callback. Defaults to false.
+         * Defines if the loader should compile materials before raising the success callback. Defaults to false.
          */
          */
         compileMaterials: boolean;
         compileMaterials: boolean;
         /**
         /**
-         * Set to true to also compile materials with clip planes. Defaults to false.
+         * Defines if the loader should also compile materials with clip planes. Defaults to false.
          */
          */
         useClipPlane: boolean;
         useClipPlane: boolean;
         /**
         /**
-         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
+         * Defines if the loader should compile shadow generators before raising the success callback. Defaults to false.
          */
          */
         compileShadowGenerators: boolean;
         compileShadowGenerators: boolean;
         /**
         /**
-         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+         * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
          */
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
         private _onMeshLoadedObserver;
         /**
         /**
-         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a mesh after parsing the glTF properties of the mesh.
          */
          */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
         /**
-         * Raised when the loader creates a texture after parsing the glTF properties of the texture.
+         * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
         private _onTextureLoadedObserver;
         /**
         /**
-         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
          */
         onTextureLoaded: (texture: BaseTexture) => void;
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
         /**
-         * Raised when the loader creates a material after parsing the glTF properties of the material.
+         * Observable raised when the loader creates a material after parsing the glTF properties of the material.
          */
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
         private _onMaterialLoadedObserver;
         /**
         /**
-         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a material after parsing the glTF properties of the material.
          */
          */
         onMaterialLoaded: (material: Material) => void;
         onMaterialLoaded: (material: Material) => void;
         /**
         /**
-         * Raised when the asset is completely loaded, immediately before the loader is disposed.
+         * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
          * For assets with LODs, raised when all of the LODs are complete.
          * For assets with LODs, raised when all of the LODs are complete.
          * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
          * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
          */
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
         private _onCompleteObserver;
         /**
         /**
-         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         * Callback raised when the asset is completely loaded, immediately before the loader is disposed.
          */
          */
         onComplete: () => void;
         onComplete: () => void;
         /**
         /**
-        * Raised after the loader is disposed.
-        */
+         * Observable raised after the loader is disposed.
+         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
         private _onDisposeObserver;
         /**
         /**
-         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         * Callback raised after the loader is disposed.
          */
          */
         onDispose: () => void;
         onDispose: () => void;
         /**
         /**
-         * Raised after a loader extension is created.
+         * Observable raised after a loader extension is created.
          * Set additional options for a loader extension in this event.
          * Set additional options for a loader extension in this event.
          */
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
         private _onExtensionLoadedObserver;
         /**
         /**
-         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         * Callback raised after a loader extension is created.
          */
          */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
         /**
          * Returns a promise that resolves when the asset is completely loaded.
          * Returns a promise that resolves when the asset is completely loaded.
-         * @returns A promise that resolves when the asset is completely loaded.
+         * @returns a promise that resolves when the asset is completely loaded.
          */
          */
         whenCompleteAsync(): Promise<void>;
         whenCompleteAsync(): Promise<void>;
         /**
         /**
-         * The loader state (LOADING, READY, COMPLETE) or null if the loader is not active.
+         * The loader state or null if the loader is not active.
          */
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
         private _loader;
@@ -267,14 +274,14 @@ declare module BABYLON {
          */
          */
         dispose(): void;
         dispose(): void;
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
-        * @param scene the scene the meshes should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise containg the loaded meshes, particles, skeletons and animations
-        */
+         * Imports one or more meshes from the loaded glTF data and adds them to the scene
+         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+         * @param scene the scene the meshes should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise containg the loaded meshes, particles, skeletons and animations
+         */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
         importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
             particleSystems: ParticleSystem[];
@@ -282,13 +289,13 @@ declare module BABYLON {
             animationGroups: AnimationGroup[];
             animationGroups: AnimationGroup[];
         }>;
         }>;
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        * @param scene the scene the objects should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise which completes when objects have been loaded to the scene
-        */
+         * Imports all objects from the loaded glTF data and adds them to the scene
+         * @param scene the scene the objects should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise which completes when objects have been loaded to the scene
+         */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         /**
         /**
          * Load into an asset container.
          * Load into an asset container.
@@ -300,17 +307,17 @@ declare module BABYLON {
          */
          */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
         /**
         /**
-         * If the data string can be loaded directly
+         * If the data string can be loaded directly.
          * @param data string contianing the file data
          * @param data string contianing the file data
          * @returns if the data can be loaded directly
          * @returns if the data can be loaded directly
          */
          */
         canDirectLoad(data: string): boolean;
         canDirectLoad(data: string): boolean;
         /**
         /**
-         * Rewrites a url by combining a root url and response url
+         * Rewrites a url by combining a root url and response url.
          */
          */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
         /**
         /**
-         * Instantiates a gltf file loader plugin
+         * Instantiates a glTF file loader plugin.
          * @returns the created plugin
          * @returns the created plugin
          */
          */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;

+ 55 - 55
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -2,8 +2,8 @@
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     /**
     /**
-    * Coordinate system mode that will be used when loading from the gltf file
-    */
+     * Mode that determines the coordinate system to use.
+     */
     var GLTFLoaderCoordinateSystemMode;
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
         /**
@@ -16,8 +16,8 @@ var BABYLON;
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     /**
     /**
-    * Animation mode that determines which animations should be started when a file is loaded
-    */
+     * Mode that determines what animations will start.
+     */
     var GLTFLoaderAnimationStartMode;
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
     (function (GLTFLoaderAnimationStartMode) {
         /**
         /**
@@ -34,8 +34,8 @@ var BABYLON;
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     /**
     /**
-    * Loading state
-    */
+     * Loader state.
+     */
     var GLTFLoaderState;
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
     (function (GLTFLoaderState) {
         /**
         /**
@@ -51,67 +51,62 @@ var BABYLON;
          */
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
-    /** File loader to load gltf files into a babylon scene */
+    /**
+     * File loader for loading glTF files into a scene.
+     */
     var GLTFFileLoader = /** @class */ (function () {
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // #region Common options
             // #region Common options
             /**
             /**
-             * Raised when the asset has been parsed.
-             * The data.json property stores the glTF JSON.
-             * The data.bin property stores the BIN chunk from a glTF binary or null if the input is not a glTF binary.
+             * Raised when the asset has been parsed
              */
              */
             this.onParsedObservable = new BABYLON.Observable();
             this.onParsedObservable = new BABYLON.Observable();
             // #endregion
             // #endregion
             // #region V2 options
             // #region V2 options
             /**
             /**
-             * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED). Defaults to AUTO.
-             * - AUTO - Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
-             * - FORCE_RIGHT_HANDED - Sets the useRightHandedSystem flag on the scene.
+             * The coordinate system mode. Defaults to AUTO.
              */
              */
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             /**
             /**
-            * The animation start mode (NONE, FIRST, ALL). Defaults to FIRST.
-            * - NONE - No animation will start.
-            * - FIRST - The first animation will start.
-            * - ALL - All animations will start.
+            * The animation start mode. Defaults to FIRST.
             */
             */
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             /**
             /**
-             * Set to true to compile materials before raising the success callback. Defaults to false.
+             * Defines if the loader should compile materials before raising the success callback. Defaults to false.
              */
              */
             this.compileMaterials = false;
             this.compileMaterials = false;
             /**
             /**
-             * Set to true to also compile materials with clip planes. Defaults to false.
+             * Defines if the loader should also compile materials with clip planes. Defaults to false.
              */
              */
             this.useClipPlane = false;
             this.useClipPlane = false;
             /**
             /**
-             * Set to true to compile shadow generators before raising the success callback. Defaults to false.
+             * Defines if the loader should compile shadow generators before raising the success callback. Defaults to false.
              */
              */
             this.compileShadowGenerators = false;
             this.compileShadowGenerators = false;
             /**
             /**
-             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+             * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
              */
              */
             this.onMeshLoadedObservable = new BABYLON.Observable();
             this.onMeshLoadedObservable = new BABYLON.Observable();
             /**
             /**
-             * Raised when the loader creates a texture after parsing the glTF properties of the texture.
+             * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
              */
              */
             this.onTextureLoadedObservable = new BABYLON.Observable();
             this.onTextureLoadedObservable = new BABYLON.Observable();
             /**
             /**
-             * Raised when the loader creates a material after parsing the glTF properties of the material.
+             * Observable raised when the loader creates a material after parsing the glTF properties of the material.
              */
              */
             this.onMaterialLoadedObservable = new BABYLON.Observable();
             this.onMaterialLoadedObservable = new BABYLON.Observable();
             /**
             /**
-             * Raised when the asset is completely loaded, immediately before the loader is disposed.
+             * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
              * For assets with LODs, raised when all of the LODs are complete.
              * For assets with LODs, raised when all of the LODs are complete.
              * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
              * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
              */
              */
             this.onCompleteObservable = new BABYLON.Observable();
             this.onCompleteObservable = new BABYLON.Observable();
             /**
             /**
-            * Raised after the loader is disposed.
-            */
+             * Observable raised after the loader is disposed.
+             */
             this.onDisposeObservable = new BABYLON.Observable();
             this.onDisposeObservable = new BABYLON.Observable();
             /**
             /**
-             * Raised after a loader extension is created.
+             * Observable raised after a loader extension is created.
              * Set additional options for a loader extension in this event.
              * Set additional options for a loader extension in this event.
              */
              */
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             this.onExtensionLoadedObservable = new BABYLON.Observable();
@@ -130,7 +125,9 @@ var BABYLON;
             };
             };
         }
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
-            /** Raised when the asset has been parsed. */
+            /**
+             * Raised when the asset has been parsed
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onParsedObserver) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -142,7 +139,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
             /**
             /**
-             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+             * Callback raised when the loader creates a mesh after parsing the glTF properties of the mesh.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                 if (this._onMeshLoadedObserver) {
@@ -155,7 +152,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
             /**
             /**
-             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             * Callback raised when the loader creates a texture after parsing the glTF properties of the texture.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                 if (this._onTextureLoadedObserver) {
@@ -168,7 +165,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
             /**
             /**
-             * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+             * Callback raised when the loader creates a material after parsing the glTF properties of the material.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                 if (this._onMaterialLoadedObserver) {
@@ -181,7 +178,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
             /**
             /**
-             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             * Callback raised when the asset is completely loaded, immediately before the loader is disposed.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onCompleteObserver) {
                 if (this._onCompleteObserver) {
@@ -194,7 +191,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
             /**
             /**
-             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             * Callback raised after the loader is disposed.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onDisposeObserver) {
                 if (this._onDisposeObserver) {
@@ -207,7 +204,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
             /**
             /**
-             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             * Callback raised after a loader extension is created.
              */
              */
             set: function (callback) {
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                 if (this._onExtensionLoadedObserver) {
@@ -220,7 +217,7 @@ var BABYLON;
         });
         });
         /**
         /**
          * Returns a promise that resolves when the asset is completely loaded.
          * Returns a promise that resolves when the asset is completely loaded.
-         * @returns A promise that resolves when the asset is completely loaded.
+         * @returns a promise that resolves when the asset is completely loaded.
          */
          */
         GLTFFileLoader.prototype.whenCompleteAsync = function () {
         GLTFFileLoader.prototype.whenCompleteAsync = function () {
             var _this = this;
             var _this = this;
@@ -232,7 +229,7 @@ var BABYLON;
         };
         };
         Object.defineProperty(GLTFFileLoader.prototype, "loaderState", {
         Object.defineProperty(GLTFFileLoader.prototype, "loaderState", {
             /**
             /**
-             * The loader state (LOADING, READY, COMPLETE) or null if the loader is not active.
+             * The loader state or null if the loader is not active.
              */
              */
             get: function () {
             get: function () {
                 return this._loader ? this._loader.state : null;
                 return this._loader ? this._loader.state : null;
@@ -255,14 +252,14 @@ var BABYLON;
             this.onDisposeObservable.clear();
             this.onDisposeObservable.clear();
         };
         };
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
-        * @param scene the scene the meshes should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise containg the loaded meshes, particles, skeletons and animations
-        */
+         * Imports one or more meshes from the loaded glTF data and adds them to the scene
+         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+         * @param scene the scene the meshes should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise containg the loaded meshes, particles, skeletons and animations
+         */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -272,13 +269,13 @@ var BABYLON;
             });
             });
         };
         };
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        * @param scene the scene the objects should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise which completes when objects have been loaded to the scene
-        */
+         * Imports all objects from the loaded glTF data and adds them to the scene
+         * @param scene the scene the objects should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise which completes when objects have been loaded to the scene
+         */
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -312,7 +309,7 @@ var BABYLON;
             });
             });
         };
         };
         /**
         /**
-         * If the data string can be loaded directly
+         * If the data string can be loaded directly.
          * @param data string contianing the file data
          * @param data string contianing the file data
          * @returns if the data can be loaded directly
          * @returns if the data can be loaded directly
          */
          */
@@ -320,7 +317,7 @@ var BABYLON;
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
         };
         /**
         /**
-         * Instantiates a gltf file loader plugin
+         * Instantiates a glTF file loader plugin.
          * @returns the created plugin
          * @returns the created plugin
          */
          */
         GLTFFileLoader.prototype.createPlugin = function () {
         GLTFFileLoader.prototype.createPlugin = function () {
@@ -507,11 +504,14 @@ var BABYLON;
         // #endregion
         // #endregion
         // #region V1 options
         // #region V1 options
         /**
         /**
-         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders.
+         * Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled.
+         * Defaults to true.
          */
          */
         GLTFFileLoader.IncrementalLoading = true;
         GLTFFileLoader.IncrementalLoading = true;
         /**
         /**
-         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters.
+         * Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates.
          */
          */
         GLTFFileLoader.HomogeneousCoordinates = false;
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
         return GLTFFileLoader;

File diff suppressed because it is too large
+ 289 - 343
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts


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


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


File diff suppressed because it is too large
+ 289 - 343
dist/preview release/loaders/babylon.glTFFileLoader.d.ts


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


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


File diff suppressed because it is too large
+ 289 - 343
dist/preview release/loaders/babylonjs.loaders.d.ts


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


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


File diff suppressed because it is too large
+ 289 - 343
dist/preview release/loaders/babylonjs.loaders.module.d.ts


+ 3 - 1
dist/preview release/serializers/babylon.glTF2Serializer.d.ts

@@ -39,11 +39,12 @@ declare module BABYLON {
 
 
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Converts Babylon Scene into glTF 2.0.
      * Converts Babylon Scene into glTF 2.0.
+     * @hidden
      */
      */
     class _Exporter {
     class _Exporter {
         /**
         /**
@@ -284,6 +285,7 @@ declare module BABYLON {
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+     * @hidden
      */
      */
     class _GLTFMaterial {
     class _GLTFMaterial {
         /**
         /**

+ 3 - 1
dist/preview release/serializers/babylon.glTF2Serializer.js

@@ -53,7 +53,7 @@ var BABYLON;
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
@@ -61,6 +61,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         /**
         /**
          * Converts Babylon Scene into glTF 2.0.
          * Converts Babylon Scene into glTF 2.0.
+         * @hidden
          */
          */
         var _Exporter = /** @class */ (function () {
         var _Exporter = /** @class */ (function () {
             /**
             /**
@@ -778,6 +779,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         /**
         /**
          * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
          * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+         * @hidden
          */
          */
         var _GLTFMaterial = /** @class */ (function () {
         var _GLTFMaterial = /** @class */ (function () {
             function _GLTFMaterial() {
             function _GLTFMaterial() {

+ 3 - 1
dist/preview release/serializers/babylonjs.serializers.d.ts

@@ -47,11 +47,12 @@ declare module BABYLON {
 
 
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Converts Babylon Scene into glTF 2.0.
      * Converts Babylon Scene into glTF 2.0.
+     * @hidden
      */
      */
     class _Exporter {
     class _Exporter {
         /**
         /**
@@ -292,6 +293,7 @@ declare module BABYLON {
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+     * @hidden
      */
      */
     class _GLTFMaterial {
     class _GLTFMaterial {
         /**
         /**

+ 3 - 1
dist/preview release/serializers/babylonjs.serializers.js

@@ -203,7 +203,7 @@ var BABYLON;
 
 
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
@@ -211,6 +211,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         /**
         /**
          * Converts Babylon Scene into glTF 2.0.
          * Converts Babylon Scene into glTF 2.0.
+         * @hidden
          */
          */
         var _Exporter = /** @class */ (function () {
         var _Exporter = /** @class */ (function () {
             /**
             /**
@@ -928,6 +929,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         /**
         /**
          * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
          * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+         * @hidden
          */
          */
         var _GLTFMaterial = /** @class */ (function () {
         var _GLTFMaterial = /** @class */ (function () {
             function _GLTFMaterial() {
             function _GLTFMaterial() {

+ 3 - 1
dist/preview release/serializers/babylonjs.serializers.module.d.ts

@@ -54,11 +54,12 @@ declare module BABYLON {
 
 
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Converts Babylon Scene into glTF 2.0.
      * Converts Babylon Scene into glTF 2.0.
+     * @hidden
      */
      */
     class _Exporter {
     class _Exporter {
         /**
         /**
@@ -299,6 +300,7 @@ declare module BABYLON {
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     /**
     /**
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+     * @hidden
      */
      */
     class _GLTFMaterial {
     class _GLTFMaterial {
         /**
         /**

File diff suppressed because it is too large
+ 11579 - 14529
dist/preview release/typedocValidationBaseline.json


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


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


+ 5 - 0
dist/preview release/what's new.md

@@ -114,6 +114,8 @@
 - Added unlit material extension support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
 - Added unlit material extension support to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
 - (Viewer) Viewer's declaration file automatically generated ([RaananW](https://github.com/RaananW))
 - (Viewer) Viewer's declaration file automatically generated ([RaananW](https://github.com/RaananW))
 - New serialize and parse functions for effect layers (Highlight and Glow layers) ([julien-moreau](https://github.com/julien-moreau))
 - New serialize and parse functions for effect layers (Highlight and Glow layers) ([julien-moreau](https://github.com/julien-moreau))
+- Added alphaCutOff support for StandardMaterial ([deltakosh](https://github.com/deltakosh))
+- Add support for sparse accessors to glTF 2.0 loader. ([bghgary](https://github.com/bghgary))
 
 
 ## Bug fixes
 ## Bug fixes
 
 
@@ -146,3 +148,6 @@
 - Engine's onCanvasPointerOutObservable will now return a PointerEvent instead of the Engine. ([trevordev](https://github.com/trevordev))
 - Engine's onCanvasPointerOutObservable will now return a PointerEvent instead of the Engine. ([trevordev](https://github.com/trevordev))
 - Removed public references to default rendering pipeline's internal post process ([trevordev](https://github.com/trevordev))
 - Removed public references to default rendering pipeline's internal post process ([trevordev](https://github.com/trevordev))
 - `Bone.setScale` does not support scaleChildren property anymore. You can use `Bone.scale` to achieve the same effect ([deltakosh](https://github.com/deltakosh))
 - `Bone.setScale` does not support scaleChildren property anymore. You can use `Bone.scale` to achieve the same effect ([deltakosh](https://github.com/deltakosh))
+- Vector3 &amp; Vector4:
+    - `MinimizeInPlace` has been renamed to `minimizeInPlace`
+    - `MaximizeInPlace` has been renamed to `maximizeInPlace`

+ 2 - 1
gui/readme.md

@@ -2,4 +2,5 @@
 The Babylon.js GUI library is an extension you can use to generate interactive user interface.
 The Babylon.js GUI library is an extension you can use to generate interactive user interface.
 It is build on top of the DynamicTexture.
 It is build on top of the DynamicTexture.
 
 
-Documentation: http://doc.babylonjs.com/overviews/gui
+Documentation: http://doc.babylonjs.com/how_to/gui
+API: http://doc.babylonjs.com/api/modules/babylon.gui

+ 2 - 2
gui/src/controls/control.ts

@@ -278,7 +278,7 @@ module BABYLON.GUI {
             this._fontSet = true;
             this._fontSet = true;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public get _isFontSizeInPercentage(): boolean {
         public get _isFontSizeInPercentage(): boolean {
             return this._fontSize.isPercentage;
             return this._fontSize.isPercentage;
         }
         }
@@ -493,7 +493,7 @@ module BABYLON.GUI {
             return "Control";
             return "Control";
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _resetFontCache(): void {
         public _resetFontCache(): void {
             this._fontSet = true;
             this._fontSet = true;
         }
         }

+ 1 - 1
gui/src/controls/textBlock.ts

@@ -224,7 +224,7 @@ module BABYLON.GUI {
             context.fillText(text, this._currentMeasure.left + x, y);
             context.fillText(text, this._currentMeasure.left + x, y);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
             context.save();
             context.save();
 
 

+ 1 - 1
inspector/sass/defines.scss

@@ -20,5 +20,5 @@ $background-lighter2: lighten($color: $background-lighter, $amount : 5%);
 $background-lighter3: lighten($color: $background-lighter2, $amount: 5%);
 $background-lighter3: lighten($color: $background-lighter2, $amount: 5%);
 
 
 $resizebar-width    : 10px;
 $resizebar-width    : 10px;
-$tabbar-height      : 32px;
+$tabbar-height      : 40px;
 $searchbar-height   : 30px;
 $searchbar-height   : 30px;

+ 5 - 5
loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts

@@ -1,9 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-/** Module defining extensions to gltf */
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression
-
     const NAME = "KHR_draco_mesh_compression";
     const NAME = "KHR_draco_mesh_compression";
 
 
     interface IKHRDracoMeshCompression {
     interface IKHRDracoMeshCompression {
@@ -11,10 +8,13 @@ module BABYLON.GLTF2.Extensions {
         attributes: { [name: string]: number };
         attributes: { [name: string]: number };
     }
     }
 
 
-    interface ILoaderBufferViewDraco extends ILoaderBufferView {
+    interface ILoaderBufferViewDraco extends _ILoaderBufferView {
         _dracoBabylonGeometry?: Promise<Geometry>;
         _dracoBabylonGeometry?: Promise<Geometry>;
     }
     }
 
 
+    /**
+     * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
+     */
     export class KHR_draco_mesh_compression extends GLTFLoaderExtension {
     export class KHR_draco_mesh_compression extends GLTFLoaderExtension {
         public readonly name = NAME;
         public readonly name = NAME;
 
 
@@ -37,7 +37,7 @@ module BABYLON.GLTF2.Extensions {
             super.dispose();
             super.dispose();
         }
         }
 
 
-        protected _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
+        protected _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
             return this._loadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, (extensionContext, extension) => {
             return this._loadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, (extensionContext, extension) => {
                 if (primitive.mode != undefined) {
                 if (primitive.mode != undefined) {
                     if (primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP &&
                     if (primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP &&

+ 5 - 4
loaders/src/glTF/2.0/Extensions/KHR_lights.ts

@@ -1,8 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights
-
     const NAME = "KHR_lights";
     const NAME = "KHR_lights";
 
 
     enum LightType {
     enum LightType {
@@ -31,10 +29,13 @@ module BABYLON.GLTF2.Extensions {
         lights: ILight[];
         lights: ILight[];
     }
     }
 
 
+    /**
+     * [Specification](https://github.com/MiiBond/glTF/tree/khr_lights_v1/extensions/Khronos/KHR_lights) (Experimental)
+     */
     export class KHR_lights extends GLTFLoaderExtension {
     export class KHR_lights extends GLTFLoaderExtension {
         public readonly name = NAME;
         public readonly name = NAME;
 
 
-        protected _loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> { 
+        protected _loadSceneAsync(context: string, scene: _ILoaderScene): Nullable<Promise<void>> { 
             return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => {
             return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => {
                 const promise = this._loader._loadSceneAsync(extensionContext, scene);
                 const promise = this._loader._loadSceneAsync(extensionContext, scene);
 
 
@@ -49,7 +50,7 @@ module BABYLON.GLTF2.Extensions {
             });
             });
         }
         }
 
 
-        protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> { 
+        protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>> { 
             return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => {
             return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => {
                 const promise = this._loader._loadNodeAsync(extensionContext, node);
                 const promise = this._loader._loadNodeAsync(extensionContext, node);
 
 

+ 5 - 4
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts

@@ -1,8 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness
-
     const NAME = "KHR_materials_pbrSpecularGlossiness";
     const NAME = "KHR_materials_pbrSpecularGlossiness";
 
 
     interface IKHRMaterialsPbrSpecularGlossiness {
     interface IKHRMaterialsPbrSpecularGlossiness {
@@ -13,10 +11,13 @@ module BABYLON.GLTF2.Extensions {
         specularGlossinessTexture: ITextureInfo;
         specularGlossinessTexture: ITextureInfo;
     }
     }
 
 
+    /**
+     * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
+     */
     export class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
     export class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension {
         public readonly name = NAME;
         public readonly name = NAME;
 
 
-        protected _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
+        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) => {
             return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => {
                 material._babylonData = material._babylonData || {};
                 material._babylonData = material._babylonData || {};
                 let babylonData = material._babylonData[babylonDrawMode];
                 let babylonData = material._babylonData[babylonDrawMode];
@@ -47,7 +48,7 @@ module BABYLON.GLTF2.Extensions {
             });
             });
         }
         }
 
 
-        private _loadSpecularGlossinessPropertiesAsync(context: string, material: ILoaderMaterial, properties: IKHRMaterialsPbrSpecularGlossiness, babylonMaterial: PBRMaterial): Promise<void> {
+        private _loadSpecularGlossinessPropertiesAsync(context: string, material: _ILoaderMaterial, properties: IKHRMaterialsPbrSpecularGlossiness, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             if (properties.diffuseFactor) {
             if (properties.diffuseFactor) {

+ 5 - 4
loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts

@@ -1,14 +1,15 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/donmccurdy/glTF/tree/feat-khr-materials-cmnConstant/extensions/2.0/Khronos/KHR_materials_unlit
-
     const NAME = "KHR_materials_unlit";
     const NAME = "KHR_materials_unlit";
 
 
+    /**
+     * [Specification](https://github.com/donmccurdy/glTF/tree/feat-khr-materials-cmnConstant/extensions/2.0/Khronos/KHR_materials_unlit) (Experimental)
+     */
     export class KHR_materials_unlit extends GLTFLoaderExtension {
     export class KHR_materials_unlit extends GLTFLoaderExtension {
         public readonly name = NAME;
         public readonly name = NAME;
 
 
-        protected _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
+        protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
             return this._loadExtensionAsync<{}>(context, material, () => {
             return this._loadExtensionAsync<{}>(context, material, () => {
                 material._babylonData = material._babylonData || {};
                 material._babylonData = material._babylonData || {};
                 let babylonData = material._babylonData[babylonDrawMode];
                 let babylonData = material._babylonData[babylonDrawMode];
@@ -37,7 +38,7 @@ module BABYLON.GLTF2.Extensions {
             });
             });
         }
         }
 
 
-        private _loadUnlitPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
+        private _loadUnlitPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             // Ensure metallic workflow
             // Ensure metallic workflow

+ 7 - 6
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -1,14 +1,15 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod
-
     const NAME = "MSFT_lod";
     const NAME = "MSFT_lod";
 
 
     interface IMSFTLOD {
     interface IMSFTLOD {
         ids: number[];
         ids: number[];
     }
     }
 
 
+    /**
+     * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
+     */
     export class MSFT_lod extends GLTFLoaderExtension {
     export class MSFT_lod extends GLTFLoaderExtension {
         public readonly name = NAME;
         public readonly name = NAME;
 
 
@@ -17,13 +18,13 @@ module BABYLON.GLTF2.Extensions {
          */
          */
         public maxLODsToLoad = Number.MAX_VALUE;
         public maxLODsToLoad = Number.MAX_VALUE;
 
 
-        private _loadingNodeLOD: Nullable<ILoaderNode> = null;
+        private _loadingNodeLOD: Nullable<_ILoaderNode> = null;
         private _loadNodeSignals: { [nodeIndex: number]: Deferred<void> } = {};
         private _loadNodeSignals: { [nodeIndex: number]: Deferred<void> } = {};
 
 
-        private _loadingMaterialLOD: Nullable<ILoaderMaterial> = null;
+        private _loadingMaterialLOD: Nullable<_ILoaderMaterial> = null;
         private _loadMaterialSignals: { [materialIndex: number]: Deferred<void> } = {};
         private _loadMaterialSignals: { [materialIndex: number]: Deferred<void> } = {};
 
 
-        protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> {
+        protected _loadNodeAsync(context: string, node: _ILoaderNode): Nullable<Promise<void>> {
             return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => {
             return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => {
                 let firstPromise: Promise<void>;
                 let firstPromise: Promise<void>;
 
 
@@ -71,7 +72,7 @@ module BABYLON.GLTF2.Extensions {
             });
             });
         }
         }
 
 
-        protected _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
+        protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
             // Don't load material LODs if already loading a node LOD.
             // Don't load material LODs if already loading a node LOD.
             if (this._loadingNodeLOD) {
             if (this._loadingNodeLOD) {
                 return null;
                 return null;

+ 289 - 275
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -1,8 +1,8 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 
 /**
 /**
-* Defines the GLTF2 module used to import/export GLTF 2.0 files
-*/
+ * Defines the module used to import/export glTF 2.0 assets
+ */
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
     interface IFileRequestInfo extends IFileRequest {
     interface IFileRequestInfo extends IFileRequest {
         _lengthComputable?: boolean;
         _lengthComputable?: boolean;
@@ -10,37 +10,23 @@ module BABYLON.GLTF2 {
         _total?: number;
         _total?: number;
     }
     }
 
 
-    /**
-    * Interface for a meterial with a constructor
-    */
-    export interface MaterialConstructor<T extends Material> {
-        /**
-        * The material class
-        */
+    /** @hidden */
+    export interface _MaterialConstructor<T extends Material> {
         readonly prototype: T;
         readonly prototype: T;
-        /**
-        * Instatiates a material
-        * @param name name of the material
-        * @param scene the scene the material will be added to
-        */
         new(name: string, scene: Scene): T;
         new(name: string, scene: Scene): T;
     }
     }
 
 
     /**
     /**
-    * Used to load from a GLTF2 file
-    */
+     * Loader for loading a glTF 2.0 asset
+     */
     export class GLTFLoader implements IGLTFLoader {
     export class GLTFLoader implements IGLTFLoader {
-        /**
-        * @ignore
-        */
-        public _gltf: ILoaderGLTF;
-        /**
-        * @ignore
-        */
+        /** @hidden */
+        public _gltf: _ILoaderGLTF;
+
+        /** @hidden */
         public _babylonScene: Scene;
         public _babylonScene: Scene;
-        /**
-        * @ignore
-        */
+
+        /** @hidden */
         public _completePromises = new Array<Promise<void>>();
         public _completePromises = new Array<Promise<void>>();
 
 
         private _disposed = false;
         private _disposed = false;
@@ -48,18 +34,15 @@ module BABYLON.GLTF2 {
         private _extensions: { [name: string]: GLTFLoaderExtension } = {};
         private _extensions: { [name: string]: GLTFLoaderExtension } = {};
         private _rootUrl: string;
         private _rootUrl: string;
         private _rootBabylonMesh: Mesh;
         private _rootBabylonMesh: Mesh;
-        private _defaultSampler = {} as ILoaderSampler;
+        private _defaultSampler = {} as _ILoaderSampler;
         private _defaultBabylonMaterials: { [drawMode: number]: PBRMaterial } = {};
         private _defaultBabylonMaterials: { [drawMode: number]: PBRMaterial } = {};
         private _progressCallback?: (event: SceneLoaderProgressEvent) => void;
         private _progressCallback?: (event: SceneLoaderProgressEvent) => void;
         private _requests = new Array<IFileRequestInfo>();
         private _requests = new Array<IFileRequestInfo>();
 
 
         private static _Names = new Array<string>();
         private static _Names = new Array<string>();
         private static _Factories: { [name: string]: (loader: GLTFLoader) => GLTFLoaderExtension } = {};
         private static _Factories: { [name: string]: (loader: GLTFLoader) => GLTFLoaderExtension } = {};
-        /**
-        * @ignore, registers the loader
-        * @param name name of the loader
-        * @param factory function that converts a loader to a loader extension
-        */
+
+        /** @hidden */
         public static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void {
         public static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void {
             if (GLTFLoader._Factories[name]) {
             if (GLTFLoader._Factories[name]) {
                 Tools.Error(`Extension with the name '${name}' already exists`);
                 Tools.Error(`Extension with the name '${name}' already exists`);
@@ -73,61 +56,74 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Coordinate system that will be used when loading from the gltf file
-        */
+         * Mode that determines the coordinate system to use.
+         */
         public coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
         public coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
+
         /**
         /**
-        * Animation mode that determines which animations should be started when a file is loaded
-        */
+         * Mode that determines what animations will start.
+         */
         public animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
         public animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
+
         /**
         /**
-        * If the materials in the file should automatically be compiled
-        */
+         * Defines if the loader should compile materials.
+         */
         public compileMaterials = false;
         public compileMaterials = false;
+
         /**
         /**
-        * If a clip plane should be usede when loading meshes in the file
-        */
+         * Defines if the loader should also compile materials with clip planes.
+         */
         public useClipPlane = false;
         public useClipPlane = false;
+
         /**
         /**
-        * If shadow generators should automatically be compiled
-        */
+         * Defines if the loader should compile shadow generators.
+         */
         public compileShadowGenerators = false;
         public compileShadowGenerators = false;
 
 
         /**
         /**
-        * Observable that fires when the loader is disposed
-        */
-        public readonly onDisposeObservable = new Observable<IGLTFLoader>();
-        /**
-        * Observable that fires each time a mesh is loaded
-        */
+         * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+         */
         public readonly onMeshLoadedObservable = new Observable<AbstractMesh>();
         public readonly onMeshLoadedObservable = new Observable<AbstractMesh>();
+
         /**
         /**
-        * Observable that fires each time a texture is loaded
-        */
+         * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
+         */
         public readonly onTextureLoadedObservable = new Observable<BaseTexture>();
         public readonly onTextureLoadedObservable = new Observable<BaseTexture>();
+
         /**
         /**
-        * Observable that fires each time a material is loaded
-        */
+         * Observable raised when the loader creates a material after parsing the glTF properties of the material.
+         */
         public readonly onMaterialLoadedObservable = new Observable<Material>();
         public readonly onMaterialLoadedObservable = new Observable<Material>();
+
         /**
         /**
-        * Observable that fires each time an extension is loaded
-        */
-        public readonly onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
-        /**
-        * Observable that fires when the load has completed
-        */
+         * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
+         * For assets with LODs, raised when all of the LODs are complete.
+         * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
+         */
         public readonly onCompleteObservable = new Observable<IGLTFLoader>();
         public readonly onCompleteObservable = new Observable<IGLTFLoader>();
 
 
         /**
         /**
-        * The current state of the loader
-        */
+         * Observable raised after the loader is disposed.
+         */
+        public readonly onDisposeObservable = new Observable<IGLTFLoader>();
+
+        /**
+         * Observable raised after a loader extension is created.
+         * Set additional options for a loader extension in this event.
+         */
+        public readonly onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
+
+
+        /**
+         * Loader state or null if the loader is not active.
+         */
         public get state(): Nullable<GLTFLoaderState> {
         public get state(): Nullable<GLTFLoaderState> {
             return this._state;
             return this._state;
         }
         }
 
 
         /**
         /**
-        * Disposes of the loader
-        */
+         * Disposes the loader, releases resources during load, and cancels any outstanding requests.
+         */
         public dispose(): void {
         public dispose(): void {
             if (this._disposed) {
             if (this._disposed) {
                 return;
                 return;
@@ -142,20 +138,20 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
-        * @param scene the scene the meshes should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise containg the loaded meshes, particles, skeletons and animations
-        */
+         * Imports one or more meshes from the loaded glTF data and adds them to the scene
+         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+         * @param scene the scene the meshes should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise containg the loaded meshes, particles, skeletons and animations
+         */
         public importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
         public importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
             return Promise.resolve().then(() => {
             return Promise.resolve().then(() => {
-                let nodes: Nullable<Array<ILoaderNode>> = null;
+                let nodes: Nullable<Array<_ILoaderNode>> = null;
 
 
                 if (meshesNames) {
                 if (meshesNames) {
-                    const nodeMap: { [name: string]: ILoaderNode } = {};
+                    const nodeMap: { [name: string]: _ILoaderNode } = {};
                     if (this._gltf.nodes) {
                     if (this._gltf.nodes) {
                         for (const node of this._gltf.nodes) {
                         for (const node of this._gltf.nodes) {
                             if (node.name) {
                             if (node.name) {
@@ -187,18 +183,18 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        * @param scene the scene the objects should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise which completes when objects have been loaded to the scene
-        */
+         * Imports all objects from the loaded glTF data and adds them to the scene
+         * @param scene the scene the objects should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise which completes when objects have been loaded to the scene
+         */
         public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
         public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return this._loadAsync(null, scene, data, rootUrl, onProgress);
             return this._loadAsync(null, scene, data, rootUrl, onProgress);
         }
         }
 
 
-        private _loadAsync(nodes: Nullable<Array<ILoaderNode>>, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
+        private _loadAsync(nodes: Nullable<Array<_ILoaderNode>>, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return Promise.resolve().then(() => {
             return Promise.resolve().then(() => {
                 this._loadExtensions();
                 this._loadExtensions();
 
 
@@ -271,7 +267,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         private _loadData(data: IGLTFLoaderData): void {
         private _loadData(data: IGLTFLoaderData): void {
-            this._gltf = data.json as ILoaderGLTF;
+            this._gltf = data.json as _ILoaderGLTF;
             this._setupData();
             this._setupData();
 
 
             if (data.bin) {
             if (data.bin) {
@@ -291,19 +287,19 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         private _setupData(): void {
         private _setupData(): void {
-            ArrayItem.Assign(this._gltf.accessors);
-            ArrayItem.Assign(this._gltf.animations);
-            ArrayItem.Assign(this._gltf.buffers);
-            ArrayItem.Assign(this._gltf.bufferViews);
-            ArrayItem.Assign(this._gltf.cameras);
-            ArrayItem.Assign(this._gltf.images);
-            ArrayItem.Assign(this._gltf.materials);
-            ArrayItem.Assign(this._gltf.meshes);
-            ArrayItem.Assign(this._gltf.nodes);
-            ArrayItem.Assign(this._gltf.samplers);
-            ArrayItem.Assign(this._gltf.scenes);
-            ArrayItem.Assign(this._gltf.skins);
-            ArrayItem.Assign(this._gltf.textures);
+            _ArrayItem.Assign(this._gltf.accessors);
+            _ArrayItem.Assign(this._gltf.animations);
+            _ArrayItem.Assign(this._gltf.buffers);
+            _ArrayItem.Assign(this._gltf.bufferViews);
+            _ArrayItem.Assign(this._gltf.cameras);
+            _ArrayItem.Assign(this._gltf.images);
+            _ArrayItem.Assign(this._gltf.materials);
+            _ArrayItem.Assign(this._gltf.meshes);
+            _ArrayItem.Assign(this._gltf.nodes);
+            _ArrayItem.Assign(this._gltf.samplers);
+            _ArrayItem.Assign(this._gltf.scenes);
+            _ArrayItem.Assign(this._gltf.skins);
+            _ArrayItem.Assign(this._gltf.textures);
 
 
             if (this._gltf.nodes) {
             if (this._gltf.nodes) {
                 const nodeParents: { [index: number]: number } = {};
                 const nodeParents: { [index: number]: number } = {};
@@ -334,11 +330,11 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        private _createRootNode(): ILoaderNode {
+        private _createRootNode(): _ILoaderNode {
             this._rootBabylonMesh = new Mesh("__root__", this._babylonScene);
             this._rootBabylonMesh = new Mesh("__root__", this._babylonScene);
             this._rootBabylonMesh.setEnabled(false);
             this._rootBabylonMesh.setEnabled(false);
 
 
-            const rootNode = { _babylonMesh: this._rootBabylonMesh } as ILoaderNode;
+            const rootNode = { _babylonMesh: this._rootBabylonMesh } as _ILoaderNode;
             switch (this.coordinateSystemMode) {
             switch (this.coordinateSystemMode) {
                 case GLTFLoaderCoordinateSystemMode.AUTO: {
                 case GLTFLoaderCoordinateSystemMode.AUTO: {
                     if (!this._babylonScene.useRightHandedSystem) {
                     if (!this._babylonScene.useRightHandedSystem) {
@@ -361,7 +357,7 @@ module BABYLON.GLTF2 {
             return rootNode;
             return rootNode;
         }
         }
 
 
-        private _loadNodesAsync(nodes: ILoaderNode[], ): Promise<void> {
+        private _loadNodesAsync(nodes: _ILoaderNode[], ): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             for (let node of nodes) {
             for (let node of nodes) {
@@ -373,10 +369,8 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void> {
+        /** @hidden */
+        public _loadSceneAsync(context: string, scene: _ILoaderScene): Promise<void> {
             const promise = GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
             const promise = GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
             if (promise) {
             if (promise) {
                 return promise;
                 return promise;
@@ -394,7 +388,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _forEachPrimitive(node: ILoaderNode, callback: (babylonMesh: Mesh) => void): void {
+        private _forEachPrimitive(node: _ILoaderNode, callback: (babylonMesh: Mesh) => void): void {
             if (node._primitiveBabylonMeshes) {
             if (node._primitiveBabylonMeshes) {
                 for (const babylonMesh of node._primitiveBabylonMeshes) {
                 for (const babylonMesh of node._primitiveBabylonMeshes) {
                     callback(babylonMesh);
                     callback(babylonMesh);
@@ -486,10 +480,8 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadNodeAsync(context: string, node: ILoaderNode): Promise<void> {
+        /** @hidden */
+        public _loadNodeAsync(context: string, node: _ILoaderNode): Promise<void> {
             const promise = GLTFLoaderExtension._LoadNodeAsync(this, context, node);
             const promise = GLTFLoaderExtension._LoadNodeAsync(this, context, node);
             if (promise) {
             if (promise) {
                 return promise;
                 return promise;
@@ -526,9 +518,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _loadMeshAsync(context: string, node: ILoaderNode, mesh: ILoaderMesh, babylonMesh: Mesh): Promise<void> {
-            // TODO: instancing
-
+        private _loadMeshAsync(context: string, node: _ILoaderNode, mesh: _ILoaderMesh, babylonMesh: Mesh): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             const primitives = mesh.primitives;
             const primitives = mesh.primitives;
@@ -536,7 +526,7 @@ module BABYLON.GLTF2 {
                 throw new Error(`${context}: Primitives are missing`);
                 throw new Error(`${context}: Primitives are missing`);
             }
             }
 
 
-            ArrayItem.Assign(primitives);
+            _ArrayItem.Assign(primitives);
             if (primitives.length === 1) {
             if (primitives.length === 1) {
                 const primitive = primitives[0];
                 const primitive = primitives[0];
                 promises.push(this._loadPrimitiveAsync(`${context}/primitives/${primitive._index}`, node, mesh, primitive, babylonMesh));
                 promises.push(this._loadPrimitiveAsync(`${context}/primitives/${primitive._index}`, node, mesh, primitive, babylonMesh));
@@ -563,7 +553,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadPrimitiveAsync(context: string, node: ILoaderNode, mesh: ILoaderMesh, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<void> {
+        private _loadPrimitiveAsync(context: string, node: _ILoaderNode, mesh: _ILoaderMesh, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             this._createMorphTargets(context, node, mesh, primitive, babylonMesh);
             this._createMorphTargets(context, node, mesh, primitive, babylonMesh);
@@ -587,7 +577,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<Geometry> {
+        private _loadVertexDataAsync(context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<Geometry> {
             const promise = GLTFLoaderExtension._LoadVertexDataAsync(this, context, primitive, babylonMesh);
             const promise = GLTFLoaderExtension._LoadVertexDataAsync(this, context, primitive, babylonMesh);
             if (promise) {
             if (promise) {
                 return promise;
                 return promise;
@@ -607,12 +597,12 @@ module BABYLON.GLTF2 {
             }
             }
             else {
             else {
                 const accessor = GLTFLoader._GetProperty(context + "/indices", this._gltf.accessors, primitive.indices);
                 const accessor = GLTFLoader._GetProperty(context + "/indices", this._gltf.accessors, primitive.indices);
-                promises.push(this._loadAccessorAsync("#/accessors/" + accessor._index, accessor).then(data => {
-                    babylonGeometry.setIndices(data as IndicesArray);
+                promises.push(this._loadIndicesAccessorAsync("#/accessors/" + accessor._index, accessor).then(data => {
+                    babylonGeometry.setIndices(data);
                 }));
                 }));
             }
             }
 
 
-            const loadAttribute = (attribute: string, kind: string, callback?: (accessor: ILoaderAccessor) => void) => {
+            const loadAttribute = (attribute: string, kind: string, callback?: (accessor: _ILoaderAccessor) => void) => {
                 if (attributes[attribute] == undefined) {
                 if (attributes[attribute] == undefined) {
                     return;
                     return;
                 }
                 }
@@ -650,7 +640,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _createMorphTargets(context: string, node: ILoaderNode, mesh: ILoaderMesh, primitive: IMeshPrimitive, babylonMesh: Mesh): void {
+        private _createMorphTargets(context: string, node: _ILoaderNode, mesh: _ILoaderMesh, primitive: IMeshPrimitive, babylonMesh: Mesh): void {
             if (!primitive.targets) {
             if (!primitive.targets) {
                 return;
                 return;
             }
             }
@@ -700,11 +690,7 @@ module BABYLON.GLTF2 {
                 }
                 }
 
 
                 const accessor = GLTFLoader._GetProperty(`${context}/${attribute}`, this._gltf.accessors, attributes[attribute]);
                 const accessor = GLTFLoader._GetProperty(`${context}/${attribute}`, this._gltf.accessors, attributes[attribute]);
-                promises.push(this._loadAccessorAsync(`#/accessors/${accessor._index}`, accessor).then(data => {
-                    if (!(data instanceof Float32Array)) {
-                        throw new Error(`${context}: Morph target accessor must have float data`);
-                    }
-
+                promises.push(this._loadFloatAccessorAsync(`#/accessors/${accessor._index}`, accessor).then(data => {
                     setData(babylonVertexBuffer, data);
                     setData(babylonVertexBuffer, data);
                 }));
                 }));
             };
             };
@@ -741,7 +727,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private static _LoadTransform(node: ILoaderNode, babylonNode: TransformNode): void {
+        private static _LoadTransform(node: _ILoaderNode, babylonNode: TransformNode): void {
             let position = Vector3.Zero();
             let position = Vector3.Zero();
             let rotation = Quaternion.Identity();
             let rotation = Quaternion.Identity();
             let scaling = Vector3.One();
             let scaling = Vector3.One();
@@ -761,10 +747,10 @@ module BABYLON.GLTF2 {
             babylonNode.scaling = scaling;
             babylonNode.scaling = scaling;
         }
         }
 
 
-        private _loadSkinAsync(context: string, node: ILoaderNode, mesh: ILoaderMesh, skin: ILoaderSkin): Promise<void> {
-            const assignSkeleton = () => {
+        private _loadSkinAsync(context: string, node: _ILoaderNode, mesh: _ILoaderMesh, skin: _ILoaderSkin): Promise<void> {
+            const assignSkeleton = (skeleton: Skeleton) => {
                 this._forEachPrimitive(node, babylonMesh => {
                 this._forEachPrimitive(node, babylonMesh => {
-                    babylonMesh.skeleton = skin._babylonSkeleton!;
+                    babylonMesh.skeleton = skeleton;
                 });
                 });
 
 
                 // Ignore the TRS of skinned nodes.
                 // Ignore the TRS of skinned nodes.
@@ -777,75 +763,80 @@ module BABYLON.GLTF2 {
 
 
             if (skin._loaded) {
             if (skin._loaded) {
                 return skin._loaded.then(() => {
                 return skin._loaded.then(() => {
-                    assignSkeleton();
+                    assignSkeleton(skin._babylonSkeleton!);
                 });
                 });
             }
             }
 
 
-            // TODO: split into two parts so that bones are created before inverseBindMatricesData is loaded (for compiling materials).
+            const skeletonId = `skeleton${skin._index}`;
+            const babylonSkeleton = new Skeleton(skin.name || skeletonId, skeletonId, this._babylonScene);
+            skin._babylonSkeleton = babylonSkeleton;
+            this._loadBones(context, skin);
+            assignSkeleton(babylonSkeleton);
 
 
             return (skin._loaded = this._loadSkinInverseBindMatricesDataAsync(context, skin).then(inverseBindMatricesData => {
             return (skin._loaded = this._loadSkinInverseBindMatricesDataAsync(context, skin).then(inverseBindMatricesData => {
-                const skeletonId = `skeleton${skin._index}`;
-                const babylonSkeleton = new Skeleton(skin.name || skeletonId, skeletonId, this._babylonScene);
-                skin._babylonSkeleton = babylonSkeleton;
-                this._loadBones(context, skin, inverseBindMatricesData);
-                assignSkeleton();
+                this._updateBoneMatrices(babylonSkeleton, inverseBindMatricesData);
             }));
             }));
         }
         }
 
 
-        private _loadSkinInverseBindMatricesDataAsync(context: string, skin: ILoaderSkin): Promise<Nullable<Float32Array>> {
-            if (skin.inverseBindMatrices == undefined) {
-                return Promise.resolve(null);
-            }
-
-            const accessor = GLTFLoader._GetProperty(`${context}/inverseBindMatrices`, this._gltf.accessors, skin.inverseBindMatrices);
-            return this._loadAccessorAsync(`#/accessors/${accessor._index}`, accessor).then(data => {
-                return data as Float32Array;
-            });
-        }
-
-        private _createBone(node: ILoaderNode, skin: ILoaderSkin, parent: Nullable<Bone>, localMatrix: Matrix, baseMatrix: Matrix, index: number): Bone {
-            const babylonBone = new Bone(node.name || `joint${node._index}`, skin._babylonSkeleton!, parent, localMatrix, null, baseMatrix, index);
-
-            node._babylonAnimationTargets = node._babylonAnimationTargets || [];
-            node._babylonAnimationTargets.push(babylonBone);
-
-            return babylonBone;
-        }
-
-        private _loadBones(context: string, skin: ILoaderSkin, inverseBindMatricesData: Nullable<Float32Array>): void {
+        private _loadBones(context: string, skin: _ILoaderSkin): void {
             const babylonBones: { [index: number]: Bone } = {};
             const babylonBones: { [index: number]: Bone } = {};
             for (const index of skin.joints) {
             for (const index of skin.joints) {
                 const node = GLTFLoader._GetProperty(`${context}/joints/${index}`, this._gltf.nodes, index);
                 const node = GLTFLoader._GetProperty(`${context}/joints/${index}`, this._gltf.nodes, index);
-                this._loadBone(node, skin, inverseBindMatricesData, babylonBones);
+                this._loadBone(node, skin, babylonBones);
             }
             }
         }
         }
 
 
-        private _loadBone(node: ILoaderNode, skin: ILoaderSkin, inverseBindMatricesData: Nullable<Float32Array>, babylonBones: { [index: number]: Bone }): Bone {
+        private _loadBone(node: _ILoaderNode, skin: _ILoaderSkin, babylonBones: { [index: number]: Bone }): Bone {
             let babylonBone = babylonBones[node._index];
             let babylonBone = babylonBones[node._index];
             if (babylonBone) {
             if (babylonBone) {
                 return babylonBone;
                 return babylonBone;
             }
             }
 
 
-            const boneIndex = skin.joints.indexOf(node._index);
-
-            let baseMatrix = Matrix.Identity();
-            if (inverseBindMatricesData && boneIndex !== -1) {
-                baseMatrix = Matrix.FromArray(inverseBindMatricesData, boneIndex * 16);
-                baseMatrix.invertToRef(baseMatrix);
-            }
-
             let babylonParentBone: Nullable<Bone> = null;
             let babylonParentBone: Nullable<Bone> = null;
             if (node._parent._babylonMesh !== this._rootBabylonMesh) {
             if (node._parent._babylonMesh !== this._rootBabylonMesh) {
-                babylonParentBone = this._loadBone(node._parent, skin, inverseBindMatricesData, babylonBones);
-                baseMatrix.multiplyToRef(babylonParentBone.getInvertedAbsoluteTransform(), baseMatrix);
+                babylonParentBone = this._loadBone(node._parent, skin, babylonBones);
             }
             }
 
 
-            babylonBone = this._createBone(node, skin, babylonParentBone, this._getNodeMatrix(node), baseMatrix, boneIndex);
+            const boneIndex = skin.joints.indexOf(node._index);
+
+            babylonBone = new Bone(node.name || `joint${node._index}`, skin._babylonSkeleton!, babylonParentBone, this._getNodeMatrix(node), null, null, boneIndex);
             babylonBones[node._index] = babylonBone;
             babylonBones[node._index] = babylonBone;
+
+            node._babylonAnimationTargets = node._babylonAnimationTargets || [];
+            node._babylonAnimationTargets.push(babylonBone);
+
             return babylonBone;
             return babylonBone;
         }
         }
 
 
-        private _getNodeMatrix(node: ILoaderNode): Matrix {
+        private _loadSkinInverseBindMatricesDataAsync(context: string, skin: _ILoaderSkin): Promise<Nullable<Float32Array>> {
+            if (skin.inverseBindMatrices == undefined) {
+                return Promise.resolve(null);
+            }
+
+            const accessor = GLTFLoader._GetProperty(`${context}/inverseBindMatrices`, this._gltf.accessors, skin.inverseBindMatrices);
+            return this._loadFloatAccessorAsync(`#/accessors/${accessor._index}`, accessor);
+        }
+
+        private _updateBoneMatrices(babylonSkeleton: Skeleton, inverseBindMatricesData: Nullable<Float32Array>): void {
+            for (const babylonBone of babylonSkeleton.bones) {
+                let baseMatrix = Matrix.Identity();
+                const boneIndex = babylonBone._index!;
+                if (inverseBindMatricesData && boneIndex !== -1) {
+                    Matrix.FromArrayToRef(inverseBindMatricesData, boneIndex * 16, baseMatrix);
+                    baseMatrix.invertToRef(baseMatrix);
+                }
+
+                const babylonParentBone = babylonBone.getParent();
+                if (babylonParentBone) {
+                    baseMatrix.multiplyToRef(babylonParentBone.getInvertedAbsoluteTransform(), baseMatrix);
+                }
+
+                babylonBone.updateMatrix(baseMatrix, false, false);
+                babylonBone._updateDifferenceMatrix(undefined, false);
+            }
+        }
+
+        private _getNodeMatrix(node: _ILoaderNode): Matrix {
             return node.matrix ?
             return node.matrix ?
                 Matrix.FromArray(node.matrix) :
                 Matrix.FromArray(node.matrix) :
                 Matrix.Compose(
                 Matrix.Compose(
@@ -870,14 +861,14 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<void> {
+        private _loadAnimationAsync(context: string, animation: _ILoaderAnimation): Promise<void> {
             const babylonAnimationGroup = new AnimationGroup(animation.name || `animation${animation._index}`, this._babylonScene);
             const babylonAnimationGroup = new AnimationGroup(animation.name || `animation${animation._index}`, this._babylonScene);
             animation._babylonAnimationGroup = babylonAnimationGroup;
             animation._babylonAnimationGroup = babylonAnimationGroup;
 
 
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
-            ArrayItem.Assign(animation.channels);
-            ArrayItem.Assign(animation.samplers);
+            _ArrayItem.Assign(animation.channels);
+            _ArrayItem.Assign(animation.samplers);
 
 
             for (const channel of animation.channels) {
             for (const channel of animation.channels) {
                 promises.push(this._loadAnimationChannelAsync(`${context}/channels/${channel._index}`, context, animation, channel, babylonAnimationGroup));
                 promises.push(this._loadAnimationChannelAsync(`${context}/channels/${channel._index}`, context, animation, channel, babylonAnimationGroup));
@@ -888,7 +879,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadAnimationChannelAsync(context: string, animationContext: string, animation: ILoaderAnimation, channel: ILoaderAnimationChannel, babylonAnimationGroup: AnimationGroup): Promise<void> {
+        private _loadAnimationChannelAsync(context: string, animationContext: string, animation: _ILoaderAnimation, channel: _ILoaderAnimationChannel, babylonAnimationGroup: AnimationGroup): Promise<void> {
             const targetNode = GLTFLoader._GetProperty(`${context}/target/node`, this._gltf.nodes, channel.target.node);
             const targetNode = GLTFLoader._GetProperty(`${context}/target/node`, this._gltf.nodes, channel.target.node);
             if (!targetNode._babylonMesh) {
             if (!targetNode._babylonMesh) {
                 return Promise.resolve();
                 return Promise.resolve();
@@ -1039,7 +1030,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadAnimationSamplerAsync(context: string, sampler: ILoaderAnimationSampler): Promise<ILoaderAnimationSamplerData> {
+        private _loadAnimationSamplerAsync(context: string, sampler: _ILoaderAnimationSampler): Promise<_ILoaderAnimationSamplerData> {
             if (sampler._data) {
             if (sampler._data) {
                 return sampler._data;
                 return sampler._data;
             }
             }
@@ -1056,31 +1047,24 @@ module BABYLON.GLTF2 {
                 }
                 }
             }
             }
 
 
-            let inputData: Nullable<Float32Array>;
-            let outputData: Nullable<Float32Array>;
-
             const inputAccessor = GLTFLoader._GetProperty(`${context}/input`, this._gltf.accessors, sampler.input);
             const inputAccessor = GLTFLoader._GetProperty(`${context}/input`, this._gltf.accessors, sampler.input);
             const outputAccessor = GLTFLoader._GetProperty(`${context}/output`, this._gltf.accessors, sampler.output);
             const outputAccessor = GLTFLoader._GetProperty(`${context}/output`, this._gltf.accessors, sampler.output);
 
 
             sampler._data = Promise.all([
             sampler._data = Promise.all([
-                this._loadAccessorAsync(`#/accessors/${inputAccessor._index}`, inputAccessor).then(data => {
-                    inputData = data as Float32Array;
-                }),
-                this._loadAccessorAsync(`#/accessors/${outputAccessor._index}`, outputAccessor).then(data => {
-                    outputData = data as Float32Array;
-                })
-            ]).then(() => {
+                this._loadFloatAccessorAsync(`#/accessors/${inputAccessor._index}`, inputAccessor),
+                this._loadFloatAccessorAsync(`#/accessors/${outputAccessor._index}`, outputAccessor)
+            ]).then(([inputData, outputData]) => {
                 return {
                 return {
-                    input: inputData!,
+                    input: inputData,
                     interpolation: interpolation,
                     interpolation: interpolation,
-                    output: outputData!,
+                    output: outputData,
                 };
                 };
             });
             });
 
 
             return sampler._data;
             return sampler._data;
         }
         }
 
 
-        private _loadBufferAsync(context: string, buffer: ILoaderBuffer): Promise<ArrayBufferView> {
+        private _loadBufferAsync(context: string, buffer: _ILoaderBuffer): Promise<ArrayBufferView> {
             if (buffer._data) {
             if (buffer._data) {
                 return buffer._data;
                 return buffer._data;
             }
             }
@@ -1094,16 +1078,14 @@ module BABYLON.GLTF2 {
             return buffer._data;
             return buffer._data;
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView> {
+        /** @hidden */
+        public _loadBufferViewAsync(context: string, bufferView: _ILoaderBufferView): Promise<ArrayBufferView> {
             if (bufferView._data) {
             if (bufferView._data) {
                 return bufferView._data;
                 return bufferView._data;
             }
             }
 
 
-            const buffer = GLTFLoader._GetProperty(context + "/buffer", this._gltf.buffers, bufferView.buffer);
-            bufferView._data = this._loadBufferAsync("#/buffers/" + buffer._index, buffer).then(data => {
+            const buffer = GLTFLoader._GetProperty(`${context}/buffer`, this._gltf.buffers, bufferView.buffer);
+            bufferView._data = this._loadBufferAsync(`#/buffers/${buffer._index}`, buffer).then(data => {
                 try {
                 try {
                     return new Uint8Array(data.buffer, data.byteOffset + (bufferView.byteOffset || 0), bufferView.byteLength);
                     return new Uint8Array(data.buffer, data.byteOffset + (bufferView.byteOffset || 0), bufferView.byteLength);
                 }
                 }
@@ -1115,58 +1097,83 @@ module BABYLON.GLTF2 {
             return bufferView._data;
             return bufferView._data;
         }
         }
 
 
-        private _loadAccessorAsync(context: string, accessor: ILoaderAccessor): Promise<ArrayBufferView> {
-            if (accessor.sparse) {
-                throw new Error(`${context}: Sparse accessors are not currently supported`);
+        private _loadIndicesAccessorAsync(context: string, accessor: _ILoaderAccessor): Promise<IndicesArray> {
+            if (accessor.type !== AccessorType.SCALAR) {
+                throw new Error(`${context}: Invalid type ${accessor.type}`);
+            }
+
+            if (accessor.componentType !== AccessorComponentType.UNSIGNED_BYTE &&
+                accessor.componentType !== AccessorComponentType.UNSIGNED_SHORT &&
+                accessor.componentType !== AccessorComponentType.UNSIGNED_INT) {
+                throw new Error(`${context}: Invalid component type ${accessor.componentType}`);
             }
             }
 
 
             if (accessor._data) {
             if (accessor._data) {
-                return accessor._data;
+                return accessor._data as Promise<IndicesArray>;
             }
             }
 
 
-            const bufferView = GLTFLoader._GetProperty(context + "/bufferView", this._gltf.bufferViews, accessor.bufferView);
-            accessor._data = this._loadBufferViewAsync("#/bufferViews/" + bufferView._index, bufferView).then(data => {
-                const buffer = data.buffer;
-                const byteOffset = data.byteOffset + (accessor.byteOffset || 0);
-                const length = GLTFLoader._GetNumComponents(context, accessor.type) * accessor.count;
+            const bufferView = GLTFLoader._GetProperty(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);
+            accessor._data = this._loadBufferViewAsync(`#/bufferViews/${bufferView._index}`, bufferView).then(data => {
+                return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, accessor.count);
+            });
 
 
-                try {
-                    switch (accessor.componentType) {
-                        case AccessorComponentType.BYTE: {
-                            return new Int8Array(buffer, byteOffset, length);
-                        }
-                        case AccessorComponentType.UNSIGNED_BYTE: {
-                            return new Uint8Array(buffer, byteOffset, length);
-                        }
-                        case AccessorComponentType.SHORT: {
-                            return new Int16Array(buffer, byteOffset, length);
-                        }
-                        case AccessorComponentType.UNSIGNED_SHORT: {
-                            return new Uint16Array(buffer, byteOffset, length);
-                        }
-                        case AccessorComponentType.UNSIGNED_INT: {
-                            return new Uint32Array(buffer, byteOffset, length);
-                        }
-                        case AccessorComponentType.FLOAT: {
-                            return new Float32Array(buffer, byteOffset, length);
-                        }
-                        default: {
-                            throw new Error(`${context}: Invalid accessor component type ${accessor.componentType}`);
+            return accessor._data as Promise<IndicesArray>;
+        }
+
+        private _loadFloatAccessorAsync(context: string, accessor: _ILoaderAccessor): Promise<Float32Array> {
+            // TODO: support normalized and stride
+
+            if (accessor.componentType !== AccessorComponentType.FLOAT) {
+                throw new Error(`Invalid component type ${accessor.componentType}`);
+            }
+
+            if (accessor._data) {
+                return accessor._data as Promise<Float32Array>;
+            }
+
+            const numComponents = GLTFLoader._GetNumComponents(context, accessor.type);
+            const length = numComponents * accessor.count;
+
+            if (accessor.bufferView == undefined) {
+                accessor._data = Promise.resolve(new Float32Array(length));
+            }
+            else {
+                const bufferView = GLTFLoader._GetProperty(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);
+                accessor._data = this._loadBufferViewAsync(`#/bufferViews/${bufferView._index}`, bufferView).then(data => {
+                    return GLTFLoader._GetTypedArray(context, accessor.componentType, data, accessor.byteOffset, length);
+                });
+            }
+
+            if (accessor.sparse) {
+                const sparse = accessor.sparse;
+                accessor._data = accessor._data.then((data: Float32Array) => {
+                    const indicesBufferView = GLTFLoader._GetProperty(`${context}/sparse/indices/bufferView`, this._gltf.bufferViews, sparse.indices.bufferView);
+                    const valuesBufferView = GLTFLoader._GetProperty(`${context}/sparse/values/bufferView`, this._gltf.bufferViews, sparse.values.bufferView);
+                    return Promise.all([
+                        this._loadBufferViewAsync(`#/bufferViews/${indicesBufferView._index}`, indicesBufferView),
+                        this._loadBufferViewAsync(`#/bufferViews/${valuesBufferView._index}`, valuesBufferView)
+                    ]).then(([indicesData, valuesData]) => {
+                        const indices = GLTFLoader._GetTypedArray(`${context}/sparse/indices`, sparse.indices.componentType, indicesData, sparse.indices.byteOffset, sparse.count) as IndicesArray;
+                        const values = GLTFLoader._GetTypedArray(`${context}/sparse/values`, accessor.componentType, valuesData, sparse.values.byteOffset, numComponents * sparse.count) as Float32Array;
+
+                        let valuesIndex = 0;
+                        for (let indicesIndex = 0; indicesIndex < indices.length; indicesIndex++) {
+                            let dataIndex = indices[indicesIndex] * numComponents;
+                            for (let componentIndex = 0; componentIndex < numComponents; componentIndex++) {
+                                data[dataIndex++] = values[valuesIndex++];
+                            }
                         }
                         }
-                    }
-                }
-                catch (e) {
-                    throw new Error(`${context}: ${e}`);
-                }
-            });
 
 
-            return accessor._data;
+                        return data;
+                    });
+                });
+            }
+
+            return accessor._data as Promise<Float32Array>;
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer> {
+        /** @hidden */
+        public _loadVertexBufferViewAsync(context: string, bufferView: _ILoaderBufferView, kind: string): Promise<Buffer> {
             if (bufferView._babylonBuffer) {
             if (bufferView._babylonBuffer) {
                 return bufferView._babylonBuffer;
                 return bufferView._babylonBuffer;
             }
             }
@@ -1178,21 +1185,24 @@ module BABYLON.GLTF2 {
             return bufferView._babylonBuffer;
             return bufferView._babylonBuffer;
         }
         }
 
 
-        private _loadVertexAccessorAsync(context: string, accessor: ILoaderAccessor, kind: string): Promise<VertexBuffer> {
-            if (accessor.sparse) {
-                throw new Error(`${context}: Sparse accessors are not currently supported`);
-            }
-
+        private _loadVertexAccessorAsync(context: string, accessor: _ILoaderAccessor, kind: string): Promise<VertexBuffer> {
             if (accessor._babylonVertexBuffer) {
             if (accessor._babylonVertexBuffer) {
                 return accessor._babylonVertexBuffer;
                 return accessor._babylonVertexBuffer;
             }
             }
 
 
-            const bufferView = GLTFLoader._GetProperty(context + "/bufferView", this._gltf.bufferViews, accessor.bufferView);
-            accessor._babylonVertexBuffer = this._loadVertexBufferViewAsync("#/bufferViews/" + bufferView._index, bufferView, kind).then(buffer => {
-                const size = GLTFLoader._GetNumComponents(context, accessor.type);
-                return new VertexBuffer(this._babylonScene.getEngine(), buffer, kind, false, false, bufferView.byteStride,
-                    false, accessor.byteOffset, size, accessor.componentType, accessor.normalized, true);
-            });
+            if (accessor.sparse) {
+                accessor._babylonVertexBuffer = this._loadFloatAccessorAsync(context, accessor).then(data => {
+                    return new VertexBuffer(this._babylonScene.getEngine(), data, kind, false);
+                });
+            }
+            else {
+                const bufferView = GLTFLoader._GetProperty(context + "/bufferView", this._gltf.bufferViews, accessor.bufferView);
+                accessor._babylonVertexBuffer = this._loadVertexBufferViewAsync("#/bufferViews/" + bufferView._index, bufferView, kind).then(buffer => {
+                    const size = GLTFLoader._GetNumComponents(context, accessor.type);
+                    return new VertexBuffer(this._babylonScene.getEngine(), buffer, kind, false, false, bufferView.byteStride,
+                        false, accessor.byteOffset, size, accessor.componentType, accessor.normalized, true);
+                });
+            }
 
 
             return accessor._babylonVertexBuffer;
             return accessor._babylonVertexBuffer;
         }
         }
@@ -1210,7 +1220,7 @@ module BABYLON.GLTF2 {
             return babylonMaterial;
             return babylonMaterial;
         }
         }
 
 
-        private _loadMaterialMetallicRoughnessPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             // Ensure metallic workflow
             // Ensure metallic workflow
@@ -1252,10 +1262,8 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void> {
+        /** @hidden */
+        public _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void> {
             const promise = GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
             const promise = GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
             if (promise) {
             if (promise) {
                 return promise;
                 return promise;
@@ -1289,20 +1297,16 @@ module BABYLON.GLTF2 {
             return babylonData.loaded;
             return babylonData.loaded;
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T {
+        /** @hidden */
+        public _createMaterial<T extends Material>(type: _MaterialConstructor<T>, name: string, drawMode: number): T {
             const babylonMaterial = new type(name, this._babylonScene);
             const babylonMaterial = new type(name, this._babylonScene);
             babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;
             babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;
             babylonMaterial.fillMode = drawMode;
             babylonMaterial.fillMode = drawMode;
             return babylonMaterial;
             return babylonMaterial;
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
+        /** @hidden */
+        public _loadMaterialBasePropertiesAsync(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<Promise<void>>();
             const promises = new Array<Promise<void>>();
 
 
             babylonMaterial.emissiveColor = material.emissiveFactor ? Color3.FromArray(material.emissiveFactor) : new Color3(0, 0, 0);
             babylonMaterial.emissiveColor = material.emissiveFactor ? Color3.FromArray(material.emissiveFactor) : new Color3(0, 0, 0);
@@ -1343,10 +1347,8 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        /**
-        * @ignore
-        */
-        public _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void {
+        /** @hidden */
+        public _loadMaterialAlphaProperties(context: string, material: _ILoaderMaterial, babylonMaterial: PBRMaterial): void {
             const alphaMode = material.alphaMode || MaterialAlphaMode.OPAQUE;
             const alphaMode = material.alphaMode || MaterialAlphaMode.OPAQUE;
             switch (alphaMode) {
             switch (alphaMode) {
                 case MaterialAlphaMode.OPAQUE: {
                 case MaterialAlphaMode.OPAQUE: {
@@ -1375,9 +1377,7 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        /**
-        * @ignore
-        */
+        /** @hidden */
         public _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void> {
         public _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void> {
             const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index);
             const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index);
             context = `#/textures/${textureInfo.index}`;
             context = `#/textures/${textureInfo.index}`;
@@ -1415,7 +1415,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _loadSampler(context: string, sampler: ILoaderSampler): ILoaderSamplerData {
+        private _loadSampler(context: string, sampler: _ILoaderSampler): _ILoaderSamplerData {
             if (!sampler._data) {
             if (!sampler._data) {
                 sampler._data = {
                 sampler._data = {
                     noMipMaps: (sampler.minFilter === TextureMinFilter.NEAREST || sampler.minFilter === TextureMinFilter.LINEAR),
                     noMipMaps: (sampler.minFilter === TextureMinFilter.NEAREST || sampler.minFilter === TextureMinFilter.LINEAR),
@@ -1428,7 +1428,7 @@ module BABYLON.GLTF2 {
             return sampler._data;
             return sampler._data;
         }
         }
 
 
-        private _loadImageAsync(context: string, image: ILoaderImage): Promise<string> {
+        private _loadImageAsync(context: string, image: _ILoaderImage): Promise<string> {
             if (image._objectURL) {
             if (image._objectURL) {
                 return image._objectURL;
                 return image._objectURL;
             }
             }
@@ -1449,9 +1449,7 @@ module BABYLON.GLTF2 {
             return image._objectURL;
             return image._objectURL;
         }
         }
 
 
-        /**
-        * @ignore
-        */
+        /** @hidden */
         public _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView> {
         public _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView> {
             const promise = GLTFLoaderExtension._LoadUriAsync(this, context, uri);
             const promise = GLTFLoaderExtension._LoadUriAsync(this, context, uri);
             if (promise) {
             if (promise) {
@@ -1516,9 +1514,7 @@ module BABYLON.GLTF2 {
             this._progressCallback(new SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             this._progressCallback(new SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
         }
         }
 
 
-        /**
-        * @ignore
-        */
+        /** @hidden */
         public static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T {
         public static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T {
             if (!array || index == undefined || !array[index]) {
             if (!array || index == undefined || !array[index]) {
                 throw new Error(`${context}: Failed to find index (${index})`);
                 throw new Error(`${context}: Failed to find index (${index})`);
@@ -1578,6 +1574,26 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
+        private static _GetTypedArray(context: string, componentType: AccessorComponentType, bufferView: ArrayBufferView, byteOffset: number | undefined, length: number): ArrayBufferView {
+            const buffer = bufferView.buffer;
+            byteOffset = bufferView.byteOffset + (byteOffset || 0);
+
+            try {
+                switch (componentType) {
+                    case AccessorComponentType.BYTE: return new Int8Array(buffer, byteOffset, length);
+                    case AccessorComponentType.UNSIGNED_BYTE: return new Uint8Array(buffer, byteOffset, length);
+                    case AccessorComponentType.SHORT: return new Int16Array(buffer, byteOffset, length);
+                    case AccessorComponentType.UNSIGNED_SHORT: return new Uint16Array(buffer, byteOffset, length);
+                    case AccessorComponentType.UNSIGNED_INT: return new Uint32Array(buffer, byteOffset, length);
+                    case AccessorComponentType.FLOAT: return new Float32Array(buffer, byteOffset, length);
+                    default: throw new Error(`Invalid component type ${componentType}`);
+                }
+            }
+            catch (e) {
+                throw new Error(`${context}: ${e}`);
+            }
+        }
+
         private static _GetNumComponents(context: string, type: string): number {
         private static _GetNumComponents(context: string, type: string): number {
             switch (type) {
             switch (type) {
                 case "SCALAR": return 1;
                 case "SCALAR": return 1;
@@ -1691,9 +1707,7 @@ module BABYLON.GLTF2 {
             this.onMaterialLoadedObservable.clear();
             this.onMaterialLoadedObservable.clear();
         }
         }
 
 
-        /**
-        * @ignore
-        */
+        /** @hidden */
         public _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>) {
         public _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>) {
             for (const name of GLTFLoader._Names) {
             for (const name of GLTFLoader._Names) {
                 const extension = this._extensions[name];
                 const extension = this._extensions[name];

+ 15 - 9
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts

@@ -2,7 +2,7 @@
 
 
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
     /**
     /**
-     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     * Abstract class that can be implemented to extend existing glTF loader behavior.
      */
      */
     export abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
     export abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         public enabled = true;
         public enabled = true;
@@ -21,16 +21,16 @@ module BABYLON.GLTF2 {
         // #region Overridable Methods
         // #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. */
-        protected _loadSceneAsync(context: string, node: ILoaderScene): Nullable<Promise<void>> { return null; }
+        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. */
-        protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> { return null; }
+        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. */
         /** 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; }
+        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. */
-        protected _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> { return null; }
+        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 uris. */
         /** Override this method to modify the default behavior for loading uris. */
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>> { return null; }
         protected _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>> { return null; }
@@ -63,22 +63,22 @@ 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. */
-        public static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: ILoaderScene): Nullable<Promise<void>> {
+        public static _LoadSceneAsync(loader: GLTFLoader, context: string, scene: _ILoaderScene): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadSceneAsync(context, scene));
             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. */
-        public static _LoadNodeAsync(loader: GLTFLoader, context: string, node: ILoaderNode): Nullable<Promise<void>> {
+        public static _LoadNodeAsync(loader: GLTFLoader, context: string, node: _ILoaderNode): Nullable<Promise<void>> {
             return loader._applyExtensions(extension => extension._loadNodeAsync(context, node));
             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. */
-        public static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
+        public static _LoadVertexDataAsync(loader: GLTFLoader, context: string, primitive: _ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
             return loader._applyExtensions(extension => extension._loadVertexDataAsync(context, primitive, babylonMesh));
             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. */
-        public static _LoadMaterialAsync(loader: GLTFLoader, context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> {
+        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));
             return loader._applyExtensions(extension => extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign));
         }
         }
 
 
@@ -87,4 +87,10 @@ module BABYLON.GLTF2 {
             return loader._applyExtensions(extension => extension._loadUriAsync(context, uri));
             return loader._applyExtensions(extension => extension._loadUriAsync(context, uri));
         }
         }
     }
     }
+}
+
+/**
+ * Defines the module of the glTF loader extensions.
+ */
+module BABYLON.GLTF2.Extensions {
 }
 }

+ 59 - 100
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -1,82 +1,59 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 
 
-/**
- * GLTF2 module for babylon
- */
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
-    /**
-     * Interface to access data and vertex buffer associated with a file
-     */
-    export interface ILoaderAccessor extends IAccessor, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderAccessor extends IAccessor, _IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
     }
 
 
-    /**
-     * Loader's animation channel
-     */
-    export interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderAnimationChannel extends IAnimationChannel, _IArrayItem {
     }
     }
 
 
-    /**
-     * Container for animation keyframe data
-     */
-    export interface ILoaderAnimationSamplerData {
+    /** @hidden */
+    export interface _ILoaderAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
     }
     }
 
 
-    /**
-     * Keyframe data
-     */
-    export interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
-        _data: Promise<ILoaderAnimationSamplerData>;
+    /** @hidden */
+    export interface _ILoaderAnimationSampler extends IAnimationSampler, _IArrayItem {
+        _data: Promise<_ILoaderAnimationSamplerData>;
     }
     }
 
 
-    /**
-     * Loader animation
-     */
-    export interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    /** @hidden */
+    export interface _ILoaderAnimation extends IAnimation, _IArrayItem {
+        channels: _ILoaderAnimationChannel[];
+        samplers: _ILoaderAnimationSampler[];
 
 
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
     }
     }
 
 
-    /**
-     * Loader buffer
-     */
-    export interface ILoaderBuffer extends IBuffer, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderBuffer extends IBuffer, _IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
 
 
-    /**
-     * Loader's buffer data
-     */
-    export interface ILoaderBufferView extends IBufferView, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderBufferView extends IBufferView, _IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
         _babylonBuffer?: Promise<Buffer>;
     }
     }
 
 
-    /**
-     * Loader's loaded camera data
-     */
-    export interface ILoaderCamera extends ICamera, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderCamera extends ICamera, _IArrayItem {
     }
     }
 
 
-    /**
-     * Loaded image specified by url
-     */
-    export interface ILoaderImage extends IImage, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderImage extends IImage, _IArrayItem {
         _objectURL?: Promise<string>;
         _objectURL?: Promise<string>;
     }
     }
 
 
-    /**
-     * Loaded material data
-     */
-    export interface ILoaderMaterial extends IMaterial, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderMaterial extends IMaterial, _IArrayItem {
         _babylonData?: {
         _babylonData?: {
             [drawMode: number]: {
             [drawMode: number]: {
                 material: Material;
                 material: Material;
@@ -86,83 +63,65 @@ module BABYLON.GLTF2 {
         };
         };
     }
     }
 
 
-    /**
-     * Loader mesh data
-     */
-    export interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    /** @hidden */
+    export interface _ILoaderMesh extends IMesh, _IArrayItem {
+        primitives: _ILoaderMeshPrimitive[];
     }
     }
 
 
-    /**
-     * Loader mesh data
-     */
-    export interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderMeshPrimitive extends IMeshPrimitive, _IArrayItem {
     }
     }
 
 
-    /**
-     * Node for traversing loader data
-     */
-    export interface ILoaderNode extends INode, IArrayItem {
-        _parent: ILoaderNode;
+    /** @hidden */
+    export interface _ILoaderNode extends INode, _IArrayItem {
+        _parent: _ILoaderNode;
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
         _primitiveBabylonMeshes?: Mesh[];
         _primitiveBabylonMeshes?: Mesh[];
         _babylonAnimationTargets?: Node[];
         _babylonAnimationTargets?: Node[];
         _numMorphTargets?: number;
         _numMorphTargets?: number;
     }
     }
 
 
-    /**
-     * Sampler data
-     */
-    export interface ILoaderSamplerData {
+    /** @hidden */
+    export interface _ILoaderSamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
         wrapV: number;
         wrapV: number;
     }
     }
 
 
-    /**
-     * Sampler data
-     */
-    export interface ILoaderSampler extends ISampler, IArrayItem {
-        _data?: ILoaderSamplerData;
+    /** @hidden */
+    export interface _ILoaderSampler extends ISampler, _IArrayItem {
+        _data?: _ILoaderSamplerData;
     }
     }
 
 
-    /**
-     * Loader's scene
-     */
-    export interface ILoaderScene extends IScene, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderScene extends IScene, _IArrayItem {
     }
     }
 
 
-    /**
-     * Loader's skeleton data
-     */
-    export interface ILoaderSkin extends ISkin, IArrayItem {
+    /** @hidden */
+    export interface _ILoaderSkin extends ISkin, _IArrayItem {
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
         _loaded?: Promise<void>;
     }
     }
 
 
-    /**
-     * Loader's texture
-     */
-    export interface ILoaderTexture extends ITexture, IArrayItem {
-    }
-
-    /**
-     * Loaded GLTF data
-     */
-    export interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    /** @hidden */
+    export interface _ILoaderTexture extends ITexture, _IArrayItem {
+    }
+
+    /** @hidden */
+    export interface _ILoaderGLTF extends IGLTF {
+        accessors?: _ILoaderAccessor[];
+        animations?: _ILoaderAnimation[];
+        buffers?: _ILoaderBuffer[];
+        bufferViews?: _ILoaderBufferView[];
+        cameras?: _ILoaderCamera[];
+        images?: _ILoaderImage[];
+        materials?: _ILoaderMaterial[];
+        meshes?: _ILoaderMesh[];
+        nodes?: _ILoaderNode[];
+        samplers?: _ILoaderSampler[];
+        scenes?: _ILoaderScene[];
+        skins?: _ILoaderSkin[];
+        textures?: _ILoaderTexture[];
     }
     }
 }
 }

+ 7 - 6
loaders/src/glTF/2.0/babylon.glTFLoaderUtilities.ts

@@ -1,14 +1,15 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
-    /** Array item which contains it's index in an array */
-    export interface IArrayItem {
+    /** @hidden */
+    export interface _IArrayItem {
         _index: number;
         _index: number;
     }
     }
-    /** Array item helper methods */
-    export class ArrayItem {
-        /** Sets the index of each array element to its index in the array */
-        public static Assign(values?: IArrayItem[]): void {
+
+    /** @hidden */
+    export class _ArrayItem {
+        /** @hidden */
+        public static Assign(values?: _IArrayItem[]): void {
             if (values) {
             if (values) {
                 for (let index = 0; index < values.length; index++) {
                 for (let index = 0; index < values.length; index++) {
                     values[index]._index = index;
                     values[index]._index = index;

+ 126 - 98
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -2,8 +2,8 @@
 
 
 module BABYLON {
 module BABYLON {
     /**
     /**
-    * Coordinate system mode that will be used when loading from the gltf file
-    */
+     * Mode that determines the coordinate system to use.
+     */
     export enum GLTFLoaderCoordinateSystemMode {
     export enum GLTFLoaderCoordinateSystemMode {
         /**
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -17,8 +17,8 @@ module BABYLON {
     }
     }
 
 
     /**
     /**
-    * Animation mode that determines which animations should be started when a file is loaded
-    */
+     * Mode that determines what animations will start.
+     */
     export enum GLTFLoaderAnimationStartMode {
     export enum GLTFLoaderAnimationStartMode {
         /**
         /**
          * No animation will start.
          * No animation will start.
@@ -37,22 +37,23 @@ module BABYLON {
     }
     }
 
 
     /**
     /**
-    * Loaded gltf data
-    */
+     * Interface that contains the data for the glTF asset.
+     */
     export interface IGLTFLoaderData {
     export interface IGLTFLoaderData {
         /**
         /**
-        * Loaded json string converted to an object
-        */
+         * JSON that represents the glTF.
+         */
         json: Object;
         json: Object;
+
         /**
         /**
-        * Loaded ArrayBufferView
-        */
+         * The BIN chunk of a binary glTF
+         */
         bin: Nullable<ArrayBufferView>;
         bin: Nullable<ArrayBufferView>;
     }
     }
 
 
     /**
     /**
-    * Gltf extension interface
-    */
+     * Interface for extending the loader.
+     */
     export interface IGLTFLoaderExtension {
     export interface IGLTFLoaderExtension {
         /**
         /**
          * The name of this extension.
          * The name of this extension.
@@ -60,14 +61,14 @@ module BABYLON {
         readonly name: string;
         readonly name: string;
 
 
         /**
         /**
-         * Whether this extension is enabled.
+         * Defines whether this extension is enabled.
          */
          */
         enabled: boolean;
         enabled: boolean;
     }
     }
 
 
     /**
     /**
-    * Loading state
-    */
+     * Loader state.
+     */
     export enum GLTFLoaderState {
     export enum GLTFLoaderState {
         /**
         /**
          * The asset is loading.
          * The asset is loading.
@@ -86,87 +87,109 @@ module BABYLON {
     }
     }
 
 
     /**
     /**
-    * GLTF loader interface
-    */
+     * Loader interface.
+     */
     export interface IGLTFLoader extends IDisposable {
     export interface IGLTFLoader extends IDisposable {
         /**
         /**
-        * Coordinate system that will be used when loading from the gltf file
-        */
+         * Mode that determines the coordinate system to use.
+         */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+
         /**
         /**
-        * Animation mode that determines which animations should be started when a file is loaded
-        */
+         * Mode that determines what animations will start.
+         */
         animationStartMode: GLTFLoaderAnimationStartMode;
         animationStartMode: GLTFLoaderAnimationStartMode;
+
         /**
         /**
-        * If the materials in the file should automatically be compiled
-        */
+         * Defines if the loader should compile materials.
+         */
         compileMaterials: boolean;
         compileMaterials: boolean;
+
         /**
         /**
-        * If a clip plane should be usede when loading meshes in the file
-        */
+         * Defines if the loader should also compile materials with clip planes.
+         */
         useClipPlane: boolean;
         useClipPlane: boolean;
+
         /**
         /**
-        * If shadow generators should automatically be compiled
-        */
+         * Defines if the loader should compile shadow generators.
+         */
         compileShadowGenerators: boolean;
         compileShadowGenerators: boolean;
 
 
         /**
         /**
-        * Observable that fires each time a mesh is loaded
-        */
+         * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+         */
         onMeshLoadedObservable: Observable<AbstractMesh>;
         onMeshLoadedObservable: Observable<AbstractMesh>;
+
         /**
         /**
-        * Observable that fires each time a texture is loaded
-        */
+         * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
+         */
         onTextureLoadedObservable: Observable<BaseTexture>;
         onTextureLoadedObservable: Observable<BaseTexture>;
-         /**
-        * Observable that fires each time a material is loaded
-        */
+
+        /**
+         * Observable raised when the loader creates a material after parsing the glTF properties of the material.
+         */
         onMaterialLoadedObservable: Observable<Material>;
         onMaterialLoadedObservable: Observable<Material>;
+
         /**
         /**
-        * Observable that fires when the load has completed
-        */
+         * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
+         * For assets with LODs, raised when all of the LODs are complete.
+         * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
+         */
         onCompleteObservable: Observable<IGLTFLoader>;
         onCompleteObservable: Observable<IGLTFLoader>;
+
         /**
         /**
-        * Observable that fires when the loader is disposed
-        */
+         * Observable raised after the loader is disposed.
+         */
         onDisposeObservable: Observable<IGLTFLoader>;
         onDisposeObservable: Observable<IGLTFLoader>;
+
         /**
         /**
-        * Observable that fire when an extension is loaded
-        */
+         * Observable raised after a loader extension is created.
+         * Set additional options for a loader extension in this event.
+         */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
 
 
         /**
         /**
-        * Loader state
-        */
+         * Loader state or null if the loader is not active.
+         */
         state: Nullable<GLTFLoaderState>;
         state: Nullable<GLTFLoaderState>;
 
 
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        */
+         * Imports meshes from the given data and adds them to the scene.
+         */
         importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }>;
         importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }>;
+
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        */
+         * Loads all objects from the given data and adds them to the scene.
+         */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
     }
-    /** File loader to load gltf files into a babylon scene */
+
+    /**
+     * File loader for loading glTF files into a scene.
+     */
     export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
     export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
-        /** Creates a gltf 1.0 file loader */
+        /**
+         * Factory function that creates a glTF 1.0 loader
+         */
         public static CreateGLTFLoaderV1: () => IGLTFLoader;
         public static CreateGLTFLoaderV1: () => IGLTFLoader;
-        /** Creates a gltf 2.0 file loader */
+
+        /**
+         * Factory function that creates a glTF 2.0 loader
+         */
         public static CreateGLTFLoaderV2: () => IGLTFLoader;
         public static CreateGLTFLoaderV2: () => IGLTFLoader;
 
 
         // #region Common options
         // #region Common options
 
 
         /**
         /**
-         * Raised when the asset has been parsed.
-         * The data.json property stores the glTF JSON.
-         * The data.bin property stores the BIN chunk from a glTF binary or null if the input is not a glTF binary.
+         * Raised when the asset has been parsed
          */
          */
         public onParsedObservable = new Observable<IGLTFLoaderData>();
         public onParsedObservable = new Observable<IGLTFLoaderData>();
 
 
         private _onParsedObserver: Nullable<Observer<IGLTFLoaderData>>;
         private _onParsedObserver: Nullable<Observer<IGLTFLoaderData>>;
-        /** Raised when the asset has been parsed. */
+
+        /**
+         * Raised when the asset has been parsed
+         */
         public set onParsed(callback: (loaderData: IGLTFLoaderData) => void) {
         public set onParsed(callback: (loaderData: IGLTFLoaderData) => void) {
             if (this._onParsedObserver) {
             if (this._onParsedObserver) {
                 this.onParsedObservable.remove(this._onParsedObserver);
                 this.onParsedObservable.remove(this._onParsedObserver);
@@ -177,13 +200,17 @@ module BABYLON {
         // #endregion
         // #endregion
 
 
         // #region V1 options
         // #region V1 options
+
         /**
         /**
-         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders.
+         * Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled.
+         * Defaults to true.
          */
          */
         public static IncrementalLoading = true;
         public static IncrementalLoading = true;
 
 
         /**
         /**
-         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters.
+         * Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates.
          */
          */
         public static HomogeneousCoordinates = false;
         public static HomogeneousCoordinates = false;
 
 
@@ -192,43 +219,39 @@ module BABYLON {
         // #region V2 options
         // #region V2 options
 
 
         /**
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED). Defaults to AUTO.
-         * - AUTO - Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
-         * - FORCE_RIGHT_HANDED - Sets the useRightHandedSystem flag on the scene.
+         * The coordinate system mode. Defaults to AUTO.
          */
          */
         public coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
         public coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
 
 
         /**
         /**
-        * The animation start mode (NONE, FIRST, ALL). Defaults to FIRST.
-        * - NONE - No animation will start.
-        * - FIRST - The first animation will start.
-        * - ALL - All animations will start.
+        * The animation start mode. Defaults to FIRST.
         */
         */
         public animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
         public animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
 
 
         /**
         /**
-         * Set to true to compile materials before raising the success callback. Defaults to false.
+         * Defines if the loader should compile materials before raising the success callback. Defaults to false.
          */
          */
         public compileMaterials = false;
         public compileMaterials = false;
 
 
         /**
         /**
-         * Set to true to also compile materials with clip planes. Defaults to false.
+         * Defines if the loader should also compile materials with clip planes. Defaults to false.
          */
          */
         public useClipPlane = false;
         public useClipPlane = false;
 
 
         /**
         /**
-         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
+         * Defines if the loader should compile shadow generators before raising the success callback. Defaults to false.
          */
          */
         public compileShadowGenerators = false;
         public compileShadowGenerators = false;
 
 
         /**
         /**
-         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh.
+         * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
          */
          */
         public readonly onMeshLoadedObservable = new Observable<AbstractMesh>();
         public readonly onMeshLoadedObservable = new Observable<AbstractMesh>();
 
 
         private _onMeshLoadedObserver: Nullable<Observer<AbstractMesh>>;
         private _onMeshLoadedObserver: Nullable<Observer<AbstractMesh>>;
+
         /**
         /**
-         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a mesh after parsing the glTF properties of the mesh.
          */
          */
         public set onMeshLoaded(callback: (mesh: AbstractMesh) => void) {
         public set onMeshLoaded(callback: (mesh: AbstractMesh) => void) {
             if (this._onMeshLoadedObserver) {
             if (this._onMeshLoadedObserver) {
@@ -238,13 +261,14 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * Raised when the loader creates a texture after parsing the glTF properties of the texture.
+         * Observable raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
          */
         public readonly onTextureLoadedObservable = new Observable<BaseTexture>();
         public readonly onTextureLoadedObservable = new Observable<BaseTexture>();
 
 
         private _onTextureLoadedObserver: Nullable<Observer<BaseTexture>>;
         private _onTextureLoadedObserver: Nullable<Observer<BaseTexture>>;
+
         /**
         /**
-         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
          */
         public set onTextureLoaded(callback: (texture: BaseTexture) => void) {
         public set onTextureLoaded(callback: (texture: BaseTexture) => void) {
             if (this._onTextureLoadedObserver) {
             if (this._onTextureLoadedObserver) {
@@ -254,13 +278,14 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * Raised when the loader creates a material after parsing the glTF properties of the material.
+         * Observable raised when the loader creates a material after parsing the glTF properties of the material.
          */
          */
         public readonly onMaterialLoadedObservable = new Observable<Material>();
         public readonly onMaterialLoadedObservable = new Observable<Material>();
 
 
         private _onMaterialLoadedObserver: Nullable<Observer<Material>>;
         private _onMaterialLoadedObserver: Nullable<Observer<Material>>;
+
         /**
         /**
-         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         * Callback raised when the loader creates a material after parsing the glTF properties of the material.
          */
          */
         public set onMaterialLoaded(callback: (material: Material) => void) {
         public set onMaterialLoaded(callback: (material: Material) => void) {
             if (this._onMaterialLoadedObserver) {
             if (this._onMaterialLoadedObserver) {
@@ -270,15 +295,16 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * Raised when the asset is completely loaded, immediately before the loader is disposed.
+         * Observable raised when the asset is completely loaded, immediately before the loader is disposed.
          * For assets with LODs, raised when all of the LODs are complete.
          * For assets with LODs, raised when all of the LODs are complete.
          * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
          * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
          */
          */
         public readonly onCompleteObservable = new Observable<GLTFFileLoader>();
         public readonly onCompleteObservable = new Observable<GLTFFileLoader>();
 
 
         private _onCompleteObserver: Nullable<Observer<GLTFFileLoader>>;
         private _onCompleteObserver: Nullable<Observer<GLTFFileLoader>>;
+
         /**
         /**
-         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         * Callback raised when the asset is completely loaded, immediately before the loader is disposed.
          */
          */
         public set onComplete(callback: () => void) {
         public set onComplete(callback: () => void) {
             if (this._onCompleteObserver) {
             if (this._onCompleteObserver) {
@@ -288,13 +314,14 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-        * Raised after the loader is disposed.
-        */
+         * Observable raised after the loader is disposed.
+         */
         public readonly onDisposeObservable = new Observable<GLTFFileLoader>();
         public readonly onDisposeObservable = new Observable<GLTFFileLoader>();
 
 
         private _onDisposeObserver: Nullable<Observer<GLTFFileLoader>>;
         private _onDisposeObserver: Nullable<Observer<GLTFFileLoader>>;
+
         /**
         /**
-         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         * Callback raised after the loader is disposed.
          */
          */
         public set onDispose(callback: () => void) {
         public set onDispose(callback: () => void) {
             if (this._onDisposeObserver) {
             if (this._onDisposeObserver) {
@@ -304,14 +331,15 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * Raised after a loader extension is created.
+         * Observable raised after a loader extension is created.
          * Set additional options for a loader extension in this event.
          * Set additional options for a loader extension in this event.
          */
          */
         public readonly onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
         public readonly onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
 
 
         private _onExtensionLoadedObserver: Nullable<Observer<IGLTFLoaderExtension>>;
         private _onExtensionLoadedObserver: Nullable<Observer<IGLTFLoaderExtension>>;
+
         /**
         /**
-         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         * Callback raised after a loader extension is created.
          */
          */
         public set onExtensionLoaded(callback: (extension: IGLTFLoaderExtension) => void) {
         public set onExtensionLoaded(callback: (extension: IGLTFLoaderExtension) => void) {
             if (this._onExtensionLoadedObserver) {
             if (this._onExtensionLoadedObserver) {
@@ -322,7 +350,7 @@ module BABYLON {
 
 
         /**
         /**
          * Returns a promise that resolves when the asset is completely loaded.
          * Returns a promise that resolves when the asset is completely loaded.
-         * @returns A promise that resolves when the asset is completely loaded.
+         * @returns a promise that resolves when the asset is completely loaded.
          */
          */
         public whenCompleteAsync(): Promise<void> {
         public whenCompleteAsync(): Promise<void> {
             return new Promise(resolve => {
             return new Promise(resolve => {
@@ -333,7 +361,7 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * The loader state (LOADING, READY, COMPLETE) or null if the loader is not active.
+         * The loader state or null if the loader is not active.
          */
          */
         public get loaderState(): Nullable<GLTFLoaderState> {
         public get loaderState(): Nullable<GLTFLoaderState> {
             return this._loader ? this._loader.state : null;
             return this._loader ? this._loader.state : null;
@@ -374,14 +402,14 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-        * Imports one or more meshes from a loaded gltf file and adds them to the scene
-        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
-        * @param scene the scene the meshes should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise containg the loaded meshes, particles, skeletons and animations
-        */
+         * Imports one or more meshes from the loaded glTF data and adds them to the scene
+         * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+         * @param scene the scene the meshes should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise containg the loaded meshes, particles, skeletons and animations
+         */
         public importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
         public importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
             return Promise.resolve().then(() => {
             return Promise.resolve().then(() => {
                 const loaderData = this._parse(data);
                 const loaderData = this._parse(data);
@@ -391,13 +419,13 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-        * Imports all objects from a loaded gltf file and adds them to the scene
-        * @param scene the scene the objects should be added to
-        * @param data gltf data containing information of the meshes in a loaded file
-        * @param rootUrl root url to load from
-        * @param onProgress event that fires when loading progress has occured
-        * @returns a promise which completes when objects have been loaded to the scene
-        */
+         * Imports all objects from the loaded glTF data and adds them to the scene
+         * @param scene the scene the objects should be added to
+         * @param data the glTF data to load
+         * @param rootUrl root url to load from
+         * @param onProgress event that fires when loading progress has occured
+         * @returns a promise which completes when objects have been loaded to the scene
+         */
         public loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
         public loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return Promise.resolve().then(() => {
             return Promise.resolve().then(() => {
                 const loaderData = this._parse(data);
                 const loaderData = this._parse(data);
@@ -431,7 +459,7 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * If the data string can be loaded directly
+         * If the data string can be loaded directly.
          * @param data string contianing the file data
          * @param data string contianing the file data
          * @returns if the data can be loaded directly
          * @returns if the data can be loaded directly
          */
          */
@@ -440,12 +468,12 @@ module BABYLON {
         }
         }
 
 
         /**
         /**
-         * Rewrites a url by combining a root url and response url
+         * Rewrites a url by combining a root url and response url.
          */
          */
         public rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
         public rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
 
 
         /**
         /**
-         * Instantiates a gltf file loader plugin
+         * Instantiates a glTF file loader plugin.
          * @returns the created plugin
          * @returns the created plugin
          */
          */
         public createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync {
         public createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync {

+ 4 - 2
serializers/src/glTF/2.0/babylon.glTFExporter.ts

@@ -2,12 +2,13 @@
 
 
 /**
 /**
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
  * Module for the Babylon glTF 2.0 exporter.  Should ONLY be used internally.
- * @ignore - capitalization of GLTF2 module.
+ * @hidden - capitalization of GLTF2 module.
  */
  */
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
     /** 
     /** 
      * Utility interface for storing vertex attribute data.
      * Utility interface for storing vertex attribute data.
-    */
+     * @hidden
+     */
     interface _IVertexAttributeData {
     interface _IVertexAttributeData {
         /** 
         /** 
          * Specifies the Babylon Vertex Buffer Type (Position, Normal, Color, etc.)
          * Specifies the Babylon Vertex Buffer Type (Position, Normal, Color, etc.)
@@ -26,6 +27,7 @@ module BABYLON.GLTF2 {
     }
     }
     /**
     /**
      * Converts Babylon Scene into glTF 2.0.
      * Converts Babylon Scene into glTF 2.0.
+     * @hidden
      */
      */
     export class _Exporter {
     export class _Exporter {
         /**
         /**

+ 5 - 2
serializers/src/glTF/2.0/babylon.glTFMaterial.ts

@@ -3,7 +3,8 @@
 module BABYLON.GLTF2 {
 module BABYLON.GLTF2 {
     /** 
     /** 
      * Interface for storing specular glossiness factors.
      * Interface for storing specular glossiness factors.
-    */
+     * @hidden
+     */
     interface _IPBRSpecularGlossiness {
     interface _IPBRSpecularGlossiness {
         /** 
         /** 
          * Represents the linear diffuse factors of the material.
          * Represents the linear diffuse factors of the material.
@@ -21,7 +22,8 @@ module BABYLON.GLTF2 {
 
 
     /** 
     /** 
      * Interface for storing metallic roughness factors.
      * Interface for storing metallic roughness factors.
-    */
+     * @hidden
+     */
     interface _IPBRMetallicRoughness {
     interface _IPBRMetallicRoughness {
         /** 
         /** 
          * Represents the albedo color of the material.
          * Represents the albedo color of the material.
@@ -47,6 +49,7 @@ module BABYLON.GLTF2 {
 
 
     /**
     /**
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
      * Utility methods for working with glTF material conversion properties.  This class should only be used internally.
+     * @hidden
      */
      */
     export class _GLTFMaterial {
     export class _GLTFMaterial {
         /**
         /**

+ 8 - 8
src/Actions/babylon.action.ts

@@ -11,7 +11,7 @@
 
 
         /**
         /**
          * Internal only - manager for action
          * Internal only - manager for action
-         * @ignore 
+         * @hidden 
          */
          */
         public _actionManager: ActionManager;
         public _actionManager: ActionManager;
 
 
@@ -45,7 +45,7 @@
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public _prepare(): void {
         public _prepare(): void {
         }
         }
@@ -60,7 +60,7 @@
 
 
         /**
         /**
          * Internal only - executes current action event
          * Internal only - executes current action event
-         * @ignore 
+         * @hidden 
          */
          */
         public _executeCurrent(evt?: ActionEvent): void {
         public _executeCurrent(evt?: ActionEvent): void {
             if (this._nextActiveAction._condition) {
             if (this._nextActiveAction._condition) {
@@ -131,7 +131,7 @@
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public _getProperty(propertyPath: string): string {
         public _getProperty(propertyPath: string): string {
             return this._actionManager._getProperty(propertyPath);
             return this._actionManager._getProperty(propertyPath);
@@ -139,7 +139,7 @@
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public _getEffectiveTarget(target: any, propertyPath: string): any {
         public _getEffectiveTarget(target: any, propertyPath: string): any {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
             return this._actionManager._getEffectiveTarget(target, propertyPath);
@@ -155,7 +155,7 @@
         
         
         /**
         /**
          * Internal only called by serialize
          * Internal only called by serialize
-         * @ignore 
+         * @hidden 
          */
          */
         protected _serialize(serializedAction: any, parent?: any): any {
         protected _serialize(serializedAction: any, parent?: any): any {
             var serializationObject: any = { 
             var serializationObject: any = { 
@@ -189,7 +189,7 @@
         
         
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public static _SerializeValueAsString = (value: any): string => {
         public static _SerializeValueAsString = (value: any): string => {
             if (typeof value === "number") {
             if (typeof value === "number") {
@@ -219,7 +219,7 @@
         
         
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public static _GetTargetProperty = (target: Scene | Node) => {
         public static _GetTargetProperty = (target: Scene | Node) => {
             return {
             return {

+ 17 - 17
src/Actions/babylon.condition.ts

@@ -5,19 +5,19 @@
     export class Condition {
     export class Condition {
         /**
         /**
          * Internal only - manager for action
          * Internal only - manager for action
-         * @ignore 
+         * @hidden 
          */
          */
         public _actionManager: ActionManager;
         public _actionManager: ActionManager;
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public _evaluationId: number;
         public _evaluationId: number;
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         public _currentResult: boolean;
         public _currentResult: boolean;
 
 
@@ -39,7 +39,7 @@
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         public _getProperty(propertyPath: string): string {
         public _getProperty(propertyPath: string): string {
             return this._actionManager._getProperty(propertyPath);
             return this._actionManager._getProperty(propertyPath);
@@ -47,7 +47,7 @@
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         public _getEffectiveTarget(target: any, propertyPath: string): any {
         public _getEffectiveTarget(target: any, propertyPath: string): any {
             return this._actionManager._getEffectiveTarget(target, propertyPath);
             return this._actionManager._getEffectiveTarget(target, propertyPath);
@@ -62,7 +62,7 @@
         
         
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         protected _serialize(serializedCondition: any): any {
         protected _serialize(serializedCondition: any): any {
             return { 
             return { 
@@ -81,25 +81,25 @@
         
         
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private static _IsEqual = 0;
         private static _IsEqual = 0;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private static _IsDifferent = 1;
         private static _IsDifferent = 1;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private static _IsGreater = 2;
         private static _IsGreater = 2;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private static _IsLesser = 3;
         private static _IsLesser = 3;
 
 
@@ -133,25 +133,25 @@
 
 
         /**
         /**
          * Internal only The action manager for the condition
          * Internal only The action manager for the condition
-         * @ignore 
+         * @hidden 
          */
          */
         public _actionManager: ActionManager;
         public _actionManager: ActionManager;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private _target: any;
         private _target: any;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private _effectiveTarget: any;
         private _effectiveTarget: any;
 
 
         /**
         /**
          * Internal only 
          * Internal only 
-         * @ignore 
+         * @hidden 
          */
          */
         private _property: string;
         private _property: string;
 
 
@@ -241,7 +241,7 @@
         
         
         /**
         /**
          * Internal only - manager for action
          * Internal only - manager for action
-         * @ignore 
+         * @hidden 
          */
          */
         public _actionManager: ActionManager;
         public _actionManager: ActionManager;
 
 
@@ -272,13 +272,13 @@
         
         
         /**
         /**
          * Internal only - manager for action
          * Internal only - manager for action
-         * @ignore 
+         * @hidden 
          */
          */
         public _actionManager: ActionManager;
         public _actionManager: ActionManager;
 
 
         /**
         /**
          * Internal only
          * Internal only
-         * @ignore 
+         * @hidden 
          */
          */
         private _target: any;
         private _target: any;
 
 

+ 543 - 40
src/Animations/babylon.animation.ts

@@ -1,8 +1,27 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Represents the range of an animation
+     */
     export class AnimationRange {
     export class AnimationRange {
-        constructor(public name: string, public from: number, public to: number) {
+        /**
+         * Initializes the range of an animation
+         * @param name The name of the animation range
+         * @param from The starting frame of the animation
+         * @param to The ending frame of the animation
+         */
+        constructor(
+            /**The name of the animation range**/
+            public name: string, 
+            /**The starting frame of the animation */
+            public from: number, 
+            /**The ending frame of the animation*/
+            public to: number) {
         }
         }
 
 
+        /**
+         * Makes a copy of the animation range
+         * @returns A copy of the animation range
+         */
         public clone(): AnimationRange {
         public clone(): AnimationRange {
             return new AnimationRange(this.name, this.from, this.to);
             return new AnimationRange(this.name, this.from, this.to);
         }
         }
@@ -12,37 +31,90 @@
      * Composed of a frame, and an action function
      * Composed of a frame, and an action function
      */
      */
     export class AnimationEvent {
     export class AnimationEvent {
+        /**
+         * Specifies if the animation event is done
+         */
         public isDone: boolean = false;
         public isDone: boolean = false;
-        constructor(public frame: number, public action: () => void, public onlyOnce?: boolean) {
+
+        /**
+         * Initializes the animation event
+         * @param frame The frame for which the event is triggered
+         * @param action The event to perform when triggered
+         * @param onlyOnce Specifies if the event should be triggered only once
+         */
+        constructor(
+            /** The frame for which the event is triggered **/
+            public frame: number,
+            /** The event to perform when triggered **/
+            public action: () => void , 
+            /** Specifies if the event should be triggered only once**/
+            public onlyOnce?: boolean ) {
         }
         }
     }
     }
 
 
+    /**
+     * A cursor which tracks a point on a path
+     */
     export class PathCursor {
     export class PathCursor {
+        /**
+         * Stores path cursor callbacks for when an onchange event is triggered
+         */
         private _onchange = new Array<(cursor: PathCursor) => void>();
         private _onchange = new Array<(cursor: PathCursor) => void>();
 
 
+        /**
+         * The value of the path cursor
+         */
         value: number = 0;
         value: number = 0;
+
+        /**
+         * The animation array of the path cursor
+         */
         animations = new Array<Animation>();
         animations = new Array<Animation>();
 
 
+        /**
+         * Initializes the path cursor
+         * @param path The path to track
+         */
         constructor(private path: Path2) {
         constructor(private path: Path2) {
         }
         }
 
 
+        /**
+         * Gets the cursor point on the path
+         * @returns A point on the path cursor at the cursor location
+         */
         public getPoint(): Vector3 {
         public getPoint(): Vector3 {
             var point = this.path.getPointAtLengthPosition(this.value);
             var point = this.path.getPointAtLengthPosition(this.value);
             return new Vector3(point.x, 0, point.y);
             return new Vector3(point.x, 0, point.y);
         }
         }
 
 
+        /**
+         * Moves the cursor ahead by the step amount
+         * @param step The amount to move the cursor forward
+         * @returns This path cursor
+         */
         public moveAhead(step: number = 0.002): PathCursor {
         public moveAhead(step: number = 0.002): PathCursor {
             this.move(step);
             this.move(step);
 
 
             return this;
             return this;
         }
         }
 
 
+        /**
+         * Moves the cursor behind by the step amount
+         * @param step The amount to move the cursor back
+         * @returns This path cursor
+         */
         public moveBack(step: number = 0.002): PathCursor {
         public moveBack(step: number = 0.002): PathCursor {
             this.move(-step);
             this.move(-step);
 
 
             return this;
             return this;
         }
         }
 
 
+        /**
+         * Moves the cursor by the step amount
+         * If the step amount is greater than one, an exception is thrown
+         * @param step The amount to move the cursor
+         * @returns This path cursor
+         */
         public move(step: number): PathCursor {
         public move(step: number): PathCursor {
 
 
             if (Math.abs(step) > 1) {
             if (Math.abs(step) > 1) {
@@ -56,6 +128,10 @@
             return this;
             return this;
         }
         }
 
 
+        /**
+         * Ensures that the value is limited between zero and one
+         * @returns This path cursor
+         */
         private ensureLimits(): PathCursor {
         private ensureLimits(): PathCursor {
             while (this.value > 1) {
             while (this.value > 1) {
                 this.value -= 1;
                 this.value -= 1;
@@ -67,13 +143,21 @@
             return this;
             return this;
         }
         }
 
 
-        // used by animation engine
+        /**
+         * Runs onchange callbacks on change (used by the animation engine)
+         * @returns This path cursor
+         */
         private raiseOnChange(): PathCursor {
         private raiseOnChange(): PathCursor {
             this._onchange.forEach(f => f(this));
             this._onchange.forEach(f => f(this));
 
 
             return this;
             return this;
         }
         }
 
 
+        /**
+         * Executes a function on change
+         * @param f A path cursor onchange callback
+         * @returns This path cursor
+         */
         public onchange(f: (cursor: PathCursor) => void): PathCursor {
         public onchange(f: (cursor: PathCursor) => void): PathCursor {
             this._onchange.push(f);
             this._onchange.push(f);
 
 
@@ -81,17 +165,38 @@
         }
         }
     }
     }
 
 
+    /**
+     * Defines an interface which represents an animation key frame
+     */
     export interface IAnimationKey {
     export interface IAnimationKey {
+        /**
+         * Frame of the key frame
+         */
         frame: number;
         frame: number;
+        /**
+         * Value at the specifies key frame
+         */
         value: any;
         value: any;
+        /**
+         * The input tangent for the cubic hermite spline
+         */
         inTangent?: any;
         inTangent?: any;
+        /**
+         * The output tangent for the cubic hermite spline
+         */
         outTangent?: any;
         outTangent?: any;
+        /**
+         * The animation interpolation type
+         */
         interpolation?: AnimationKeyInterpolation;
         interpolation?: AnimationKeyInterpolation;
     }
     }
 
 
+    /**
+     * Enum for the animation key frame interpolation type
+     */
     export enum AnimationKeyInterpolation {
     export enum AnimationKeyInterpolation {
         /**
         /**
-         * Do not interpolate between keys and use the start key value only. Tangents are ignored.
+         * Do not interpolate between keys and use the start key value only. Tangents are ignored
          */
          */
         STEP = 1
         STEP = 1
     }
     }
@@ -110,21 +215,45 @@
          */
          */
         public static AllowMatrixDecomposeForInterpolation = true;
         public static AllowMatrixDecomposeForInterpolation = true;
 
 
+        /**
+         * Stores the key frames of the animation
+         */
         private _keys: Array<IAnimationKey>;
         private _keys: Array<IAnimationKey>;
+
+        /**
+         * Stores the easing function of the animation
+         */
         private _easingFunction: IEasingFunction;
         private _easingFunction: IEasingFunction;
 
 
+        /**
+         * @hidden Internal use only
+         */
         public _runtimeAnimations = new Array<RuntimeAnimation>();
         public _runtimeAnimations = new Array<RuntimeAnimation>();
 
 
-        // The set of event that will be linked to this animation
+        /**
+         * The set of event that will be linked to this animation
+         */
         private _events = new Array<AnimationEvent>();
         private _events = new Array<AnimationEvent>();
 
 
+        /**
+         * Stores an array of target property paths
+         */
         public targetPropertyPath: string[];
         public targetPropertyPath: string[];
 
 
+        /**
+         * Stores the blending speed of the animation
+         */
         public blendingSpeed = 0.01;
         public blendingSpeed = 0.01;
 
 
+        /**
+         * Stores the animation ranges for the animation
+         */
         private _ranges: { [name: string]: Nullable<AnimationRange> } = {};
         private _ranges: { [name: string]: Nullable<AnimationRange> } = {};
 
 
-        static _PrepareAnimation(name: string, targetProperty: string, framePerSecond: number, totalFrame: number,
+        /**
+         * @hidden Internal use
+         */
+        public static _PrepareAnimation(name: string, targetProperty: string, framePerSecond: number, totalFrame: number,
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction): Nullable<Animation> {
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction): Nullable<Animation> {
             var dataType = undefined;
             var dataType = undefined;
 
 
@@ -159,10 +288,11 @@
         }
         }
 
 
         /**
         /**
-		 * Sets up an animation.
-		 * @param property the property to animate
-		 * @param animationType the animation type to apply
-		 * @param easingFunction the easing function used in the animation
+		 * Sets up an animation
+		 * @param property The property to animate
+		 * @param animationType The animation type to apply
+         * @param framePerSecond The frames per second of the animation
+		 * @param easingFunction The easing function used in the animation
 		 * @returns The created animation
 		 * @returns The created animation
 		 */
 		 */
         public static CreateAnimation(property: string, animationType: number, framePerSecond: number, easingFunction: EasingFunction): Animation {
         public static CreateAnimation(property: string, animationType: number, framePerSecond: number, easingFunction: EasingFunction): Animation {
@@ -179,15 +309,15 @@
 
 
         /**
         /**
          * Create and start an animation on a node
          * Create and start an animation on a node
-         * @param {string} name defines the name of the global animation that will be run on all nodes
-         * @param {BABYLON.Node} node defines the root node where the animation will take place
-         * @param {string} targetProperty defines property to animate
-         * @param {number} framePerSecond defines the number of frame per second yo use
-         * @param {number} totalFrame defines the number of frames in total
-         * @param {any} from defines the initial value
-         * @param {any} to defines the final value
-         * @param {number} loopMode defines which loop mode you want to use (off by default)
-         * @param {BABYLON.EasingFunction} easingFunction defines the easing function to use (linear by default)
+         * @param name defines the name of the global animation that will be run on all nodes
+         * @param node defines the root node where the animation will take place
+         * @param targetProperty defines property to animate
+         * @param framePerSecond defines the number of frame per second yo use
+         * @param totalFrame defines the number of frames in total
+         * @param from defines the initial value
+         * @param to defines the final value
+         * @param loopMode defines which loop mode you want to use (off by default)
+         * @param easingFunction defines the easing function to use (linear by default)
          * @param onAnimationEnd defines the callback to call when animation end
          * @param onAnimationEnd defines the callback to call when animation end
          * @returns the animatable created for this animation
          * @returns the animatable created for this animation
          */
          */
@@ -206,16 +336,16 @@
 
 
         /**
         /**
          * Create and start an animation on a node and its descendants
          * Create and start an animation on a node and its descendants
-         * @param {string} name defines the name of the global animation that will be run on all nodes
-         * @param {BABYLON.Node} node defines the root node where the animation will take place
-         * @param {boolean} directDescendantsOnly if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used.
-         * @param {string} targetProperty defines property to animate
-         * @param {number} framePerSecond defines the number of frame per second yo use
-         * @param {number} totalFrame defines the number of frames in total
-         * @param {any} from defines the initial value
-         * @param {any} to defines the final value
-         * @param {number} loopMode defines which loop mode you want to use (off by default)
-         * @param {BABYLON.EasingFunction} easingFunction defines the easing function to use (linear by default)
+         * @param name defines the name of the global animation that will be run on all nodes
+         * @param node defines the root node where the animation will take place
+         * @param directDescendantsOnly if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used
+         * @param targetProperty defines property to animate
+         * @param framePerSecond defines the number of frame per second to use
+         * @param totalFrame defines the number of frames in total
+         * @param from defines the initial value
+         * @param to defines the final value
+         * @param loopMode defines which loop mode you want to use (off by default)
+         * @param easingFunction defines the easing function to use (linear by default)
          * @param onAnimationEnd defines the callback to call when an animation ends (will be called once per node)
          * @param onAnimationEnd defines the callback to call when an animation ends (will be called once per node)
          * @returns the list of animatables created for all nodes
          * @returns the list of animatables created for all nodes
          * @example https://www.babylonjs-playground.com/#MH0VLI
          * @example https://www.babylonjs-playground.com/#MH0VLI
@@ -234,6 +364,20 @@
             return scene.beginDirectHierarchyAnimation(node, directDescendantsOnly, [animation], 0, totalFrame, (animation.loopMode === 1), 1.0, onAnimationEnd);
             return scene.beginDirectHierarchyAnimation(node, directDescendantsOnly, [animation], 0, totalFrame, (animation.loopMode === 1), 1.0, onAnimationEnd);
         }
         }
 
 
+        /**
+         * Creates a new animation, merges it with the existing animations and starts it
+         * @param name Name of the animation
+         * @param node Node which contains the scene that begins the animations
+         * @param targetProperty Specifies which property to animate
+         * @param framePerSecond The frames per second of the animation
+         * @param totalFrame The total number of frames
+         * @param from The frame at the beginning of the animation
+         * @param to The frame at the end of the animation
+         * @param loopMode Specifies the loop mode of the animation
+         * @param easingFunction (Optional) The easing function of the animation, which allow custom mathematical formulas for animations
+         * @param onAnimationEnd Callback to run once the animation is complete
+         * @returns Nullable animation
+         */
         public static CreateMergeAndStartAnimation(name: string, node: Node, targetProperty: string,
         public static CreateMergeAndStartAnimation(name: string, node: Node, targetProperty: string,
             framePerSecond: number, totalFrame: number,
             framePerSecond: number, totalFrame: number,
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Nullable<Animatable> {
             from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Nullable<Animatable> {
@@ -250,7 +394,7 @@
         }
         }
 
 
         /**
         /**
-		 * Transition property of the Camera to the target Value.
+		 * Transition property of the Camera to the target Value
 		 * @param property The property to transition
 		 * @param property The property to transition
 		 * @param targetValue The target Value of the property
 		 * @param targetValue The target Value of the property
          * @param host The object where the property to animate belongs
          * @param host The object where the property to animate belongs
@@ -258,10 +402,10 @@
          * @param frameRate Framerate (in frame/s) to use
          * @param frameRate Framerate (in frame/s) to use
 		 * @param transition The transition type we want to use
 		 * @param transition The transition type we want to use
 		 * @param duration The duration of the animation, in milliseconds
 		 * @param duration The duration of the animation, in milliseconds
-		 * @param onAnimationEnd Call back trigger at the end of the animation.
+		 * @param onAnimationEnd Callback trigger at the end of the animation
+         * @returns Nullable animation
 		 */
 		 */
         public static TransitionTo(property: string, targetValue: any, host: any, scene: Scene, frameRate: number, transition: Animation, duration: number, onAnimationEnd: Nullable<() => void> = null): Nullable<Animatable> {
         public static TransitionTo(property: string, targetValue: any, host: any, scene: Scene, frameRate: number, transition: Animation, duration: number, onAnimationEnd: Nullable<() => void> = null): Nullable<Animatable> {
-
             if (duration <= 0) {
             if (duration <= 0) {
                 host[property] = targetValue;
                 host[property] = targetValue;
                 if (onAnimationEnd) {
                 if (onAnimationEnd) {
@@ -299,6 +443,9 @@
             return this._runtimeAnimations;
             return this._runtimeAnimations;
         }
         }
 
 
+        /**
+         * Specifies if any of the runtime animations are currently running
+         */
         public get hasRunningRuntimeAnimations(): boolean {
         public get hasRunningRuntimeAnimations(): boolean {
             for (var runtimeAnimation of this._runtimeAnimations) {
             for (var runtimeAnimation of this._runtimeAnimations) {
                 if (!runtimeAnimation.isStopped) {
                 if (!runtimeAnimation.isStopped) {
@@ -309,7 +456,28 @@
             return false;
             return false;
         }
         }
 
 
-        constructor(public name: string, public targetProperty: string, public framePerSecond: number, public dataType: number, public loopMode?: number, public enableBlending?: boolean) {
+        /**
+         * Initializes the animation
+         * @param name Name of the animation
+         * @param targetProperty Property to animate
+         * @param framePerSecond The frames per second of the animation
+         * @param dataType The data type of the animation
+         * @param loopMode The loop mode of the animation
+         * @param enableBlendings Specifies if blending should be enabled
+         */
+        constructor(
+            /**Name of the animation */
+            public name: string, 
+            /**Property to animate */
+            public targetProperty: string, 
+            /**The frames per second of the animation */
+            public framePerSecond: number, 
+            /**The data type of the animation */
+            public dataType: number,
+            /**The loop mode of the animation */ 
+            public loopMode?: number, 
+            /**Specifies if blending should be enabled */
+            public enableBlending?: boolean) {
             this.targetPropertyPath = targetProperty.split(".");
             this.targetPropertyPath = targetProperty.split(".");
             this.dataType = dataType;
             this.dataType = dataType;
             this.loopMode = loopMode === undefined ? Animation.ANIMATIONLOOPMODE_CYCLE : loopMode;
             this.loopMode = loopMode === undefined ? Animation.ANIMATIONLOOPMODE_CYCLE : loopMode;
@@ -317,7 +485,9 @@
 
 
         // Methods
         // Methods
         /**
         /**
-         * @param {boolean} fullDetails - support for multiple levels of logging within scene loading
+         * Converts the animation to a string
+         * @param fullDetails support for multiple levels of logging within scene loading
+         * @returns String form of the animation
          */
          */
         public toString(fullDetails?: boolean): string {
         public toString(fullDetails?: boolean): string {
             var ret = "Name: " + this.name + ", property: " + this.targetProperty;
             var ret = "Name: " + this.name + ", property: " + this.targetProperty;
@@ -340,7 +510,8 @@
         }
         }
 
 
         /**
         /**
-         * Add an event to this animation.
+         * Add an event to this animation
+         * @param event Event to add
          */
          */
         public addEvent(event: AnimationEvent): void {
         public addEvent(event: AnimationEvent): void {
             this._events.push(event);
             this._events.push(event);
@@ -348,7 +519,7 @@
 
 
         /**
         /**
          * Remove all events found at the given frame
          * Remove all events found at the given frame
-         * @param frame
+         * @param frame The frame to remove events from
          */
          */
         public removeEvents(frame: number): void {
         public removeEvents(frame: number): void {
             for (var index = 0; index < this._events.length; index++) {
             for (var index = 0; index < this._events.length; index++) {
@@ -359,10 +530,20 @@
             }
             }
         }
         }
 
 
+        /**
+         * Retrieves all the events from the animation
+         * @returns Events from the animation
+         */
         public getEvents(): AnimationEvent[] {
         public getEvents(): AnimationEvent[] {
             return this._events;
             return this._events;
         }
         }
 
 
+        /**
+         * Creates an animation range
+         * @param name Name of the animation range
+         * @param from Starting frame of the animation range
+         * @param to Ending frame of the animation
+         */
         public createRange(name: string, from: number, to: number): void {
         public createRange(name: string, from: number, to: number): void {
             // check name not already in use; could happen for bones after serialized
             // check name not already in use; could happen for bones after serialized
             if (!this._ranges[name]) {
             if (!this._ranges[name]) {
@@ -370,6 +551,11 @@
             }
             }
         }
         }
 
 
+        /**
+         * Deletes an animation range by name
+         * @param name Name of the animation range to delete
+         * @param deleteFrames Specifies if the key frames for the range should also be deleted (true) or not (false)
+         */
         public deleteRange(name: string, deleteFrames = true): void {
         public deleteRange(name: string, deleteFrames = true): void {
             let range = this._ranges[name];
             let range = this._ranges[name];
             if (!range) {
             if (!range) {
@@ -391,15 +577,27 @@
 
 
         }
         }
 
 
+        /**
+         * Gets the animation range by name, or null if not defined
+         * @param name Name of the animation range
+         * @returns Nullable animation range
+         */
         public getRange(name: string): Nullable<AnimationRange> {
         public getRange(name: string): Nullable<AnimationRange> {
             return this._ranges[name];
             return this._ranges[name];
         }
         }
 
 
-
+        /**
+         * Gets the key frames from the animation
+         * @returns The key frames of the animation
+         */
         public getKeys(): Array<IAnimationKey> {
         public getKeys(): Array<IAnimationKey> {
             return this._keys;
             return this._keys;
         }
         }
 
 
+        /**
+         * Gets the highest frame rate of the animation
+         * @returns Highest frame rate of the animation
+         */
         public getHighestFrame(): number {
         public getHighestFrame(): number {
             var ret = 0;
             var ret = 0;
 
 
@@ -411,55 +609,278 @@
             return ret;
             return ret;
         }
         }
 
 
-        public getEasingFunction() {
+        /**
+         * Gets the easing function of the animation
+         * @returns Easing function of the animation
+         */
+        public getEasingFunction(): IEasingFunction {
             return this._easingFunction;
             return this._easingFunction;
         }
         }
 
 
-        public setEasingFunction(easingFunction: EasingFunction) {
+        /**
+         * Sets the easing function of the animation
+         * @param easingFunction A custom mathematical formula for animation
+         */
+        public setEasingFunction(easingFunction: EasingFunction): void {
             this._easingFunction = easingFunction;
             this._easingFunction = easingFunction;
         }
         }
 
 
+        /**
+         * Interpolates a scalar linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated scalar value
+         */
         public floatInterpolateFunction(startValue: number, endValue: number, gradient: number): number {
         public floatInterpolateFunction(startValue: number, endValue: number, gradient: number): number {
             return Scalar.Lerp(startValue, endValue, gradient);
             return Scalar.Lerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a scalar cubically
+         * @param startValue Start value of the animation curve
+         * @param outTangent End tangent of the animation
+         * @param endValue End value of the animation curve
+         * @param inTangent Start tangent of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated scalar value
+         */
         public floatInterpolateFunctionWithTangents(startValue: number, outTangent: number, endValue: number, inTangent: number, gradient: number): number {
         public floatInterpolateFunctionWithTangents(startValue: number, outTangent: number, endValue: number, inTangent: number, gradient: number): number {
             return Scalar.Hermite(startValue, outTangent, endValue, inTangent, gradient);
             return Scalar.Hermite(startValue, outTangent, endValue, inTangent, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a quaternion using a spherical linear interpolation
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated quaternion value
+         */
         public quaternionInterpolateFunction(startValue: Quaternion, endValue: Quaternion, gradient: number): Quaternion {
         public quaternionInterpolateFunction(startValue: Quaternion, endValue: Quaternion, gradient: number): Quaternion {
             return Quaternion.Slerp(startValue, endValue, gradient);
             return Quaternion.Slerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a quaternion cubically
+         * @param startValue Start value of the animation curve
+         * @param outTangent End tangent of the animation curve
+         * @param endValue End value of the animation curve
+         * @param inTangent Start tangent of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated quaternion value
+         */
         public quaternionInterpolateFunctionWithTangents(startValue: Quaternion, outTangent: Quaternion, endValue: Quaternion, inTangent: Quaternion, gradient: number): Quaternion {
         public quaternionInterpolateFunctionWithTangents(startValue: Quaternion, outTangent: Quaternion, endValue: Quaternion, inTangent: Quaternion, gradient: number): Quaternion {
             return Quaternion.Hermite(startValue, outTangent, endValue, inTangent, gradient).normalize();
             return Quaternion.Hermite(startValue, outTangent, endValue, inTangent, gradient).normalize();
         }
         }
 
 
+        /**
+         * Interpolates a Vector3 linearl
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated scalar value
+         */
         public vector3InterpolateFunction(startValue: Vector3, endValue: Vector3, gradient: number): Vector3 {
         public vector3InterpolateFunction(startValue: Vector3, endValue: Vector3, gradient: number): Vector3 {
             return Vector3.Lerp(startValue, endValue, gradient);
             return Vector3.Lerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a Vector3 cubically
+         * @param startValue Start value of the animation curve
+         * @param outTangent End tangent of the animation
+         * @param endValue End value of the animation curve
+         * @param inTangent Start tangent of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns InterpolatedVector3 value
+         */
         public vector3InterpolateFunctionWithTangents(startValue: Vector3, outTangent: Vector3, endValue: Vector3, inTangent: Vector3, gradient: number): Vector3 {
         public vector3InterpolateFunctionWithTangents(startValue: Vector3, outTangent: Vector3, endValue: Vector3, inTangent: Vector3, gradient: number): Vector3 {
             return Vector3.Hermite(startValue, outTangent, endValue, inTangent, gradient);
             return Vector3.Hermite(startValue, outTangent, endValue, inTangent, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a Vector2 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Vector2 value
+         */
         public vector2InterpolateFunction(startValue: Vector2, endValue: Vector2, gradient: number): Vector2 {
         public vector2InterpolateFunction(startValue: Vector2, endValue: Vector2, gradient: number): Vector2 {
             return Vector2.Lerp(startValue, endValue, gradient);
             return Vector2.Lerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a Vector2 cubically
+         * @param startValue Start value of the animation curve
+         * @param outTangent End tangent of the animation
+         * @param endValue End value of the animation curve
+         * @param inTangent Start tangent of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Vector2 value
+         */
         public vector2InterpolateFunctionWithTangents(startValue: Vector2, outTangent: Vector2, endValue: Vector2, inTangent: Vector2, gradient: number): Vector2 {
         public vector2InterpolateFunctionWithTangents(startValue: Vector2, outTangent: Vector2, endValue: Vector2, inTangent: Vector2, gradient: number): Vector2 {
             return Vector2.Hermite(startValue, outTangent, endValue, inTangent, gradient);
             return Vector2.Hermite(startValue, outTangent, endValue, inTangent, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a size linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Size value
+         */
         public sizeInterpolateFunction(startValue: Size, endValue: Size, gradient: number): Size {
         public sizeInterpolateFunction(startValue: Size, endValue: Size, gradient: number): Size {
             return Size.Lerp(startValue, endValue, gradient);
             return Size.Lerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Interpolates a Color3 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
         public color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3 {
         public color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3 {
             return Color3.Lerp(startValue, endValue, gradient);
             return Color3.Lerp(startValue, endValue, gradient);
         }
         }
 
 
         /**
         /**
+         * @hidden Internal use only
+         */
+        public _getKeyValue(value: any): any {
+            if (typeof value === "function") {
+                return value();
+            }
+
+            return value;
+        } 
+
+        /**
+         * @hidden Internal use only
+         */
+        public _interpolate(currentFrame: number, repeatCount: number, workValue?: any, loopMode?: number, offsetValue?: any, highLimitValue?: any): any {
+            if (loopMode === Animation.ANIMATIONLOOPMODE_CONSTANT && repeatCount > 0) {
+                return highLimitValue.clone ? highLimitValue.clone() : highLimitValue;
+            }
+
+            let keys = this.getKeys();
+
+            // Try to get a hash to find the right key
+            var startKeyIndex = Math.max(0, Math.min(keys.length - 1, Math.floor(keys.length * (currentFrame - keys[0].frame) / (keys[keys.length - 1].frame - keys[0].frame)) - 1));
+
+            if (keys[startKeyIndex].frame >= currentFrame) {
+                while (startKeyIndex - 1 >= 0 && keys[startKeyIndex].frame >= currentFrame) {
+                    startKeyIndex--;
+                }
+            }
+
+            for (var key = startKeyIndex; key < keys.length; key++) {
+                var endKey = keys[key + 1];
+
+                if (endKey.frame >= currentFrame) {
+
+                    var startKey = keys[key];
+                    var startValue = this._getKeyValue(startKey.value);
+                    if (startKey.interpolation === AnimationKeyInterpolation.STEP) {
+                        return startValue;
+                    }
+
+                    var endValue = this._getKeyValue(endKey.value);
+
+                    var useTangent = startKey.outTangent !== undefined && endKey.inTangent !== undefined;
+                    var frameDelta = endKey.frame - startKey.frame;
+
+                    // gradient : percent of currentFrame between the frame inf and the frame sup
+                    var gradient = (currentFrame - startKey.frame) / frameDelta;
+
+                    // check for easingFunction and correction of gradient
+                    let easingFunction = this.getEasingFunction();
+                    if (easingFunction != null) {
+                        gradient = easingFunction.ease(gradient);
+                    }
+
+                    switch (this.dataType) {
+                        // Float
+                        case Animation.ANIMATIONTYPE_FLOAT:
+                            var floatValue = useTangent ? this.floatInterpolateFunctionWithTangents(startValue, startKey.outTangent * frameDelta, endValue, endKey.inTangent * frameDelta, gradient) : this.floatInterpolateFunction(startValue, endValue, gradient);
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return floatValue;
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return offsetValue * repeatCount + floatValue;
+                            }
+                            break;
+                        // Quaternion
+                        case Animation.ANIMATIONTYPE_QUATERNION:
+                            var quatValue = useTangent ? this.quaternionInterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this.quaternionInterpolateFunction(startValue, endValue, gradient);
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return quatValue;
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return quatValue.addInPlace(offsetValue.scale(repeatCount));
+                            }
+
+                            return quatValue;
+                        // Vector3
+                        case Animation.ANIMATIONTYPE_VECTOR3:
+                            var vec3Value = useTangent ? this.vector3InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this.vector3InterpolateFunction(startValue, endValue, gradient);
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return vec3Value;
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return vec3Value.add(offsetValue.scale(repeatCount));
+                            }
+                        // Vector2
+                        case Animation.ANIMATIONTYPE_VECTOR2:
+                            var vec2Value = useTangent ? this.vector2InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this.vector2InterpolateFunction(startValue, endValue, gradient);
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return vec2Value;
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return vec2Value.add(offsetValue.scale(repeatCount));
+                            }
+                        // Size
+                        case Animation.ANIMATIONTYPE_SIZE:
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return this.sizeInterpolateFunction(startValue, endValue, gradient);
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return this.sizeInterpolateFunction(startValue, endValue, gradient).add(offsetValue.scale(repeatCount));
+                            }
+                        // Color3
+                        case Animation.ANIMATIONTYPE_COLOR3:
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    return this.color3InterpolateFunction(startValue, endValue, gradient);
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return this.color3InterpolateFunction(startValue, endValue, gradient).add(offsetValue.scale(repeatCount));
+                            }
+                        // Matrix
+                        case Animation.ANIMATIONTYPE_MATRIX:
+                            switch (loopMode) {
+                                case Animation.ANIMATIONLOOPMODE_CYCLE:
+                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                    if (Animation.AllowMatricesInterpolation) {
+                                        return this.matrixInterpolateFunction(startValue, endValue, gradient, workValue);
+                                    }
+                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                    return startValue;
+                            }
+                        default:
+                            break;
+                    }
+                    break;
+                }
+            }
+            return this._getKeyValue(keys[keys.length - 1].value);
+        }
+
+        /**
          * Defines the function to use to interpolate matrices
          * Defines the function to use to interpolate matrices
          * @param startValue defines the start matrix
          * @param startValue defines the start matrix
          * @param endValue defines the end matrix
          * @param endValue defines the end matrix
@@ -483,6 +904,10 @@
             return Matrix.Lerp(startValue, endValue, gradient);
             return Matrix.Lerp(startValue, endValue, gradient);
         }
         }
 
 
+        /**
+         * Makes a copy of the animation
+         * @returns Cloned animation
+         */
         public clone(): Animation {
         public clone(): Animation {
             var clone = new Animation(this.name, this.targetPropertyPath.join("."), this.framePerSecond, this.dataType, this.loopMode);
             var clone = new Animation(this.name, this.targetPropertyPath.join("."), this.framePerSecond, this.dataType, this.loopMode);
 
 
@@ -507,10 +932,18 @@
             return clone;
             return clone;
         }
         }
 
 
+        /**
+         * Sets the key frames of the animation
+         * @param values The animation key frames to set
+         */
         public setKeys(values: Array<IAnimationKey>): void {
         public setKeys(values: Array<IAnimationKey>): void {
             this._keys = values.slice(0);
             this._keys = values.slice(0);
         }
         }
 
 
+        /**
+         * Serializes the animation to an object
+         * @returns Serialized object
+         */
         public serialize(): any {
         public serialize(): any {
             var serializationObject: any = {};
             var serializationObject: any = {};
 
 
@@ -564,57 +997,122 @@
         }
         }
 
 
         // Statics
         // Statics
+        /**
+         * Float animation type
+         */
         private static _ANIMATIONTYPE_FLOAT = 0;
         private static _ANIMATIONTYPE_FLOAT = 0;
+        /**
+         * Vector3 animation type
+         */
         private static _ANIMATIONTYPE_VECTOR3 = 1;
         private static _ANIMATIONTYPE_VECTOR3 = 1;
+        /**
+         * Quaternion animation type
+         */
         private static _ANIMATIONTYPE_QUATERNION = 2;
         private static _ANIMATIONTYPE_QUATERNION = 2;
+        /**
+         * Matrix animation type
+         */
         private static _ANIMATIONTYPE_MATRIX = 3;
         private static _ANIMATIONTYPE_MATRIX = 3;
+        /**
+         * Color3 animation type
+         */
         private static _ANIMATIONTYPE_COLOR3 = 4;
         private static _ANIMATIONTYPE_COLOR3 = 4;
+        /**
+         * Vector2 animation type
+         */
         private static _ANIMATIONTYPE_VECTOR2 = 5;
         private static _ANIMATIONTYPE_VECTOR2 = 5;
+        /**
+         * Size animation type
+         */
         private static _ANIMATIONTYPE_SIZE = 6;
         private static _ANIMATIONTYPE_SIZE = 6;
+        /**
+         * Relative Loop Mode
+         */
         private static _ANIMATIONLOOPMODE_RELATIVE = 0;
         private static _ANIMATIONLOOPMODE_RELATIVE = 0;
+        /**
+         * Cycle Loop Mode
+         */
         private static _ANIMATIONLOOPMODE_CYCLE = 1;
         private static _ANIMATIONLOOPMODE_CYCLE = 1;
+        /**
+         * Constant Loop Mode
+         */
         private static _ANIMATIONLOOPMODE_CONSTANT = 2;
         private static _ANIMATIONLOOPMODE_CONSTANT = 2;
 
 
+        /**
+         * Get the float animation type
+         */
         public static get ANIMATIONTYPE_FLOAT(): number {
         public static get ANIMATIONTYPE_FLOAT(): number {
             return Animation._ANIMATIONTYPE_FLOAT;
             return Animation._ANIMATIONTYPE_FLOAT;
         }
         }
 
 
+        /**
+         * Get the Vector3 animation type
+         */
         public static get ANIMATIONTYPE_VECTOR3(): number {
         public static get ANIMATIONTYPE_VECTOR3(): number {
             return Animation._ANIMATIONTYPE_VECTOR3;
             return Animation._ANIMATIONTYPE_VECTOR3;
         }
         }
 
 
+        /**
+         * Get the Vectpr2 animation type
+         */
         public static get ANIMATIONTYPE_VECTOR2(): number {
         public static get ANIMATIONTYPE_VECTOR2(): number {
             return Animation._ANIMATIONTYPE_VECTOR2;
             return Animation._ANIMATIONTYPE_VECTOR2;
         }
         }
 
 
+        /**
+         * Get the Size animation type
+         */
         public static get ANIMATIONTYPE_SIZE(): number {
         public static get ANIMATIONTYPE_SIZE(): number {
             return Animation._ANIMATIONTYPE_SIZE;
             return Animation._ANIMATIONTYPE_SIZE;
         }
         }
 
 
+        /**
+         * Get the Quaternion animation type
+         */
         public static get ANIMATIONTYPE_QUATERNION(): number {
         public static get ANIMATIONTYPE_QUATERNION(): number {
             return Animation._ANIMATIONTYPE_QUATERNION;
             return Animation._ANIMATIONTYPE_QUATERNION;
         }
         }
 
 
+        /**
+         * Get the Matrix animation type
+         */
         public static get ANIMATIONTYPE_MATRIX(): number {
         public static get ANIMATIONTYPE_MATRIX(): number {
             return Animation._ANIMATIONTYPE_MATRIX;
             return Animation._ANIMATIONTYPE_MATRIX;
         }
         }
 
 
+        /**
+         * Get the Color3 animation type
+         */
         public static get ANIMATIONTYPE_COLOR3(): number {
         public static get ANIMATIONTYPE_COLOR3(): number {
             return Animation._ANIMATIONTYPE_COLOR3;
             return Animation._ANIMATIONTYPE_COLOR3;
         }
         }
 
 
+        /**
+         * Get the Relative Loop Mode
+         */
         public static get ANIMATIONLOOPMODE_RELATIVE(): number {
         public static get ANIMATIONLOOPMODE_RELATIVE(): number {
             return Animation._ANIMATIONLOOPMODE_RELATIVE;
             return Animation._ANIMATIONLOOPMODE_RELATIVE;
         }
         }
 
 
+        /**
+         * Get the Cycle Loop Mode
+         */
         public static get ANIMATIONLOOPMODE_CYCLE(): number {
         public static get ANIMATIONLOOPMODE_CYCLE(): number {
             return Animation._ANIMATIONLOOPMODE_CYCLE;
             return Animation._ANIMATIONLOOPMODE_CYCLE;
         }
         }
 
 
+        /**
+         * Get the Constant Loop Mode
+         */
         public static get ANIMATIONLOOPMODE_CONSTANT(): number {
         public static get ANIMATIONLOOPMODE_CONSTANT(): number {
             return Animation._ANIMATIONLOOPMODE_CONSTANT;
             return Animation._ANIMATIONLOOPMODE_CONSTANT;
         }
         }
 
 
+        /**
+         * Parses an animation object and creates an animation
+         * @param parsedAnimation Parsed animation object
+         * @returns Animation object
+         */
         public static Parse(parsedAnimation: any): Animation {
         public static Parse(parsedAnimation: any): Animation {
             var animation = new Animation(parsedAnimation.name, parsedAnimation.property, parsedAnimation.framePerSecond, parsedAnimation.dataType, parsedAnimation.loopBehavior);
             var animation = new Animation(parsedAnimation.name, parsedAnimation.property, parsedAnimation.framePerSecond, parsedAnimation.dataType, parsedAnimation.loopBehavior);
 
 
@@ -698,7 +1196,12 @@
             return animation;
             return animation;
         }
         }
 
 
-        public static AppendSerializedAnimations(source: IAnimatable, destination: any): any {
+        /**
+         * Appends the serialized animations from the source animations
+         * @param source Source containing the animations
+         * @param destination Target to store the animations
+         */
+        public static AppendSerializedAnimations(source: IAnimatable, destination: any): void {
             if (source.animations) {
             if (source.animations) {
                 destination.animations = [];
                 destination.animations = [];
                 for (var animationIndex = 0; animationIndex < source.animations.length; animationIndex++) {
                 for (var animationIndex = 0; animationIndex < source.animations.length; animationIndex++) {

+ 121 - 138
src/Animations/babylon.runtimeAnimation.ts

@@ -1,28 +1,104 @@
 module BABYLON {
 module BABYLON {
 
 
+    /**
+     * Defines a runtime animation
+     */
     export class RuntimeAnimation {
     export class RuntimeAnimation {
+        /**
+         * The current frame of the runtime animation
+         */
         private _currentFrame: number = 0;
         private _currentFrame: number = 0;
+
+        /**
+         * The animation used by the runtime animation
+         */
         private _animation: Animation;
         private _animation: Animation;
+        
+        /**
+         * The target of the runtime animation
+         */
         private _target: any;
         private _target: any;
-        private _host: Animatable;
 
 
+        /**
+         * The initiating animatable
+         */
+        private _host: Animatable;
+        
+        /**
+         * The original value of the runtime animation
+         */
         private _originalValue: any;
         private _originalValue: any;
+        
+        /**
+         * The original blend value of the runtime animation
+         */
         private _originalBlendValue: any;
         private _originalBlendValue: any;
+        
+        /**
+         * The offsets cache of the runtime animation
+         */
         private _offsetsCache: {[key: string]: any} = {};
         private _offsetsCache: {[key: string]: any} = {};
+        
+        /**
+         * The high limits cache of the runtime animation
+         */
         private _highLimitsCache: {[key: string]: any} = {};
         private _highLimitsCache: {[key: string]: any} = {};
+        
+        /**
+         * Specifies if the runtime animation has been stopped
+         */
         private _stopped = false;
         private _stopped = false;
+        
+        /**
+         * The blending factor of the runtime animation
+         */
         private _blendingFactor = 0;
         private _blendingFactor = 0;
+        
+        /**
+         * The BabylonJS scene
+         */
         private _scene: Scene;
         private _scene: Scene;
 
 
+        /**
+         * The current value of the runtime animation
+         */
         private _currentValue: any;
         private _currentValue: any;
-        /** @ignore */
+        
+        /** @hidden */
         public _workValue: any;
         public _workValue: any;
+        
+        /**
+         * The active target of the runtime animation
+         */
         private _activeTarget: any;
         private _activeTarget: any;
+        
+        /**
+         * The target path of the runtime animation
+         */
         private _targetPath: string = "";
         private _targetPath: string = "";
+        
+        /**
+         * The weight of the runtime animation
+         */
         private _weight = 1.0;
         private _weight = 1.0;
 
 
         /**
         /**
-         * Gets the current frame
+         * The ratio offset of the runtime animation
+         */
+        private _ratioOffset = 0;
+
+        /**
+         * The previous delay of the runtime animation
+         */
+        private _previousDelay: number = 0;
+        
+        /**
+         * The previous ratio of the runtime animation
+         */
+        private _previousRatio: number = 0;
+
+        /**
+         * Gets the current frame of the runtime animation
          */
          */
         public get currentFrame(): number {
         public get currentFrame(): number {
             return this._currentFrame;
             return this._currentFrame;
@@ -50,7 +126,7 @@
         }
         }
 
 
         /**
         /**
-         * Gets the path where to store the animated value in the target
+         * Gets the target path of the runtime animation
          */
          */
         public get targetPath(): string {
         public get targetPath(): string {
             return this._targetPath;
             return this._targetPath;
@@ -66,7 +142,7 @@
         /**
         /**
          * Create a new RuntimeAnimation object
          * Create a new RuntimeAnimation object
          * @param target defines the target of the animation
          * @param target defines the target of the animation
-         * @param animation defines the source {BABYLON.Animation} object
+         * @param animation defines the source animation object
          * @param scene defines the hosting scene
          * @param scene defines the hosting scene
          * @param host defines the initiating Animatable
          * @param host defines the initiating Animatable
          */
          */
@@ -79,10 +155,16 @@
             animation._runtimeAnimations.push(this);
             animation._runtimeAnimations.push(this);
         }
         }
 
 
+        /**
+         * Gets the animation from the runtime animation
+         */
         public get animation(): Animation {
         public get animation(): Animation {
             return this._animation;
             return this._animation;
         }
         }
 
 
+        /**
+         * Resets the runtime animation to the beginning
+         */
         public reset(): void {
         public reset(): void {
             this._offsetsCache = {};
             this._offsetsCache = {};
             this._highLimitsCache = {};
             this._highLimitsCache = {};
@@ -91,10 +173,17 @@
             this._originalValue = null;
             this._originalValue = null;
         }
         }
 
 
+        /**
+         * Specifies if the runtime animation is stopped
+         * @returns Boolean specifying if the runtime animation is stopped
+         */
         public isStopped(): boolean {
         public isStopped(): boolean {
             return this._stopped;
             return this._stopped;
         }        
         }        
 
 
+        /**
+         * Disposes of the runtime animation
+         */
         public dispose(): void {
         public dispose(): void {
             let index = this._animation.runtimeAnimations.indexOf(this);
             let index = this._animation.runtimeAnimations.indexOf(this);
 
 
@@ -102,139 +191,24 @@
                 this._animation.runtimeAnimations.splice(index, 1);
                 this._animation.runtimeAnimations.splice(index, 1);
             }
             }
         }
         }
-
-        private _getKeyValue(value: any): any {
-            if (typeof value === "function") {
-                return value();
-            }
-
-            return value;
-        }      
         
         
-        private _interpolate(currentFrame: number, repeatCount: number, loopMode?: number, offsetValue?: any, highLimitValue?: any) {
-            if (loopMode === Animation.ANIMATIONLOOPMODE_CONSTANT && repeatCount > 0) {
-                return highLimitValue.clone ? highLimitValue.clone() : highLimitValue;
-            }
-
+        /**
+         * Interpolates the animation from the current frame
+         * @param currentFrame The frame to interpolate the animation to
+         * @param repeatCount The number of times that the animation should loop
+         * @param loopMode The type of looping mode to use
+         * @param offsetValue Animation offset value
+         * @param highLimitValue The high limit value
+         * @returns The interpolated value
+         */
+        private _interpolate(currentFrame: number, repeatCount: number, loopMode?: number, offsetValue?: any, highLimitValue?: any): any {
             this._currentFrame = currentFrame;
             this._currentFrame = currentFrame;
 
 
-            let keys = this._animation.getKeys();
-
-            // Try to get a hash to find the right key
-            var startKeyIndex = Math.max(0, Math.min(keys.length - 1, Math.floor(keys.length * (currentFrame - keys[0].frame) / (keys[keys.length - 1].frame - keys[0].frame)) - 1));
-
-            if (keys[startKeyIndex].frame >= currentFrame) {
-                while (startKeyIndex - 1 >= 0 && keys[startKeyIndex].frame >= currentFrame) {
-                    startKeyIndex--;
-                }
+            if (this._animation.dataType === Animation.ANIMATIONTYPE_MATRIX && !this._workValue) {
+                this._workValue = Matrix.Zero();
             }
             }
 
 
-            for (var key = startKeyIndex; key < keys.length; key++) {
-                var endKey = keys[key + 1];
-
-                if (endKey.frame >= currentFrame) {
-
-                    var startKey = keys[key];
-                    var startValue = this._getKeyValue(startKey.value);
-                    if (startKey.interpolation === AnimationKeyInterpolation.STEP) {
-                        return startValue;
-                    }
-
-                    var endValue = this._getKeyValue(endKey.value);
-
-                    var useTangent = startKey.outTangent !== undefined && endKey.inTangent !== undefined;
-                    var frameDelta = endKey.frame - startKey.frame;
-
-                    // gradient : percent of currentFrame between the frame inf and the frame sup
-                    var gradient = (currentFrame - startKey.frame) / frameDelta;
-
-                    // check for easingFunction and correction of gradient
-                    let easingFunction = this._animation.getEasingFunction();
-                    if (easingFunction != null) {
-                        gradient = easingFunction.ease(gradient);
-                    }
-
-                    switch (this._animation.dataType) {
-                        // Float
-                        case Animation.ANIMATIONTYPE_FLOAT:
-                            var floatValue = useTangent ? this._animation.floatInterpolateFunctionWithTangents(startValue, startKey.outTangent * frameDelta, endValue, endKey.inTangent * frameDelta, gradient) : this._animation.floatInterpolateFunction(startValue, endValue, gradient);
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return floatValue;
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return offsetValue * repeatCount + floatValue;
-                            }
-                            break;
-                        // Quaternion
-                        case Animation.ANIMATIONTYPE_QUATERNION:
-                            var quatValue = useTangent ? this._animation.quaternionInterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this._animation.quaternionInterpolateFunction(startValue, endValue, gradient);
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return quatValue;
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return quatValue.addInPlace(offsetValue.scale(repeatCount));
-                            }
-
-                            return quatValue;
-                        // Vector3
-                        case Animation.ANIMATIONTYPE_VECTOR3:
-                            var vec3Value = useTangent ? this._animation.vector3InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this._animation.vector3InterpolateFunction(startValue, endValue, gradient);
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return vec3Value;
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return vec3Value.add(offsetValue.scale(repeatCount));
-                            }
-                        // Vector2
-                        case Animation.ANIMATIONTYPE_VECTOR2:
-                            var vec2Value = useTangent ? this._animation.vector2InterpolateFunctionWithTangents(startValue, startKey.outTangent.scale(frameDelta), endValue, endKey.inTangent.scale(frameDelta), gradient) : this._animation.vector2InterpolateFunction(startValue, endValue, gradient);
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return vec2Value;
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return vec2Value.add(offsetValue.scale(repeatCount));
-                            }
-                        // Size
-                        case Animation.ANIMATIONTYPE_SIZE:
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return this._animation.sizeInterpolateFunction(startValue, endValue, gradient);
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return this._animation.sizeInterpolateFunction(startValue, endValue, gradient).add(offsetValue.scale(repeatCount));
-                            }
-                        // Color3
-                        case Animation.ANIMATIONTYPE_COLOR3:
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    return this._animation.color3InterpolateFunction(startValue, endValue, gradient);
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return this._animation.color3InterpolateFunction(startValue, endValue, gradient).add(offsetValue.scale(repeatCount));
-                            }
-                        // Matrix
-                        case Animation.ANIMATIONTYPE_MATRIX:
-                            switch (loopMode) {
-                                case Animation.ANIMATIONLOOPMODE_CYCLE:
-                                case Animation.ANIMATIONLOOPMODE_CONSTANT:
-                                    if (Animation.AllowMatricesInterpolation) {
-                                        this._workValue = this._animation.matrixInterpolateFunction(startValue, endValue, gradient, this._workValue);
-                                        return this._workValue;
-                                    }
-                                case Animation.ANIMATIONLOOPMODE_RELATIVE:
-                                    return startValue;
-                            }
-                        default:
-                            break;
-                    }
-                    break;
-                }
-            }
-            return this._getKeyValue(keys[keys.length - 1].value);
+            return this._animation._interpolate(currentFrame, repeatCount, this._workValue, loopMode, offsetValue, highLimitValue);
         }
         }
 
 
         /**
         /**
@@ -253,6 +227,12 @@
             }
             }
         }
         }
 
 
+        /**
+         * Sets the value of the runtime animation
+         * @param target The target property of the runtime animation
+         * @param currentValue The current value to use for the runtime animation
+         * @param weight The weight to use for the runtime animation (Defaults to 1.0)
+         */
         private _setValue(target: any, currentValue: any, weight = 1.0): void {
         private _setValue(target: any, currentValue: any, weight = 1.0): void {
             // Set value
             // Set value
             var path: any;
             var path: any;
@@ -355,6 +335,10 @@
             }
             }
         }
         }
 
 
+        /**
+         * Gets the loop pmode of the runtime animation
+         * @returns Loop Mode
+         */
         private _getCorrectLoopMode(): number | undefined {
         private _getCorrectLoopMode(): number | undefined {
             if ( this._target && this._target.animationPropertiesOverride) {
             if ( this._target && this._target.animationPropertiesOverride) {
                 return this._target.animationPropertiesOverride.loopMode;
                 return this._target.animationPropertiesOverride.loopMode;
@@ -381,16 +365,15 @@
             this.setValue(currentValue, -1);
             this.setValue(currentValue, -1);
         }
         }
 
 
+        /**
+         * @hidden Internal use only
+         */
         public _prepareForSpeedRatioChange(newSpeedRatio: number): void {
         public _prepareForSpeedRatioChange(newSpeedRatio: number): void {
             let newRatio = this._previousDelay * (this._animation.framePerSecond * newSpeedRatio) / 1000.0;
             let newRatio = this._previousDelay * (this._animation.framePerSecond * newSpeedRatio) / 1000.0;
 
 
             this._ratioOffset = this._previousRatio - newRatio;
             this._ratioOffset = this._previousRatio - newRatio;
         }
         }
 
 
-        private _ratioOffset = 0;
-        private _previousDelay: number = 0;
-        private _previousRatio: number = 0;
-
         /**
         /**
          * Execute the current animation
          * Execute the current animation
          * @param delay defines the delay to add to the current frame
          * @param delay defines the delay to add to the current frame
@@ -445,7 +428,7 @@
 
 
             if (((to > from && ratio > range) || (from > to && ratio < range)) && !loop) { // If we are out of range and not looping get back to caller
             if (((to > from && ratio > range) || (from > to && ratio < range)) && !loop) { // If we are out of range and not looping get back to caller
                 returnValue = false;
                 returnValue = false;
-                highLimitValue = this._getKeyValue(keys[keys.length - 1].value);
+                highLimitValue = this._animation._getKeyValue(keys[keys.length - 1].value);
             } else {
             } else {
                 // Get max value if required
                 // Get max value if required
 
 

+ 33 - 23
src/Bones/babylon.bone.ts

@@ -23,7 +23,7 @@
         public length: number;
         public length: number;
 
 
         /** 
         /** 
-         * @ignore Internal only
+         * @hidden Internal only
          * Set this value to map this bone to a different index in the transform matrices
          * Set this value to map this bone to a different index in the transform matrices
          * Set this value to -1 to exclude the bone from the transform matrices
          * Set this value to -1 to exclude the bone from the transform matrices
          */
          */
@@ -38,20 +38,20 @@
         private _parent: Nullable<Bone>;
         private _parent: Nullable<Bone>;
         private _scalingDeterminant = 1;
         private _scalingDeterminant = 1;
         private _worldTransform = new Matrix();
         private _worldTransform = new Matrix();
-        
+
         private _localScaling: Vector3;
         private _localScaling: Vector3;
         private _localRotation: Quaternion;
         private _localRotation: Quaternion;
         private _localPosition: Vector3;
         private _localPosition: Vector3;
         private _needToDecompose = true;
         private _needToDecompose = true;
         private _needToCompose = false;
         private _needToCompose = false;
 
 
-        /** @ignore */
+        /** @hidden */
         get _matrix(): Matrix {
         get _matrix(): Matrix {
             this._compose();
             this._compose();
             return this._localMatrix;
             return this._localMatrix;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         set _matrix(value: Matrix) {
         set _matrix(value: Matrix) {
             this._localMatrix.copyFrom(value);
             this._localMatrix.copyFrom(value);
             this._needToDecompose = true;
             this._needToDecompose = true;
@@ -84,7 +84,9 @@
 
 
             this.setParent(parentBone, false);
             this.setParent(parentBone, false);
 
 
-            this._updateDifferenceMatrix();
+            if (baseMatrix || localMatrix) {
+                this._updateDifferenceMatrix();
+            }
         }
         }
 
 
         // Members
         // Members
@@ -202,7 +204,7 @@
         public set position(newPosition: Vector3) {
         public set position(newPosition: Vector3) {
             this._decompose();
             this._decompose();
             this._localPosition.copyFrom(newPosition);
             this._localPosition.copyFrom(newPosition);
-            
+
             this._markAsDirtyAndCompose();
             this._markAsDirtyAndCompose();
         }
         }
 
 
@@ -267,23 +269,29 @@
         }
         }
 
 
         /**
         /**
-         * Update the local matrix
-         * @param matrix defines the new local matrix
+         * Update the base and local matrices
+         * @param matrix defines the new base or local matrix
          * @param updateDifferenceMatrix defines if the difference matrix must be updated
          * @param updateDifferenceMatrix defines if the difference matrix must be updated
+         * @param updateLocalMatrix defines if the local matrix should be updated
          */
          */
-        public updateMatrix(matrix: Matrix, updateDifferenceMatrix = true): void {
+        public updateMatrix(matrix: Matrix, updateDifferenceMatrix = true, updateLocalMatrix = true): void {
             this._baseMatrix.copyFrom(matrix);
             this._baseMatrix.copyFrom(matrix);
-            this._localMatrix.copyFrom(matrix);
 
 
             if (updateDifferenceMatrix) {
             if (updateDifferenceMatrix) {
                 this._updateDifferenceMatrix();
                 this._updateDifferenceMatrix();
             }
             }
 
 
-            this._markAsDirtyAndDecompose();
+            if (updateLocalMatrix) {
+                this._localMatrix.copyFrom(matrix);
+                this._markAsDirtyAndDecompose();
+            }
+            else {
+                this.markAsDirty();
+            }
         }
         }
 
 
-        /** @ignore */
-        public _updateDifferenceMatrix(rootMatrix?: Matrix): void {
+        /** @hidden */
+        public _updateDifferenceMatrix(rootMatrix?: Matrix, updateChildren = true): void {
             if (!rootMatrix) {
             if (!rootMatrix) {
                 rootMatrix = this._baseMatrix;
                 rootMatrix = this._baseMatrix;
             }
             }
@@ -296,8 +304,10 @@
 
 
             this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform);
             this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform);
 
 
-            for (var index = 0; index < this.children.length; index++) {
-                this.children[index]._updateDifferenceMatrix();
+            if (updateChildren) {
+                for (var index = 0; index < this.children.length; index++) {
+                    this.children[index]._updateDifferenceMatrix();
+                }
             }
             }
 
 
             this._scalingDeterminant = (this._absoluteTransform.determinant() < 0 ? -1 : 1);
             this._scalingDeterminant = (this._absoluteTransform.determinant() < 0 ? -1 : 1);
@@ -318,7 +328,7 @@
         }
         }
 
 
         private _markAsDirtyAndDecompose() {
         private _markAsDirtyAndDecompose() {
-            this.markAsDirty();            
+            this.markAsDirty();
             this._needToDecompose = true;
             this._needToDecompose = true;
         }
         }
 
 
@@ -540,12 +550,12 @@
          * Set the bone scaling in local space
          * Set the bone scaling in local space
          * @param scale defines the scaling vector
          * @param scale defines the scaling vector
          */
          */
-        public setScale(scale: Vector3): void {          
+        public setScale(scale: Vector3): void {
             this._decompose();
             this._decompose();
             this._localScaling.copyFrom(scale);
             this._localScaling.copyFrom(scale);
             this._markAsDirtyAndCompose();
             this._markAsDirtyAndCompose();
-        }    
-        
+        }
+
         /**
         /**
          * Gets the current scaling in local space
          * Gets the current scaling in local space
          * @returns the current scaling vector
          * @returns the current scaling vector
@@ -562,7 +572,7 @@
         public getScaleToRef(result: Vector3) {
         public getScaleToRef(result: Vector3) {
             this._decompose();
             this._decompose();
             result.copyFrom(this._localScaling);
             result.copyFrom(this._localScaling);
-        }        
+        }
 
 
         /**
         /**
          * Set the yaw, pitch, and roll of the bone in local or world space
          * Set the yaw, pitch, and roll of the bone in local or world space
@@ -575,7 +585,7 @@
         public setYawPitchRoll(yaw: number, pitch: number, roll: number, space = Space.LOCAL, mesh?: AbstractMesh): void {
         public setYawPitchRoll(yaw: number, pitch: number, roll: number, space = Space.LOCAL, mesh?: AbstractMesh): void {
             if (space === Space.LOCAL) {
             if (space === Space.LOCAL) {
                 var quat = Bone._tmpQuat;
                 var quat = Bone._tmpQuat;
-                Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, quat);                
+                Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, quat);
                 this.setRotationQuaternion(quat, space, mesh);
                 this.setRotationQuaternion(quat, space, mesh);
                 return;
                 return;
             }
             }
@@ -622,7 +632,7 @@
             if (space === Space.LOCAL) {
             if (space === Space.LOCAL) {
                 var quat = Bone._tmpQuat;
                 var quat = Bone._tmpQuat;
                 Quaternion.RotationAxisToRef(axis, angle, quat);
                 Quaternion.RotationAxisToRef(axis, angle, quat);
-    
+
                 this.setRotationQuaternion(quat, space, mesh);
                 this.setRotationQuaternion(quat, space, mesh);
                 return;
                 return;
             }
             }
@@ -661,7 +671,7 @@
                 this._localRotation.copyFrom(quat);
                 this._localRotation.copyFrom(quat);
 
 
                 this._markAsDirtyAndCompose();
                 this._markAsDirtyAndCompose();
-    
+
                 return;
                 return;
             }
             }
 
 

+ 4 - 4
src/Bones/babylon.skeleton.ts

@@ -293,17 +293,17 @@
             return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);
             return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _markAsDirty(): void {
         public _markAsDirty(): void {
             this._isDirty = true;
             this._isDirty = true;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _registerMeshWithPoseMatrix(mesh: AbstractMesh): void {
         public _registerMeshWithPoseMatrix(mesh: AbstractMesh): void {
             this._meshesWithPoseMatrix.push(mesh);
             this._meshesWithPoseMatrix.push(mesh);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _unregisterMeshWithPoseMatrix(mesh: AbstractMesh): void {
         public _unregisterMeshWithPoseMatrix(mesh: AbstractMesh): void {
             var index = this._meshesWithPoseMatrix.indexOf(mesh);
             var index = this._meshesWithPoseMatrix.indexOf(mesh);
 
 
@@ -312,7 +312,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _computeTransformMatrices(targetMatrix: Float32Array, initialSkinMatrix: Nullable<Matrix>): void {
         public _computeTransformMatrices(targetMatrix: Float32Array, initialSkinMatrix: Nullable<Matrix>): void {
 
 
             this.onBeforeComputeObservable.notifyObservers(this);
             this.onBeforeComputeObservable.notifyObservers(this);

+ 7 - 0
src/Collisions/babylon.collisionCoordinator.ts

@@ -77,9 +77,13 @@ module BABYLON {
         radius: Array<number>;
         radius: Array<number>;
     }
     }
 
 
+    /** Defines supported task for worker process */
     export enum WorkerTaskType {
     export enum WorkerTaskType {
+        /** Initialization */
         INIT,
         INIT,
+        /** Update of geometry */
         UPDATE,
         UPDATE,
+        /** Evaluate collision */
         COLLIDE
         COLLIDE
     }
     }
 
 
@@ -113,8 +117,11 @@ module BABYLON {
         removedGeometries: Array<string>;
         removedGeometries: Array<string>;
     }
     }
 
 
+    /** Defines kind of replies returned by worker */
     export enum WorkerReplyType {
     export enum WorkerReplyType {
+        /** Success */
         SUCCESS,
         SUCCESS,
+        /** Unkown error */
         UNKNOWN_ERROR
         UNKNOWN_ERROR
     }
     }
 
 

+ 53 - 46
src/Engine/babylon.engine.ts

@@ -843,7 +843,7 @@
          */
          */
         public disableUniformBuffers = false;
         public disableUniformBuffers = false;
 
 
-        /** @ignore */
+        /** @hidden */
         public _uniformBuffers = new Array<UniformBuffer>();
         public _uniformBuffers = new Array<UniformBuffer>();
 
 
         /**
         /**
@@ -890,10 +890,10 @@
             return this._webGLVersion < 2 || this.forcePOTTextures;
             return this._webGLVersion < 2 || this.forcePOTTextures;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _badOS = false;
         public _badOS = false;
 
 
-        /** @ignore */
+        /** @hidden */
         public _badDesktopOS = false;
         public _badDesktopOS = false;
 
 
         /**
         /**
@@ -906,7 +906,7 @@
         /** 
         /** 
          * Gets the audio engine 
          * Gets the audio engine 
          * @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
          * @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
-         * @ignoreNaming
+         * @ignorenaming
          */
          */
         public static audioEngine: AudioEngine;
         public static audioEngine: AudioEngine;
 
 
@@ -942,7 +942,7 @@
         public onVRRequestPresentStart = new Observable<Engine>();
         public onVRRequestPresentStart = new Observable<Engine>();
 
 
         private _hardwareScalingLevel: number;
         private _hardwareScalingLevel: number;
-        /** @ignore */
+        /** @hidden */
         protected _caps: EngineCapabilities;
         protected _caps: EngineCapabilities;
         private _pointerLockRequested: boolean;
         private _pointerLockRequested: boolean;
         private _isStencilEnable: boolean;
         private _isStencilEnable: boolean;
@@ -950,9 +950,9 @@
 
 
         private _loadingScreen: ILoadingScreen;
         private _loadingScreen: ILoadingScreen;
 
 
-        /** @ignore */
+        /** @hidden */
         public _drawCalls = new PerfCounter();
         public _drawCalls = new PerfCounter();
-        /** @ignore */
+        /** @hidden */
         public _textureCollisions = new PerfCounter();
         public _textureCollisions = new PerfCounter();
 
 
         private _glVersion: string;
         private _glVersion: string;
@@ -1000,42 +1000,42 @@
         }
         }
 
 
         // States
         // States
-        /** @ignore */
+        /** @hidden */
         protected _depthCullingState = new _DepthCullingState();
         protected _depthCullingState = new _DepthCullingState();
-        /** @ignore */
+        /** @hidden */
         protected _stencilState = new _StencilState();
         protected _stencilState = new _StencilState();
-        /** @ignore */
+        /** @hidden */
         protected _alphaState = new _AlphaState();
         protected _alphaState = new _AlphaState();
-        /** @ignore */
+        /** @hidden */
         protected _alphaMode = Engine.ALPHA_DISABLE;
         protected _alphaMode = Engine.ALPHA_DISABLE;
 
 
         // Cache
         // Cache
         private _internalTexturesCache = new Array<InternalTexture>();
         private _internalTexturesCache = new Array<InternalTexture>();
-        /** @ignore */
+        /** @hidden */
         protected _activeChannel = 0;
         protected _activeChannel = 0;
         private _currentTextureChannel = -1;    
         private _currentTextureChannel = -1;    
-        /** @ignore */
+        /** @hidden */
         protected _boundTexturesCache: { [key: string]: Nullable<InternalTexture> } = {};
         protected _boundTexturesCache: { [key: string]: Nullable<InternalTexture> } = {};
-        /** @ignore */
+        /** @hidden */
         protected _currentEffect: Nullable<Effect>;
         protected _currentEffect: Nullable<Effect>;
-        /** @ignore */
+        /** @hidden */
         protected _currentProgram: Nullable<WebGLProgram>;
         protected _currentProgram: Nullable<WebGLProgram>;
         private _compiledEffects: { [key: string]: Effect } = {}
         private _compiledEffects: { [key: string]: Effect } = {}
         private _vertexAttribArraysEnabled: boolean[] = [];
         private _vertexAttribArraysEnabled: boolean[] = [];
-        /** @ignore */
+        /** @hidden */
         protected _cachedViewport: Nullable<Viewport>;
         protected _cachedViewport: Nullable<Viewport>;
         private _cachedVertexArrayObject: Nullable<WebGLVertexArrayObject>;
         private _cachedVertexArrayObject: Nullable<WebGLVertexArrayObject>;
-        /** @ignore */
+        /** @hidden */
         protected _cachedVertexBuffers: any;
         protected _cachedVertexBuffers: any;
-        /** @ignore */
+        /** @hidden */
         protected _cachedIndexBuffer: Nullable<WebGLBuffer>;
         protected _cachedIndexBuffer: Nullable<WebGLBuffer>;
-        /** @ignore */
+        /** @hidden */
         protected _cachedEffectForVertexBuffers: Nullable<Effect>;
         protected _cachedEffectForVertexBuffers: Nullable<Effect>;
-        /** @ignore */
+        /** @hidden */
         protected _currentRenderTarget: Nullable<InternalTexture>;
         protected _currentRenderTarget: Nullable<InternalTexture>;
         private _uintIndicesCurrentlySet = false;
         private _uintIndicesCurrentlySet = false;
         private _currentBoundBuffer = new Array<Nullable<WebGLBuffer>>();
         private _currentBoundBuffer = new Array<Nullable<WebGLBuffer>>();
-        /** @ignore */
+        /** @hidden */
         protected _currentFramebuffer: Nullable<WebGLFramebuffer>;
         protected _currentFramebuffer: Nullable<WebGLFramebuffer>;
         private _currentBufferPointers = new Array<BufferPointer>();
         private _currentBufferPointers = new Array<BufferPointer>();
         private _currentInstanceLocations = new Array<number>();
         private _currentInstanceLocations = new Array<number>();
@@ -1805,13 +1805,13 @@
             return this._caps;
             return this._caps;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public get drawCalls(): number {
         public get drawCalls(): number {
             Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
             Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
             return 0;
             return 0;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public get drawCallsPerfCounter(): Nullable<PerfCounter> {
         public get drawCallsPerfCounter(): Nullable<PerfCounter> {
             Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
             Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
             return null;
             return null;
@@ -2030,7 +2030,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _renderLoop(): void {
         public _renderLoop(): void {
             if (!this._contextWasLost) {
             if (!this._contextWasLost) {
                 var shouldRender = true;
                 var shouldRender = true;
@@ -3123,7 +3123,7 @@
             this._gl.deleteVertexArray(vao);
             this._gl.deleteVertexArray(vao);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _releaseBuffer(buffer: WebGLBuffer): boolean {
         public _releaseBuffer(buffer: WebGLBuffer): boolean {
             buffer.references--;
             buffer.references--;
 
 
@@ -3324,7 +3324,7 @@
 
 
         // Shaders
         // Shaders
         
         
-        /** @ignore */
+        /** @hidden */
         public _releaseEffect(effect: Effect): void {
         public _releaseEffect(effect: Effect): void {
             if (this._compiledEffects[effect._key]) {
             if (this._compiledEffects[effect._key]) {
                 delete this._compiledEffects[effect._key];
                 delete this._compiledEffects[effect._key];
@@ -3333,7 +3333,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _deleteProgram(program: WebGLProgram): void {
         public _deleteProgram(program: WebGLProgram): void {
             if (program) {
             if (program) {
                 program.__SPECTOR_rebuildProgram = null;
                 program.__SPECTOR_rebuildProgram = null;
@@ -4084,7 +4084,7 @@
             return null;
             return null;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _createTexture(): WebGLTexture {
         public _createTexture(): WebGLTexture {
             let texture = this._gl.createTexture();
             let texture = this._gl.createTexture();
 
 
@@ -5235,12 +5235,12 @@
             return samples;
             return samples;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _uploadDataToTexture(target: number, lod: number, internalFormat: number, width: number, height: number, format: number, type: number, data: ArrayBufferView) {
         public _uploadDataToTexture(target: number, lod: number, internalFormat: number, width: number, height: number, format: number, type: number, data: ArrayBufferView) {
             this._gl.texImage2D(target, lod, internalFormat, width, height, 0, format, type, data);
             this._gl.texImage2D(target, lod, internalFormat, width, height, 0, format, type, data);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _uploadCompressedDataToTexture(target: number, lod: number, internalFormat: number, width: number, height: number, data: ArrayBufferView) {
         public _uploadCompressedDataToTexture(target: number, lod: number, internalFormat: number, width: number, height: number, data: ArrayBufferView) {
             this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, <DataView>data);
             this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, <DataView>data);
         }
         }
@@ -5349,6 +5349,9 @@
                 }
                 }
 
 
                 let texture = loadData.texture as InternalTexture;
                 let texture = loadData.texture as InternalTexture;
+                if(loadData.info.sphericalPolynomial){
+                    texture._sphericalPolynomial = loadData.info.sphericalPolynomial;
+                }
                 texture._dataSource = InternalTexture.DATASOURCE_CUBEPREFILTERED;
                 texture._dataSource = InternalTexture.DATASOURCE_CUBEPREFILTERED;
                 texture._lodGenerationScale = scale;
                 texture._lodGenerationScale = scale;
                 texture._lodGenerationOffset = offset;
                 texture._lodGenerationOffset = offset;
@@ -5421,7 +5424,7 @@
                 }
                 }
             };
             };
 
 
-            return this.createCubeTexture(rootUrl, scene, null, false, callback, onError, format, forcedExtension);
+            return this.createCubeTexture(rootUrl, scene, null, false, callback, onError, format, forcedExtension, true);
         }
         }
 
 
         /**
         /**
@@ -5434,9 +5437,10 @@
          * @param onError defines an optional callback raised if there is an issue to load the texture
          * @param onError defines an optional callback raised if there is an issue to load the texture
          * @param format defines the format of the data
          * @param format defines the format of the data
          * @param forcedExtension defines the extension to use to pick the right loader
          * @param forcedExtension defines the extension to use to pick the right loader
+         * @param createPolynomials if a polynomial sphere should be created for the cube texture
          * @returns the cube texture as an InternalTexture
          * @returns the cube texture as an InternalTexture
          */
          */
-        public createCubeTexture(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null): InternalTexture {
+        public createCubeTexture(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null, createPolynomials = false): InternalTexture {
             var gl = this._gl;
             var gl = this._gl;
 
 
             var texture = new InternalTexture(this, InternalTexture.DATASOURCE_CUBE);
             var texture = new InternalTexture(this, InternalTexture.DATASOURCE_CUBE);
@@ -5527,7 +5531,10 @@
                     this._loadFile(rootUrl,
                     this._loadFile(rootUrl,
                         data => {
                         data => {
                             var info = DDSTools.GetDDSInfo(data);
                             var info = DDSTools.GetDDSInfo(data);
-
+                            if(createPolynomials){
+                                info.sphericalPolynomial = new SphericalPolynomial();
+                            }
+                            
                             var loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && !noMipmap;
                             var loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && !noMipmap;
 
 
                             this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);
                             this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);
@@ -5545,7 +5552,7 @@
                             texture.height = info.height;
                             texture.height = info.height;
                             texture.isReady = true;
                             texture.isReady = true;
                             texture.type = info.textureType;
                             texture.type = info.textureType;
-
+                            
                             if (onLoad) {
                             if (onLoad) {
                                 onLoad({ isDDS: true, width: info.width, info, data, texture });
                                 onLoad({ isDDS: true, width: info.width, info, data, texture });
                             }
                             }
@@ -6035,7 +6042,7 @@
             return rgbaData;
             return rgbaData;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _releaseFramebufferObjects(texture: InternalTexture): void {
         public _releaseFramebufferObjects(texture: InternalTexture): void {
             var gl = this._gl;
             var gl = this._gl;
 
 
@@ -6060,7 +6067,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _releaseTexture(texture: InternalTexture): void {
         public _releaseTexture(texture: InternalTexture): void {
             var gl = this._gl;
             var gl = this._gl;
 
 
@@ -6213,7 +6220,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         protected _bindTextureDirectly(target: number, texture: Nullable<InternalTexture>, forTextureDataUpdate = false, force = false): void {
         protected _bindTextureDirectly(target: number, texture: Nullable<InternalTexture>, forTextureDataUpdate = false, force = false): void {
             if (forTextureDataUpdate && texture && texture._designatedSlot > -1) {
             if (forTextureDataUpdate && texture && texture._designatedSlot > -1) {
                 this._activeChannel = texture._designatedSlot;
                 this._activeChannel = texture._designatedSlot;
@@ -6254,7 +6261,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _bindTexture(channel: number, texture: Nullable<InternalTexture>): void {
         public _bindTexture(channel: number, texture: Nullable<InternalTexture>): void {
             if (channel < 0) {
             if (channel < 0) {
                 return;
                 return;
@@ -6499,7 +6506,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _setAnisotropicLevel(target: number, texture: BaseTexture) {
         public _setAnisotropicLevel(target: number, texture: BaseTexture) {
             var internalTexture = texture.getInternalTexture();
             var internalTexture = texture.getInternalTexture();
 
 
@@ -6905,7 +6912,7 @@
             this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0;
             this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _readTexturePixels(texture: InternalTexture, width: number, height: number, faceIndex = -1): ArrayBufferView {
         public _readTexturePixels(texture: InternalTexture, width: number, height: number, faceIndex = -1): ArrayBufferView {
             let gl = this._gl;
             let gl = this._gl;
             if (!this._dummyFramebuffer) {
             if (!this._dummyFramebuffer) {
@@ -7010,7 +7017,7 @@
             return successful;
             return successful;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _getWebGLTextureType(type: number): number {
         public _getWebGLTextureType(type: number): number {
             if (type === Engine.TEXTURETYPE_FLOAT) {
             if (type === Engine.TEXTURETYPE_FLOAT) {
                 return this._gl.FLOAT;
                 return this._gl.FLOAT;
@@ -7054,7 +7061,7 @@
             return internalFormat;
             return internalFormat;
         }        
         }        
 
 
-        /** @ignore */
+        /** @hidden */
         public _getRGBABufferInternalSizedFormat(type: number, format?: number): number {
         public _getRGBABufferInternalSizedFormat(type: number, format?: number): number {
             if (this._webGLVersion === 1) {
             if (this._webGLVersion === 1) {
                 if (format) {
                 if (format) {
@@ -7092,7 +7099,7 @@
             return this._gl.RGBA;
             return this._gl.RGBA;
         };
         };
 
 
-        /** @ignore */
+        /** @hidden */
         public _getRGBAMultiSampleBufferFormat(type: number): number {
         public _getRGBAMultiSampleBufferFormat(type: number): number {
             if (type === Engine.TEXTURETYPE_FLOAT) {
             if (type === Engine.TEXTURETYPE_FLOAT) {
                 return this._gl.RGBA32F;
                 return this._gl.RGBA32F;
@@ -7378,7 +7385,7 @@
             this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER, 0, value);
             this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER, 0, value);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _loadFile(url: string, onSuccess: (data: string | ArrayBuffer, responseURL?: string) => void, onProgress?: (data: any) => void, database?: Database, useArrayBuffer?: boolean, onError?: (request?: XMLHttpRequest, exception?: any) => void): IFileRequest {
         public _loadFile(url: string, onSuccess: (data: string | ArrayBuffer, responseURL?: string) => void, onProgress?: (data: any) => void, database?: Database, useArrayBuffer?: boolean, onError?: (request?: XMLHttpRequest, exception?: any) => void): IFileRequest {
             let request = Tools.LoadFile(url, onSuccess, onProgress, database, useArrayBuffer, onError);
             let request = Tools.LoadFile(url, onSuccess, onProgress, database, useArrayBuffer, onError);
             this._activeRequests.push(request);
             this._activeRequests.push(request);
@@ -7388,7 +7395,7 @@
             return request;
             return request;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _loadFileAsync(url: string, database?: Database, useArrayBuffer?: boolean): Promise<string | ArrayBuffer> {
         public _loadFileAsync(url: string, database?: Database, useArrayBuffer?: boolean): Promise<string | ArrayBuffer> {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
                 this._loadFile(url, (data) => {
                 this._loadFile(url, (data) => {
@@ -7432,7 +7439,7 @@
         /**
         /**
          * Gets a boolean indicating if the engine can be instanciated (ie. if a webGL context can be found)
          * Gets a boolean indicating if the engine can be instanciated (ie. if a webGL context can be found)
          * @returns true if the engine can be created
          * @returns true if the engine can be created
-         * @ignoreNaming
+         * @ignorenaming
          */
          */
         public static isSupported(): boolean {
         public static isSupported(): boolean {
             try {
             try {

+ 1 - 1
src/Gamepad/Controllers/babylon.poseEnabledController.ts

@@ -49,7 +49,7 @@ module BABYLON {
 
 
     /**
     /**
      * Defines the ExtendedGamepadButton interface for a gamepad button which includes state provided by a pose controller
      * Defines the ExtendedGamepadButton interface for a gamepad button which includes state provided by a pose controller
-     * @ignore
+     * @hidden
      */
      */
     export interface ExtendedGamepadButton extends GamepadButton {
     export interface ExtendedGamepadButton extends GamepadButton {
         /**
         /**

+ 1 - 1
src/Gamepad/Controllers/babylon.windowsMotionController.ts

@@ -264,7 +264,7 @@ module BABYLON {
          * Moves the axis on the controller mesh based on its current state
          * Moves the axis on the controller mesh based on its current state
          * @param axis the index of the axis
          * @param axis the index of the axis
          * @param axisValue the value of the axis which determines the meshes new position
          * @param axisValue the value of the axis which determines the meshes new position
-         * @ignore
+         * @hidden
          */
          */
         protected _lerpAxisTransform(axis: number, axisValue: number) {
         protected _lerpAxisTransform(axis: number, axisValue: number) {
             if (!this._loadedMeshInfo) {
             if (!this._loadedMeshInfo) {

+ 98 - 2
src/Gamepad/babylon.xboxGamepad.ts

@@ -1,25 +1,46 @@
 module BABYLON {
 module BABYLON {
 
 
+    /**
+     * Defines supported buttons for XBox360 compatible gamepads
+     */
     export enum Xbox360Button {
     export enum Xbox360Button {
+        /** A */
         A,
         A,
+        /** B */
         B,
         B,
+        /** X */
         X,
         X,
+        /** Y */
         Y,
         Y,
+        /** Start */
         Start,
         Start,
+        /** Back */
         Back,
         Back,
+        /** Left button */
         LB,
         LB,
+        /** Right button */
         RB,
         RB,
+        /** Left stick */
         LeftStick,
         LeftStick,
+        /** Right stick */
         RightStick
         RightStick
     }
     }
 
 
+    /** Defines values for XBox360 DPad  */
     export enum Xbox360Dpad {
     export enum Xbox360Dpad {
+        /** Up */
         Up,
         Up,
+        /** Down */
         Down,
         Down,
+        /** Left */
         Left,
         Left,
+        /** Right */
         Right
         Right
     }
     }
 
 
+    /**
+     * Defines a XBox360 gamepad
+     */
     export class Xbox360Pad extends Gamepad {
     export class Xbox360Pad extends Gamepad {
         private _leftTrigger: number = 0;
         private _leftTrigger: number = 0;
         private _rightTrigger: number = 0;
         private _rightTrigger: number = 0;
@@ -32,9 +53,13 @@
         private _ondpaddown: (dPadPressed: Xbox360Dpad) => void;
         private _ondpaddown: (dPadPressed: Xbox360Dpad) => void;
         private _ondpadup: (dPadReleased: Xbox360Dpad) => void;
         private _ondpadup: (dPadReleased: Xbox360Dpad) => void;
 
 
+        /** Observable raised when a button is pressed */
         public onButtonDownObservable = new Observable<Xbox360Button>();
         public onButtonDownObservable = new Observable<Xbox360Button>();
+        /** Observable raised when a button is released */
         public onButtonUpObservable = new Observable<Xbox360Button>();        
         public onButtonUpObservable = new Observable<Xbox360Button>();        
+        /** Observable raised when a pad is pressed */
         public onPadDownObservable = new Observable<Xbox360Dpad>();
         public onPadDownObservable = new Observable<Xbox360Dpad>();
+        /** Observable raised when a pad is released */
         public onPadUpObservable = new Observable<Xbox360Dpad>();        
         public onPadUpObservable = new Observable<Xbox360Dpad>();        
 
 
         private _buttonA: number = 0;
         private _buttonA: number = 0;
@@ -55,20 +80,38 @@
 
 
         private _isXboxOnePad: boolean = false;
         private _isXboxOnePad: boolean = false;
 
 
+        /**
+         * Creates a new XBox360 gamepad object
+         * @param id defines the id of this gamepad
+         * @param index defines its index
+         * @param gamepad defines the internal HTML gamepad object
+         * @param xboxOne defines if it is a XBox One gamepad
+         */
         constructor(id: string, index: number, gamepad: any, xboxOne: boolean = false) {
         constructor(id: string, index: number, gamepad: any, xboxOne: boolean = false) {
             super(id, index, gamepad, 0, 1, 2, 3);
             super(id, index, gamepad, 0, 1, 2, 3);
             this.type = Gamepad.XBOX;
             this.type = Gamepad.XBOX;
             this._isXboxOnePad = xboxOne;
             this._isXboxOnePad = xboxOne;
         }
         }
 
 
+        /**
+         * Defines the callback to call when left trigger is pressed
+         * @param callback defines the callback to use
+         */
         public onlefttriggerchanged(callback: (value: number) => void) {
         public onlefttriggerchanged(callback: (value: number) => void) {
             this._onlefttriggerchanged = callback;
             this._onlefttriggerchanged = callback;
         }
         }
 
 
+        /**
+         * Defines the callback to call when right trigger is pressed
+         * @param callback defines the callback to use
+         */        
         public onrighttriggerchanged(callback: (value: number) => void) {
         public onrighttriggerchanged(callback: (value: number) => void) {
             this._onrighttriggerchanged = callback;
             this._onrighttriggerchanged = callback;
         }
         }
-
+ 
+        /**
+         * Gets or sets left trigger value
+         */
         public get leftTrigger(): number {
         public get leftTrigger(): number {
             return this._leftTrigger;
             return this._leftTrigger;
         }
         }
@@ -79,6 +122,9 @@
             this._leftTrigger = newValue;
             this._leftTrigger = newValue;
         }
         }
 
 
+        /**
+         * Gets or sets right trigger value
+         */        
         public get rightTrigger(): number {
         public get rightTrigger(): number {
             return this._rightTrigger;
             return this._rightTrigger;
         }
         }
@@ -89,15 +135,34 @@
             this._rightTrigger = newValue;
             this._rightTrigger = newValue;
         }
         }
 
 
+        /**
+         * Defines the callback to call when a button is pressed
+         * @param callback defines the callback to use
+         */
         public onbuttondown(callback: (buttonPressed: Xbox360Button) => void) {
         public onbuttondown(callback: (buttonPressed: Xbox360Button) => void) {
             this._onbuttondown = callback;
             this._onbuttondown = callback;
         }
         }
+
+        /**
+         * Defines the callback to call when a button is released
+         * @param callback defines the callback to use
+         */        
         public onbuttonup(callback: (buttonReleased: Xbox360Button) => void) {
         public onbuttonup(callback: (buttonReleased: Xbox360Button) => void) {
             this._onbuttonup = callback;
             this._onbuttonup = callback;
         }
         }
+
+        /**
+         * Defines the callback to call when a pad is pressed
+         * @param callback defines the callback to use
+         */             
         public ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void) {
         public ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void) {
             this._ondpaddown = callback;
             this._ondpaddown = callback;
         }
         }
+
+        /**
+         * Defines the callback to call when a pad is released
+         * @param callback defines the callback to use
+         */             
         public ondpadup(callback: (dPadReleased: Xbox360Dpad) => void) {
         public ondpadup(callback: (dPadReleased: Xbox360Dpad) => void) {
             this._ondpadup = callback;
             this._ondpadup = callback;
         }
         }
@@ -143,90 +208,121 @@
             return newValue;
             return newValue;
         }
         }
 
 
+        /** Gets or sets value of A button */
         public get buttonA(): number {
         public get buttonA(): number {
             return this._buttonA;
             return this._buttonA;
         }
         }
         public set buttonA(value) {
         public set buttonA(value) {
             this._buttonA = this._setButtonValue(value, this._buttonA, Xbox360Button.A);
             this._buttonA = this._setButtonValue(value, this._buttonA, Xbox360Button.A);
         }
         }
+
+        /** Gets or sets value of B button */
         public get buttonB(): number {
         public get buttonB(): number {
             return this._buttonB;
             return this._buttonB;
         }
         }
         public set buttonB(value) {
         public set buttonB(value) {
             this._buttonB = this._setButtonValue(value, this._buttonB, Xbox360Button.B);
             this._buttonB = this._setButtonValue(value, this._buttonB, Xbox360Button.B);
         }
         }
+
+        /** Gets or sets value of X button */       
         public get buttonX(): number {
         public get buttonX(): number {
             return this._buttonX;
             return this._buttonX;
         }
         }
         public set buttonX(value) {
         public set buttonX(value) {
             this._buttonX = this._setButtonValue(value, this._buttonX, Xbox360Button.X);
             this._buttonX = this._setButtonValue(value, this._buttonX, Xbox360Button.X);
         }
         }
+
+        /** Gets or sets value of Y button */        
         public get buttonY(): number {
         public get buttonY(): number {
             return this._buttonY;
             return this._buttonY;
         }
         }
         public set buttonY(value) {
         public set buttonY(value) {
             this._buttonY = this._setButtonValue(value, this._buttonY, Xbox360Button.Y);
             this._buttonY = this._setButtonValue(value, this._buttonY, Xbox360Button.Y);
-        }
+        }        
+        
+        /** Gets or sets value of Start button  */
         public get buttonStart(): number {
         public get buttonStart(): number {
             return this._buttonStart;
             return this._buttonStart;
         }
         }
         public set buttonStart(value) {
         public set buttonStart(value) {
             this._buttonStart = this._setButtonValue(value, this._buttonStart, Xbox360Button.Start);
             this._buttonStart = this._setButtonValue(value, this._buttonStart, Xbox360Button.Start);
         }
         }
+
+        /** Gets or sets value of Back button  */        
         public get buttonBack(): number {
         public get buttonBack(): number {
             return this._buttonBack;
             return this._buttonBack;
         }
         }
         public set buttonBack(value) {
         public set buttonBack(value) {
             this._buttonBack = this._setButtonValue(value, this._buttonBack, Xbox360Button.Back);
             this._buttonBack = this._setButtonValue(value, this._buttonBack, Xbox360Button.Back);
         }
         }
+
+        /** Gets or sets value of Left button  */        
         public get buttonLB(): number {
         public get buttonLB(): number {
             return this._buttonLB;
             return this._buttonLB;
         }
         }
         public set buttonLB(value) {
         public set buttonLB(value) {
             this._buttonLB = this._setButtonValue(value, this._buttonLB, Xbox360Button.LB);
             this._buttonLB = this._setButtonValue(value, this._buttonLB, Xbox360Button.LB);
         }
         }
+
+        /** Gets or sets value of Right button  */        
         public get buttonRB(): number {
         public get buttonRB(): number {
             return this._buttonRB;
             return this._buttonRB;
         }
         }
         public set buttonRB(value) {
         public set buttonRB(value) {
             this._buttonRB = this._setButtonValue(value, this._buttonRB, Xbox360Button.RB);
             this._buttonRB = this._setButtonValue(value, this._buttonRB, Xbox360Button.RB);
         }
         }
+
+        /** Gets or sets value of left stick */  
         public get buttonLeftStick(): number {
         public get buttonLeftStick(): number {
             return this._buttonLeftStick;
             return this._buttonLeftStick;
         }
         }
         public set buttonLeftStick(value) {
         public set buttonLeftStick(value) {
             this._buttonLeftStick = this._setButtonValue(value, this._buttonLeftStick, Xbox360Button.LeftStick);
             this._buttonLeftStick = this._setButtonValue(value, this._buttonLeftStick, Xbox360Button.LeftStick);
         }
         }
+
+        /** Gets or sets value of right stick */  
         public get buttonRightStick(): number {
         public get buttonRightStick(): number {
             return this._buttonRightStick;
             return this._buttonRightStick;
         }
         }
         public set buttonRightStick(value) {
         public set buttonRightStick(value) {
             this._buttonRightStick = this._setButtonValue(value, this._buttonRightStick, Xbox360Button.RightStick);
             this._buttonRightStick = this._setButtonValue(value, this._buttonRightStick, Xbox360Button.RightStick);
         }
         }
+
+        /** Gets or sets value of DPad up */  
         public get dPadUp(): number {
         public get dPadUp(): number {
             return this._dPadUp;
             return this._dPadUp;
         }
         }
         public set dPadUp(value) {
         public set dPadUp(value) {
             this._dPadUp = this._setDPadValue(value, this._dPadUp, Xbox360Dpad.Up);
             this._dPadUp = this._setDPadValue(value, this._dPadUp, Xbox360Dpad.Up);
         }
         }
+
+        /** Gets or sets value of DPad down */  
         public get dPadDown(): number {
         public get dPadDown(): number {
             return this._dPadDown;
             return this._dPadDown;
         }
         }
         public set dPadDown(value) {
         public set dPadDown(value) {
             this._dPadDown = this._setDPadValue(value, this._dPadDown, Xbox360Dpad.Down);
             this._dPadDown = this._setDPadValue(value, this._dPadDown, Xbox360Dpad.Down);
         }
         }
+
+        /** Gets or sets value of DPad left */  
         public get dPadLeft(): number {
         public get dPadLeft(): number {
             return this._dPadLeft;
             return this._dPadLeft;
         }
         }
         public set dPadLeft(value) {
         public set dPadLeft(value) {
             this._dPadLeft = this._setDPadValue(value, this._dPadLeft, Xbox360Dpad.Left);
             this._dPadLeft = this._setDPadValue(value, this._dPadLeft, Xbox360Dpad.Left);
         }
         }
+
+        /** Gets or sets value of DPad right */  
         public get dPadRight(): number {
         public get dPadRight(): number {
             return this._dPadRight;
             return this._dPadRight;
         }
         }
         public set dPadRight(value) {
         public set dPadRight(value) {
             this._dPadRight = this._setDPadValue(value, this._dPadRight, Xbox360Dpad.Right);
             this._dPadRight = this._setDPadValue(value, this._dPadRight, Xbox360Dpad.Right);
         }
         }
+
+        /**
+         * Force the gamepad to synchronize with device values
+         */
         public update() {
         public update() {
             super.update();
             super.update();
             if (this._isXboxOnePad) {
             if (this._isXboxOnePad) {

+ 4 - 23
src/Helpers/babylon.environmentHelper.ts

@@ -396,37 +396,18 @@ module BABYLON {
         /**
         /**
          * Sets the primary color of all the available elements.
          * Sets the primary color of all the available elements.
          * @param color the main color to affect to the ground and the background
          * @param color the main color to affect to the ground and the background
-         * @param perceptual Specifies wether the chosen color has been set as intented to be seen e.g. in gamma space not accounting for exposure and tone mapping
          */
          */
-        public setMainColor(color: Color3, perceptual = false): void {
+        public setMainColor(color: Color3): void {
             if (this.groundMaterial) {
             if (this.groundMaterial) {
-                if (perceptual) {
-                    this.groundMaterial.perceptualColor = color;
-                }
-                else {
-                    this.groundMaterial.primaryColor = color;
-                }
+                this.groundMaterial.primaryColor = color;
             }
             }
 
 
             if (this.skyboxMaterial) {
             if (this.skyboxMaterial) {
-                if (perceptual) {
-                    this.skyboxMaterial.perceptualColor = color;
-                }
-                else {
-                    this.skyboxMaterial.primaryColor = color;
-                }
+                this.skyboxMaterial.primaryColor = color;
             }
             }
 
 
             if (this.groundMirror) {
             if (this.groundMirror) {
-                if (perceptual && this.groundMaterial) {
-                    this.groundMirror.clearColor = new Color4(this.groundMaterial.primaryColor.r, 
-                        this.groundMaterial.primaryColor.g, 
-                        this.groundMaterial.primaryColor.b, 
-                        1.0);
-                }
-                else {
-                    this.groundMirror.clearColor = new Color4(color.r, color.g, color.b, 1.0);
-                }
+                this.groundMirror.clearColor = new Color4(color.r, color.g, color.b, 1.0);
             }
             }
         }
         }
 
 

+ 3 - 0
src/Instrumentation/babylon.timeToken.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * @hidden
+     **/    
     export class _TimeToken {
     export class _TimeToken {
         public _startTimeQuery: Nullable<WebGLQuery>;
         public _startTimeQuery: Nullable<WebGLQuery>;
         public _endTimeQuery: Nullable<WebGLQuery>;
         public _endTimeQuery: Nullable<WebGLQuery>;

+ 1 - 1
src/Layer/babylon.effectLayer.ts

@@ -602,7 +602,7 @@
 
 
         /**
         /**
          * Rebuild the required buffers.
          * Rebuild the required buffers.
-         * @ignore Internal use only.
+         * @hidden Internal use only.
          */
          */
         public _rebuild(): void {
         public _rebuild(): void {
             let vb = this._vertexBuffers[VertexBuffer.PositionKind];
             let vb = this._vertexBuffers[VertexBuffer.PositionKind];

+ 1 - 1
src/Lights/babylon.hemisphericLight.ts

@@ -89,7 +89,7 @@
         }
         }
 
 
         /**
         /**
-         * @ignore internal use only.
+         * @hidden internal use only.
          */
          */
         public _getWorldMatrix(): Matrix {
         public _getWorldMatrix(): Matrix {
             if (!this._worldMatrix) {
             if (!this._worldMatrix) {

+ 6 - 6
src/Lights/babylon.light.ts

@@ -297,18 +297,18 @@ module BABYLON {
         public _shadowGenerator: Nullable<IShadowGenerator>;
         public _shadowGenerator: Nullable<IShadowGenerator>;
 
 
         /**
         /**
-         * @ignore Internal use only.
+         * @hidden Internal use only.
          */
          */
         public _excludedMeshesIds = new Array<string>();
         public _excludedMeshesIds = new Array<string>();
 
 
         /**
         /**
-         * @ignore Internal use only.
+         * @hidden Internal use only.
          */
          */
         public _includedOnlyMeshesIds = new Array<string>();
         public _includedOnlyMeshesIds = new Array<string>();
 
 
         /**
         /**
          * The current light unifom buffer.
          * The current light unifom buffer.
-         * @ignore Internal use only.
+         * @hidden Internal use only.
          */
          */
         public _uniformBuffer: UniformBuffer;
         public _uniformBuffer: UniformBuffer;
 
 
@@ -341,7 +341,7 @@ module BABYLON {
         public abstract transferToEffect(effect: Effect, lightIndex: string): Light;
         public abstract transferToEffect(effect: Effect, lightIndex: string): Light;
 
 
         /**
         /**
-         * @ignore internal use only.
+         * @hidden internal use only.
          */
          */
         public abstract _getWorldMatrix(): Matrix;
         public abstract _getWorldMatrix(): Matrix;
 
 
@@ -686,7 +686,7 @@ module BABYLON {
 
 
         /**
         /**
          * Forces the meshes to update their light related information in their rendering used effects
          * Forces the meshes to update their light related information in their rendering used effects
-         * @ignore Internal Use Only
+         * @hidden Internal Use Only
          */
          */
         public _markMeshesAsLightDirty() {
         public _markMeshesAsLightDirty() {
             for (var mesh of this.getScene().meshes) {
             for (var mesh of this.getScene().meshes) {
@@ -765,7 +765,7 @@ module BABYLON {
 
 
         /**
         /**
          * Reorder the light in the scene according to their defined priority.
          * Reorder the light in the scene according to their defined priority.
-         * @ignore Internal Use Only
+         * @hidden Internal Use Only
          */
          */
         public _reorderLightsInScene(): void {
         public _reorderLightsInScene(): void {
             var scene = this.getScene();
             var scene = this.getScene();

+ 1 - 1
src/Lights/babylon.shadowLight.ts

@@ -303,7 +303,7 @@
 
 
         /**
         /**
          * Get the world matrix of the sahdow lights.
          * Get the world matrix of the sahdow lights.
-         * @ignore Internal Use Only
+         * @hidden Internal Use Only
          */
          */
         public _getWorldMatrix(): Matrix {
         public _getWorldMatrix(): Matrix {
             if (!this._worldMatrix) {
             if (!this._worldMatrix) {

+ 2 - 1
src/Lights/babylon.spotLight.ts

@@ -116,7 +116,8 @@
         }
         }
 
 
         @serializeAsTexture("projectedLightTexture")
         @serializeAsTexture("projectedLightTexture")
-        private _projectionTexture: Nullable<BaseTexture>;;
+        private _projectionTexture: Nullable<BaseTexture>;
+        
         /** 
         /** 
          * Gets the projection texture of the light.
          * Gets the projection texture of the light.
         */
         */

+ 11 - 34
src/Materials/Background/babylon.backgroundMaterial.ts

@@ -1,7 +1,7 @@
 module BABYLON {
 module BABYLON {
     /**
     /**
      * Background material defines definition.
      * Background material defines definition.
-     * @ignore Mainly internal Use
+     * @hidden Mainly internal Use
      */
      */
     class BackgroundMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
     class BackgroundMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
         /**
         /**
@@ -155,8 +155,10 @@
         public primaryColor = Color3.White();
         public primaryColor = Color3.White();
         
         
         @serializeAsColor3()
         @serializeAsColor3()
-        protected _perceptualColor: Nullable<Color3>;
+        protected __perceptualColor: Nullable<Color3>;
         /**
         /**
+         * Experimental Internal Use Only.
+         * 
          * Key light Color in "perceptual value" meaning the color you would like to see on screen.
          * Key light Color in "perceptual value" meaning the color you would like to see on screen.
          * This acts as a helper to set the primary color to a more "human friendly" value.
          * This acts as a helper to set the primary color to a more "human friendly" value.
          * Conversion to linear space as well as exposure and tone mapping correction will be applied to keep the
          * Conversion to linear space as well as exposure and tone mapping correction will be applied to keep the
@@ -164,11 +166,11 @@
          * (This does not account for contrast color grading and color curves as they are considered post effect and not directly
          * (This does not account for contrast color grading and color curves as they are considered post effect and not directly
          * part of lighting setup.)
          * part of lighting setup.)
          */
          */
-        public get perceptualColor(): Nullable<Color3> {
-            return this._perceptualColor;
+        public get _perceptualColor(): Nullable<Color3> {
+            return this.__perceptualColor;
         }
         }
-        public set perceptualColor(value: Nullable<Color3>) {
-            this._perceptualColor = value;
+        public set _perceptualColor(value: Nullable<Color3>) {
+            this.__perceptualColor = value;
             this._computePrimaryColorFromPerceptualColor();
             this._computePrimaryColorFromPerceptualColor();
             this._markAllSubMeshesAsLightsDirty();
             this._markAllSubMeshesAsLightsDirty();
         }
         }
@@ -711,6 +713,7 @@
                         }
                         }
                     } else {
                     } else {
                         defines.REFLECTION = false;
                         defines.REFLECTION = false;
+                        defines.REFLECTIONFRESNEL = false;
                         defines.REFLECTIONFALLOFF = false;
                         defines.REFLECTIONFALLOFF = false;
                         defines.REFLECTIONBLUR = false;
                         defines.REFLECTIONBLUR = false;
                         defines.REFLECTIONMAP_3D = false;
                         defines.REFLECTIONMAP_3D = false;
@@ -865,44 +868,20 @@
         }
         }
 
 
         /**
         /**
-         * Tone Mapping calibration (should match image processing tone mapping calibration value).
-         */
-        private static readonly _tonemappingCalibration = 1.590579;
-
-        /**
          * Compute the primary color according to the chosen perceptual color.
          * Compute the primary color according to the chosen perceptual color.
          */
          */
         private _computePrimaryColorFromPerceptualColor(): void {
         private _computePrimaryColorFromPerceptualColor(): void {
-            if (!this._perceptualColor) {
+            if (!this.__perceptualColor) {
                 return;
                 return;
             }
             }
 
 
-            this._primaryColor.copyFrom(this._perceptualColor);
+            this._primaryColor.copyFrom(this.__perceptualColor);
 
 
             // Revert gamma space.
             // Revert gamma space.
             this._primaryColor.toLinearSpaceToRef(this._primaryColor);
             this._primaryColor.toLinearSpaceToRef(this._primaryColor);
 
 
             // Revert image processing configuration.
             // Revert image processing configuration.
             if (this._imageProcessingConfiguration) {
             if (this._imageProcessingConfiguration) {
-                // Revert tone mapping.
-                if (this._imageProcessingConfiguration.toneMappingEnabled) {
-                    // shader reference.
-                    // tonemapped.rgb = 1.0 - exp2(-tonemappingCalibration * color.rgb);
-                    // providing
-                    // log2(1.0 - tonemapped.rgb) / -tonemappingCalibration = color.rgb;
-
-                    // 1.0 - tonemapped.rgb
-                    this._white.subtractToRef(this._primaryColor, this._primaryColor);
-
-                    // log2(1.0 - tonemapped.rgb)
-                    this._primaryColor.r = Scalar.Log2(this._primaryColor.r);
-                    this._primaryColor.g = Scalar.Log2(this._primaryColor.g);
-                    this._primaryColor.b = Scalar.Log2(this._primaryColor.b);
-                    
-                    // log2(1.0 - tonemapped.rgb) / -tonemappingCalibration
-                    this._primaryColor.scaleToRef(-1 / BackgroundMaterial._tonemappingCalibration, this._primaryColor);
-                }
-
                 // Revert Exposure.
                 // Revert Exposure.
                 this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);
                 this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);
             }
             }
@@ -921,13 +900,11 @@
             // Find the highlight color based on the configuration.
             // Find the highlight color based on the configuration.
             this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);
             this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);
             this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);
             this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);
-            this._primaryShadowColor.clampToRef(0, 1, this._primaryShadowColor);
 
 
             // Find the shadow color based on the configuration.
             // Find the shadow color based on the configuration.
             this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);
             this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);
             this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);
             this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);
             this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);
             this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);
-            this._primaryHighlightColor.clampToRef(0, 1, this._primaryHighlightColor);
         }
         }
 
 
         /**
         /**

+ 1 - 1
src/Materials/PBR/babylon.pbrBaseMaterial.ts

@@ -1,7 +1,7 @@
 module BABYLON {
 module BABYLON {
     /**
     /**
      * Manages the defines for the PBR Material.
      * Manages the defines for the PBR Material.
-     * @ignoreChildren
+     * @hiddenChildren
      */
      */
     class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
     class PBRMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
         public PBR = true;
         public PBR = true;

+ 1 - 1
src/Materials/Textures/babylon.dynamicTexture.ts

@@ -177,7 +177,7 @@
             return newTexture;
             return newTexture;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _rebuild(): void {
         public _rebuild(): void {
             this.update();
             this.update();
         }
         }

+ 35 - 35
src/Materials/Textures/babylon.internalTexture.ts

@@ -133,78 +133,78 @@ module BABYLON {
         public next: Nullable<IInternalTextureTracker> = null
         public next: Nullable<IInternalTextureTracker> = null
 
 
         // Private
         // Private
-        /** @ignore */
+        /** @hidden */
         public _initialSlot = -1;
         public _initialSlot = -1;
-        /** @ignore */
+        /** @hidden */
         public _designatedSlot = -1;
         public _designatedSlot = -1;
-        /** @ignore */
+        /** @hidden */
         public _dataSource = InternalTexture.DATASOURCE_UNKNOWN;
         public _dataSource = InternalTexture.DATASOURCE_UNKNOWN;
-        /** @ignore */
+        /** @hidden */
         public _buffer: Nullable<ArrayBuffer | HTMLImageElement>;
         public _buffer: Nullable<ArrayBuffer | HTMLImageElement>;
-        /** @ignore */
+        /** @hidden */
         public _bufferView: Nullable<ArrayBufferView>;
         public _bufferView: Nullable<ArrayBufferView>;
-        /** @ignore */
+        /** @hidden */
         public _bufferViewArray: Nullable<ArrayBufferView[]>;
         public _bufferViewArray: Nullable<ArrayBufferView[]>;
-        /** @ignore */
+        /** @hidden */
         public _size: number;
         public _size: number;
-        /** @ignore */
+        /** @hidden */
         public _extension: string;
         public _extension: string;
-        /** @ignore */
+        /** @hidden */
         public _files: Nullable<string[]>;
         public _files: Nullable<string[]>;
-        /** @ignore */
+        /** @hidden */
         public _workingCanvas: HTMLCanvasElement;
         public _workingCanvas: HTMLCanvasElement;
-        /** @ignore */
+        /** @hidden */
         public _workingContext: CanvasRenderingContext2D;
         public _workingContext: CanvasRenderingContext2D;
-        /** @ignore */
+        /** @hidden */
         public _framebuffer: Nullable<WebGLFramebuffer>;
         public _framebuffer: Nullable<WebGLFramebuffer>;
-        /** @ignore */
+        /** @hidden */
         public _depthStencilBuffer: Nullable<WebGLRenderbuffer>;
         public _depthStencilBuffer: Nullable<WebGLRenderbuffer>;
-        /** @ignore */
+        /** @hidden */
         public _MSAAFramebuffer: Nullable<WebGLFramebuffer>;
         public _MSAAFramebuffer: Nullable<WebGLFramebuffer>;
-        /** @ignore */
+        /** @hidden */
         public _MSAARenderBuffer: Nullable<WebGLRenderbuffer>;
         public _MSAARenderBuffer: Nullable<WebGLRenderbuffer>;
-        /** @ignore */
+        /** @hidden */
         public _attachments: Nullable<number[]>;
         public _attachments: Nullable<number[]>;
-        /** @ignore */
+        /** @hidden */
         public _cachedCoordinatesMode: Nullable<number>;
         public _cachedCoordinatesMode: Nullable<number>;
-        /** @ignore */
+        /** @hidden */
         public _cachedWrapU: Nullable<number>;
         public _cachedWrapU: Nullable<number>;
-        /** @ignore */
+        /** @hidden */
         public _cachedWrapV: Nullable<number>;
         public _cachedWrapV: Nullable<number>;
-        /** @ignore */
+        /** @hidden */
         public _cachedWrapR: Nullable<number>;
         public _cachedWrapR: Nullable<number>;
-        /** @ignore */
+        /** @hidden */
         public _cachedAnisotropicFilteringLevel: Nullable<number>;
         public _cachedAnisotropicFilteringLevel: Nullable<number>;
-        /** @ignore */
+        /** @hidden */
         public _isDisabled: boolean;
         public _isDisabled: boolean;
-        /** @ignore */
+        /** @hidden */
         public _compression: Nullable<string>;
         public _compression: Nullable<string>;
-        /** @ignore */
+        /** @hidden */
         public _generateStencilBuffer: boolean;
         public _generateStencilBuffer: boolean;
-        /** @ignore */
+        /** @hidden */
         public _generateDepthBuffer: boolean;
         public _generateDepthBuffer: boolean;
-        /** @ignore */
+        /** @hidden */
         public _comparisonFunction: number = 0;
         public _comparisonFunction: number = 0;
-        /** @ignore */
+        /** @hidden */
         public _sphericalPolynomial: Nullable<SphericalPolynomial>;
         public _sphericalPolynomial: Nullable<SphericalPolynomial>;
-        /** @ignore */
+        /** @hidden */
         public _lodGenerationScale: number;
         public _lodGenerationScale: number;
-        /** @ignore */
+        /** @hidden */
         public _lodGenerationOffset: number;
         public _lodGenerationOffset: number;
 
 
         // The following three fields helps sharing generated fixed LODs for texture filtering
         // The following three fields helps sharing generated fixed LODs for texture filtering
         // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.
         // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.
         // They are at the level of the gl texture to benefit from the cache.
         // They are at the level of the gl texture to benefit from the cache.
-        /** @ignore */
+        /** @hidden */
         public _lodTextureHigh: BaseTexture;
         public _lodTextureHigh: BaseTexture;
-        /** @ignore */
+        /** @hidden */
         public _lodTextureMid: BaseTexture;
         public _lodTextureMid: BaseTexture;
-        /** @ignore */
+        /** @hidden */
         public _lodTextureLow: BaseTexture;
         public _lodTextureLow: BaseTexture;
 
 
-        /** @ignore */
+        /** @hidden */
         public _webGLTexture: Nullable<WebGLTexture>;
         public _webGLTexture: Nullable<WebGLTexture>;
-        /** @ignore */
+        /** @hidden */
         public _references: number = 1;
         public _references: number = 1;
         private _engine: Engine;
         private _engine: Engine;
 
 
@@ -252,7 +252,7 @@ module BABYLON {
             this._size = width * height * depth;
             this._size = width * height * depth;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _rebuild(): void {
         public _rebuild(): void {
             var proxy: InternalTexture;
             var proxy: InternalTexture;
             this.isReady = false;
             this.isReady = false;

+ 6 - 6
src/Materials/babylon.effect.ts

@@ -451,7 +451,7 @@
             });
             });
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _loadVertexShader(vertex: any, callback: (data: any) => void): void {
         public _loadVertexShader(vertex: any, callback: (data: any) => void): void {
             if (Tools.IsWindowObjectExist()) {
             if (Tools.IsWindowObjectExist()) {
                 // DOM element ?
                 // DOM element ?
@@ -487,7 +487,7 @@
             this._engine._loadFile(vertexShaderUrl + ".vertex.fx", callback);
             this._engine._loadFile(vertexShaderUrl + ".vertex.fx", callback);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _loadFragmentShader(fragment: any, callback: (data: any) => void): void {
         public _loadFragmentShader(fragment: any, callback: (data: any) => void): void {
             if (Tools.IsWindowObjectExist()) {
             if (Tools.IsWindowObjectExist()) {
                 // DOM element ?
                 // DOM element ?
@@ -913,7 +913,7 @@
             this._engine.setTextureFromPostProcessOutput(this._samplers.indexOf(channel), postProcess);
             this._engine.setTextureFromPostProcessOutput(this._samplers.indexOf(channel), postProcess);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _cacheMatrix(uniformName: string, matrix: Matrix): boolean {
         public _cacheMatrix(uniformName: string, matrix: Matrix): boolean {
             var cache = this._valueCache[uniformName];
             var cache = this._valueCache[uniformName];
             var flag = matrix.updateFlag;
             var flag = matrix.updateFlag;
@@ -926,7 +926,7 @@
             return true;
             return true;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _cacheFloat2(uniformName: string, x: number, y: number): boolean {
         public _cacheFloat2(uniformName: string, x: number, y: number): boolean {
             var cache = this._valueCache[uniformName];
             var cache = this._valueCache[uniformName];
             if (!cache) {
             if (!cache) {
@@ -948,7 +948,7 @@
             return changed;
             return changed;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _cacheFloat3(uniformName: string, x: number, y: number, z: number): boolean {
         public _cacheFloat3(uniformName: string, x: number, y: number, z: number): boolean {
             var cache = this._valueCache[uniformName];
             var cache = this._valueCache[uniformName];
             if (!cache) {
             if (!cache) {
@@ -974,7 +974,7 @@
             return changed;
             return changed;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _cacheFloat4(uniformName: string, x: number, y: number, z: number, w: number): boolean {
         public _cacheFloat4(uniformName: string, x: number, y: number, z: number, w: number): boolean {
             var cache = this._valueCache[uniformName];
             var cache = this._valueCache[uniformName];
             if (!cache) {
             if (!cache) {

+ 1 - 1
src/Materials/babylon.imageProcessingConfiguration.ts

@@ -2,7 +2,7 @@ module BABYLON {
     /**
     /**
      * Interface to follow in your material defines to integrate easily the
      * Interface to follow in your material defines to integrate easily the
      * Image proccessing functions.
      * Image proccessing functions.
-     * @ignore
+     * @hidden
      */
      */
     export interface IImageProcessingConfigurationDefines {
     export interface IImageProcessingConfigurationDefines {
         IMAGEPROCESSING: boolean;
         IMAGEPROCESSING: boolean;

+ 12 - 12
src/Materials/babylon.material.ts

@@ -5,30 +5,30 @@
     export class MaterialDefines {
     export class MaterialDefines {
         private _keys: string[];
         private _keys: string[];
         private _isDirty = true;
         private _isDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _renderId: number;
         public _renderId: number;
 
 
-        /** @ignore */
+        /** @hidden */
         public _areLightsDirty = true;
         public _areLightsDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _areAttributesDirty = true;
         public _areAttributesDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _areTexturesDirty = true;
         public _areTexturesDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _areFresnelDirty = true;
         public _areFresnelDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _areMiscDirty = true;
         public _areMiscDirty = true;
-        /** @ignore */
+        /** @hidden */
         public _areImageProcessingDirty = true;
         public _areImageProcessingDirty = true;
 
 
-        /** @ignore */
+        /** @hidden */
         public _normals = false;
         public _normals = false;
-        /** @ignore */
+        /** @hidden */
         public _uvs = false;
         public _uvs = false;
 
 
-        /** @ignore */
+        /** @hidden */
         public _needNormals = false;
         public _needNormals = false;
-        /** @ignore */
+        /** @hidden */
         public _needUVs = false;
         public _needUVs = false;
 
 
         /**
         /**
@@ -909,7 +909,7 @@
             this._wasPreviouslyReady = false;
             this._wasPreviouslyReady = false;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _preBind(effect?: Effect, overrideOrientation: Nullable<number> = null): boolean {
         public _preBind(effect?: Effect, overrideOrientation: Nullable<number> = null): boolean {
             var engine = this._scene.getEngine();
             var engine = this._scene.getEngine();
 
 

+ 1 - 1
src/Materials/babylon.materialHelper.ts

@@ -220,7 +220,7 @@ module BABYLON {
                     if (light.getTypeID() === Light.LIGHTTYPEID_SPOTLIGHT) {
                     if (light.getTypeID() === Light.LIGHTTYPEID_SPOTLIGHT) {
                         type = "SPOTLIGHT" + lightIndex;
                         type = "SPOTLIGHT" + lightIndex;
                         let spotLight = light as SpotLight;
                         let spotLight = light as SpotLight;
-                        defines["PROJECTEDLIGHTTEXTURE" + lightIndex] = spotLight.projectionTexture ? spotLight.projectionTexture.isReady() : false;
+                        defines["PROJECTEDLIGHTTEXTURE" + lightIndex] = spotLight.projectionTexture ? true : false;
                     } else if (light.getTypeID() === Light.LIGHTTYPEID_HEMISPHERICLIGHT) {
                     } else if (light.getTypeID() === Light.LIGHTTYPEID_HEMISPHERICLIGHT) {
                         type = "HEMILIGHT" + lightIndex;
                         type = "HEMILIGHT" + lightIndex;
                     } else if (light.getTypeID() === Light.LIGHTTYPEID_POINTLIGHT) {
                     } else if (light.getTypeID() === Light.LIGHTTYPEID_POINTLIGHT) {

+ 14 - 4
src/Materials/babylon.standardMaterial.ts

@@ -1,5 +1,5 @@
 module BABYLON {
 module BABYLON {
-    /** @ignore */
+    /** @hidden */
     export class StandardMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
     export class StandardMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
         public MAINUV1 = false;
         public MAINUV1 = false;
         public MAINUV2 = false;
         public MAINUV2 = false;
@@ -89,12 +89,12 @@ module BABYLON {
         public IMAGEPROCESSINGPOSTPROCESS = false;
         public IMAGEPROCESSINGPOSTPROCESS = false;
         /**
         /**
          * If the reflection texture on this material is in linear color space
          * If the reflection texture on this material is in linear color space
-         * @ignore
+         * @hidden
          */
          */
         public IS_REFLECTION_LINEAR = false;
         public IS_REFLECTION_LINEAR = false;
         /**
         /**
          * If the refraction texture on this material is in linear color space
          * If the refraction texture on this material is in linear color space
-         * @ignore
+         * @hidden
          */
          */
         public IS_REFRACTION_LINEAR = false;
         public IS_REFRACTION_LINEAR = false;
         public EXPOSURE = false;
         public EXPOSURE = false;
@@ -241,6 +241,12 @@ module BABYLON {
         @serialize()
         @serialize()
         public invertRefractionY = true;
         public invertRefractionY = true;
 
 
+        /**
+         * Defines the alpha limits in alpha test mode
+         */
+        @serialize()
+        public alphaCutOff = 0.4;        
+
         @serialize("useLightmapAsShadowmap")
         @serialize("useLightmapAsShadowmap")
         private _useLightmapAsShadowmap = false;
         private _useLightmapAsShadowmap = false;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
@@ -876,7 +882,7 @@ module BABYLON {
                     "vClipPlane", "diffuseMatrix", "ambientMatrix", "opacityMatrix", "reflectionMatrix", "emissiveMatrix", "specularMatrix", "bumpMatrix", "normalMatrix", "lightmapMatrix", "refractionMatrix",
                     "vClipPlane", "diffuseMatrix", "ambientMatrix", "opacityMatrix", "reflectionMatrix", "emissiveMatrix", "specularMatrix", "bumpMatrix", "normalMatrix", "lightmapMatrix", "refractionMatrix",
                     "diffuseLeftColor", "diffuseRightColor", "opacityParts", "reflectionLeftColor", "reflectionRightColor", "emissiveLeftColor", "emissiveRightColor", "refractionLeftColor", "refractionRightColor",
                     "diffuseLeftColor", "diffuseRightColor", "opacityParts", "reflectionLeftColor", "reflectionRightColor", "emissiveLeftColor", "emissiveRightColor", "refractionLeftColor", "refractionRightColor",
                     "vReflectionPosition", "vReflectionSize",
                     "vReflectionPosition", "vReflectionSize",
-                    "logarithmicDepthConstant", "vTangentSpaceParams"
+                    "logarithmicDepthConstant", "vTangentSpaceParams", "alphaCutOff"
                 ];
                 ];
 
 
                 var samplers = ["diffuseSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "specularSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"]
                 var samplers = ["diffuseSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "specularSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"]
@@ -1054,6 +1060,10 @@ module BABYLON {
                         if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
                         if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
                             this._uniformBuffer.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
                             this._uniformBuffer.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
                             MaterialHelper.BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, "diffuse");
                             MaterialHelper.BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, "diffuse");
+
+                            if (this._diffuseTexture.hasAlpha) {
+                                effect.setFloat("alphaCutOff", this.alphaCutOff);
+                            }
                         }
                         }
 
 
                         if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
                         if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {

+ 16 - 1
src/Math/babylon.math.ts

@@ -3790,7 +3790,7 @@
          */
          */
         public m: Float32Array = new Float32Array(16);
         public m: Float32Array = new Float32Array(16);
 
 
-        /** @ignore */
+        /** @hidden */
         public _markAsUpdated() {
         public _markAsUpdated() {
             this.updateFlag = Matrix._updateFlagSeed++;
             this.updateFlag = Matrix._updateFlagSeed++;
             this._isIdentityDirty = true;
             this._isIdentityDirty = true;
@@ -5840,15 +5840,23 @@
         }
         }
     }
     }
 
 
+    /** Defines supported spaces */
     export enum Space {
     export enum Space {
+        /** Local (object) space */
         LOCAL = 0,
         LOCAL = 0,
+        /** World space */
         WORLD = 1,
         WORLD = 1,
+        /** Bone space */
         BONE = 2
         BONE = 2
     }
     }
 
 
+    /** Defines the 3 main axes */
     export class Axis {
     export class Axis {
+        /** X axis */
         public static X: Vector3 = new Vector3(1.0, 0.0, 0.0);
         public static X: Vector3 = new Vector3(1.0, 0.0, 0.0);
+        /** Y axis */
         public static Y: Vector3 = new Vector3(0.0, 1.0, 0.0);
         public static Y: Vector3 = new Vector3(0.0, 1.0, 0.0);
+        /** Z axis */
         public static Z: Vector3 = new Vector3(0.0, 0.0, 1.0);
         public static Z: Vector3 = new Vector3(0.0, 0.0, 1.0);
     };
     };
 
 
@@ -5882,8 +5890,15 @@
         }
         }
     }
     }
 
 
+    /**
+     * Defines potential orientation for back face culling
+     */
     export enum Orientation {
     export enum Orientation {
+        /**
+         * Clockwise
+         */
         CW = 0,
         CW = 0,
+        /** Counter clockwise */
         CCW = 1
         CCW = 1
     }
     }
 
 

File diff suppressed because it is too large
+ 474 - 215
src/Mesh/babylon.abstractMesh.ts


+ 14 - 13
src/Mesh/babylon.geometry.ts

@@ -31,21 +31,21 @@
         private _isDisposed = false;
         private _isDisposed = false;
         private _extend: { minimum: Vector3, maximum: Vector3 };
         private _extend: { minimum: Vector3, maximum: Vector3 };
         private _boundingBias: Vector2;
         private _boundingBias: Vector2;
-        /** @ignore */
+        /** @hidden */
         public _delayInfo: Array<string>;
         public _delayInfo: Array<string>;
         private _indexBuffer: Nullable<WebGLBuffer>;
         private _indexBuffer: Nullable<WebGLBuffer>;
         private _indexBufferIsUpdatable = false;
         private _indexBufferIsUpdatable = false;
-        /** @ignore */
+        /** @hidden */
         public _boundingInfo: Nullable<BoundingInfo>;
         public _boundingInfo: Nullable<BoundingInfo>;
-        /** @ignore */
+        /** @hidden */
         public _delayLoadingFunction: Nullable<(any: any, geometry: Geometry) => void>;
         public _delayLoadingFunction: Nullable<(any: any, geometry: Geometry) => void>;
-        /** @ignore */
+        /** @hidden */
         public _softwareSkinningRenderId: number;
         public _softwareSkinningRenderId: number;
         private _vertexArrayObjects: { [key: string]: WebGLVertexArrayObject; };
         private _vertexArrayObjects: { [key: string]: WebGLVertexArrayObject; };
         private _updatable: boolean;
         private _updatable: boolean;
 
 
         // Cache
         // Cache
-        /** @ignore */
+        /** @hidden */
         public _positions: Nullable<Vector3[]>;
         public _positions: Nullable<Vector3[]>;
 
 
         /**
         /**
@@ -168,7 +168,7 @@
             return true;
             return true;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _rebuild(): void {
         public _rebuild(): void {
             if (this._vertexArrayObjects) {
             if (this._vertexArrayObjects) {
                 this._vertexArrayObjects = {};
                 this._vertexArrayObjects = {};
@@ -329,7 +329,7 @@
             }
             }
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _bind(effect: Nullable<Effect>, indexToBind?: Nullable<WebGLBuffer>): void {
         public _bind(effect: Nullable<Effect>, indexToBind?: Nullable<WebGLBuffer>): void {
             if (!effect) {
             if (!effect) {
                 return;
                 return;
@@ -585,7 +585,7 @@
             return this._indexBuffer;
             return this._indexBuffer;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _releaseVertexArrayObject(effect: Nullable<Effect> = null) {
         public _releaseVertexArrayObject(effect: Nullable<Effect> = null) {
             if (!effect || !this._vertexArrayObjects) {
             if (!effect || !this._vertexArrayObjects) {
                 return;
                 return;
@@ -790,12 +790,12 @@
         }
         }
 
 
         // Cache
         // Cache
-        /** @ignore */
+        /** @hidden */
         public _resetPointsArrayCache(): void {
         public _resetPointsArrayCache(): void {
             this._positions = null;
             this._positions = null;
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _generatePointsArray(): boolean {
         public _generatePointsArray(): boolean {
             if (this._positions)
             if (this._positions)
                 return true;
                 return true;
@@ -1076,7 +1076,7 @@
             return Tools.RandomId();
             return Tools.RandomId();
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public static _ImportGeometry(parsedGeometry: any, mesh: Mesh): void {
         public static _ImportGeometry(parsedGeometry: any, mesh: Mesh): void {
             var scene = mesh.getScene();
             var scene = mesh.getScene();
 
 
@@ -1433,6 +1433,7 @@
     /// Abstract class
     /// Abstract class
     /**
     /**
      * Abstract class used to provide common services for all typed geometries
      * Abstract class used to provide common services for all typed geometries
+     * @hidden
      */
      */
     export class _PrimitiveGeometry extends Geometry {
     export class _PrimitiveGeometry extends Geometry {
 
 
@@ -1497,7 +1498,7 @@
         }
         }
 
 
         // to override
         // to override
-        /** @ignore */
+        /** @hidden */
         public _regenerateVertexData(): VertexData {
         public _regenerateVertexData(): VertexData {
             throw new Error("Abstract method");
             throw new Error("Abstract method");
         }
         }
@@ -1560,7 +1561,7 @@
             super(id, scene, canBeRegenerated, mesh);
             super(id, scene, canBeRegenerated, mesh);
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _regenerateVertexData(): VertexData {
         public _regenerateVertexData(): VertexData {
             return VertexData.CreateRibbon({ pathArray: this.pathArray, closeArray: this.closeArray, closePath: this.closePath, offset: this.offset, sideOrientation: this.side });
             return VertexData.CreateRibbon({ pathArray: this.pathArray, closeArray: this.closeArray, closePath: this.closePath, offset: this.offset, sideOrientation: this.side });
         }
         }

+ 4 - 74
src/Mesh/babylon.mesh.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * @hidden
+     **/        
     export class _InstancesBatch {
     export class _InstancesBatch {
         public mustReturn = false;
         public mustReturn = false;
         public visibleInstances = new Array<Nullable<Array<InstancedMesh>>>();
         public visibleInstances = new Array<Nullable<Array<InstancedMesh>>>();
@@ -503,22 +506,6 @@
             return this._geometry.getVertexBuffer(kind);
             return this._geometry.getVertexBuffer(kind);
         }
         }
 
 
-        /**
-         * Returns a boolean depending on the existence of the Vertex Data for the requested `kind`.
-         * Possible `kind` values :
-         * - BABYLON.VertexBuffer.PositionKind
-         * - BABYLON.VertexBuffer.UVKind
-         * - BABYLON.VertexBuffer.UV2Kind
-         * - BABYLON.VertexBuffer.UV3Kind
-         * - BABYLON.VertexBuffer.UV4Kind
-         * - BABYLON.VertexBuffer.UV5Kind
-         * - BABYLON.VertexBuffer.UV6Kind
-         * - BABYLON.VertexBuffer.ColorKind
-         * - BABYLON.VertexBuffer.MatricesIndicesKind
-         * - BABYLON.VertexBuffer.MatricesIndicesExtraKind
-         * - BABYLON.VertexBuffer.MatricesWeightsKind
-         * - BABYLON.VertexBuffer.MatricesWeightsExtraKind
-         */
         public isVerticesDataPresent(kind: string): boolean {
         public isVerticesDataPresent(kind: string): boolean {
             if (!this._geometry) {
             if (!this._geometry) {
                 if (this._delayInfo) {
                 if (this._delayInfo) {
@@ -909,31 +896,6 @@
             this.synchronizeInstances();
             this.synchronizeInstances();
         }
         }
 
 
-        /**
-         * Sets the vertex data of the mesh geometry for the requested `kind`.
-         * If the mesh has no geometry, a new Geometry object is set to the mesh and then passed this vertex data.  
-         * The `data` are either a numeric array either a Float32Array. 
-         * The parameter `updatable` is passed as is to the underlying Geometry object constructor (if initianilly none) or updater. 
-         * The parameter `stride` is an optional positive integer, it is usually automatically deducted from the `kind` (3 for positions or normals, 2 for UV, etc).  
-         * Note that a new underlying VertexBuffer object is created each call. 
-         * If the `kind` is the `PositionKind`, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed. 
-         *
-         * Possible `kind` values :
-         * - BABYLON.VertexBuffer.PositionKind
-         * - BABYLON.VertexBuffer.UVKind
-         * - BABYLON.VertexBuffer.UV2Kind
-         * - BABYLON.VertexBuffer.UV3Kind
-         * - BABYLON.VertexBuffer.UV4Kind
-         * - BABYLON.VertexBuffer.UV5Kind
-         * - BABYLON.VertexBuffer.UV6Kind
-         * - BABYLON.VertexBuffer.ColorKind
-         * - BABYLON.VertexBuffer.MatricesIndicesKind
-         * - BABYLON.VertexBuffer.MatricesIndicesExtraKind
-         * - BABYLON.VertexBuffer.MatricesWeightsKind
-         * - BABYLON.VertexBuffer.MatricesWeightsExtraKind  
-         * 
-         * Returns the Mesh.  
-         */
         public setVerticesData(kind: string, data: FloatArray, updatable: boolean = false, stride?: number): Mesh {
         public setVerticesData(kind: string, data: FloatArray, updatable: boolean = false, stride?: number): Mesh {
             if (!this._geometry) {
             if (!this._geometry) {
                 var vertexData = new VertexData();
                 var vertexData = new VertexData();
@@ -972,30 +934,6 @@
             return this;
             return this;
         }
         }
 
 
-        /**
-         * Updates the existing vertex data of the mesh geometry for the requested `kind`.
-         * If the mesh has no geometry, it is simply returned as it is.  
-         * The `data` are either a numeric array either a Float32Array. 
-         * No new underlying VertexBuffer object is created. 
-         * If the `kind` is the `PositionKind` and if `updateExtends` is true, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.  
-         * If the parameter `makeItUnique` is true, a new global geometry is created from this positions and is set to the mesh.
-         *
-         * Possible `kind` values :
-         * - BABYLON.VertexBuffer.PositionKind
-         * - BABYLON.VertexBuffer.UVKind
-         * - BABYLON.VertexBuffer.UV2Kind
-         * - BABYLON.VertexBuffer.UV3Kind
-         * - BABYLON.VertexBuffer.UV4Kind
-         * - BABYLON.VertexBuffer.UV5Kind
-         * - BABYLON.VertexBuffer.UV6Kind
-         * - BABYLON.VertexBuffer.ColorKind
-         * - BABYLON.VertexBuffer.MatricesIndicesKind
-         * - BABYLON.VertexBuffer.MatricesIndicesExtraKind
-         * - BABYLON.VertexBuffer.MatricesWeightsKind
-         * - BABYLON.VertexBuffer.MatricesWeightsExtraKind
-         * 
-         * Returns the Mesh.  
-         */
         public updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): Mesh {
         public updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): Mesh {
             if (!this._geometry) {
             if (!this._geometry) {
                 return this;
                 return this;
@@ -1055,14 +993,6 @@
             return this;
             return this;
         }
         }
 
 
-        /**
-         * Sets the mesh indices.  
-         * Expects an array populated with integers or a typed array (Int32Array, Uint32Array, Uint16Array).
-         * Type is Uint16Array by default unless the mesh has more than 65536 vertices.
-         * If the mesh has no geometry, a new Geometry object is created and set to the mesh. 
-         * This method creates a new index buffer each call.  
-         * Returns the Mesh.  
-         */
         public setIndices(indices: IndicesArray, totalVertices: Nullable<number> = null, updatable: boolean = false): Mesh {
         public setIndices(indices: IndicesArray, totalVertices: Nullable<number> = null, updatable: boolean = false): Mesh {
             if (!this._geometry) {
             if (!this._geometry) {
                 var vertexData = new VertexData();
                 var vertexData = new VertexData();
@@ -1359,7 +1289,7 @@
          */
          */
         public render(subMesh: SubMesh, enableAlphaMode: boolean): Mesh {
         public render(subMesh: SubMesh, enableAlphaMode: boolean): Mesh {
 
 
-            this.checkOcclusionQuery();
+            this._checkOcclusionQuery();
             if (this._isOccluded) {
             if (this._isOccluded) {
                 return this;
                 return this;
             }
             }

+ 3 - 2
src/Mesh/babylon.meshSimplification.ts

@@ -114,10 +114,11 @@
     }
     }
 
 
     /**
     /**
-     * The implemented types of simplification.
-     * At the moment only Quadratic Error Decimation is implemented.
+     * The implemented types of simplification
+     * At the moment only Quadratic Error Decimation is implemented
      */
      */
     export enum SimplificationType {
     export enum SimplificationType {
+        /** Quadratic error decimation */
         QUADRATIC
         QUADRATIC
     }
     }
 
 

+ 2 - 2
src/Particles/babylon.gpuParticleSystem.ts

@@ -472,7 +472,7 @@
 
 
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _recreateUpdateEffect() {
         public _recreateUpdateEffect() {
             let defines = this.particleEmitterType ? this.particleEmitterType.getEffectDefines() : "";
             let defines = this.particleEmitterType ? this.particleEmitterType.getEffectDefines() : "";
             if (this._updateEffect && this._updateEffectOptions.defines === defines) {
             if (this._updateEffect && this._updateEffectOptions.defines === defines) {
@@ -482,7 +482,7 @@
             this._updateEffect = new Effect("gpuUpdateParticles", this._updateEffectOptions, this._scene.getEngine());   
             this._updateEffect = new Effect("gpuUpdateParticles", this._updateEffectOptions, this._scene.getEngine());   
         }
         }
 
 
-        /** @ignore */
+        /** @hidden */
         public _recreateRenderEffect() {
         public _recreateRenderEffect() {
             let defines = "";
             let defines = "";
             if (this._scene.clipPlane) {
             if (this._scene.clipPlane) {

+ 2 - 2
src/Particles/babylon.particleSystem.ts

@@ -522,7 +522,7 @@
         }
         }
 
 
         /**
         /**
-         * @ignore (for internal use only)
+         * @hidden (for internal use only)
          */
          */
         public _appendParticleVertex(index: number, particle: Particle, offsetX: number, offsetY: number): void {
         public _appendParticleVertex(index: number, particle: Particle, offsetX: number, offsetY: number): void {
             var offset = index * this._vertexBufferSize;
             var offset = index * this._vertexBufferSize;
@@ -540,7 +540,7 @@
         }
         }
 
 
         /**
         /**
-         * @ignore (for internal use only)
+         * @hidden (for internal use only)
          */
          */
         public _appendParticleVertexWithAnimation(index: number, particle: Particle, offsetX: number, offsetY: number): void {
         public _appendParticleVertexWithAnimation(index: number, particle: Particle, offsetX: number, offsetY: number): void {
             if (offsetX === 0)
             if (offsetX === 0)

+ 1 - 1
src/Particles/babylon.solidParticle.ts

@@ -206,7 +206,7 @@ module BABYLON {
         /**
         /**
          * Creates a ModelShape object. This is an internal simplified reference to a mesh used as for a model to replicate particles from by the SPS.
          * Creates a ModelShape object. This is an internal simplified reference to a mesh used as for a model to replicate particles from by the SPS.
          * SPS internal tool, don't use it manually.
          * SPS internal tool, don't use it manually.
-         * @ignore
+         * @hidden
          */
          */
         constructor(id: number, shape: Vector3[], indicesLength: number, shapeUV: number[], 
         constructor(id: number, shape: Vector3[], indicesLength: number, shapeUV: number[], 
                         posFunction: Nullable<(particle: SolidParticle, i: number, s: number) => void>, vtxFunction: Nullable<(particle: SolidParticle, vertex: Vector3, i: number) => void>) {
                         posFunction: Nullable<(particle: SolidParticle, i: number, s: number) => void>, vtxFunction: Nullable<(particle: SolidParticle, vertex: Vector3, i: number) => void>) {

+ 8 - 4
src/Physics/babylon.physicsHelper.ts

@@ -634,16 +634,20 @@ module BABYLON {
     * The strenght of the force in correspondence to the distance of the affected object
     * The strenght of the force in correspondence to the distance of the affected object
     */
     */
     export enum PhysicsRadialImpulseFalloff {
     export enum PhysicsRadialImpulseFalloff {
-        Constant, // impulse is constant in strength across it's whole radius
-        Linear // impulse gets weaker if it's further from the origin
+        /** Defines that impulse is constant in strength across it's whole radius */
+        Constant,
+        /** DEfines that impulse gets weaker if it's further from the origin */
+        Linear 
     }
     }
 
 
     /**
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      * The strenght of the force in correspondence to the distance of the affected object
      */
      */
     export enum PhysicsUpdraftMode {
     export enum PhysicsUpdraftMode {
-        Center, // the upstream forces will pull towards the top center of the cylinder
-        Perpendicular // once a impostor is inside the cylinder, it will shoot out perpendicular from the ground of the cylinder
+        /** Defines that the upstream forces will pull towards the top center of the cylinder */
+        Center,
+        /** Defines that once a impostor is inside the cylinder, it will shoot out perpendicular from the ground of the cylinder */
+        Perpendicular
     }
     }
 
 
 
 

+ 21 - 1
src/PostProcess/babylon.tonemapPostProcess.ts

@@ -1,14 +1,34 @@
 module BABYLON {
 module BABYLON {
+    /** Defines operator used for tonemapping */
     export enum TonemappingOperator {
     export enum TonemappingOperator {
+        /** Hable */
         Hable = 0,
         Hable = 0,
+        /** Reinhard */
         Reinhard = 1,
         Reinhard = 1,
+        /** HejiDawson */
         HejiDawson = 2,
         HejiDawson = 2,
+        /** Photographic */
         Photographic = 3,
         Photographic = 3,
     };
     };
 
 
+    /**
+     * Defines a post process to apply tone mapping
+     */
     export class TonemapPostProcess extends PostProcess {
     export class TonemapPostProcess extends PostProcess {
 
 
-        constructor(name: string, private _operator: TonemappingOperator, public exposureAdjustment: number, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, textureFormat = Engine.TEXTURETYPE_UNSIGNED_INT) {
+        /**
+         * Creates a new TonemapPostProcess
+         * @param name defines the name of the postprocess
+         * @param _operator defines the operator to use
+         * @param exposureAdjustment defines the required exposure adjustement
+         * @param camera defines the camera to use (can be null)
+         * @param samplingMode defines the required sampling mode (BABYLON.Texture.BILINEAR_SAMPLINGMODE by default)
+         * @param engine defines the hosting engine (can be ignore if camera is set)
+         * @param textureFormat defines the texture format to use (BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT by default)
+         */
+        constructor(name: string, private _operator: TonemappingOperator, 
+            /** Defines the required exposure adjustement */
+            public exposureAdjustment: number, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, textureFormat = Engine.TEXTURETYPE_UNSIGNED_INT) {
             super(name, "tonemap", ["_ExposureAdjustment"], null, 1.0, camera, samplingMode, engine, true, null, textureFormat);
             super(name, "tonemap", ["_ExposureAdjustment"], null, 1.0, camera, samplingMode, engine, true, null, textureFormat);
 
 
             var defines = "#define ";
             var defines = "#define ";

+ 0 - 3
src/Shaders/ShadersInclude/lightsFragmentFunctions.fx

@@ -113,8 +113,5 @@ vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler, m
 	vec4 strq = textureProjectionMatrix * vec4(vPositionW, 1.0);
 	vec4 strq = textureProjectionMatrix * vec4(vPositionW, 1.0);
 	strq /= strq.w;
 	strq /= strq.w;
 	vec3 textureColor = texture2D(projectionLightSampler, strq.xy).rgb;
 	vec3 textureColor = texture2D(projectionLightSampler, strq.xy).rgb;
-#ifdef PBR
-	textureColor = toLinearSpace(textureColor);
-#endif
 	return textureColor;
 	return textureColor;
 }
 }

+ 7 - 0
src/Shaders/ShadersInclude/pbrLightFunctions.fx

@@ -153,4 +153,11 @@ lightingInfo computeHemisphericLighting(vec3 viewDirectionW, vec3 vNormal, vec4
     #endif
     #endif
 
 
     return result;
     return result;
+}
+
+vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler, mat4 textureProjectionMatrix){
+	vec4 strq = textureProjectionMatrix * vec4(vPositionW, 1.0);
+	strq /= strq.w;
+	vec3 textureColor = texture2D(projectionLightSampler, strq.xy).rgb;
+	return toLinearSpace(textureColor);
 }
 }

+ 5 - 1
src/Shaders/default.fragment.fx

@@ -121,6 +121,10 @@ uniform sampler2D refraction2DSampler;
 	uniform sampler2D specularSampler;
 	uniform sampler2D specularSampler;
 #endif
 #endif
 
 
+#ifdef ALPHATEST
+	uniform float alphaCutOff;
+#endif
+
 // Fresnel
 // Fresnel
 #include<fresnelFunction>
 #include<fresnelFunction>
 
 
@@ -192,7 +196,7 @@ void main(void) {
 	baseColor = texture2D(diffuseSampler, vDiffuseUV + uvOffset);
 	baseColor = texture2D(diffuseSampler, vDiffuseUV + uvOffset);
 
 
 	#ifdef ALPHATEST
 	#ifdef ALPHATEST
-		if (baseColor.a < 0.4)
+		if (baseColor.a < alphaCutOff)
 			discard;
 			discard;
 	#endif
 	#endif
 
 

+ 3 - 0
src/States/babylon.alphaCullingState.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * @hidden
+     **/        
     export class _AlphaState {
     export class _AlphaState {
         private _isAlphaBlendDirty = false;
         private _isAlphaBlendDirty = false;
         private _isBlendFunctionParametersDirty = false;
         private _isBlendFunctionParametersDirty = false;

+ 0 - 0
src/States/babylon.depthCullingState.ts


Some files were not shown because too many files changed in this diff