ソースを参照

Merge remote-tracking branch 'BabylonJS/master'

MackeyK24 7 年 前
コミット
0e56b5ee61
100 ファイル変更35587 行追加961098 行削除
  1. 1 1
      .vscode/settings.json
  2. 16767 15252
      Playground/babylon.d.txt
  3. 0 4
      Playground/debug.html
  4. 0 4
      Playground/frame.html
  5. 0 4
      Playground/full.html
  6. 9 6
      Playground/index-local.html
  7. 0 4
      Playground/index.html
  8. 0 4
      Playground/indexStable.html
  9. 0 930590
      Playground/scenes/dummy.babylon
  10. BIN
      Playground/scenes/ufo.glb
  11. BIN
      Playground/textures/stars.png
  12. 0 4
      Playground/zipContent/index.html
  13. 3 1
      Tools/Gulp/config.json
  14. 3 4
      Tools/Gulp/gulpfile.js
  15. 3 2
      Tools/Gulp/package.json
  16. 6 3
      Viewer/src/configuration/mappers.ts
  17. 10233 9781
      dist/preview release/babylon.d.ts
  18. 56 56
      dist/preview release/babylon.js
  19. 1987 1611
      dist/preview release/babylon.max.js
  20. 1987 1611
      dist/preview release/babylon.no-module.max.js
  21. 58 58
      dist/preview release/babylon.worker.js
  22. 0 0
      dist/preview release/draco_decoder_gltf.js
  23. 0 0
      dist/preview release/draco_decoder_gltf.wasm
  24. 0 0
      dist/preview release/draco_wasm_wrapper_gltf.js
  25. 1987 1611
      dist/preview release/es6.js
  26. 4 0
      dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts
  27. 1 1
      dist/preview release/gltf2Interface/package.json
  28. 5 0
      dist/preview release/gui/babylon.gui.d.ts
  29. 44 35
      dist/preview release/gui/babylon.gui.js
  30. 4 4
      dist/preview release/gui/babylon.gui.min.js
  31. 5 0
      dist/preview release/gui/babylon.gui.module.d.ts
  32. 1 1
      dist/preview release/gui/package.json
  33. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  34. 7 61
      dist/preview release/inspector/babylon.inspector.js
  35. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  36. 1 1
      dist/preview release/inspector/package.json
  37. 168 6
      dist/preview release/loaders/babylon.glTF1FileLoader.d.ts
  38. 111 15
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  39. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  40. 338 13
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  41. 205 70
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  42. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  43. 358 13
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  44. 230 78
      dist/preview release/loaders/babylon.glTFFileLoader.js
  45. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  46. 1 0
      dist/preview release/loaders/babylon.objFileLoader.d.ts
  47. 5 1
      dist/preview release/loaders/babylon.objFileLoader.js
  48. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  49. 0 1
      dist/preview release/loaders/babylon.stlFileLoader.js
  50. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  51. 359 13
      dist/preview release/loaders/babylonjs.loaders.d.ts
  52. 235 80
      dist/preview release/loaders/babylonjs.loaders.js
  53. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  54. 359 13
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  55. 2 2
      dist/preview release/loaders/package.json
  56. 0 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  58. 0 1
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  59. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  60. 0 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  61. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  62. 0 1
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  63. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  64. 0 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  65. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  66. 0 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  67. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  68. 0 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  69. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  70. 0 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  71. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  72. 0 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  73. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  74. 0 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  75. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  76. 0 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  77. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  78. 0 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  79. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  80. 0 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  81. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  82. 0 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  83. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  84. 0 14
      dist/preview release/materialsLibrary/babylonjs.materials.js
  85. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  86. 1 1
      dist/preview release/materialsLibrary/package.json
  87. 0 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  88. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  89. 0 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  90. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  91. 0 2
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  92. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  93. 1 1
      dist/preview release/postProcessesLibrary/package.json
  94. 0 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js
  95. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js
  96. 0 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js
  97. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js
  98. 0 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js
  99. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js
  100. 0 0
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js

+ 1 - 1
.vscode/settings.json

@@ -43,5 +43,5 @@
         "**/*.d.ts": true,
         "assets":true
     },
-    "typescript.check.workspaceVersion": false
+    "typescript.tsdk": "./Tools/Gulp/node_modules/typescript/lib"
 }

ファイルの差分が大きいため隠しています
+ 16767 - 15252
Playground/babylon.d.txt


+ 0 - 4
Playground/debug.html

@@ -33,10 +33,6 @@
     <!-- jszip -->
     <script src="js/libs/jszip.min.js"></script>
     <script src="js/libs/fileSaver.js"></script>
-    <!-- Draco -->
-    <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-    <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-    <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
     <!-- Monaco -->
     <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
     <!-- Babylon.js -->

+ 0 - 4
Playground/frame.html

@@ -24,10 +24,6 @@
     <meta name="theme-color" content="#ffffff">
 
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
-    <!-- Draco -->
-    <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-    <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-    <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
     <!-- Babylon.js -->
     <script src="https://preview.babylonjs.com/cannon.js"></script>
     <script src="https://preview.babylonjs.com/Oimo.js"></script>

+ 0 - 4
Playground/full.html

@@ -24,10 +24,6 @@
         <meta name="theme-color" content="#ffffff">
 
         <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
-        <!-- Draco -->
-        <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-        <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-        <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
         <!-- Babylon.js -->
         <script src="https://preview.babylonjs.com/cannon.js"></script>
         <script src="https://preview.babylonjs.com/Oimo.js"></script>

+ 9 - 6
Playground/index-local.html

@@ -17,10 +17,6 @@
         <script src="../dist/preview%20release/cannon.js"></script>
         <script src="../dist/preview%20release/Oimo.js"></script>
         <script src="../dist/preview%20release/earcut.min.js"></script>
-        <!-- Draco -->
-        <script src="../dist/preview%20release/draco_decoder.js" type="text/x-draco-decoder"></script>
-        <script src="../dist/preview%20release/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-        <script src="../dist/preview%20release/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
         <!-- Monaco -->
         <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
         <!-- Babylon.js -->
@@ -470,8 +466,15 @@
         <script src="js/actions.js"></script>
         <script src="js/pbt.js"></script>
         <script>
-            BABYLONDEVTOOLS.Loader.require('js/index.js')
-                .load();
+            BABYLONDEVTOOLS.Loader
+                .require('js/index.js')
+                .load(function () {
+                    BABYLON.DracoCompression.Configuration.decoder = {
+                        wasmUrl: "../dist/preview%20release/draco_wasm_wrapper_gltf.js",
+                        wasmBinaryUrl: "../dist/preview%20release/draco_decoder_gltf.wasm",
+                        fallbackUrl: "../dist/preview%20release/draco_decoder_gltf.js"
+                    };
+                });
         </script>
     </body>
 

+ 0 - 4
Playground/index.html

@@ -37,10 +37,6 @@
         <script src="https://preview.babylonjs.com/cannon.js"></script>
         <script src="https://preview.babylonjs.com/Oimo.js"></script>
         <script src="https://preview.babylonjs.com/earcut.min.js"></script>
-        <!-- Draco -->
-        <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-        <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-        <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
         <!-- Monaco -->
         <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
         <!-- Babylon.js -->

+ 0 - 4
Playground/indexStable.html

@@ -36,10 +36,6 @@
         <!-- Physics -->
         <script src="https://cdn.babylonjs.com/cannon.js"></script>
         <script src="https://cdn.babylonjs.com/Oimo.js"></script>
-        <!-- Draco -->
-        <script src="https://cdn.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-        <script src="https://cdn.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-        <script src="https://cdn.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
         <!-- Monaco -->
         <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
         <!-- Babylon.js -->

ファイルの差分が大きいため隠しています
+ 0 - 930590
Playground/scenes/dummy.babylon


BIN
Playground/scenes/ufo.glb


BIN
Playground/textures/stars.png


+ 0 - 4
Playground/zipContent/index.html

@@ -5,10 +5,6 @@
 
         <title>Babylon.js sample code</title>
 
-        <!-- Draco -->
-        <script src="https://preview.babylonjs.com/draco_decoder.js" type="text/x-draco-decoder"></script>
-        <script src="https://preview.babylonjs.com/draco_decoder.wasm" type="text/x-draco-decoder-wasm-binary"></script>
-        <script src="https://preview.babylonjs.com/draco_wasm_wrapper.js" type="text/x-draco-decoder-wasm-wrapper"></script>
         <!-- Babylon.js -->
         <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script>
         <script src="https://preview.babylonjs.com/babylon.js"></script>

+ 3 - 1
Tools/Gulp/config.json

@@ -11,7 +11,9 @@
         "intellisenseFile": "babylon.d.txt",
         "intellisenseSources": [
             "../../dist/preview release/babylon.d.ts",
-            "../../dist/preview release/gui/babylon.gui.d.ts"
+            "../../dist/preview release/gui/babylon.gui.d.ts",
+            "../../dist/preview release/loaders/babylon.glTF2FileLoader.d.ts",
+            "../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"
         ],
         "outputCustomConfigurationsDirectory": "../../dist/preview release/customConfigurations",
         "srcOutputDirectory": "../../src/",

+ 3 - 4
Tools/Gulp/gulpfile.js

@@ -63,7 +63,6 @@ var tsConfig = {
     noUnusedLocals: true,
     strictNullChecks: true,
     strictFunctionTypes: true,
-    strict: true,
     types: [],
     lib: [
         "dom",
@@ -85,7 +84,6 @@ var externalTsConfig = {
     noImplicitThis: true,
     noUnusedLocals: true,
     strictNullChecks: true,
-    strict: true,
     types: [],
     lib: [
         "dom",
@@ -220,6 +218,7 @@ gulp.task("buildWorker", ["workers", "shaders"], function () {
         .pipe(cleants())
         .pipe(replace(extendsSearchRegex, ""))
         .pipe(replace(decorateSearchRegex, ""))
+        .pipe(addDecorateAndExtends())
         .pipe(addModuleExports("BABYLON", {
             dependencies: config.build.dependencies
         }))
@@ -466,7 +465,7 @@ var buildExternalLibrary = function (library, settings, watch) {
                         // prepend the needed reference
                         fs.readFile(settings.build.dtsBundle.out, function (err, data) {
                             if (err) throw err;
-                            data = settings.build.dtsBundle.prependText + data.toString();
+                            data = settings.build.dtsBundle.prependText + '\n' + data.toString();
                             fs.writeFile(settings.build.dtsBundle.out, data);
                         });
                     });
@@ -885,7 +884,7 @@ gulp.task("modules", ["prepare-dependency-tree"], function () {
  */
 gulp.task("typedoc-generate", function () {
     return gulp
-        .src(["../../dist/preview release/babylon.d.ts"])
+        .src(["../../dist/preview release/babylon.d.ts", "../../dist/preview release/loaders/babylon.glTF2FileLoader.d.ts", "../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"])
         .pipe(typedoc({
             // TypeScript options (see typescript docs)
             mode: "modules",

+ 3 - 2
Tools/Gulp/package.json

@@ -57,7 +57,7 @@
         "through2": "~0.6.5",
         "ts-loader": "^2.3.7",
         "typedoc": "^0.9.0",
-        "typescript": "~2.6.2",
+        "typescript": "~2.8.1",
         "webpack-stream": "^4.0.1"
     },
     "scripts": {
@@ -65,6 +65,7 @@
     },
     "dependencies": {
         "dts-bundle": "^0.7.3",
-        "gulp-clean": "^0.4.0"
+        "gulp-clean": "^0.4.0",
+        "npm": "^5.8.0"
     }
 }

+ 6 - 3
Viewer/src/configuration/mappers.ts

@@ -38,13 +38,16 @@ class HTMLMapper implements IMapper {
         let config = {};
         for (let attrIdx = 0; attrIdx < element.attributes.length; ++attrIdx) {
             let attr = element.attributes.item(attrIdx);
+            if (!attr) {
+                continue;
+            }
             // map "object.property" to the right configuration place.
             let split = attr.nodeName.split('.');
             split.reduce((currentConfig, key, idx) => {
                 //convert html-style to json-style
                 let camelKey = kebabToCamel(key);
                 if (idx === split.length - 1) {
-                    let val: any = attr.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.
+                    let val: any = attr!.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.
                     if (val === "true") {
                         val = true;
                     } else if (val === "false") {
@@ -103,10 +106,10 @@ class DOMMapper implements IMapper {
                     // use the HTML Mapper to read configuration from a single element
                     let configMapped = htmlMapper.map(item);
                     let key = kebabToCamel(item.nodeName.toLowerCase());
-                    if (item.attributes.getNamedItem('array') && item.attributes.getNamedItem('array').nodeValue === 'true') {
+                    if (item.attributes.getNamedItem('array') && item.attributes.getNamedItem('array')!.nodeValue === 'true') {
                         partConfig[key] = [];
                     } else {
-                        if (element.attributes.getNamedItem('array') && element.attributes.getNamedItem('array').nodeValue === 'true') {
+                        if (element.attributes.getNamedItem('array') && element.attributes.getNamedItem('array')!.nodeValue === 'true') {
                             partConfig.push(configMapped)
                         } else if (partConfig[key]) {
                             //exists already! probably an array

ファイルの差分が大きいため隠しています
+ 10233 - 9781
dist/preview release/babylon.d.ts


ファイルの差分が大きいため隠しています
+ 56 - 56
dist/preview release/babylon.js


ファイルの差分が大きいため隠しています
+ 1987 - 1611
dist/preview release/babylon.max.js


ファイルの差分が大きいため隠しています
+ 1987 - 1611
dist/preview release/babylon.no-module.max.js


ファイルの差分が大きいため隠しています
+ 58 - 58
dist/preview release/babylon.worker.js


dist/preview release/draco_decoder.js → dist/preview release/draco_decoder_gltf.js


dist/preview release/draco_decoder.wasm → dist/preview release/draco_decoder_gltf.wasm


dist/preview release/draco_wasm_wrapper.js → dist/preview release/draco_wasm_wrapper_gltf.js


ファイルの差分が大きいため隠しています
+ 1987 - 1611
dist/preview release/es6.js


+ 4 - 0
dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts

@@ -1,3 +1,7 @@
+/**
+ * @ignoreChildren
+ * @ignore
+ */
 declare module BABYLON.GLTF2 {
     const enum AccessorComponentType {
         BYTE = 5120,

+ 1 - 1
dist/preview release/gltf2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 5 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -55,9 +55,14 @@ declare module BABYLON.GUI {
         dispose(): void;
         private _onResize();
         _getGlobalViewport(scene: Scene): Viewport;
+        getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
         private _checkUpdate(camera);
         private _render();
         private _doPicking(x, y, type, pointerId, buttonIndex);
+        _cleanControlAfterRemovalFromList(list: {
+            [pointerId: number]: Control;
+        }, control: Control): void;
+        _cleanControlAfterRemoval(control: Control): void;
         attach(): void;
         attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
         moveFocusToControl(control: IFocusableControl): void;

+ 44 - 35
dist/preview release/gui/babylon.gui.js

@@ -23,7 +23,6 @@
 
 var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
 var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
-"use strict";
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -304,6 +303,16 @@ var BABYLON;
                 var engine = scene.getEngine();
                 return this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
             };
+            AdvancedDynamicTexture.prototype.getProjectedPosition = function (position, worldMatrix) {
+                var scene = this.getScene();
+                if (!scene) {
+                    return BABYLON.Vector2.Zero();
+                }
+                var globalViewport = this._getGlobalViewport(scene);
+                var projectedPosition = BABYLON.Vector3.Project(position, worldMatrix, scene.getTransformMatrix(), globalViewport);
+                projectedPosition.scaleInPlace(this.renderScale);
+                return new BABYLON.Vector2(projectedPosition.x, projectedPosition.y);
+            };
             AdvancedDynamicTexture.prototype._checkUpdate = function (camera) {
                 if (this._layerToDispose) {
                     if ((camera.layerMask & this._layerToDispose.layerMask) === 0) {
@@ -391,6 +400,21 @@ var BABYLON;
                 }
                 this._manageFocus();
             };
+            AdvancedDynamicTexture.prototype._cleanControlAfterRemovalFromList = function (list, control) {
+                for (var pointerId in list) {
+                    if (!list.hasOwnProperty(pointerId)) {
+                        continue;
+                    }
+                    var lastControlOver = list[pointerId];
+                    if (lastControlOver === control) {
+                        delete list[pointerId];
+                    }
+                }
+            };
+            AdvancedDynamicTexture.prototype._cleanControlAfterRemoval = function (control) {
+                this._cleanControlAfterRemovalFromList(this._lastControlDown, control);
+                this._cleanControlAfterRemovalFromList(this._lastControlOver, control);
+            };
             AdvancedDynamicTexture.prototype.attach = function () {
                 var _this = this;
                 var scene = this.getScene();
@@ -541,7 +565,6 @@ var BABYLON;
 
 //# sourceMappingURL=advancedDynamicTexture.js.map
 
-"use strict";
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -586,7 +609,6 @@ var BABYLON;
 
 //# sourceMappingURL=measure.js.map
 
-"use strict";
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -720,7 +742,6 @@ var BABYLON;
 
 //# sourceMappingURL=math2D.js.map
 
-"use strict";
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -776,10 +797,10 @@ var BABYLON;
                     if (host.useSmallestIdeal && host.idealWidth && host.idealHeight) {
                         return window.innerWidth < window.innerHeight ? width : height;
                     }
-                    if (host.idealWidth) {
+                    if (host.idealWidth) { // horizontal
                         return width;
                     }
-                    if (host.idealHeight) {
+                    if (host.idealHeight) { // vertical
                         return height;
                     }
                 }
@@ -850,7 +871,6 @@ var BABYLON;
 
 //# sourceMappingURL=valueAndUnit.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -1968,7 +1988,6 @@ var BABYLON;
 
 //# sourceMappingURL=control.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -2083,6 +2102,9 @@ var BABYLON;
                     control.parent = null;
                 }
                 control.linkWithMesh(null);
+                if (this._host) {
+                    this._host._cleanControlAfterRemoval(control);
+                }
                 this._markAsDirty();
                 return this;
             };
@@ -2214,7 +2236,6 @@ var BABYLON;
 
 //# sourceMappingURL=container.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -2357,7 +2378,6 @@ var BABYLON;
 
 //# sourceMappingURL=stackPanel.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -2485,7 +2505,6 @@ var BABYLON;
 
 //# sourceMappingURL=rectangle.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -2563,7 +2582,6 @@ var BABYLON;
 
 //# sourceMappingURL=ellipse.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -2807,7 +2825,6 @@ var BABYLON;
 
 //# sourceMappingURL=line.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -3096,7 +3113,6 @@ var BABYLON;
 
 //# sourceMappingURL=slider.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -3224,7 +3240,6 @@ var BABYLON;
 
 //# sourceMappingURL=checkbox.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -3373,7 +3388,6 @@ var BABYLON;
 
 //# sourceMappingURL=radioButton.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -3388,10 +3402,10 @@ var BABYLON;
              * @param text defines the text to display (emptry string by default)
              */
             function TextBlock(
-                /**
-                 * Defines the name of the control
-                 */
-                name, text) {
+            /**
+             * Defines the name of the control
+             */
+            name, text) {
                 if (text === void 0) { text = ""; }
                 var _this = _super.call(this, name) || this;
                 _this.name = name;
@@ -3721,7 +3735,6 @@ var BABYLON;
 
 //# sourceMappingURL=textBlock.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var DOMImage = Image;
@@ -3982,7 +3995,7 @@ var BABYLON;
                                 if (this._autoScale) {
                                     this.synchronizeSizeWithContent();
                                 }
-                                if (this._root && this._root.parent) {
+                                if (this._root && this._root.parent) { // Will update root size if root is not the top root
                                     this._root.width = this.width;
                                     this._root.height = this.height;
                                 }
@@ -4033,7 +4046,6 @@ var BABYLON;
 
 //# sourceMappingURL=image.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -4163,7 +4175,6 @@ var BABYLON;
 
 //# sourceMappingURL=button.js.map
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -4522,7 +4533,6 @@ var BABYLON;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;
@@ -4743,10 +4753,10 @@ var BABYLON;
             InputText.prototype.processKey = function (keyCode, key) {
                 // Specific cases
                 switch (keyCode) {
-                    case 32://SPACE
+                    case 32: //SPACE
                         key = " "; //ie11 key for space is "Spacebar" 
                         break;
-                    case 8:// BACKSPACE
+                    case 8: // BACKSPACE
                         if (this._text && this._text.length > 0) {
                             if (this._cursorOffset === 0) {
                                 this.text = this._text.substr(0, this._text.length - 1);
@@ -4759,27 +4769,27 @@ var BABYLON;
                             }
                         }
                         return;
-                    case 46:// DELETE
+                    case 46: // DELETE
                         if (this._text && this._text.length > 0) {
                             var deletePosition = this._text.length - this._cursorOffset;
                             this.text = this._text.slice(0, deletePosition) + this._text.slice(deletePosition + 1);
                             this._cursorOffset--;
                         }
                         return;
-                    case 13:// RETURN
+                    case 13: // RETURN
                         this._host.focusedControl = null;
                         return;
-                    case 35:// END
+                    case 35: // END
                         this._cursorOffset = 0;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 36:// HOME
+                    case 36: // HOME
                         this._cursorOffset = this._text.length;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 37:// LEFT
+                    case 37: // LEFT
                         this._cursorOffset++;
                         if (this._cursorOffset > this._text.length) {
                             this._cursorOffset = this._text.length;
@@ -4787,7 +4797,7 @@ var BABYLON;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 39:// RIGHT
+                    case 39: // RIGHT
                         this._cursorOffset--;
                         if (this._cursorOffset < 0) {
                             this._cursorOffset = 0;
@@ -4803,7 +4813,7 @@ var BABYLON;
                     (keyCode > 64 && keyCode < 91) || // Letters
                     (keyCode > 185 && keyCode < 193) || // Special characters
                     (keyCode > 218 && keyCode < 223) || // Special characters
-                    (keyCode > 95 && keyCode < 112)) {
+                    (keyCode > 95 && keyCode < 112)) { // Numpad
                     if (this._cursorOffset === 0) {
                         this.text += key;
                     }
@@ -4966,7 +4976,6 @@ var BABYLON;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 var BABYLON;

ファイルの差分が大きいため隠しています
+ 4 - 4
dist/preview release/gui/babylon.gui.min.js


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

@@ -60,9 +60,14 @@ declare module BABYLON.GUI {
         dispose(): void;
         private _onResize();
         _getGlobalViewport(scene: Scene): Viewport;
+        getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
         private _checkUpdate(camera);
         private _render();
         private _doPicking(x, y, type, pointerId, buttonIndex);
+        _cleanControlAfterRemovalFromList(list: {
+            [pointerId: number]: Control;
+        }, control: Control): void;
+        _cleanControlAfterRemoval(control: Control): void;
         attach(): void;
         attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
         moveFocusToControl(control: IFocusableControl): void;

+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

ファイルの差分が大きいため隠しています
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


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

@@ -1,4 +1,3 @@
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var Inspector = /** @class */ (function () {
@@ -199,6 +198,7 @@ var INSPECTOR;
                     return this._getRelativeParent(elem.parentElement, true);
                 }
             }
+            // looking for the relative parent of the element 
             else {
                 if (computedStyle.position == "static") {
                     return elem.parentElement;
@@ -354,7 +354,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=Inspector.js.map
 
-"use strict";
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
 var INSPECTOR;
 (function (INSPECTOR) {
@@ -483,7 +482,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=properties.js.map
 
-"use strict";
 /// <reference path="../../dist/preview release/gui/babylon.gui.d.ts"/>
 var INSPECTOR;
 (function (INSPECTOR) {
@@ -604,7 +602,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=properties_gui.js.map
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     /**
@@ -636,7 +633,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=BasicElement.js.map
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var Adapter = /** @class */ (function () {
@@ -674,7 +670,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=Adapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -734,7 +729,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=CameraAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -796,7 +790,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=PhysicsImpostorAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -848,7 +841,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=GUIAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -905,7 +897,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=SoundAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -952,7 +943,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=TextureAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -1004,7 +994,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=LightAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -1049,7 +1038,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=MaterialAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -1157,7 +1145,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=MeshAdapter.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -1363,7 +1350,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=DetailPanel.js.map
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     /**
@@ -1415,7 +1401,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=Property.js.map
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var PropertyFormatter = /** @class */ (function () {
@@ -1517,10 +1502,10 @@ var INSPECTOR;
          */
         PropertyLine.prototype._validateInput = function (e) {
             this._input.removeEventListener('focusout', this._focusOutInputHandler);
-            if (e.keyCode == 13) {
+            if (e.keyCode == 13) { // Enter
                 this.validateInput(this._input.value);
             }
-            else if (e.keyCode == 9) {
+            else if (e.keyCode == 9) { // Tab
                 e.preventDefault();
                 this.validateInput(this._input.value);
             }
@@ -1698,7 +1683,7 @@ var INSPECTOR;
             if (typeof this.value === 'boolean') {
                 this._checkboxInput();
             }
-            else if (this._isSliderType()) {
+            else if (this._isSliderType()) { // Add slider when parent have slider property
                 this._rangeInput();
             }
             else {
@@ -1904,7 +1889,7 @@ var INSPECTOR;
          */
         PropertyLine.prototype._checkboxInput = function () {
             var _this = this;
-            if (this._valueDiv.childElementCount < 1) {
+            if (this._valueDiv.childElementCount < 1) { // Prevent display two checkbox
                 this._input = INSPECTOR.Helpers.CreateInput('checkbox-element', this._valueDiv);
                 this._input.type = 'checkbox';
                 this._input.checked = this.value;
@@ -1915,7 +1900,7 @@ var INSPECTOR;
             }
         };
         PropertyLine.prototype._rangeInput = function () {
-            if (this._valueDiv.childElementCount < 1) {
+            if (this._valueDiv.childElementCount < 1) { // Prevent display two input range
                 this._input = INSPECTOR.Helpers.CreateInput('slider-element', this._valueDiv);
                 this._input.type = 'range';
                 this._input.style.display = 'inline-block';
@@ -1960,7 +1945,6 @@ var INSPECTOR;
 
 //# sourceMappingURL=PropertyLine.js.map
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2010,7 +1994,6 @@ var INSPECTOR;
     INSPECTOR.ColorElement = ColorElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2081,7 +2064,6 @@ var INSPECTOR;
     INSPECTOR.ColorPickerElement = ColorPickerElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2199,7 +2181,6 @@ var INSPECTOR;
     INSPECTOR.CubeTextureElement = CubeTextureElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2244,7 +2225,6 @@ var INSPECTOR;
     INSPECTOR.HDRCubeTextureElement = HDRCubeTextureElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2321,7 +2301,6 @@ var INSPECTOR;
     INSPECTOR.SearchBarDetails = SearchBarDetails;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2368,7 +2347,6 @@ var INSPECTOR;
     INSPECTOR.TextureElement = TextureElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     /**
@@ -2394,7 +2372,6 @@ var INSPECTOR;
     INSPECTOR.Tooltip = Tooltip;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var Helpers = /** @class */ (function () {
@@ -2609,7 +2586,6 @@ var INSPECTOR;
     INSPECTOR.Helpers = Helpers;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var Scheduler = /** @class */ (function () {
@@ -2656,7 +2632,6 @@ var INSPECTOR;
     INSPECTOR.Scheduler = Scheduler;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2733,7 +2708,6 @@ var INSPECTOR;
     INSPECTOR.Tab = Tab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2884,7 +2858,6 @@ var INSPECTOR;
     INSPECTOR.PropertyTab = PropertyTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2918,7 +2891,6 @@ var INSPECTOR;
     INSPECTOR.CameraTab = CameraTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2974,7 +2946,6 @@ var INSPECTOR;
     INSPECTOR.GUITab = GUITab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3015,7 +2986,6 @@ var INSPECTOR;
     INSPECTOR.PhysicsTab = PhysicsTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3053,7 +3023,6 @@ var INSPECTOR;
     INSPECTOR.SoundTab = SoundTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3227,7 +3196,6 @@ var INSPECTOR;
     INSPECTOR.TextureTab = TextureTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3261,7 +3229,6 @@ var INSPECTOR;
     INSPECTOR.LightTab = LightTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3295,7 +3262,6 @@ var INSPECTOR;
     INSPECTOR.MaterialTab = MaterialTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -3386,7 +3352,6 @@ var INSPECTOR;
     INSPECTOR.MeshTab = MeshTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3573,7 +3538,6 @@ var INSPECTOR;
     INSPECTOR.SceneTab = SceneTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -3713,7 +3677,6 @@ var INSPECTOR;
     INSPECTOR.ConsoleTab = ConsoleTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4058,7 +4021,6 @@ var INSPECTOR;
     INSPECTOR.StatsTab = StatsTab;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4280,7 +4242,6 @@ var INSPECTOR;
     INSPECTOR.TabBar = TabBar;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var AbstractTool = /** @class */ (function () {
@@ -4321,7 +4282,6 @@ var INSPECTOR;
     INSPECTOR.AbstractTool = AbstractTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4358,7 +4318,6 @@ var INSPECTOR;
     INSPECTOR.PauseScheduleTool = PauseScheduleTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4422,7 +4381,6 @@ var INSPECTOR;
     INSPECTOR.PickTool = PickTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4449,7 +4407,6 @@ var INSPECTOR;
     INSPECTOR.PopupTool = PopupTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4476,7 +4433,6 @@ var INSPECTOR;
     INSPECTOR.RefreshTool = RefreshTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4588,6 +4544,7 @@ var INSPECTOR;
                 this._initializeLabels();
                 this._advancedTexture._rootContainer.isVisible = true;
             }
+            // Or to hide them
             else {
                 this._advancedTexture._rootContainer.isVisible = false;
             }
@@ -4597,7 +4554,6 @@ var INSPECTOR;
     INSPECTOR.LabelTool = LabelTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4663,7 +4619,6 @@ var INSPECTOR;
     INSPECTOR.Toolbar = Toolbar;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4693,7 +4648,6 @@ var INSPECTOR;
     INSPECTOR.DisposeTool = DisposeTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4726,7 +4680,6 @@ var INSPECTOR;
     INSPECTOR.FullscreenTool = FullscreenTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4912,7 +4865,6 @@ var INSPECTOR;
     INSPECTOR.TreeItem = TreeItem;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var INSPECTOR;
 (function (INSPECTOR) {
     var AbstractTreeTool = /** @class */ (function () {
@@ -4945,7 +4897,6 @@ var INSPECTOR;
     INSPECTOR.AbstractTreeTool = AbstractTreeTool;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -4993,7 +4944,6 @@ var INSPECTOR;
     INSPECTOR.BoundingBox = BoundingBox;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -5049,7 +4999,6 @@ var INSPECTOR;
     INSPECTOR.CameraPOV = CameraPOV;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -5097,7 +5046,6 @@ var INSPECTOR;
     INSPECTOR.SoundInteractions = SoundInteractions;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -5151,7 +5099,6 @@ var INSPECTOR;
     INSPECTOR.Checkbox = Checkbox;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -5189,7 +5136,6 @@ var INSPECTOR;
     INSPECTOR.DebugArea = DebugArea;
 })(INSPECTOR || (INSPECTOR = {}));
 
-"use strict";
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||

ファイルの差分が大きいため隠しています
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 168 - 6
dist/preview release/loaders/babylon.glTF1FileLoader.d.ts

@@ -1,5 +1,8 @@
 
 declare module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -10,6 +13,9 @@ declare module BABYLON {
          */
         FORCE_RIGHT_HANDED = 1,
     }
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -24,10 +30,22 @@ declare module BABYLON {
          */
         ALL = 2,
     }
+    /**
+    * Loaded gltf data
+    */
     interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
+    /**
+    * Gltf extension interface
+    */
     interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -38,6 +56,9 @@ declare module BABYLON {
          */
         enabled: boolean;
     }
+    /**
+    * Loading state
+    */
     enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -52,29 +73,77 @@ declare module BABYLON {
          */
         COMPLETE = 2,
     }
+    /**
+    * GLTF loader interface
+    */
     interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+       * Observable that fires each time a material is loaded
+       */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
+        /**
+        * Imports one or more meshes from a loaded gltf file 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[];
         }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
+    /** File loader to load gltf files into a babylon scene */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
          * Raised when the asset has been parsed.
@@ -83,27 +152,39 @@ declare module BABYLON {
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
+        /** Raised when the asset has been parsed. */
         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.
+         */
         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
+         */
         static HomogeneousCoordinates: boolean;
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+         * 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.
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
-         * The animation start mode (NONE, FIRST, ALL).
-         */
+        * 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.
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
-         * Set to true to compile materials before raising the success callback.
+         * Set to true to compile materials before raising the success callback. Defaults to false.
          */
         compileMaterials: boolean;
         /**
-         * Set to true to also compile materials with clip planes.
+         * Set to true to also compile materials with clip planes. Defaults to false.
          */
         useClipPlane: boolean;
         /**
-         * Set to true to compile shadow generators before raising the success callback.
+         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
          */
         compileShadowGenerators: boolean;
         /**
@@ -111,18 +192,27 @@ declare module BABYLON {
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
          * Raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
          * Raised when the loader creates a material after parsing the glTF properties of the material.
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         onMaterialLoaded: (material: Material) => void;
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
@@ -131,12 +221,18 @@ declare module BABYLON {
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         onComplete: () => void;
         /**
         * Raised after the loader is disposed.
         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         onDispose: () => void;
         /**
          * Raised after a loader extension is created.
@@ -144,6 +240,9 @@ declare module BABYLON {
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
          * Returns a promise that resolves when the asset is completely loaded.
@@ -155,22 +254,65 @@ declare module BABYLON {
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
+        /**
+         * Name of the loader ("gltf")
+         */
         name: string;
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         extensions: ISceneLoaderPluginExtensions;
         /**
          * Disposes the loader, releases resources during load, and cancels any outstanding requests.
          */
         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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, 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
+        * @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
+        */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         canDirectLoad(data: string): boolean;
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         private _parse(data);
         private _getLoader(loaderData);
@@ -587,9 +729,21 @@ declare module BABYLON.GLTF1 {
         onMaterialLoadedObservable: Observable<Material>;
         onCompleteObservable: Observable<IGLTFLoader>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * State of the loader
+        */
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
         private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
@@ -597,6 +751,14 @@ declare module BABYLON.GLTF1 {
             animationGroups: AnimationGroup[];
         }>;
         private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadShadersAsync(gltfRuntime, onload);
         private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);

+ 111 - 15
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -1,7 +1,9 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
@@ -13,6 +15,9 @@ var BABYLON;
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
         /**
@@ -28,6 +33,9 @@ var BABYLON;
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
         /**
@@ -43,6 +51,7 @@ var BABYLON;
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
             // #region Common options
@@ -55,23 +64,28 @@ var BABYLON;
             // #endregion
             // #region V2 options
             /**
-             * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+             * 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.
              */
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             /**
-             * The animation start mode (NONE, FIRST, ALL).
-             */
+            * 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.
+            */
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             /**
-             * Set to true to compile materials before raising the success callback.
+             * Set to true to compile materials before raising the success callback. Defaults to false.
              */
             this.compileMaterials = false;
             /**
-             * Set to true to also compile materials with clip planes.
+             * Set to true to also compile materials with clip planes. Defaults to false.
              */
             this.useClipPlane = false;
             /**
-             * Set to true to compile shadow generators before raising the success callback.
+             * Set to true to compile shadow generators before raising the success callback. Defaults to false.
              */
             this.compileShadowGenerators = false;
             /**
@@ -103,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
             };
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -120,6 +141,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -130,6 +154,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -140,6 +167,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -150,6 +180,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -160,6 +193,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -170,6 +206,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -215,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             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
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -223,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+        * 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
+        */
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -231,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -247,9 +311,18 @@ var BABYLON;
                 });
             });
         };
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
         };
@@ -433,7 +506,13 @@ var BABYLON;
         };
         // #endregion
         // #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.
+         */
         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
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
     }());
@@ -472,7 +551,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFFileLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -570,7 +648,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -759,11 +836,11 @@ var BABYLON;
                     // For each frame
                     for (var j = 0; j < bufferInput.length; j++) {
                         var value = null;
-                        if (targetPath === "rotationQuaternion") {
+                        if (targetPath === "rotationQuaternion") { // VEC4
                             value = BABYLON.Quaternion.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2], bufferOutput[arrayOffset + 3]]);
                             arrayOffset += 4;
                         }
-                        else {
+                        else { // Position and scaling are VEC3
                             value = BABYLON.Vector3.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2]]);
                             arrayOffset += 3;
                         }
@@ -1251,6 +1328,7 @@ var BABYLON;
                 var newMesh = importMesh(gltfRuntime, node, node.mesh ? [node.mesh] : node.meshes, id, node.babylonNode);
                 lastNode = newMesh;
             }
+            // Lights
             else if (node.light && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var light = gltfRuntime.lights[node.light];
                 if (light) {
@@ -1298,6 +1376,7 @@ var BABYLON;
                     }
                 }
             }
+            // Cameras
             else if (node.camera && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var camera = gltfRuntime.cameras[node.camera];
                 if (camera) {
@@ -1483,6 +1562,7 @@ var BABYLON;
                 if (type === GLTF1.EParameterType.SAMPLER_2D) {
                     GLTF1.GLTFLoaderExtension.LoadTextureAsync(gltfRuntime, material.values ? value : uniform.value, onLoadTexture(unif), function () { return onLoadTexture(null); });
                 }
+                // Others
                 else {
                     if (uniform.value && GLTF1.GLTFUtils.SetUniform(shaderMaterial, unif, material.values ? value : uniform.value, type)) {
                         // Static uniform
@@ -1869,6 +1949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1931,6 +2014,15 @@ var BABYLON;
                 }, onError);
                 return true;
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -1970,6 +2062,14 @@ var BABYLON;
                     }, onError);
                 }, onError);
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -2074,7 +2174,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -2310,7 +2409,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderUtils.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -2459,7 +2557,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2537,7 +2634,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFBinaryExtension.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 338 - 13
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -1,5 +1,8 @@
 
 declare module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -10,6 +13,9 @@ declare module BABYLON {
          */
         FORCE_RIGHT_HANDED = 1,
     }
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -24,10 +30,22 @@ declare module BABYLON {
          */
         ALL = 2,
     }
+    /**
+    * Loaded gltf data
+    */
     interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
+    /**
+    * Gltf extension interface
+    */
     interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -38,6 +56,9 @@ declare module BABYLON {
          */
         enabled: boolean;
     }
+    /**
+    * Loading state
+    */
     enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -52,29 +73,77 @@ declare module BABYLON {
          */
         COMPLETE = 2,
     }
+    /**
+    * GLTF loader interface
+    */
     interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+       * Observable that fires each time a material is loaded
+       */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
+        /**
+        * Imports one or more meshes from a loaded gltf file 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[];
         }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
+    /** File loader to load gltf files into a babylon scene */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
          * Raised when the asset has been parsed.
@@ -83,27 +152,39 @@ declare module BABYLON {
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
+        /** Raised when the asset has been parsed. */
         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.
+         */
         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
+         */
         static HomogeneousCoordinates: boolean;
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+         * 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.
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
-         * The animation start mode (NONE, FIRST, ALL).
-         */
+        * 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.
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
-         * Set to true to compile materials before raising the success callback.
+         * Set to true to compile materials before raising the success callback. Defaults to false.
          */
         compileMaterials: boolean;
         /**
-         * Set to true to also compile materials with clip planes.
+         * Set to true to also compile materials with clip planes. Defaults to false.
          */
         useClipPlane: boolean;
         /**
-         * Set to true to compile shadow generators before raising the success callback.
+         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
          */
         compileShadowGenerators: boolean;
         /**
@@ -111,18 +192,27 @@ declare module BABYLON {
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
          * Raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
          * Raised when the loader creates a material after parsing the glTF properties of the material.
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         onMaterialLoaded: (material: Material) => void;
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
@@ -131,12 +221,18 @@ declare module BABYLON {
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         onComplete: () => void;
         /**
         * Raised after the loader is disposed.
         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         onDispose: () => void;
         /**
          * Raised after a loader extension is created.
@@ -144,6 +240,9 @@ declare module BABYLON {
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
          * Returns a promise that resolves when the asset is completely loaded.
@@ -155,22 +254,65 @@ declare module BABYLON {
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
+        /**
+         * Name of the loader ("gltf")
+         */
         name: string;
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         extensions: ISceneLoaderPluginExtensions;
         /**
          * Disposes the loader, releases resources during load, and cancels any outstanding requests.
          */
         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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, 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
+        * @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
+        */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         canDirectLoad(data: string): boolean;
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         private _parse(data);
         private _getLoader(loaderData);
@@ -185,55 +327,84 @@ declare module BABYLON {
 
 
 declare module BABYLON.GLTF2 {
+    /** Array item which contains it's index in an array */
     interface IArrayItem {
         _index: number;
     }
+    /** Array item helper methods */
     class ArrayItem {
+        /** Sets the index of each array element to its index in the array */
         static Assign(values?: IArrayItem[]): void;
     }
-    class AnimationMultiTarget {
-        subTargets: any[];
-        position: Vector3;
-        rotationQuaternion: Quaternion;
-        scaling: Vector3;
-        influence: number;
-    }
 }
 
 
 
+/**
+ * GLTF2 module for babylon
+ */
 declare module BABYLON.GLTF2 {
+    /**
+     * Interface to access data and vertex buffer associated with a file
+     */
     interface ILoaderAccessor extends IAccessor, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
+    /**
+     * Loader's animation channel
+     */
     interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
     }
+    /**
+     * Container for animation keyframe data
+     */
     interface ILoaderAnimationSamplerData {
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
     }
+    /**
+     * Keyframe data
+     */
     interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
         _data: Promise<ILoaderAnimationSamplerData>;
     }
+    /**
+     * Loader animation
+     */
     interface ILoaderAnimation extends IAnimation, IArrayItem {
         channels: ILoaderAnimationChannel[];
         samplers: ILoaderAnimationSampler[];
         _babylonAnimationGroup?: AnimationGroup;
     }
+    /**
+     * Loader buffer
+     */
     interface ILoaderBuffer extends IBuffer, IArrayItem {
         _data?: Promise<ArrayBufferView>;
     }
+    /**
+     * Loader's buffer data
+     */
     interface ILoaderBufferView extends IBufferView, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
     }
+    /**
+     * Loader's loaded camera data
+     */
     interface ILoaderCamera extends ICamera, IArrayItem {
     }
+    /**
+     * Loaded image specified by url
+     */
     interface ILoaderImage extends IImage, IArrayItem {
         _objectURL?: Promise<string>;
     }
+    /**
+     * Loaded material data
+     */
     interface ILoaderMaterial extends IMaterial, IArrayItem {
         _babylonData?: {
             [drawMode: number]: {
@@ -243,11 +414,20 @@ declare module BABYLON.GLTF2 {
             };
         };
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMesh extends IMesh, IArrayItem {
         primitives: ILoaderMeshPrimitive[];
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
     }
+    /**
+     * Node for traversing loader data
+     */
     interface ILoaderNode extends INode, IArrayItem {
         _parent: ILoaderNode;
         _babylonMesh?: Mesh;
@@ -255,23 +435,41 @@ declare module BABYLON.GLTF2 {
         _babylonAnimationTargets?: Node[];
         _numMorphTargets?: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSamplerData {
         noMipMaps: boolean;
         samplingMode: number;
         wrapU: number;
         wrapV: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSampler extends ISampler, IArrayItem {
         _data?: ILoaderSamplerData;
     }
+    /**
+     * Loader's scene
+     */
     interface ILoaderScene extends IScene, IArrayItem {
     }
+    /**
+     * Loader's skeleton data
+     */
     interface ILoaderSkin extends ISkin, IArrayItem {
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
     }
+    /**
+     * Loader's texture
+     */
     interface ILoaderTexture extends ITexture, IArrayItem {
     }
+    /**
+     * Loaded GLTF data
+     */
     interface ILoaderGLTF extends IGLTF {
         accessors?: ILoaderAccessor[];
         animations?: ILoaderAnimation[];
@@ -290,14 +488,40 @@ declare module BABYLON.GLTF2 {
 }
 
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 declare module BABYLON.GLTF2 {
+    /**
+    * Interface for a meterial with a constructor
+    */
     interface MaterialConstructor<T extends Material> {
+        /**
+        * The material class
+        */
         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;
     }
+    /**
+    * Used to load from a GLTF2 file
+    */
     class GLTFLoader implements IGLTFLoader {
+        /**
+        * @ignore
+        */
         _gltf: ILoaderGLTF;
+        /**
+        * @ignore
+        */
         _babylonScene: Scene;
+        /**
+        * @ignore
+        */
         _completePromises: Promise<void>[];
         private _disposed;
         private _state;
@@ -310,26 +534,87 @@ declare module BABYLON.GLTF2 {
         private _requests;
         private static _Names;
         private static _Factories;
+        /**
+        * @ignore, registers the loader
+        * @param name name of the loader
+        * @param factory function that converts a loader to a loader extension
+        */
         static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void;
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         readonly onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+        * Observable that fires each time a material is loaded
+        */
         readonly onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires each time an extension is loaded
+        */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Observable that fires when the load has completed
+        */
         readonly onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * The current state of the loader
+        */
         readonly state: Nullable<GLTFLoaderState>;
+        /**
+        * Disposes of the loader
+        */
         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
+        */
         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
+        * @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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadAsync(nodes, scene, data, rootUrl, onProgress?);
         private _loadExtensions();
@@ -338,12 +623,18 @@ declare module BABYLON.GLTF2 {
         private _checkExtensions();
         private _createRootNode();
         private _loadNodesAsync(nodes);
+        /**
+        * @ignore
+        */
         _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
         private _forEachPrimitive(node, callback);
         private _getMeshes();
         private _getSkeletons();
         private _getAnimationGroups();
         private _startAnimations();
+        /**
+        * @ignore
+        */
         _loadNodeAsync(context: string, node: ILoaderNode): Promise<void>;
         private _loadMeshAsync(context, node, mesh, babylonMesh);
         private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
@@ -363,21 +654,48 @@ declare module BABYLON.GLTF2 {
         private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
         private _loadAnimationSamplerAsync(context, sampler);
         private _loadBufferAsync(context, buffer);
+        /**
+        * @ignore
+        */
         _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
         private _loadAccessorAsync(context, accessor);
+        /**
+        * @ignore
+        */
         _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer>;
         private _loadVertexAccessorAsync(context, accessor, kind);
         private _getDefaultMaterial(drawMode);
         private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
+        /**
+        * @ignore
+        */
         _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
+        /**
+        * @ignore
+        */
         _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T;
+        /**
+        * @ignore
+        */
         _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void>;
+        /**
+        * @ignore
+        */
         _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void;
+        /**
+        * @ignore
+        */
         _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void>;
         private _loadSampler(context, sampler);
         private _loadImageAsync(context, image);
+        /**
+        * @ignore
+        */
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
         private _onProgress();
+        /**
+        * @ignore
+        */
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
         private static _GetTextureWrapMode(context, mode);
         private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
@@ -387,12 +705,18 @@ declare module BABYLON.GLTF2 {
         private _compileMaterialsAsync();
         private _compileShadowGeneratorsAsync();
         private _clear();
+        /**
+        * @ignore
+        */
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
     }
 }
 
 
 declare module BABYLON.GLTF2 {
+    /**
+     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         enabled: boolean;
         readonly abstract name: string;
@@ -447,6 +771,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 
 
+/** Module defining extensions to gltf */
 declare module BABYLON.GLTF2.Extensions {
     class KHR_draco_mesh_compression extends GLTFLoaderExtension {
         readonly name: string;

+ 205 - 70
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -1,7 +1,9 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
@@ -13,6 +15,9 @@ var BABYLON;
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
         /**
@@ -28,6 +33,9 @@ var BABYLON;
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
         /**
@@ -43,6 +51,7 @@ var BABYLON;
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
             // #region Common options
@@ -55,23 +64,28 @@ var BABYLON;
             // #endregion
             // #region V2 options
             /**
-             * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+             * 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.
              */
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             /**
-             * The animation start mode (NONE, FIRST, ALL).
-             */
+            * 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.
+            */
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             /**
-             * Set to true to compile materials before raising the success callback.
+             * Set to true to compile materials before raising the success callback. Defaults to false.
              */
             this.compileMaterials = false;
             /**
-             * Set to true to also compile materials with clip planes.
+             * Set to true to also compile materials with clip planes. Defaults to false.
              */
             this.useClipPlane = false;
             /**
-             * Set to true to compile shadow generators before raising the success callback.
+             * Set to true to compile shadow generators before raising the success callback. Defaults to false.
              */
             this.compileShadowGenerators = false;
             /**
@@ -103,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
             };
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -120,6 +141,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -130,6 +154,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -140,6 +167,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -150,6 +180,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -160,6 +193,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -170,6 +206,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -215,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             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
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -223,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+        * 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
+        */
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -231,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -247,9 +311,18 @@ var BABYLON;
                 });
             });
         };
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
         };
@@ -433,7 +506,13 @@ var BABYLON;
         };
         // #endregion
         // #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.
+         */
         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
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
     }());
@@ -472,15 +551,16 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFFileLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
@@ -491,72 +571,32 @@ var BABYLON;
             return ArrayItem;
         }());
         GLTF2.ArrayItem = ArrayItem;
-        var AnimationMultiTarget = /** @class */ (function () {
-            function AnimationMultiTarget() {
-                this.subTargets = new Array();
-            }
-            Object.defineProperty(AnimationMultiTarget.prototype, "position", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.position = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "rotationQuaternion", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.rotationQuaternion = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "scaling", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.scaling = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "influence", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.influence = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            return AnimationMultiTarget;
-        }());
-        GLTF2.AnimationMultiTarget = AnimationMultiTarget;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=babylon.glTFLoaderUtilities.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._state = null;
@@ -564,18 +604,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
             }
+            /**
+            * @ignore, registers the loader
+            * @param name name of the loader
+            * @param factory function that converts a loader to a loader extension
+            */
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -586,12 +664,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                     return this._state;
                 },
                 enumerable: true,
                 configurable: true
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                     return;
@@ -601,6 +685,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this._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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return Promise.resolve().then(function () {
@@ -634,6 +727,14 @@ 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
@@ -791,6 +892,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
@@ -890,6 +994,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
@@ -1339,12 +1446,13 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
+                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                multiTarget.subTargets.push(morphTarget);
+                                morphTarget.animations.push(babylonAnimation);
+                                morphTargets.push(morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -1355,12 +1463,11 @@ var BABYLON;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
                         if (targetNode._babylonAnimationTargets) {
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
                             for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var target = _a[_i];
-                                multiTarget.subTargets.push(target);
+                                var babylonAnimationTarget = _a[_i];
+                                babylonAnimationTarget.animations.push(babylonAnimation);
                             }
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonAnimationTargets);
                         }
                     }
                 });
@@ -1410,6 +1517,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                     return bufferView._data;
@@ -1468,6 +1578,9 @@ var BABYLON;
                 });
                 return accessor._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 if (bufferView._babylonBuffer) {
@@ -1537,6 +1650,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
@@ -1562,12 +1678,18 @@ var BABYLON;
                 assign(babylonData.material);
                 return babylonData.loaded;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -1601,6 +1723,9 @@ var BABYLON;
                 }
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
@@ -1629,6 +1754,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -1688,6 +1816,9 @@ var BABYLON;
                 });
                 return image._objectURL;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -1745,6 +1876,9 @@ var BABYLON;
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -1893,6 +2027,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
@@ -1917,12 +2054,14 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
@@ -1991,7 +2130,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2162,7 +2300,6 @@ var BABYLON;
 
 //# sourceMappingURL=MSFT_lod.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2174,6 +2311,7 @@ var __extends = (this && this.__extends) || (function () {
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
     };
 })();
+/** Module defining extensions to gltf */
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
@@ -2261,7 +2399,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_draco_mesh_compression.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2348,7 +2485,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2435,7 +2571,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_unlit.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 358 - 13
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -1,5 +1,8 @@
 
 declare module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -10,6 +13,9 @@ declare module BABYLON {
          */
         FORCE_RIGHT_HANDED = 1,
     }
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -24,10 +30,22 @@ declare module BABYLON {
          */
         ALL = 2,
     }
+    /**
+    * Loaded gltf data
+    */
     interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
+    /**
+    * Gltf extension interface
+    */
     interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -38,6 +56,9 @@ declare module BABYLON {
          */
         enabled: boolean;
     }
+    /**
+    * Loading state
+    */
     enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -52,29 +73,77 @@ declare module BABYLON {
          */
         COMPLETE = 2,
     }
+    /**
+    * GLTF loader interface
+    */
     interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+       * Observable that fires each time a material is loaded
+       */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
+        /**
+        * Imports one or more meshes from a loaded gltf file 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[];
         }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
+    /** File loader to load gltf files into a babylon scene */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
          * Raised when the asset has been parsed.
@@ -83,27 +152,39 @@ declare module BABYLON {
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
+        /** Raised when the asset has been parsed. */
         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.
+         */
         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
+         */
         static HomogeneousCoordinates: boolean;
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+         * 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.
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
-         * The animation start mode (NONE, FIRST, ALL).
-         */
+        * 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.
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
-         * Set to true to compile materials before raising the success callback.
+         * Set to true to compile materials before raising the success callback. Defaults to false.
          */
         compileMaterials: boolean;
         /**
-         * Set to true to also compile materials with clip planes.
+         * Set to true to also compile materials with clip planes. Defaults to false.
          */
         useClipPlane: boolean;
         /**
-         * Set to true to compile shadow generators before raising the success callback.
+         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
          */
         compileShadowGenerators: boolean;
         /**
@@ -111,18 +192,27 @@ declare module BABYLON {
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
          * Raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
          * Raised when the loader creates a material after parsing the glTF properties of the material.
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         onMaterialLoaded: (material: Material) => void;
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
@@ -131,12 +221,18 @@ declare module BABYLON {
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         onComplete: () => void;
         /**
         * Raised after the loader is disposed.
         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         onDispose: () => void;
         /**
          * Raised after a loader extension is created.
@@ -144,6 +240,9 @@ declare module BABYLON {
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
          * Returns a promise that resolves when the asset is completely loaded.
@@ -155,22 +254,65 @@ declare module BABYLON {
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
+        /**
+         * Name of the loader ("gltf")
+         */
         name: string;
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         extensions: ISceneLoaderPluginExtensions;
         /**
          * Disposes the loader, releases resources during load, and cancels any outstanding requests.
          */
         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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, 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
+        * @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
+        */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         canDirectLoad(data: string): boolean;
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         private _parse(data);
         private _getLoader(loaderData);
@@ -587,9 +729,21 @@ declare module BABYLON.GLTF1 {
         onMaterialLoadedObservable: Observable<Material>;
         onCompleteObservable: Observable<IGLTFLoader>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * State of the loader
+        */
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
         private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
@@ -597,6 +751,14 @@ declare module BABYLON.GLTF1 {
             animationGroups: AnimationGroup[];
         }>;
         private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadShadersAsync(gltfRuntime, onload);
         private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
@@ -741,55 +903,84 @@ declare module BABYLON.GLTF1 {
 
 
 declare module BABYLON.GLTF2 {
+    /** Array item which contains it's index in an array */
     interface IArrayItem {
         _index: number;
     }
+    /** Array item helper methods */
     class ArrayItem {
+        /** Sets the index of each array element to its index in the array */
         static Assign(values?: IArrayItem[]): void;
     }
-    class AnimationMultiTarget {
-        subTargets: any[];
-        position: Vector3;
-        rotationQuaternion: Quaternion;
-        scaling: Vector3;
-        influence: number;
-    }
 }
 
 
 
+/**
+ * GLTF2 module for babylon
+ */
 declare module BABYLON.GLTF2 {
+    /**
+     * Interface to access data and vertex buffer associated with a file
+     */
     interface ILoaderAccessor extends IAccessor, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
+    /**
+     * Loader's animation channel
+     */
     interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
     }
+    /**
+     * Container for animation keyframe data
+     */
     interface ILoaderAnimationSamplerData {
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
     }
+    /**
+     * Keyframe data
+     */
     interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
         _data: Promise<ILoaderAnimationSamplerData>;
     }
+    /**
+     * Loader animation
+     */
     interface ILoaderAnimation extends IAnimation, IArrayItem {
         channels: ILoaderAnimationChannel[];
         samplers: ILoaderAnimationSampler[];
         _babylonAnimationGroup?: AnimationGroup;
     }
+    /**
+     * Loader buffer
+     */
     interface ILoaderBuffer extends IBuffer, IArrayItem {
         _data?: Promise<ArrayBufferView>;
     }
+    /**
+     * Loader's buffer data
+     */
     interface ILoaderBufferView extends IBufferView, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
     }
+    /**
+     * Loader's loaded camera data
+     */
     interface ILoaderCamera extends ICamera, IArrayItem {
     }
+    /**
+     * Loaded image specified by url
+     */
     interface ILoaderImage extends IImage, IArrayItem {
         _objectURL?: Promise<string>;
     }
+    /**
+     * Loaded material data
+     */
     interface ILoaderMaterial extends IMaterial, IArrayItem {
         _babylonData?: {
             [drawMode: number]: {
@@ -799,11 +990,20 @@ declare module BABYLON.GLTF2 {
             };
         };
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMesh extends IMesh, IArrayItem {
         primitives: ILoaderMeshPrimitive[];
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
     }
+    /**
+     * Node for traversing loader data
+     */
     interface ILoaderNode extends INode, IArrayItem {
         _parent: ILoaderNode;
         _babylonMesh?: Mesh;
@@ -811,23 +1011,41 @@ declare module BABYLON.GLTF2 {
         _babylonAnimationTargets?: Node[];
         _numMorphTargets?: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSamplerData {
         noMipMaps: boolean;
         samplingMode: number;
         wrapU: number;
         wrapV: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSampler extends ISampler, IArrayItem {
         _data?: ILoaderSamplerData;
     }
+    /**
+     * Loader's scene
+     */
     interface ILoaderScene extends IScene, IArrayItem {
     }
+    /**
+     * Loader's skeleton data
+     */
     interface ILoaderSkin extends ISkin, IArrayItem {
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
     }
+    /**
+     * Loader's texture
+     */
     interface ILoaderTexture extends ITexture, IArrayItem {
     }
+    /**
+     * Loaded GLTF data
+     */
     interface ILoaderGLTF extends IGLTF {
         accessors?: ILoaderAccessor[];
         animations?: ILoaderAnimation[];
@@ -846,14 +1064,40 @@ declare module BABYLON.GLTF2 {
 }
 
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 declare module BABYLON.GLTF2 {
+    /**
+    * Interface for a meterial with a constructor
+    */
     interface MaterialConstructor<T extends Material> {
+        /**
+        * The material class
+        */
         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;
     }
+    /**
+    * Used to load from a GLTF2 file
+    */
     class GLTFLoader implements IGLTFLoader {
+        /**
+        * @ignore
+        */
         _gltf: ILoaderGLTF;
+        /**
+        * @ignore
+        */
         _babylonScene: Scene;
+        /**
+        * @ignore
+        */
         _completePromises: Promise<void>[];
         private _disposed;
         private _state;
@@ -866,26 +1110,87 @@ declare module BABYLON.GLTF2 {
         private _requests;
         private static _Names;
         private static _Factories;
+        /**
+        * @ignore, registers the loader
+        * @param name name of the loader
+        * @param factory function that converts a loader to a loader extension
+        */
         static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void;
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         readonly onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+        * Observable that fires each time a material is loaded
+        */
         readonly onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires each time an extension is loaded
+        */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Observable that fires when the load has completed
+        */
         readonly onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * The current state of the loader
+        */
         readonly state: Nullable<GLTFLoaderState>;
+        /**
+        * Disposes of the loader
+        */
         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
+        */
         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
+        * @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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadAsync(nodes, scene, data, rootUrl, onProgress?);
         private _loadExtensions();
@@ -894,12 +1199,18 @@ declare module BABYLON.GLTF2 {
         private _checkExtensions();
         private _createRootNode();
         private _loadNodesAsync(nodes);
+        /**
+        * @ignore
+        */
         _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
         private _forEachPrimitive(node, callback);
         private _getMeshes();
         private _getSkeletons();
         private _getAnimationGroups();
         private _startAnimations();
+        /**
+        * @ignore
+        */
         _loadNodeAsync(context: string, node: ILoaderNode): Promise<void>;
         private _loadMeshAsync(context, node, mesh, babylonMesh);
         private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
@@ -919,21 +1230,48 @@ declare module BABYLON.GLTF2 {
         private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
         private _loadAnimationSamplerAsync(context, sampler);
         private _loadBufferAsync(context, buffer);
+        /**
+        * @ignore
+        */
         _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
         private _loadAccessorAsync(context, accessor);
+        /**
+        * @ignore
+        */
         _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer>;
         private _loadVertexAccessorAsync(context, accessor, kind);
         private _getDefaultMaterial(drawMode);
         private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
+        /**
+        * @ignore
+        */
         _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
+        /**
+        * @ignore
+        */
         _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T;
+        /**
+        * @ignore
+        */
         _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void>;
+        /**
+        * @ignore
+        */
         _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void;
+        /**
+        * @ignore
+        */
         _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void>;
         private _loadSampler(context, sampler);
         private _loadImageAsync(context, image);
+        /**
+        * @ignore
+        */
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
         private _onProgress();
+        /**
+        * @ignore
+        */
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
         private static _GetTextureWrapMode(context, mode);
         private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
@@ -943,12 +1281,18 @@ declare module BABYLON.GLTF2 {
         private _compileMaterialsAsync();
         private _compileShadowGeneratorsAsync();
         private _clear();
+        /**
+        * @ignore
+        */
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
     }
 }
 
 
 declare module BABYLON.GLTF2 {
+    /**
+     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         enabled: boolean;
         readonly abstract name: string;
@@ -1003,6 +1347,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 
 
+/** Module defining extensions to gltf */
 declare module BABYLON.GLTF2.Extensions {
     class KHR_draco_mesh_compression extends GLTFLoaderExtension {
         readonly name: string;

+ 230 - 78
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -1,7 +1,9 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
@@ -13,6 +15,9 @@ var BABYLON;
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
         /**
@@ -28,6 +33,9 @@ var BABYLON;
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
         /**
@@ -43,6 +51,7 @@ var BABYLON;
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
             // #region Common options
@@ -55,23 +64,28 @@ var BABYLON;
             // #endregion
             // #region V2 options
             /**
-             * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+             * 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.
              */
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             /**
-             * The animation start mode (NONE, FIRST, ALL).
-             */
+            * 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.
+            */
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             /**
-             * Set to true to compile materials before raising the success callback.
+             * Set to true to compile materials before raising the success callback. Defaults to false.
              */
             this.compileMaterials = false;
             /**
-             * Set to true to also compile materials with clip planes.
+             * Set to true to also compile materials with clip planes. Defaults to false.
              */
             this.useClipPlane = false;
             /**
-             * Set to true to compile shadow generators before raising the success callback.
+             * Set to true to compile shadow generators before raising the success callback. Defaults to false.
              */
             this.compileShadowGenerators = false;
             /**
@@ -103,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
             };
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -120,6 +141,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -130,6 +154,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -140,6 +167,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -150,6 +180,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -160,6 +193,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -170,6 +206,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -215,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             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
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -223,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+        * 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
+        */
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -231,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -247,9 +311,18 @@ var BABYLON;
                 });
             });
         };
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
         };
@@ -433,7 +506,13 @@ var BABYLON;
         };
         // #endregion
         // #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.
+         */
         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
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
     }());
@@ -472,7 +551,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFFileLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -570,7 +648,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -759,11 +836,11 @@ var BABYLON;
                     // For each frame
                     for (var j = 0; j < bufferInput.length; j++) {
                         var value = null;
-                        if (targetPath === "rotationQuaternion") {
+                        if (targetPath === "rotationQuaternion") { // VEC4
                             value = BABYLON.Quaternion.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2], bufferOutput[arrayOffset + 3]]);
                             arrayOffset += 4;
                         }
-                        else {
+                        else { // Position and scaling are VEC3
                             value = BABYLON.Vector3.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2]]);
                             arrayOffset += 3;
                         }
@@ -1251,6 +1328,7 @@ var BABYLON;
                 var newMesh = importMesh(gltfRuntime, node, node.mesh ? [node.mesh] : node.meshes, id, node.babylonNode);
                 lastNode = newMesh;
             }
+            // Lights
             else if (node.light && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var light = gltfRuntime.lights[node.light];
                 if (light) {
@@ -1298,6 +1376,7 @@ var BABYLON;
                     }
                 }
             }
+            // Cameras
             else if (node.camera && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var camera = gltfRuntime.cameras[node.camera];
                 if (camera) {
@@ -1483,6 +1562,7 @@ var BABYLON;
                 if (type === GLTF1.EParameterType.SAMPLER_2D) {
                     GLTF1.GLTFLoaderExtension.LoadTextureAsync(gltfRuntime, material.values ? value : uniform.value, onLoadTexture(unif), function () { return onLoadTexture(null); });
                 }
+                // Others
                 else {
                     if (uniform.value && GLTF1.GLTFUtils.SetUniform(shaderMaterial, unif, material.values ? value : uniform.value, type)) {
                         // Static uniform
@@ -1869,6 +1949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1931,6 +2014,15 @@ var BABYLON;
                 }, onError);
                 return true;
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -1970,6 +2062,14 @@ var BABYLON;
                     }, onError);
                 }, onError);
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -2074,7 +2174,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -2310,7 +2409,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderUtils.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -2459,7 +2557,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2537,7 +2634,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFBinaryExtension.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -2670,15 +2766,16 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFMaterialsCommonExtension.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
@@ -2689,72 +2786,32 @@ var BABYLON;
             return ArrayItem;
         }());
         GLTF2.ArrayItem = ArrayItem;
-        var AnimationMultiTarget = /** @class */ (function () {
-            function AnimationMultiTarget() {
-                this.subTargets = new Array();
-            }
-            Object.defineProperty(AnimationMultiTarget.prototype, "position", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.position = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "rotationQuaternion", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.rotationQuaternion = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "scaling", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.scaling = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "influence", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.influence = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            return AnimationMultiTarget;
-        }());
-        GLTF2.AnimationMultiTarget = AnimationMultiTarget;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=babylon.glTFLoaderUtilities.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._state = null;
@@ -2762,18 +2819,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
             }
+            /**
+            * @ignore, registers the loader
+            * @param name name of the loader
+            * @param factory function that converts a loader to a loader extension
+            */
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -2784,12 +2879,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                     return this._state;
                 },
                 enumerable: true,
                 configurable: true
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                     return;
@@ -2799,6 +2900,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this._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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return Promise.resolve().then(function () {
@@ -2832,6 +2942,14 @@ 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
@@ -2989,6 +3107,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
@@ -3088,6 +3209,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
@@ -3537,12 +3661,13 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
+                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                multiTarget.subTargets.push(morphTarget);
+                                morphTarget.animations.push(babylonAnimation);
+                                morphTargets.push(morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -3553,12 +3678,11 @@ var BABYLON;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
                         if (targetNode._babylonAnimationTargets) {
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
                             for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var target = _a[_i];
-                                multiTarget.subTargets.push(target);
+                                var babylonAnimationTarget = _a[_i];
+                                babylonAnimationTarget.animations.push(babylonAnimation);
                             }
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonAnimationTargets);
                         }
                     }
                 });
@@ -3608,6 +3732,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                     return bufferView._data;
@@ -3666,6 +3793,9 @@ var BABYLON;
                 });
                 return accessor._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 if (bufferView._babylonBuffer) {
@@ -3735,6 +3865,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
@@ -3760,12 +3893,18 @@ var BABYLON;
                 assign(babylonData.material);
                 return babylonData.loaded;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -3799,6 +3938,9 @@ var BABYLON;
                 }
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
@@ -3827,6 +3969,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -3886,6 +4031,9 @@ var BABYLON;
                 });
                 return image._objectURL;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -3943,6 +4091,9 @@ var BABYLON;
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -4091,6 +4242,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
@@ -4115,12 +4269,14 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
@@ -4189,7 +4345,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -4360,7 +4515,6 @@ var BABYLON;
 
 //# sourceMappingURL=MSFT_lod.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -4372,6 +4526,7 @@ var __extends = (this && this.__extends) || (function () {
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
     };
 })();
+/** Module defining extensions to gltf */
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
@@ -4459,7 +4614,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_draco_mesh_compression.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -4546,7 +4700,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
@@ -4633,7 +4786,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_unlit.js.map
 
-"use strict";
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 1 - 0
dist/preview release/loaders/babylon.objFileLoader.d.ts

@@ -30,6 +30,7 @@ declare module BABYLON {
     }
     class OBJFileLoader implements ISceneLoaderPlugin {
         static OPTIMIZE_WITH_UV: boolean;
+        static INVERT_Y: boolean;
         name: string;
         extensions: string;
         obj: RegExp;

+ 5 - 1
dist/preview release/loaders/babylon.objFileLoader.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
@@ -201,6 +200,7 @@ var BABYLON;
                     url += value;
                 }
             }
+            // Not from input file.
             else {
                 url += value;
             }
@@ -746,6 +746,9 @@ var BABYLON;
                 vertexData.indices = handledMesh.indices;
                 //Set the data from the VertexBuffer to the current BABYLON.Mesh
                 vertexData.applyToMesh(babylonMesh);
+                if (OBJFileLoader.INVERT_Y) {
+                    babylonMesh.scaling.y *= -1;
+                }
                 //Push the mesh into an array
                 babylonMeshesArray.push(babylonMesh);
             }
@@ -787,6 +790,7 @@ var BABYLON;
             return babylonMeshesArray;
         };
         OBJFileLoader.OPTIMIZE_WITH_UV = false;
+        OBJFileLoader.INVERT_Y = false;
         return OBJFileLoader;
     }());
     BABYLON.OBJFileLoader = OBJFileLoader;

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 0 - 1
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.min.js


+ 359 - 13
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -48,6 +48,7 @@ declare module BABYLON {
     }
     class OBJFileLoader implements ISceneLoaderPlugin {
         static OPTIMIZE_WITH_UV: boolean;
+        static INVERT_Y: boolean;
         name: string;
         extensions: string;
         obj: RegExp;
@@ -95,6 +96,9 @@ declare module BABYLON {
 
 
 declare module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -105,6 +109,9 @@ declare module BABYLON {
          */
         FORCE_RIGHT_HANDED = 1,
     }
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -119,10 +126,22 @@ declare module BABYLON {
          */
         ALL = 2,
     }
+    /**
+    * Loaded gltf data
+    */
     interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
+    /**
+    * Gltf extension interface
+    */
     interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -133,6 +152,9 @@ declare module BABYLON {
          */
         enabled: boolean;
     }
+    /**
+    * Loading state
+    */
     enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -147,29 +169,77 @@ declare module BABYLON {
          */
         COMPLETE = 2,
     }
+    /**
+    * GLTF loader interface
+    */
     interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+       * Observable that fires each time a material is loaded
+       */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
+        /**
+        * Imports one or more meshes from a loaded gltf file 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[];
         }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
+    /** File loader to load gltf files into a babylon scene */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
          * Raised when the asset has been parsed.
@@ -178,27 +248,39 @@ declare module BABYLON {
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
+        /** Raised when the asset has been parsed. */
         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.
+         */
         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
+         */
         static HomogeneousCoordinates: boolean;
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+         * 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.
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
-         * The animation start mode (NONE, FIRST, ALL).
-         */
+        * 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.
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
-         * Set to true to compile materials before raising the success callback.
+         * Set to true to compile materials before raising the success callback. Defaults to false.
          */
         compileMaterials: boolean;
         /**
-         * Set to true to also compile materials with clip planes.
+         * Set to true to also compile materials with clip planes. Defaults to false.
          */
         useClipPlane: boolean;
         /**
-         * Set to true to compile shadow generators before raising the success callback.
+         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
          */
         compileShadowGenerators: boolean;
         /**
@@ -206,18 +288,27 @@ declare module BABYLON {
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
          * Raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
          * Raised when the loader creates a material after parsing the glTF properties of the material.
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         onMaterialLoaded: (material: Material) => void;
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
@@ -226,12 +317,18 @@ declare module BABYLON {
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         onComplete: () => void;
         /**
         * Raised after the loader is disposed.
         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         onDispose: () => void;
         /**
          * Raised after a loader extension is created.
@@ -239,6 +336,9 @@ declare module BABYLON {
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
          * Returns a promise that resolves when the asset is completely loaded.
@@ -250,22 +350,65 @@ declare module BABYLON {
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
+        /**
+         * Name of the loader ("gltf")
+         */
         name: string;
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         extensions: ISceneLoaderPluginExtensions;
         /**
          * Disposes the loader, releases resources during load, and cancels any outstanding requests.
          */
         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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, 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
+        * @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
+        */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         canDirectLoad(data: string): boolean;
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         private _parse(data);
         private _getLoader(loaderData);
@@ -682,9 +825,21 @@ declare module BABYLON.GLTF1 {
         onMaterialLoadedObservable: Observable<Material>;
         onCompleteObservable: Observable<IGLTFLoader>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * State of the loader
+        */
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
         private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
@@ -692,6 +847,14 @@ declare module BABYLON.GLTF1 {
             animationGroups: AnimationGroup[];
         }>;
         private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadShadersAsync(gltfRuntime, onload);
         private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
@@ -836,55 +999,84 @@ declare module BABYLON.GLTF1 {
 
 
 declare module BABYLON.GLTF2 {
+    /** Array item which contains it's index in an array */
     interface IArrayItem {
         _index: number;
     }
+    /** Array item helper methods */
     class ArrayItem {
+        /** Sets the index of each array element to its index in the array */
         static Assign(values?: IArrayItem[]): void;
     }
-    class AnimationMultiTarget {
-        subTargets: any[];
-        position: Vector3;
-        rotationQuaternion: Quaternion;
-        scaling: Vector3;
-        influence: number;
-    }
 }
 
 
 
+/**
+ * GLTF2 module for babylon
+ */
 declare module BABYLON.GLTF2 {
+    /**
+     * Interface to access data and vertex buffer associated with a file
+     */
     interface ILoaderAccessor extends IAccessor, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
+    /**
+     * Loader's animation channel
+     */
     interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
     }
+    /**
+     * Container for animation keyframe data
+     */
     interface ILoaderAnimationSamplerData {
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
     }
+    /**
+     * Keyframe data
+     */
     interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
         _data: Promise<ILoaderAnimationSamplerData>;
     }
+    /**
+     * Loader animation
+     */
     interface ILoaderAnimation extends IAnimation, IArrayItem {
         channels: ILoaderAnimationChannel[];
         samplers: ILoaderAnimationSampler[];
         _babylonAnimationGroup?: AnimationGroup;
     }
+    /**
+     * Loader buffer
+     */
     interface ILoaderBuffer extends IBuffer, IArrayItem {
         _data?: Promise<ArrayBufferView>;
     }
+    /**
+     * Loader's buffer data
+     */
     interface ILoaderBufferView extends IBufferView, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
     }
+    /**
+     * Loader's loaded camera data
+     */
     interface ILoaderCamera extends ICamera, IArrayItem {
     }
+    /**
+     * Loaded image specified by url
+     */
     interface ILoaderImage extends IImage, IArrayItem {
         _objectURL?: Promise<string>;
     }
+    /**
+     * Loaded material data
+     */
     interface ILoaderMaterial extends IMaterial, IArrayItem {
         _babylonData?: {
             [drawMode: number]: {
@@ -894,11 +1086,20 @@ declare module BABYLON.GLTF2 {
             };
         };
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMesh extends IMesh, IArrayItem {
         primitives: ILoaderMeshPrimitive[];
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
     }
+    /**
+     * Node for traversing loader data
+     */
     interface ILoaderNode extends INode, IArrayItem {
         _parent: ILoaderNode;
         _babylonMesh?: Mesh;
@@ -906,23 +1107,41 @@ declare module BABYLON.GLTF2 {
         _babylonAnimationTargets?: Node[];
         _numMorphTargets?: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSamplerData {
         noMipMaps: boolean;
         samplingMode: number;
         wrapU: number;
         wrapV: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSampler extends ISampler, IArrayItem {
         _data?: ILoaderSamplerData;
     }
+    /**
+     * Loader's scene
+     */
     interface ILoaderScene extends IScene, IArrayItem {
     }
+    /**
+     * Loader's skeleton data
+     */
     interface ILoaderSkin extends ISkin, IArrayItem {
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
     }
+    /**
+     * Loader's texture
+     */
     interface ILoaderTexture extends ITexture, IArrayItem {
     }
+    /**
+     * Loaded GLTF data
+     */
     interface ILoaderGLTF extends IGLTF {
         accessors?: ILoaderAccessor[];
         animations?: ILoaderAnimation[];
@@ -941,14 +1160,40 @@ declare module BABYLON.GLTF2 {
 }
 
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 declare module BABYLON.GLTF2 {
+    /**
+    * Interface for a meterial with a constructor
+    */
     interface MaterialConstructor<T extends Material> {
+        /**
+        * The material class
+        */
         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;
     }
+    /**
+    * Used to load from a GLTF2 file
+    */
     class GLTFLoader implements IGLTFLoader {
+        /**
+        * @ignore
+        */
         _gltf: ILoaderGLTF;
+        /**
+        * @ignore
+        */
         _babylonScene: Scene;
+        /**
+        * @ignore
+        */
         _completePromises: Promise<void>[];
         private _disposed;
         private _state;
@@ -961,26 +1206,87 @@ declare module BABYLON.GLTF2 {
         private _requests;
         private static _Names;
         private static _Factories;
+        /**
+        * @ignore, registers the loader
+        * @param name name of the loader
+        * @param factory function that converts a loader to a loader extension
+        */
         static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void;
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         readonly onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+        * Observable that fires each time a material is loaded
+        */
         readonly onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires each time an extension is loaded
+        */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Observable that fires when the load has completed
+        */
         readonly onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * The current state of the loader
+        */
         readonly state: Nullable<GLTFLoaderState>;
+        /**
+        * Disposes of the loader
+        */
         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
+        */
         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
+        * @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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadAsync(nodes, scene, data, rootUrl, onProgress?);
         private _loadExtensions();
@@ -989,12 +1295,18 @@ declare module BABYLON.GLTF2 {
         private _checkExtensions();
         private _createRootNode();
         private _loadNodesAsync(nodes);
+        /**
+        * @ignore
+        */
         _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
         private _forEachPrimitive(node, callback);
         private _getMeshes();
         private _getSkeletons();
         private _getAnimationGroups();
         private _startAnimations();
+        /**
+        * @ignore
+        */
         _loadNodeAsync(context: string, node: ILoaderNode): Promise<void>;
         private _loadMeshAsync(context, node, mesh, babylonMesh);
         private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
@@ -1014,21 +1326,48 @@ declare module BABYLON.GLTF2 {
         private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
         private _loadAnimationSamplerAsync(context, sampler);
         private _loadBufferAsync(context, buffer);
+        /**
+        * @ignore
+        */
         _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
         private _loadAccessorAsync(context, accessor);
+        /**
+        * @ignore
+        */
         _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer>;
         private _loadVertexAccessorAsync(context, accessor, kind);
         private _getDefaultMaterial(drawMode);
         private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
+        /**
+        * @ignore
+        */
         _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
+        /**
+        * @ignore
+        */
         _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T;
+        /**
+        * @ignore
+        */
         _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void>;
+        /**
+        * @ignore
+        */
         _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void;
+        /**
+        * @ignore
+        */
         _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void>;
         private _loadSampler(context, sampler);
         private _loadImageAsync(context, image);
+        /**
+        * @ignore
+        */
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
         private _onProgress();
+        /**
+        * @ignore
+        */
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
         private static _GetTextureWrapMode(context, mode);
         private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
@@ -1038,12 +1377,18 @@ declare module BABYLON.GLTF2 {
         private _compileMaterialsAsync();
         private _compileShadowGeneratorsAsync();
         private _clear();
+        /**
+        * @ignore
+        */
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
     }
 }
 
 
 declare module BABYLON.GLTF2 {
+    /**
+     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         enabled: boolean;
         readonly abstract name: string;
@@ -1098,6 +1443,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 
 
+/** Module defining extensions to gltf */
 declare module BABYLON.GLTF2.Extensions {
     class KHR_draco_mesh_compression extends GLTFLoaderExtension {
         readonly name: string;

+ 235 - 80
dist/preview release/loaders/babylonjs.loaders.js

@@ -23,7 +23,6 @@
 
 var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
 var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -195,7 +194,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.stlFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -398,6 +396,7 @@ var BABYLON;
                     url += value;
                 }
             }
+            // Not from input file.
             else {
                 url += value;
             }
@@ -943,6 +942,9 @@ var BABYLON;
                 vertexData.indices = handledMesh.indices;
                 //Set the data from the VertexBuffer to the current BABYLON.Mesh
                 vertexData.applyToMesh(babylonMesh);
+                if (OBJFileLoader.INVERT_Y) {
+                    babylonMesh.scaling.y *= -1;
+                }
                 //Push the mesh into an array
                 babylonMeshesArray.push(babylonMesh);
             }
@@ -984,6 +986,7 @@ var BABYLON;
             return babylonMeshesArray;
         };
         OBJFileLoader.OPTIMIZE_WITH_UV = false;
+        OBJFileLoader.INVERT_Y = false;
         return OBJFileLoader;
     }());
     BABYLON.OBJFileLoader = OBJFileLoader;
@@ -995,10 +998,12 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.objFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
@@ -1010,6 +1015,9 @@ var BABYLON;
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
         /**
@@ -1025,6 +1033,9 @@ var BABYLON;
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
         /**
@@ -1040,6 +1051,7 @@ var BABYLON;
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
             // #region Common options
@@ -1052,23 +1064,28 @@ var BABYLON;
             // #endregion
             // #region V2 options
             /**
-             * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+             * 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.
              */
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             /**
-             * The animation start mode (NONE, FIRST, ALL).
-             */
+            * 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.
+            */
             this.animationStartMode = GLTFLoaderAnimationStartMode.FIRST;
             /**
-             * Set to true to compile materials before raising the success callback.
+             * Set to true to compile materials before raising the success callback. Defaults to false.
              */
             this.compileMaterials = false;
             /**
-             * Set to true to also compile materials with clip planes.
+             * Set to true to also compile materials with clip planes. Defaults to false.
              */
             this.useClipPlane = false;
             /**
-             * Set to true to compile shadow generators before raising the success callback.
+             * Set to true to compile shadow generators before raising the success callback. Defaults to false.
              */
             this.compileShadowGenerators = false;
             /**
@@ -1100,13 +1117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
             };
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -1117,6 +1141,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -1127,6 +1154,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -1137,6 +1167,9 @@ var BABYLON;
             configurable: true
         });
         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.)
+             */
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -1147,6 +1180,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -1157,6 +1193,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -1167,6 +1206,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -1212,6 +1254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             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
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -1220,6 +1271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+        * 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
+        */
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -1228,6 +1287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
             });
         };
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             return Promise.resolve().then(function () {
@@ -1244,9 +1311,18 @@ var BABYLON;
                 });
             });
         };
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
         };
@@ -1430,7 +1506,13 @@ var BABYLON;
         };
         // #endregion
         // #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.
+         */
         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
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
     }());
@@ -1469,7 +1551,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFFileLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -1567,7 +1648,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -1756,11 +1836,11 @@ var BABYLON;
                     // For each frame
                     for (var j = 0; j < bufferInput.length; j++) {
                         var value = null;
-                        if (targetPath === "rotationQuaternion") {
+                        if (targetPath === "rotationQuaternion") { // VEC4
                             value = BABYLON.Quaternion.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2], bufferOutput[arrayOffset + 3]]);
                             arrayOffset += 4;
                         }
-                        else {
+                        else { // Position and scaling are VEC3
                             value = BABYLON.Vector3.FromArray([bufferOutput[arrayOffset], bufferOutput[arrayOffset + 1], bufferOutput[arrayOffset + 2]]);
                             arrayOffset += 3;
                         }
@@ -2248,6 +2328,7 @@ var BABYLON;
                 var newMesh = importMesh(gltfRuntime, node, node.mesh ? [node.mesh] : node.meshes, id, node.babylonNode);
                 lastNode = newMesh;
             }
+            // Lights
             else if (node.light && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var light = gltfRuntime.lights[node.light];
                 if (light) {
@@ -2295,6 +2376,7 @@ var BABYLON;
                     }
                 }
             }
+            // Cameras
             else if (node.camera && !node.babylonNode && !gltfRuntime.importOnlyMeshes) {
                 var camera = gltfRuntime.cameras[node.camera];
                 if (camera) {
@@ -2480,6 +2562,7 @@ var BABYLON;
                 if (type === GLTF1.EParameterType.SAMPLER_2D) {
                     GLTF1.GLTFLoaderExtension.LoadTextureAsync(gltfRuntime, material.values ? value : uniform.value, onLoadTexture(unif), function () { return onLoadTexture(null); });
                 }
+                // Others
                 else {
                     if (uniform.value && GLTF1.GLTFUtils.SetUniform(shaderMaterial, unif, material.values ? value : uniform.value, type)) {
                         // Static uniform
@@ -2866,6 +2949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -2928,6 +3014,15 @@ var BABYLON;
                 }, onError);
                 return true;
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -2967,6 +3062,14 @@ var BABYLON;
                     }, onError);
                 }, onError);
             };
+            /**
+            * 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return new Promise(function (resolve, reject) {
@@ -3071,7 +3174,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -3307,7 +3409,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderUtils.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
@@ -3456,7 +3557,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -3525,7 +3625,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFBinaryExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -3649,15 +3748,16 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFMaterialsCommonExtension.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
@@ -3668,72 +3768,32 @@ var BABYLON;
             return ArrayItem;
         }());
         GLTF2.ArrayItem = ArrayItem;
-        var AnimationMultiTarget = /** @class */ (function () {
-            function AnimationMultiTarget() {
-                this.subTargets = new Array();
-            }
-            Object.defineProperty(AnimationMultiTarget.prototype, "position", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.position = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "rotationQuaternion", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.rotationQuaternion = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "scaling", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.scaling = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            Object.defineProperty(AnimationMultiTarget.prototype, "influence", {
-                set: function (value) {
-                    for (var _i = 0, _a = this.subTargets; _i < _a.length; _i++) {
-                        var subTarget = _a[_i];
-                        subTarget.influence = value;
-                    }
-                },
-                enumerable: true,
-                configurable: true
-            });
-            return AnimationMultiTarget;
-        }());
-        GLTF2.AnimationMultiTarget = AnimationMultiTarget;
     })(GLTF2 = BABYLON.GLTF2 || (BABYLON.GLTF2 = {}));
 })(BABYLON || (BABYLON = {}));
 
 //# sourceMappingURL=babylon.glTFLoaderUtilities.js.map
 
-"use strict";
 
 
 
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
-"use strict";
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._state = null;
@@ -3741,18 +3801,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
             }
+            /**
+            * @ignore, registers the loader
+            * @param name name of the loader
+            * @param factory function that converts a loader to a loader extension
+            */
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -3763,12 +3861,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                     return this._state;
                 },
                 enumerable: true,
                 configurable: true
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                     return;
@@ -3778,6 +3882,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this._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
+            */
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 return Promise.resolve().then(function () {
@@ -3811,6 +3924,14 @@ 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
+            */
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
@@ -3968,6 +4089,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
@@ -4067,6 +4191,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
@@ -4516,12 +4643,13 @@ var BABYLON;
                                 value: key.value[targetIndex],
                                 outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             }); }));
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
+                            var morphTargets = new Array();
                             _this._forEachPrimitive(targetNode, function (babylonMesh) {
                                 var morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
-                                multiTarget.subTargets.push(morphTarget);
+                                morphTarget.animations.push(babylonAnimation);
+                                morphTargets.push(morphTarget);
                             });
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, morphTargets);
                         };
                         for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
                             _loop_1(targetIndex);
@@ -4532,12 +4660,11 @@ var BABYLON;
                         var babylonAnimation = new BABYLON.Animation(animationName, targetPath, 1, animationType);
                         babylonAnimation.setKeys(keys);
                         if (targetNode._babylonAnimationTargets) {
-                            var multiTarget = new GLTF2.AnimationMultiTarget();
                             for (var _i = 0, _a = targetNode._babylonAnimationTargets; _i < _a.length; _i++) {
-                                var target = _a[_i];
-                                multiTarget.subTargets.push(target);
+                                var babylonAnimationTarget = _a[_i];
+                                babylonAnimationTarget.animations.push(babylonAnimation);
                             }
-                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, multiTarget);
+                            babylonAnimationGroup.addTargetedAnimation(babylonAnimation, targetNode._babylonAnimationTargets);
                         }
                     }
                 });
@@ -4587,6 +4714,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                     return bufferView._data;
@@ -4645,6 +4775,9 @@ var BABYLON;
                 });
                 return accessor._data;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 if (bufferView._babylonBuffer) {
@@ -4714,6 +4847,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
@@ -4739,12 +4875,18 @@ var BABYLON;
                 assign(babylonData.material);
                 return babylonData.loaded;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -4778,6 +4920,9 @@ var BABYLON;
                 }
                 return Promise.all(promises).then(function () { });
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
@@ -4806,6 +4951,9 @@ var BABYLON;
                     }
                 }
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -4865,6 +5013,9 @@ var BABYLON;
                 });
                 return image._objectURL;
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -4922,6 +5073,9 @@ var BABYLON;
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -5070,6 +5224,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
@@ -5094,12 +5251,14 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoader.js.map
 
-"use strict";
 
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
@@ -5168,7 +5327,6 @@ var BABYLON;
 
 //# sourceMappingURL=babylon.glTFLoaderExtension.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -5330,9 +5488,9 @@ var BABYLON;
 
 //# sourceMappingURL=MSFT_lod.js.map
 
-"use strict";
 
 
+/** Module defining extensions to gltf */
 var BABYLON;
 (function (BABYLON) {
     var GLTF2;
@@ -5420,7 +5578,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_draco_mesh_compression.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -5498,7 +5655,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map
 
-"use strict";
 
 
 var BABYLON;
@@ -5576,7 +5732,6 @@ var BABYLON;
 
 //# sourceMappingURL=KHR_materials_unlit.js.map
 
-"use strict";
 
 
 var BABYLON;

ファイルの差分が大きいため隠しています
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


+ 359 - 13
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -55,6 +55,7 @@ declare module BABYLON {
     }
     class OBJFileLoader implements ISceneLoaderPlugin {
         static OPTIMIZE_WITH_UV: boolean;
+        static INVERT_Y: boolean;
         name: string;
         extensions: string;
         obj: RegExp;
@@ -102,6 +103,9 @@ declare module BABYLON {
 
 
 declare module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -112,6 +116,9 @@ declare module BABYLON {
          */
         FORCE_RIGHT_HANDED = 1,
     }
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -126,10 +133,22 @@ declare module BABYLON {
          */
         ALL = 2,
     }
+    /**
+    * Loaded gltf data
+    */
     interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
+    /**
+    * Gltf extension interface
+    */
     interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -140,6 +159,9 @@ declare module BABYLON {
          */
         enabled: boolean;
     }
+    /**
+    * Loading state
+    */
     enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -154,29 +176,77 @@ declare module BABYLON {
          */
         COMPLETE = 2,
     }
+    /**
+    * GLTF loader interface
+    */
     interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+       * Observable that fires each time a material is loaded
+       */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
+        /**
+        * Imports one or more meshes from a loaded gltf file 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[];
         }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
+    /** File loader to load gltf files into a babylon scene */
     class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         static CreateGLTFLoaderV2: () => IGLTFLoader;
         /**
          * Raised when the asset has been parsed.
@@ -185,27 +255,39 @@ declare module BABYLON {
          */
         onParsedObservable: Observable<IGLTFLoaderData>;
         private _onParsedObserver;
+        /** Raised when the asset has been parsed. */
         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.
+         */
         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
+         */
         static HomogeneousCoordinates: boolean;
         /**
-         * The coordinate system mode (AUTO, FORCE_RIGHT_HANDED).
+         * 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.
          */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
         /**
-         * The animation start mode (NONE, FIRST, ALL).
-         */
+        * 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.
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
         /**
-         * Set to true to compile materials before raising the success callback.
+         * Set to true to compile materials before raising the success callback. Defaults to false.
          */
         compileMaterials: boolean;
         /**
-         * Set to true to also compile materials with clip planes.
+         * Set to true to also compile materials with clip planes. Defaults to false.
          */
         useClipPlane: boolean;
         /**
-         * Set to true to compile shadow generators before raising the success callback.
+         * Set to true to compile shadow generators before raising the success callback. Defaults to false.
          */
         compileShadowGenerators: boolean;
         /**
@@ -213,18 +295,27 @@ declare module BABYLON {
          */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
         private _onMeshLoadedObserver;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         onMeshLoaded: (mesh: AbstractMesh) => void;
         /**
          * Raised when the loader creates a texture after parsing the glTF properties of the texture.
          */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
         private _onTextureLoadedObserver;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         onTextureLoaded: (texture: BaseTexture) => void;
         /**
          * Raised when the loader creates a material after parsing the glTF properties of the material.
          */
         readonly onMaterialLoadedObservable: Observable<Material>;
         private _onMaterialLoadedObserver;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         onMaterialLoaded: (material: Material) => void;
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
@@ -233,12 +324,18 @@ declare module BABYLON {
          */
         readonly onCompleteObservable: Observable<GLTFFileLoader>;
         private _onCompleteObserver;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         onComplete: () => void;
         /**
         * Raised after the loader is disposed.
         */
         readonly onDisposeObservable: Observable<GLTFFileLoader>;
         private _onDisposeObserver;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         onDispose: () => void;
         /**
          * Raised after a loader extension is created.
@@ -246,6 +343,9 @@ declare module BABYLON {
          */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
         private _onExtensionLoadedObserver;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         onExtensionLoaded: (extension: IGLTFLoaderExtension) => void;
         /**
          * Returns a promise that resolves when the asset is completely loaded.
@@ -257,22 +357,65 @@ declare module BABYLON {
          */
         readonly loaderState: Nullable<GLTFLoaderState>;
         private _loader;
+        /**
+         * Name of the loader ("gltf")
+         */
         name: string;
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         extensions: ISceneLoaderPluginExtensions;
         /**
          * Disposes the loader, releases resources during load, and cancels any outstanding requests.
          */
         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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: any, 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
+        * @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
+        */
         loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
+        /**
+         * Load into an asset container.
+         * @param scene The scene to load into
+         * @param data The data to import
+         * @param rootUrl The root url for scene and resources
+         * @param onProgress The callback when the load progresses
+         * @returns The loaded asset container
+         */
         loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer>;
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         canDirectLoad(data: string): boolean;
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
         private _parse(data);
         private _getLoader(loaderData);
@@ -689,9 +832,21 @@ declare module BABYLON.GLTF1 {
         onMaterialLoadedObservable: Observable<Material>;
         onCompleteObservable: Observable<IGLTFLoader>;
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * State of the loader
+        */
         state: Nullable<GLTFLoaderState>;
         dispose(): void;
         private _importMeshAsync(meshesNames, scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{
             meshes: AbstractMesh[];
             particleSystems: ParticleSystem[];
@@ -699,6 +854,14 @@ declare module BABYLON.GLTF1 {
             animationGroups: AnimationGroup[];
         }>;
         private _loadAsync(scene, data, rootUrl, onSuccess, onProgress?, onError?);
+        /**
+        * 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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadShadersAsync(gltfRuntime, onload);
         private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
@@ -843,55 +1006,84 @@ declare module BABYLON.GLTF1 {
 
 
 declare module BABYLON.GLTF2 {
+    /** Array item which contains it's index in an array */
     interface IArrayItem {
         _index: number;
     }
+    /** Array item helper methods */
     class ArrayItem {
+        /** Sets the index of each array element to its index in the array */
         static Assign(values?: IArrayItem[]): void;
     }
-    class AnimationMultiTarget {
-        subTargets: any[];
-        position: Vector3;
-        rotationQuaternion: Quaternion;
-        scaling: Vector3;
-        influence: number;
-    }
 }
 
 
 
+/**
+ * GLTF2 module for babylon
+ */
 declare module BABYLON.GLTF2 {
+    /**
+     * Interface to access data and vertex buffer associated with a file
+     */
     interface ILoaderAccessor extends IAccessor, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
+    /**
+     * Loader's animation channel
+     */
     interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
     }
+    /**
+     * Container for animation keyframe data
+     */
     interface ILoaderAnimationSamplerData {
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
     }
+    /**
+     * Keyframe data
+     */
     interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
         _data: Promise<ILoaderAnimationSamplerData>;
     }
+    /**
+     * Loader animation
+     */
     interface ILoaderAnimation extends IAnimation, IArrayItem {
         channels: ILoaderAnimationChannel[];
         samplers: ILoaderAnimationSampler[];
         _babylonAnimationGroup?: AnimationGroup;
     }
+    /**
+     * Loader buffer
+     */
     interface ILoaderBuffer extends IBuffer, IArrayItem {
         _data?: Promise<ArrayBufferView>;
     }
+    /**
+     * Loader's buffer data
+     */
     interface ILoaderBufferView extends IBufferView, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
     }
+    /**
+     * Loader's loaded camera data
+     */
     interface ILoaderCamera extends ICamera, IArrayItem {
     }
+    /**
+     * Loaded image specified by url
+     */
     interface ILoaderImage extends IImage, IArrayItem {
         _objectURL?: Promise<string>;
     }
+    /**
+     * Loaded material data
+     */
     interface ILoaderMaterial extends IMaterial, IArrayItem {
         _babylonData?: {
             [drawMode: number]: {
@@ -901,11 +1093,20 @@ declare module BABYLON.GLTF2 {
             };
         };
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMesh extends IMesh, IArrayItem {
         primitives: ILoaderMeshPrimitive[];
     }
+    /**
+     * Loader mesh data
+     */
     interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
     }
+    /**
+     * Node for traversing loader data
+     */
     interface ILoaderNode extends INode, IArrayItem {
         _parent: ILoaderNode;
         _babylonMesh?: Mesh;
@@ -913,23 +1114,41 @@ declare module BABYLON.GLTF2 {
         _babylonAnimationTargets?: Node[];
         _numMorphTargets?: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSamplerData {
         noMipMaps: boolean;
         samplingMode: number;
         wrapU: number;
         wrapV: number;
     }
+    /**
+     * Sampler data
+     */
     interface ILoaderSampler extends ISampler, IArrayItem {
         _data?: ILoaderSamplerData;
     }
+    /**
+     * Loader's scene
+     */
     interface ILoaderScene extends IScene, IArrayItem {
     }
+    /**
+     * Loader's skeleton data
+     */
     interface ILoaderSkin extends ISkin, IArrayItem {
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
     }
+    /**
+     * Loader's texture
+     */
     interface ILoaderTexture extends ITexture, IArrayItem {
     }
+    /**
+     * Loaded GLTF data
+     */
     interface ILoaderGLTF extends IGLTF {
         accessors?: ILoaderAccessor[];
         animations?: ILoaderAnimation[];
@@ -948,14 +1167,40 @@ declare module BABYLON.GLTF2 {
 }
 
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 declare module BABYLON.GLTF2 {
+    /**
+    * Interface for a meterial with a constructor
+    */
     interface MaterialConstructor<T extends Material> {
+        /**
+        * The material class
+        */
         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;
     }
+    /**
+    * Used to load from a GLTF2 file
+    */
     class GLTFLoader implements IGLTFLoader {
+        /**
+        * @ignore
+        */
         _gltf: ILoaderGLTF;
+        /**
+        * @ignore
+        */
         _babylonScene: Scene;
+        /**
+        * @ignore
+        */
         _completePromises: Promise<void>[];
         private _disposed;
         private _state;
@@ -968,26 +1213,87 @@ declare module BABYLON.GLTF2 {
         private _requests;
         private static _Names;
         private static _Factories;
+        /**
+        * @ignore, registers the loader
+        * @param name name of the loader
+        * @param factory function that converts a loader to a loader extension
+        */
         static _Register(name: string, factory: (loader: GLTFLoader) => GLTFLoaderExtension): void;
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         readonly onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         readonly onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         readonly onTextureLoadedObservable: Observable<BaseTexture>;
+        /**
+        * Observable that fires each time a material is loaded
+        */
         readonly onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires each time an extension is loaded
+        */
         readonly onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
+        /**
+        * Observable that fires when the load has completed
+        */
         readonly onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * The current state of the loader
+        */
         readonly state: Nullable<GLTFLoaderState>;
+        /**
+        * Disposes of the loader
+        */
         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
+        */
         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
+        * @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
+        */
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void>;
         private _loadAsync(nodes, scene, data, rootUrl, onProgress?);
         private _loadExtensions();
@@ -996,12 +1302,18 @@ declare module BABYLON.GLTF2 {
         private _checkExtensions();
         private _createRootNode();
         private _loadNodesAsync(nodes);
+        /**
+        * @ignore
+        */
         _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
         private _forEachPrimitive(node, callback);
         private _getMeshes();
         private _getSkeletons();
         private _getAnimationGroups();
         private _startAnimations();
+        /**
+        * @ignore
+        */
         _loadNodeAsync(context: string, node: ILoaderNode): Promise<void>;
         private _loadMeshAsync(context, node, mesh, babylonMesh);
         private _loadPrimitiveAsync(context, node, mesh, primitive, babylonMesh);
@@ -1021,21 +1333,48 @@ declare module BABYLON.GLTF2 {
         private _loadAnimationChannelAsync(context, animationContext, animation, channel, babylonAnimationGroup);
         private _loadAnimationSamplerAsync(context, sampler);
         private _loadBufferAsync(context, buffer);
+        /**
+        * @ignore
+        */
         _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
         private _loadAccessorAsync(context, accessor);
+        /**
+        * @ignore
+        */
         _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer>;
         private _loadVertexAccessorAsync(context, accessor, kind);
         private _getDefaultMaterial(drawMode);
         private _loadMaterialMetallicRoughnessPropertiesAsync(context, material, babylonMaterial);
+        /**
+        * @ignore
+        */
         _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void>;
+        /**
+        * @ignore
+        */
         _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T;
+        /**
+        * @ignore
+        */
         _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void>;
+        /**
+        * @ignore
+        */
         _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void;
+        /**
+        * @ignore
+        */
         _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void>;
         private _loadSampler(context, sampler);
         private _loadImageAsync(context, image);
+        /**
+        * @ignore
+        */
         _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView>;
         private _onProgress();
+        /**
+        * @ignore
+        */
         static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
         private static _GetTextureWrapMode(context, mode);
         private static _GetTextureSamplingMode(context, magFilter?, minFilter?);
@@ -1045,12 +1384,18 @@ declare module BABYLON.GLTF2 {
         private _compileMaterialsAsync();
         private _compileShadowGeneratorsAsync();
         private _clear();
+        /**
+        * @ignore
+        */
         _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>): Nullable<Promise<T>>;
     }
 }
 
 
 declare module BABYLON.GLTF2 {
+    /**
+     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     */
     abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         enabled: boolean;
         readonly abstract name: string;
@@ -1105,6 +1450,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 
 
+/** Module defining extensions to gltf */
 declare module BABYLON.GLTF2.Extensions {
     class KHR_draco_mesh_compression extends GLTFLoaderExtension {
         readonly name: string;

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.2.0-beta.4"
+        "babylonjs-gltf2interface": "3.2.0-beta.5"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

+ 0 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.fireMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.fireMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


+ 0 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


ファイルの差分が大きいため隠しています
+ 0 - 14
dist/preview release/materialsLibrary/babylonjs.materials.js


ファイルの差分が大きいため隠しています
+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.min.js


+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 0 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


+ 0 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


ファイルの差分が大きいため隠しています
+ 0 - 2
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-beta.4",
+    "version": "3.2.0-beta.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 0 - 1
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js


+ 0 - 1
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js


+ 0 - 1
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js

@@ -1,4 +1,3 @@
-"use strict";
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js


+ 0 - 0
dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません