David Catuhe 7 年之前
父节点
当前提交
9b617eba15

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


+ 2 - 1
Tools/Gulp/package.json

@@ -65,6 +65,7 @@
     },
     },
     "dependencies": {
     "dependencies": {
         "dts-bundle": "^0.7.3",
         "dts-bundle": "^0.7.3",
-        "gulp-clean": "^0.4.0"
+        "gulp-clean": "^0.4.0",
+        "npm": "^5.8.0"
     }
     }
 }
 }

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


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


+ 5 - 0
dist/preview release/babylon.max.js

@@ -87550,6 +87550,9 @@ var BABYLON;
             }
             }
             else if (this._vrDeviceOrientationCamera) {
             else if (this._vrDeviceOrientationCamera) {
                 this._vrDeviceOrientationCamera.position = this._position;
                 this._vrDeviceOrientationCamera.position = this._position;
+                if (this._scene.activeCamera) {
+                    this._vrDeviceOrientationCamera.minZ = this._scene.activeCamera.minZ;
+                }
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.getEngine().switchFullscreen(true);
                 this._scene.getEngine().switchFullscreen(true);
                 this.updateButtonVisibility();
                 this.updateButtonVisibility();
@@ -87594,6 +87597,8 @@ var BABYLON;
             if (this._interactionsEnabled) {
             if (this._interactionsEnabled) {
                 this._scene.unregisterBeforeRender(this.beforeRender);
                 this._scene.unregisterBeforeRender(this.beforeRender);
             }
             }
+            // resize to update width and height when exiting vr exits fullscreen
+            this._scene.getEngine().resize();
         };
         };
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
             /**
             /**

+ 5 - 0
dist/preview release/babylon.no-module.max.js

@@ -87517,6 +87517,9 @@ var BABYLON;
             }
             }
             else if (this._vrDeviceOrientationCamera) {
             else if (this._vrDeviceOrientationCamera) {
                 this._vrDeviceOrientationCamera.position = this._position;
                 this._vrDeviceOrientationCamera.position = this._position;
+                if (this._scene.activeCamera) {
+                    this._vrDeviceOrientationCamera.minZ = this._scene.activeCamera.minZ;
+                }
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.getEngine().switchFullscreen(true);
                 this._scene.getEngine().switchFullscreen(true);
                 this.updateButtonVisibility();
                 this.updateButtonVisibility();
@@ -87561,6 +87564,8 @@ var BABYLON;
             if (this._interactionsEnabled) {
             if (this._interactionsEnabled) {
                 this._scene.unregisterBeforeRender(this.beforeRender);
                 this._scene.unregisterBeforeRender(this.beforeRender);
             }
             }
+            // resize to update width and height when exiting vr exits fullscreen
+            this._scene.getEngine().resize();
         };
         };
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
             /**
             /**

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


+ 5 - 0
dist/preview release/es6.js

@@ -87517,6 +87517,9 @@ var BABYLON;
             }
             }
             else if (this._vrDeviceOrientationCamera) {
             else if (this._vrDeviceOrientationCamera) {
                 this._vrDeviceOrientationCamera.position = this._position;
                 this._vrDeviceOrientationCamera.position = this._position;
+                if (this._scene.activeCamera) {
+                    this._vrDeviceOrientationCamera.minZ = this._scene.activeCamera.minZ;
+                }
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.getEngine().switchFullscreen(true);
                 this._scene.getEngine().switchFullscreen(true);
                 this.updateButtonVisibility();
                 this.updateButtonVisibility();
@@ -87561,6 +87564,8 @@ var BABYLON;
             if (this._interactionsEnabled) {
             if (this._interactionsEnabled) {
                 this._scene.unregisterBeforeRender(this.beforeRender);
                 this._scene.unregisterBeforeRender(this.beforeRender);
             }
             }
+            // resize to update width and height when exiting vr exits fullscreen
+            this._scene.getEngine().resize();
         };
         };
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
             /**
             /**

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

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

+ 106 - 6
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -1,6 +1,9 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
         /**
@@ -12,6 +15,9 @@ var BABYLON;
          */
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
     (function (GLTFLoaderAnimationStartMode) {
         /**
         /**
@@ -27,6 +33,9 @@ var BABYLON;
          */
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
     (function (GLTFLoaderState) {
         /**
         /**
@@ -42,6 +51,7 @@ var BABYLON;
          */
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // #region Common options
             // #region Common options
@@ -54,23 +64,28 @@ var BABYLON;
             // #endregion
             // #endregion
             // #region V2 options
             // #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;
             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;
             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;
             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;
             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;
             this.compileShadowGenerators = false;
             /**
             /**
@@ -102,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             // #endregion
             this._loader = null;
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
                 ".glb": { isBinary: true }
             };
             };
         }
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
             set: function (callback) {
                 if (this._onParsedObserver) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -119,6 +141,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
+            /**
+             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -129,6 +154,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -139,6 +167,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
+            /**
+             * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -149,6 +180,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onCompleteObserver) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -159,6 +193,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onDisposeObserver) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -169,6 +206,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -214,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.clear();
             this.onDisposeObservable.clear();
         };
         };
+        /**
+        * Imports one or more meshes from a loaded gltf file and adds them to the scene
+        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+        * @param scene the scene the meshes should be added to
+        * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
+        * @param onProgress event that fires when loading progress has occured
+        * @returns a promise containg the loaded meshes, particles, skeletons and animations
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -222,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -230,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -246,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) {
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
             return new GLTFFileLoader();
         };
         };
@@ -432,7 +506,13 @@ var BABYLON;
         };
         };
         // #endregion
         // #endregion
         // #region V1 options
         // #region V1 options
+        /**
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         */
         GLTFFileLoader.IncrementalLoading = true;
         GLTFFileLoader.IncrementalLoading = true;
+        /**
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
@@ -1869,6 +1949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
                 this.state = null;
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1931,6 +2014,15 @@ var BABYLON;
                 }, onError);
                 }, onError);
                 return true;
                 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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {
@@ -1970,6 +2062,14 @@ var BABYLON;
                     }, onError);
                     }, onError);
                 }, 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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {

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

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

+ 198 - 6
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -1,6 +1,9 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
         /**
@@ -12,6 +15,9 @@ var BABYLON;
          */
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
     (function (GLTFLoaderAnimationStartMode) {
         /**
         /**
@@ -27,6 +33,9 @@ var BABYLON;
          */
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
     (function (GLTFLoaderState) {
         /**
         /**
@@ -42,6 +51,7 @@ var BABYLON;
          */
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // #region Common options
             // #region Common options
@@ -54,23 +64,28 @@ var BABYLON;
             // #endregion
             // #endregion
             // #region V2 options
             // #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;
             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;
             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;
             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;
             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;
             this.compileShadowGenerators = false;
             /**
             /**
@@ -102,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             // #endregion
             this._loader = null;
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
                 ".glb": { isBinary: true }
             };
             };
         }
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
             set: function (callback) {
                 if (this._onParsedObserver) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -119,6 +141,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
+            /**
+             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -129,6 +154,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -139,6 +167,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
+            /**
+             * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -149,6 +180,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onCompleteObserver) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -159,6 +193,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onDisposeObserver) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -169,6 +206,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -214,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.clear();
             this.onDisposeObservable.clear();
         };
         };
+        /**
+        * Imports one or more meshes from a loaded gltf file and adds them to the scene
+        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+        * @param scene the scene the meshes should be added to
+        * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
+        * @param onProgress event that fires when loading progress has occured
+        * @returns a promise containg the loaded meshes, particles, skeletons and animations
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -222,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -230,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -246,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) {
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
             return new GLTFFileLoader();
         };
         };
@@ -432,7 +506,13 @@ var BABYLON;
         };
         };
         // #endregion
         // #endregion
         // #region V1 options
         // #region V1 options
+        /**
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         */
         GLTFFileLoader.IncrementalLoading = true;
         GLTFFileLoader.IncrementalLoading = true;
+        /**
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
@@ -476,9 +556,11 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             function ArrayItem() {
             }
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
             ArrayItem.Assign = function (values) {
                 if (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
                     for (var index = 0; index < values.length; index++) {
@@ -500,12 +582,21 @@ var BABYLON;
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
 
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._disposed = false;
                 this._state = null;
                 this._state = null;
@@ -513,18 +604,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
                 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) {
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -535,12 +664,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
                 GLTFLoader._Names.push(name);
             };
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                 get: function () {
                     return this._state;
                     return this._state;
                 },
                 },
                 enumerable: true,
                 enumerable: true,
                 configurable: true
                 configurable: true
             });
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                 if (this._disposed) {
                     return;
                     return;
@@ -550,6 +685,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this.onDisposeObservable.clear();
                 this._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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return Promise.resolve().then(function () {
                 return Promise.resolve().then(function () {
@@ -583,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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
             };
@@ -740,6 +892,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
                 if (promise) {
@@ -839,6 +994,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
                 if (promise) {
@@ -1359,6 +1517,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
                 return buffer._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                 if (bufferView._data) {
                     return bufferView._data;
                     return bufferView._data;
@@ -1417,6 +1578,9 @@ var BABYLON;
                 });
                 });
                 return accessor._data;
                 return accessor._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 var _this = this;
                 if (bufferView._babylonBuffer) {
                 if (bufferView._babylonBuffer) {
@@ -1486,6 +1650,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
                 if (promise) {
@@ -1511,12 +1678,18 @@ var BABYLON;
                 assign(babylonData.material);
                 assign(babylonData.material);
                 return babylonData.loaded;
                 return babylonData.loaded;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
                 return babylonMaterial;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -1550,6 +1723,9 @@ var BABYLON;
                 }
                 }
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
                 switch (alphaMode) {
@@ -1578,6 +1754,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -1637,6 +1816,9 @@ var BABYLON;
                 });
                 });
                 return image._objectURL;
                 return image._objectURL;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -1694,6 +1876,9 @@ var BABYLON;
                 }
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -1842,6 +2027,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
                     var name_5 = _a[_i];
@@ -1871,6 +2059,9 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
                 this.enabled = true;
@@ -2120,6 +2311,7 @@ var __extends = (this && this.__extends) || (function () {
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
     };
     };
 })();
 })();
+/** Module defining extensions to gltf */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;

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

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

+ 218 - 6
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -1,6 +1,9 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
         /**
@@ -12,6 +15,9 @@ var BABYLON;
          */
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
     (function (GLTFLoaderAnimationStartMode) {
         /**
         /**
@@ -27,6 +33,9 @@ var BABYLON;
          */
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
     (function (GLTFLoaderState) {
         /**
         /**
@@ -42,6 +51,7 @@ var BABYLON;
          */
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // #region Common options
             // #region Common options
@@ -54,23 +64,28 @@ var BABYLON;
             // #endregion
             // #endregion
             // #region V2 options
             // #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;
             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;
             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;
             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;
             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;
             this.compileShadowGenerators = false;
             /**
             /**
@@ -102,13 +117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             // #endregion
             this._loader = null;
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
                 ".glb": { isBinary: true }
             };
             };
         }
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
             set: function (callback) {
                 if (this._onParsedObserver) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -119,6 +141,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
+            /**
+             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -129,6 +154,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -139,6 +167,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
+            /**
+             * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -149,6 +180,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onCompleteObserver) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -159,6 +193,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onDisposeObserver) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -169,6 +206,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -214,6 +254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.clear();
             this.onDisposeObservable.clear();
         };
         };
+        /**
+        * Imports one or more meshes from a loaded gltf file and adds them to the scene
+        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+        * @param scene the scene the meshes should be added to
+        * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
+        * @param onProgress event that fires when loading progress has occured
+        * @returns a promise containg the loaded meshes, particles, skeletons and animations
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -222,6 +271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -230,6 +287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -246,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) {
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
             return new GLTFFileLoader();
         };
         };
@@ -432,7 +506,13 @@ var BABYLON;
         };
         };
         // #endregion
         // #endregion
         // #region V1 options
         // #region V1 options
+        /**
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         */
         GLTFFileLoader.IncrementalLoading = true;
         GLTFFileLoader.IncrementalLoading = true;
+        /**
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
@@ -1869,6 +1949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
                 this.state = null;
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1931,6 +2014,15 @@ var BABYLON;
                 }, onError);
                 }, onError);
                 return true;
                 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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {
@@ -1970,6 +2062,14 @@ var BABYLON;
                     }, onError);
                     }, onError);
                 }, 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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {
@@ -2671,9 +2771,11 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             function ArrayItem() {
             }
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
             ArrayItem.Assign = function (values) {
                 if (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
                     for (var index = 0; index < values.length; index++) {
@@ -2695,12 +2797,21 @@ var BABYLON;
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
 
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._disposed = false;
                 this._state = null;
                 this._state = null;
@@ -2708,18 +2819,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
                 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) {
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -2730,12 +2879,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
                 GLTFLoader._Names.push(name);
             };
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                 get: function () {
                     return this._state;
                     return this._state;
                 },
                 },
                 enumerable: true,
                 enumerable: true,
                 configurable: true
                 configurable: true
             });
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                 if (this._disposed) {
                     return;
                     return;
@@ -2745,6 +2900,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this.onDisposeObservable.clear();
                 this._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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return Promise.resolve().then(function () {
                 return Promise.resolve().then(function () {
@@ -2778,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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
             };
@@ -2935,6 +3107,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
                 if (promise) {
@@ -3034,6 +3209,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
                 if (promise) {
@@ -3554,6 +3732,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
                 return buffer._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                 if (bufferView._data) {
                     return bufferView._data;
                     return bufferView._data;
@@ -3612,6 +3793,9 @@ var BABYLON;
                 });
                 });
                 return accessor._data;
                 return accessor._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 var _this = this;
                 if (bufferView._babylonBuffer) {
                 if (bufferView._babylonBuffer) {
@@ -3681,6 +3865,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
                 if (promise) {
@@ -3706,12 +3893,18 @@ var BABYLON;
                 assign(babylonData.material);
                 assign(babylonData.material);
                 return babylonData.loaded;
                 return babylonData.loaded;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
                 return babylonMaterial;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -3745,6 +3938,9 @@ var BABYLON;
                 }
                 }
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
                 switch (alphaMode) {
@@ -3773,6 +3969,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -3832,6 +4031,9 @@ var BABYLON;
                 });
                 });
                 return image._objectURL;
                 return image._objectURL;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -3889,6 +4091,9 @@ var BABYLON;
                 }
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -4037,6 +4242,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
                     var name_5 = _a[_i];
@@ -4066,6 +4274,9 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
                 this.enabled = true;
@@ -4315,6 +4526,7 @@ var __extends = (this && this.__extends) || (function () {
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
     };
     };
 })();
 })();
+/** Module defining extensions to gltf */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;

+ 358 - 6
dist/preview release/loaders/babylonjs.loaders.d.ts

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

+ 218 - 6
dist/preview release/loaders/babylonjs.loaders.js

@@ -1001,6 +1001,9 @@ var BABYLON;
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     var GLTFLoaderCoordinateSystemMode;
     var GLTFLoaderCoordinateSystemMode;
     (function (GLTFLoaderCoordinateSystemMode) {
     (function (GLTFLoaderCoordinateSystemMode) {
         /**
         /**
@@ -1012,6 +1015,9 @@ var BABYLON;
          */
          */
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 1] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     var GLTFLoaderAnimationStartMode;
     var GLTFLoaderAnimationStartMode;
     (function (GLTFLoaderAnimationStartMode) {
     (function (GLTFLoaderAnimationStartMode) {
         /**
         /**
@@ -1027,6 +1033,9 @@ var BABYLON;
          */
          */
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
         GLTFLoaderAnimationStartMode[GLTFLoaderAnimationStartMode["ALL"] = 2] = "ALL";
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
     })(GLTFLoaderAnimationStartMode = BABYLON.GLTFLoaderAnimationStartMode || (BABYLON.GLTFLoaderAnimationStartMode = {}));
+    /**
+    * Loading state
+    */
     var GLTFLoaderState;
     var GLTFLoaderState;
     (function (GLTFLoaderState) {
     (function (GLTFLoaderState) {
         /**
         /**
@@ -1042,6 +1051,7 @@ var BABYLON;
          */
          */
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
         GLTFLoaderState[GLTFLoaderState["COMPLETE"] = 2] = "COMPLETE";
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
     })(GLTFLoaderState = BABYLON.GLTFLoaderState || (BABYLON.GLTFLoaderState = {}));
+    /** File loader to load gltf files into a babylon scene */
     var GLTFFileLoader = /** @class */ (function () {
     var GLTFFileLoader = /** @class */ (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // #region Common options
             // #region Common options
@@ -1054,23 +1064,28 @@ var BABYLON;
             // #endregion
             // #endregion
             // #region V2 options
             // #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;
             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;
             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;
             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;
             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;
             this.compileShadowGenerators = false;
             /**
             /**
@@ -1102,13 +1117,20 @@ var BABYLON;
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             this.onExtensionLoadedObservable = new BABYLON.Observable();
             // #endregion
             // #endregion
             this._loader = null;
             this._loader = null;
+            /**
+             * Name of the loader ("gltf")
+             */
             this.name = "gltf";
             this.name = "gltf";
+            /**
+             * Supported file extensions of the loader (.gltf, .glb)
+             */
             this.extensions = {
             this.extensions = {
                 ".gltf": { isBinary: false },
                 ".gltf": { isBinary: false },
                 ".glb": { isBinary: true }
                 ".glb": { isBinary: true }
             };
             };
         }
         }
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
         Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
+            /** Raised when the asset has been parsed. */
             set: function (callback) {
             set: function (callback) {
                 if (this._onParsedObserver) {
                 if (this._onParsedObserver) {
                     this.onParsedObservable.remove(this._onParsedObserver);
                     this.onParsedObservable.remove(this._onParsedObserver);
@@ -1119,6 +1141,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMeshLoaded", {
+            /**
+             * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMeshLoadedObserver) {
                 if (this._onMeshLoadedObserver) {
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
                     this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -1129,6 +1154,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onTextureLoaded", {
+            /**
+             * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onTextureLoadedObserver) {
                 if (this._onTextureLoadedObserver) {
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
                     this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -1139,6 +1167,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onMaterialLoaded", {
+            /**
+             * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onMaterialLoadedObserver) {
                 if (this._onMaterialLoadedObserver) {
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
                     this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -1149,6 +1180,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
         Object.defineProperty(GLTFFileLoader.prototype, "onComplete", {
+            /**
+             * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onCompleteObserver) {
                 if (this._onCompleteObserver) {
                     this.onCompleteObservable.remove(this._onCompleteObserver);
                     this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -1159,6 +1193,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
         Object.defineProperty(GLTFFileLoader.prototype, "onDispose", {
+            /**
+             * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onDisposeObserver) {
                 if (this._onDisposeObserver) {
                     this.onDisposeObservable.remove(this._onDisposeObserver);
                     this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -1169,6 +1206,9 @@ var BABYLON;
             configurable: true
             configurable: true
         });
         });
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
         Object.defineProperty(GLTFFileLoader.prototype, "onExtensionLoaded", {
+            /**
+             * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+             */
             set: function (callback) {
             set: function (callback) {
                 if (this._onExtensionLoadedObserver) {
                 if (this._onExtensionLoadedObserver) {
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
                     this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -1214,6 +1254,15 @@ var BABYLON;
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.notifyObservers(this);
             this.onDisposeObservable.clear();
             this.onDisposeObservable.clear();
         };
         };
+        /**
+        * Imports one or more meshes from a loaded gltf file and adds them to the scene
+        * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
+        * @param scene the scene the meshes should be added to
+        * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
+        * @param onProgress event that fires when loading progress has occured
+        * @returns a promise containg the loaded meshes, particles, skeletons and animations
+        */
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
         GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -1222,6 +1271,14 @@ var BABYLON;
                 return _this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -1230,6 +1287,14 @@ var BABYLON;
                 return _this._loader.loadAsync(scene, loaderData, rootUrl, onProgress);
                 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) {
         GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress) {
             var _this = this;
             var _this = this;
             return Promise.resolve().then(function () {
             return Promise.resolve().then(function () {
@@ -1246,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) {
         GLTFFileLoader.prototype.canDirectLoad = function (data) {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         };
         };
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         GLTFFileLoader.prototype.createPlugin = function () {
         GLTFFileLoader.prototype.createPlugin = function () {
             return new GLTFFileLoader();
             return new GLTFFileLoader();
         };
         };
@@ -1432,7 +1506,13 @@ var BABYLON;
         };
         };
         // #endregion
         // #endregion
         // #region V1 options
         // #region V1 options
+        /**
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         */
         GLTFFileLoader.IncrementalLoading = true;
         GLTFFileLoader.IncrementalLoading = true;
+        /**
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         */
         GLTFFileLoader.HomogeneousCoordinates = false;
         GLTFFileLoader.HomogeneousCoordinates = false;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
@@ -2869,6 +2949,9 @@ var BABYLON;
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onCompleteObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * State of the loader
+                */
                 this.state = null;
                 this.state = null;
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -2931,6 +3014,15 @@ var BABYLON;
                 }, onError);
                 }, onError);
                 return true;
                 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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {
@@ -2970,6 +3062,14 @@ var BABYLON;
                     }, onError);
                     }, onError);
                 }, 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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return new Promise(function (resolve, reject) {
                 return new Promise(function (resolve, reject) {
@@ -3653,9 +3753,11 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /** Array item helper methods */
         var ArrayItem = /** @class */ (function () {
         var ArrayItem = /** @class */ (function () {
             function ArrayItem() {
             function ArrayItem() {
             }
             }
+            /** Sets the index of each array element to its index in the array */
             ArrayItem.Assign = function (values) {
             ArrayItem.Assign = function (values) {
                 if (values) {
                 if (values) {
                     for (var index = 0; index < values.length; index++) {
                     for (var index = 0; index < values.length; index++) {
@@ -3677,12 +3779,21 @@ var BABYLON;
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 //# sourceMappingURL=babylon.glTFLoaderInterfaces.js.map
 
 
 
 
+/**
+* Defines the GLTF2 module used to import/export GLTF 2.0 files
+*/
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+        * Used to load from a GLTF2 file
+        */
         var GLTFLoader = /** @class */ (function () {
         var GLTFLoader = /** @class */ (function () {
             function GLTFLoader() {
             function GLTFLoader() {
+                /**
+                * @ignore
+                */
                 this._completePromises = new Array();
                 this._completePromises = new Array();
                 this._disposed = false;
                 this._disposed = false;
                 this._state = null;
                 this._state = null;
@@ -3690,18 +3801,56 @@ var BABYLON;
                 this._defaultSampler = {};
                 this._defaultSampler = {};
                 this._defaultBabylonMaterials = {};
                 this._defaultBabylonMaterials = {};
                 this._requests = new Array();
                 this._requests = new Array();
+                /**
+                * Coordinate system that will be used when loading from the gltf file
+                */
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
                 this.coordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode.AUTO;
+                /**
+                * Animation mode that determines which animations should be started when a file is loaded
+                */
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
                 this.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.FIRST;
+                /**
+                * If the materials in the file should automatically be compiled
+                */
                 this.compileMaterials = false;
                 this.compileMaterials = false;
+                /**
+                * If a clip plane should be usede when loading meshes in the file
+                */
                 this.useClipPlane = false;
                 this.useClipPlane = false;
+                /**
+                * If shadow generators should automatically be compiled
+                */
                 this.compileShadowGenerators = false;
                 this.compileShadowGenerators = false;
+                /**
+                * Observable that fires when the loader is disposed
+                */
                 this.onDisposeObservable = new BABYLON.Observable();
                 this.onDisposeObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a mesh is loaded
+                */
                 this.onMeshLoadedObservable = new BABYLON.Observable();
                 this.onMeshLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a texture is loaded
+                */
                 this.onTextureLoadedObservable = new BABYLON.Observable();
                 this.onTextureLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time a material is loaded
+                */
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
                 this.onMaterialLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires each time an extension is loaded
+                */
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
                 this.onExtensionLoadedObservable = new BABYLON.Observable();
+                /**
+                * Observable that fires when the load has completed
+                */
                 this.onCompleteObservable = new BABYLON.Observable();
                 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) {
             GLTFLoader._Register = function (name, factory) {
                 if (GLTFLoader._Factories[name]) {
                 if (GLTFLoader._Factories[name]) {
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
                     BABYLON.Tools.Error("Extension with the name '" + name + "' already exists");
@@ -3712,12 +3861,18 @@ var BABYLON;
                 GLTFLoader._Names.push(name);
                 GLTFLoader._Names.push(name);
             };
             };
             Object.defineProperty(GLTFLoader.prototype, "state", {
             Object.defineProperty(GLTFLoader.prototype, "state", {
+                /**
+                * The current state of the loader
+                */
                 get: function () {
                 get: function () {
                     return this._state;
                     return this._state;
                 },
                 },
                 enumerable: true,
                 enumerable: true,
                 configurable: true
                 configurable: true
             });
             });
+            /**
+            * Disposes of the loader
+            */
             GLTFLoader.prototype.dispose = function () {
             GLTFLoader.prototype.dispose = function () {
                 if (this._disposed) {
                 if (this._disposed) {
                     return;
                     return;
@@ -3727,6 +3882,15 @@ var BABYLON;
                 this.onDisposeObservable.clear();
                 this.onDisposeObservable.clear();
                 this._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) {
             GLTFLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress) {
                 var _this = this;
                 var _this = this;
                 return Promise.resolve().then(function () {
                 return Promise.resolve().then(function () {
@@ -3760,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) {
             GLTFLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress) {
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
                 return this._loadAsync(null, scene, data, rootUrl, onProgress);
             };
             };
@@ -3917,6 +4089,9 @@ var BABYLON;
                 promises.push(this._loadAnimationsAsync());
                 promises.push(this._loadAnimationsAsync());
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
             GLTFLoader.prototype._loadSceneAsync = function (context, scene) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 var promise = GLTF2.GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
                 if (promise) {
                 if (promise) {
@@ -4016,6 +4191,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
             GLTFLoader.prototype._loadNodeAsync = function (context, node) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 var promise = GLTF2.GLTFLoaderExtension._LoadNodeAsync(this, context, node);
                 if (promise) {
                 if (promise) {
@@ -4536,6 +4714,9 @@ var BABYLON;
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 buffer._data = this._loadUriAsync(context, buffer.uri);
                 return buffer._data;
                 return buffer._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
             GLTFLoader.prototype._loadBufferViewAsync = function (context, bufferView) {
                 if (bufferView._data) {
                 if (bufferView._data) {
                     return bufferView._data;
                     return bufferView._data;
@@ -4594,6 +4775,9 @@ var BABYLON;
                 });
                 });
                 return accessor._data;
                 return accessor._data;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
             GLTFLoader.prototype._loadVertexBufferViewAsync = function (context, bufferView, kind) {
                 var _this = this;
                 var _this = this;
                 if (bufferView._babylonBuffer) {
                 if (bufferView._babylonBuffer) {
@@ -4663,6 +4847,9 @@ var BABYLON;
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 this._loadMaterialAlphaProperties(context, material, babylonMaterial);
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
             GLTFLoader.prototype._loadMaterialAsync = function (context, material, babylonMesh, babylonDrawMode, assign) {
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 var promise = GLTF2.GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
                 if (promise) {
                 if (promise) {
@@ -4688,12 +4875,18 @@ var BABYLON;
                 assign(babylonData.material);
                 assign(babylonData.material);
                 return babylonData.loaded;
                 return babylonData.loaded;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
             GLTFLoader.prototype._createMaterial = function (type, name, drawMode) {
                 var babylonMaterial = new type(name, this._babylonScene);
                 var babylonMaterial = new type(name, this._babylonScene);
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? BABYLON.Material.CounterClockWiseSideOrientation : BABYLON.Material.ClockWiseSideOrientation;
                 babylonMaterial.fillMode = drawMode;
                 babylonMaterial.fillMode = drawMode;
                 return babylonMaterial;
                 return babylonMaterial;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialBasePropertiesAsync = function (context, material, babylonMaterial) {
                 var promises = new Array();
                 var promises = new Array();
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
                 babylonMaterial.emissiveColor = material.emissiveFactor ? BABYLON.Color3.FromArray(material.emissiveFactor) : new BABYLON.Color3(0, 0, 0);
@@ -4727,6 +4920,9 @@ var BABYLON;
                 }
                 }
                 return Promise.all(promises).then(function () { });
                 return Promise.all(promises).then(function () { });
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
             GLTFLoader.prototype._loadMaterialAlphaProperties = function (context, material, babylonMaterial) {
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 var alphaMode = material.alphaMode || "OPAQUE" /* OPAQUE */;
                 switch (alphaMode) {
                 switch (alphaMode) {
@@ -4755,6 +4951,9 @@ var BABYLON;
                     }
                     }
                 }
                 }
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
             GLTFLoader.prototype._loadTextureAsync = function (context, textureInfo, assign) {
                 var _this = this;
                 var _this = this;
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
                 var texture = GLTFLoader._GetProperty(context + "/index", this._gltf.textures, textureInfo.index);
@@ -4814,6 +5013,9 @@ var BABYLON;
                 });
                 });
                 return image._objectURL;
                 return image._objectURL;
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
             GLTFLoader.prototype._loadUriAsync = function (context, uri) {
                 var _this = this;
                 var _this = this;
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
                 var promise = GLTF2.GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -4871,6 +5073,9 @@ var BABYLON;
                 }
                 }
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
                 this._progressCallback(new BABYLON.SceneLoaderProgressEvent(lengthComputable, loaded, lengthComputable ? total : 0));
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader._GetProperty = function (context, array, index) {
             GLTFLoader._GetProperty = function (context, array, index) {
                 if (!array || index == undefined || !array[index]) {
                 if (!array || index == undefined || !array[index]) {
                     throw new Error(context + ": Failed to find index (" + index + ")");
                     throw new Error(context + ": Failed to find index (" + index + ")");
@@ -5019,6 +5224,9 @@ var BABYLON;
                 this.onTextureLoadedObservable.clear();
                 this.onTextureLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
                 this.onMaterialLoadedObservable.clear();
             };
             };
+            /**
+            * @ignore
+            */
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
             GLTFLoader.prototype._applyExtensions = function (actionAsync) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                 for (var _i = 0, _a = GLTFLoader._Names; _i < _a.length; _i++) {
                     var name_5 = _a[_i];
                     var name_5 = _a[_i];
@@ -5048,6 +5256,9 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
+        /**
+         * Abstract class that can be implemented to extend existing gltf loader behavior.
+         */
         var GLTFLoaderExtension = /** @class */ (function () {
         var GLTFLoaderExtension = /** @class */ (function () {
             function GLTFLoaderExtension(loader) {
             function GLTFLoaderExtension(loader) {
                 this.enabled = true;
                 this.enabled = true;
@@ -5279,6 +5490,7 @@ var BABYLON;
 
 
 
 
 
 
+/** Module defining extensions to gltf */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;

+ 358 - 6
dist/preview release/loaders/babylonjs.loaders.module.d.ts

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

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


+ 5 - 0
dist/preview release/viewer/babylon.viewer.max.js

@@ -87638,6 +87638,9 @@ var BABYLON;
             }
             }
             else if (this._vrDeviceOrientationCamera) {
             else if (this._vrDeviceOrientationCamera) {
                 this._vrDeviceOrientationCamera.position = this._position;
                 this._vrDeviceOrientationCamera.position = this._position;
+                if (this._scene.activeCamera) {
+                    this._vrDeviceOrientationCamera.minZ = this._scene.activeCamera.minZ;
+                }
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.activeCamera = this._vrDeviceOrientationCamera;
                 this._scene.getEngine().switchFullscreen(true);
                 this._scene.getEngine().switchFullscreen(true);
                 this.updateButtonVisibility();
                 this.updateButtonVisibility();
@@ -87682,6 +87685,8 @@ var BABYLON;
             if (this._interactionsEnabled) {
             if (this._interactionsEnabled) {
                 this._scene.unregisterBeforeRender(this.beforeRender);
                 this._scene.unregisterBeforeRender(this.beforeRender);
             }
             }
+            // resize to update width and height when exiting vr exits fullscreen
+            this._scene.getEngine().resize();
         };
         };
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
         Object.defineProperty(VRExperienceHelper.prototype, "position", {
             /**
             /**