瀏覽代碼

Merge pull request #4106 from TrevorDev/moreGLTFDocs

add to gulp doc validation, add missing docs it complained about
sebavan 7 年之前
父節點
當前提交
40228917c9

+ 3 - 1
Tools/Gulp/config.json

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

+ 1 - 1
Tools/Gulp/gulpfile.js

@@ -884,7 +884,7 @@ gulp.task("modules", ["prepare-dependency-tree"], function () {
  */
 gulp.task("typedoc-generate", function () {
     return gulp
-        .src(["../../dist/preview release/babylon.d.ts"])
+        .src(["../../dist/preview release/babylon.d.ts", "../../dist/preview release/loaders/babylon.glTF2FileLoader.d.ts", "../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"])
         .pipe(typedoc({
             // TypeScript options (see typescript docs)
             mode: "modules",

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

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

+ 20 - 0
loaders/src/glTF/1.0/babylon.glTFLoader.ts

@@ -1576,6 +1576,9 @@ module BABYLON.GLTF1 {
         public onCompleteObservable = new Observable<IGLTFLoader>();
         public onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
 
+        /**
+        * State of the loader
+        */
         public state: Nullable<GLTFLoaderState> = null;
 
         public dispose(): void {}
@@ -1644,6 +1647,15 @@ module BABYLON.GLTF1 {
             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
+        */
         public importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
             return new Promise((resolve, reject) => {
                 this._importMeshAsync(meshesNames, scene, data, rootUrl, (meshes, skeletons) => {
@@ -1687,6 +1699,14 @@ module BABYLON.GLTF1 {
             }, 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
+        */
         public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return new Promise((resolve, reject) => {
                 this._loadAsync(scene, data, rootUrl, () => {

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

@@ -1,5 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
+/** Module defining extensions to gltf */
 module BABYLON.GLTF2.Extensions {
     // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression
 

+ 18 - 16
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -31,15 +31,15 @@ module BABYLON.GLTF2 {
     */
     export class GLTFLoader implements IGLTFLoader {
         /**
-        * Internal
+        * @ignore
         */
         public _gltf: ILoaderGLTF;
         /**
-        * Internal
+        * @ignore
         */
         public _babylonScene: Scene;
         /**
-        * Internal
+        * @ignore
         */
         public _completePromises = new Array<Promise<void>>();
 
@@ -56,7 +56,7 @@ module BABYLON.GLTF2 {
         private static _Names = new Array<string>();
         private static _Factories: { [name: string]: (loader: GLTFLoader) => GLTFLoaderExtension } = {};
         /**
-        * Internal, registers the loader
+        * @ignore, registers the loader
         * @param name name of the loader
         * @param factory function that converts a loader to a loader extension
         */
@@ -146,6 +146,7 @@ module BABYLON.GLTF2 {
         * @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
         */
@@ -189,6 +190,7 @@ module BABYLON.GLTF2 {
         * Imports all objects from a loaded gltf file and adds them to the scene
         * @param scene the scene the objects should be added to
         * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
         * @param onProgress event that fires when loading progress has occured
         * @returns a promise which completes when objects have been loaded to the scene
         */
@@ -372,7 +374,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void> {
             const promise = GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
@@ -485,7 +487,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadNodeAsync(context: string, node: ILoaderNode): Promise<void> {
             const promise = GLTFLoaderExtension._LoadNodeAsync(this, context, node);
@@ -1093,7 +1095,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView> {
             if (bufferView._data) {
@@ -1162,7 +1164,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer> {
             if (bufferView._babylonBuffer) {
@@ -1251,7 +1253,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void> {
             const promise = GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
@@ -1288,7 +1290,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T {
             const babylonMaterial = new type(name, this._babylonScene);
@@ -1298,7 +1300,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<Promise<void>>();
@@ -1342,7 +1344,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void {
             const alphaMode = material.alphaMode || MaterialAlphaMode.OPAQUE;
@@ -1374,7 +1376,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void> {
             const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index);
@@ -1448,7 +1450,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView> {
             const promise = GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -1515,7 +1517,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T {
             if (!array || index == undefined || !array[index]) {
@@ -1690,7 +1692,7 @@ module BABYLON.GLTF2 {
         }
 
         /**
-        * Internal
+        * @ignore
         */
         public _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>) {
             for (const name of GLTFLoader._Names) {

+ 3 - 0
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts

@@ -1,6 +1,9 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GLTF2 {
+    /**
+     * Abstract class that can be implemented to extend existing gltf loader behavior.
+     */
     export abstract class GLTFLoaderExtension implements IGLTFLoaderExtension, IDisposable {
         public enabled = true;
         public abstract readonly name: string;

+ 60 - 0
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -1,25 +1,43 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/babylon.glTF2Interface.d.ts"/>
 
+/**
+ * GLTF2 module for babylon
+ */
 module BABYLON.GLTF2 {
+    /**
+     * Interface to access data and vertex buffer associated with a file
+     */
     export interface ILoaderAccessor extends IAccessor, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonVertexBuffer?: Promise<VertexBuffer>;
     }
 
+    /**
+     * Loader's animation channel
+     */
     export interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
     }
 
+    /**
+     * Container for animation keyframe data
+     */
     export interface ILoaderAnimationSamplerData {
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
     }
 
+    /**
+     * Keyframe data
+     */
     export interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
         _data: Promise<ILoaderAnimationSamplerData>;
     }
 
+    /**
+     * Loader animation
+     */
     export interface ILoaderAnimation extends IAnimation, IArrayItem {
         channels: ILoaderAnimationChannel[];
         samplers: ILoaderAnimationSampler[];
@@ -27,22 +45,37 @@ module BABYLON.GLTF2 {
         _babylonAnimationGroup?: AnimationGroup;
     }
 
+    /**
+     * Loader buffer
+     */
     export interface ILoaderBuffer extends IBuffer, IArrayItem {
         _data?: Promise<ArrayBufferView>;
     }
 
+    /**
+     * Loader's buffer data
+     */
     export interface ILoaderBufferView extends IBufferView, IArrayItem {
         _data?: Promise<ArrayBufferView>;
         _babylonBuffer?: Promise<Buffer>;
     }
 
+    /**
+     * Loader's loaded camera data
+     */
     export interface ILoaderCamera extends ICamera, IArrayItem {
     }
 
+    /**
+     * Loaded image specified by url
+     */
     export interface ILoaderImage extends IImage, IArrayItem {
         _objectURL?: Promise<string>;
     }
 
+    /**
+     * Loaded material data
+     */
     export interface ILoaderMaterial extends IMaterial, IArrayItem {
         _babylonData?: {
             [drawMode: number]: {
@@ -53,13 +86,22 @@ module BABYLON.GLTF2 {
         };
     }
 
+    /**
+     * Loader mesh data
+     */
     export interface ILoaderMesh extends IMesh, IArrayItem {
         primitives: ILoaderMeshPrimitive[];
     }
 
+    /**
+     * Loader mesh data
+     */
     export interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
     }
 
+    /**
+     * Node for traversing loader data
+     */
     export interface ILoaderNode extends INode, IArrayItem {
         _parent: ILoaderNode;
         _babylonMesh?: Mesh;
@@ -68,6 +110,9 @@ module BABYLON.GLTF2 {
         _numMorphTargets?: number;
     }
 
+    /**
+     * Sampler data
+     */
     export interface ILoaderSamplerData {
         noMipMaps: boolean;
         samplingMode: number;
@@ -75,21 +120,36 @@ module BABYLON.GLTF2 {
         wrapV: number;
     }
 
+    /**
+     * Sampler data
+     */
     export interface ILoaderSampler extends ISampler, IArrayItem {
         _data?: ILoaderSamplerData;
     }
 
+    /**
+     * Loader's scene
+     */
     export interface ILoaderScene extends IScene, IArrayItem {
     }
 
+    /**
+     * Loader's skeleton data
+     */
     export interface ILoaderSkin extends ISkin, IArrayItem {
         _babylonSkeleton?: Skeleton;
         _loaded?: Promise<void>;
     }
 
+    /**
+     * Loader's texture
+     */
     export interface ILoaderTexture extends ITexture, IArrayItem {
     }
 
+    /**
+     * Loaded GLTF data
+     */
     export interface ILoaderGLTF extends IGLTF {
         accessors?: ILoaderAccessor[];
         animations?: ILoaderAnimation[];

+ 3 - 1
loaders/src/glTF/2.0/babylon.glTFLoaderUtilities.ts

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

+ 148 - 8
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -1,6 +1,9 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON {
+    /**
+    * Coordinate system mode that will be used when loading from the gltf file
+    */
     export enum GLTFLoaderCoordinateSystemMode {
         /**
          * Automatically convert the glTF right-handed data to the appropriate system based on the current coordinate system mode of the scene.
@@ -13,6 +16,9 @@ module BABYLON {
         FORCE_RIGHT_HANDED,
     }
 
+    /**
+    * Animation mode that determines which animations should be started when a file is loaded
+    */
     export enum GLTFLoaderAnimationStartMode {
         /**
          * No animation will start.
@@ -30,11 +36,23 @@ module BABYLON {
         ALL,
     }
 
+    /**
+    * Loaded gltf data
+    */
     export interface IGLTFLoaderData {
+        /**
+        * Loaded json string converted to an object
+        */
         json: Object;
+        /**
+        * Loaded ArrayBufferView
+        */
         bin: Nullable<ArrayBufferView>;
     }
 
+    /**
+    * Gltf extension interface
+    */
     export interface IGLTFLoaderExtension {
         /**
          * The name of this extension.
@@ -47,6 +65,9 @@ module BABYLON {
         enabled: boolean;
     }
 
+    /**
+    * Loading state
+    */
     export enum GLTFLoaderState {
         /**
          * The asset is loading.
@@ -64,28 +85,75 @@ module BABYLON {
         COMPLETE
     }
 
+    /**
+    * GLTF loader interface
+    */
     export interface IGLTFLoader extends IDisposable {
+        /**
+        * Coordinate system that will be used when loading from the gltf file
+        */
         coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
+        /**
+        * Animation mode that determines which animations should be started when a file is loaded
+        */
         animationStartMode: GLTFLoaderAnimationStartMode;
+        /**
+        * If the materials in the file should automatically be compiled
+        */
         compileMaterials: boolean;
+        /**
+        * If a clip plane should be usede when loading meshes in the file
+        */
         useClipPlane: boolean;
+        /**
+        * If shadow generators should automatically be compiled
+        */
         compileShadowGenerators: boolean;
 
+        /**
+        * Observable that fires each time a mesh is loaded
+        */
         onMeshLoadedObservable: Observable<AbstractMesh>;
+        /**
+        * Observable that fires each time a texture is loaded
+        */
         onTextureLoadedObservable: Observable<BaseTexture>;
+         /**
+        * Observable that fires each time a material is loaded
+        */
         onMaterialLoadedObservable: Observable<Material>;
+        /**
+        * Observable that fires when the load has completed
+        */
         onCompleteObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fires when the loader is disposed
+        */
         onDisposeObservable: Observable<IGLTFLoader>;
+        /**
+        * Observable that fire when an extension is loaded
+        */
         onExtensionLoadedObservable: Observable<IGLTFLoaderExtension>;
 
+        /**
+        * Loader state
+        */
         state: Nullable<GLTFLoaderState>;
 
+        /**
+        * Imports one or more meshes from a loaded gltf file and adds them to the scene
+        */
         importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }>;
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        */
         loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void) => Promise<void>;
     }
-
+    /** File loader to load gltf files into a babylon scene */
     export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
+        /** Creates a gltf 1.0 file loader */
         public static CreateGLTFLoaderV1: () => IGLTFLoader;
+        /** Creates a gltf 2.0 file loader */
         public static CreateGLTFLoaderV2: () => IGLTFLoader;
 
         // #region Common options
@@ -98,6 +166,7 @@ module BABYLON {
         public onParsedObservable = new Observable<IGLTFLoaderData>();
 
         private _onParsedObserver: Nullable<Observer<IGLTFLoaderData>>;
+        /** Raised when the asset has been parsed. */
         public set onParsed(callback: (loaderData: IGLTFLoaderData) => void) {
             if (this._onParsedObserver) {
                 this.onParsedObservable.remove(this._onParsedObserver);
@@ -108,9 +177,14 @@ module BABYLON {
         // #endregion
 
         // #region V1 options
-
+        /**
+         * Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
+         */
         public static IncrementalLoading = true;
 
+        /**
+         * Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates
+         */
         public static HomogeneousCoordinates = false;
 
         // #endregion
@@ -118,27 +192,32 @@ module BABYLON {
         // #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.
          */
         public 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.
+        */
         public 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.
          */
         public 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.
          */
         public 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.
          */
         public compileShadowGenerators = false;
 
@@ -148,6 +227,9 @@ module BABYLON {
         public readonly onMeshLoadedObservable = new Observable<AbstractMesh>();
 
         private _onMeshLoadedObserver: Nullable<Observer<AbstractMesh>>;
+        /**
+         * Raised when the loader creates a mesh after parsing the glTF properties of the mesh. (onMeshLoadedObservable is likely desired instead.)
+         */
         public set onMeshLoaded(callback: (mesh: AbstractMesh) => void) {
             if (this._onMeshLoadedObserver) {
                 this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver);
@@ -161,6 +243,9 @@ module BABYLON {
         public readonly onTextureLoadedObservable = new Observable<BaseTexture>();
 
         private _onTextureLoadedObserver: Nullable<Observer<BaseTexture>>;
+        /**
+         * Method called when a texture has been loaded (onTextureLoadedObservable is likely desired instead.)
+         */
         public set onTextureLoaded(callback: (texture: BaseTexture) => void) {
             if (this._onTextureLoadedObserver) {
                 this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver);
@@ -174,6 +259,9 @@ module BABYLON {
         public readonly onMaterialLoadedObservable = new Observable<Material>();
 
         private _onMaterialLoadedObserver: Nullable<Observer<Material>>;
+        /**
+         * Method when the loader creates a material after parsing the glTF properties of the material. (onMaterialLoadedObservable is likely desired instead.)
+         */
         public set onMaterialLoaded(callback: (material: Material) => void) {
             if (this._onMaterialLoadedObserver) {
                 this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver);
@@ -189,6 +277,9 @@ module BABYLON {
         public readonly onCompleteObservable = new Observable<GLTFFileLoader>();
 
         private _onCompleteObserver: Nullable<Observer<GLTFFileLoader>>;
+        /**
+         * Raised when the asset is completely loaded, immediately before the loader is disposed. (onCompleteObservable is likely desired instead.)
+         */
         public set onComplete(callback: () => void) {
             if (this._onCompleteObserver) {
                 this.onCompleteObservable.remove(this._onCompleteObserver);
@@ -202,6 +293,9 @@ module BABYLON {
         public readonly onDisposeObservable = new Observable<GLTFFileLoader>();
 
         private _onDisposeObserver: Nullable<Observer<GLTFFileLoader>>;
+        /**
+         * Raised after the loader is disposed. (onDisposeObservable is likely desired instead.)
+         */
         public set onDispose(callback: () => void) {
             if (this._onDisposeObserver) {
                 this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -216,6 +310,9 @@ module BABYLON {
         public readonly onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
 
         private _onExtensionLoadedObserver: Nullable<Observer<IGLTFLoaderExtension>>;
+        /**
+         * Raised after a loader extension is created. (onExtensionLoadedObservable is likely desired instead.)
+         */
         public set onExtensionLoaded(callback: (extension: IGLTFLoaderExtension) => void) {
             if (this._onExtensionLoadedObserver) {
                 this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver);
@@ -246,8 +343,14 @@ module BABYLON {
 
         private _loader: Nullable<IGLTFLoader> = null;
 
+        /**
+         * Name of the loader ("gltf")
+         */
         public name = "gltf";
 
+        /**
+         * Supported file extensions of the loader (.gltf, .glb)
+         */
         public extensions: ISceneLoaderPluginExtensions = {
             ".gltf": { isBinary: false },
             ".glb": { isBinary: true }
@@ -270,6 +373,15 @@ module BABYLON {
             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
+        */
         public importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
             return Promise.resolve().then(() => {
                 const loaderData = this._parse(data);
@@ -278,6 +390,14 @@ module BABYLON {
             });
         }
 
+        /**
+        * Imports all objects from a loaded gltf file and adds them to the scene
+        * @param scene the scene the objects should be added to
+        * @param data gltf data containing information of the meshes in a loaded file
+        * @param rootUrl root url to load from
+        * @param onProgress event that fires when loading progress has occured
+        * @returns a promise which completes when objects have been loaded to the scene
+        */
         public loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return Promise.resolve().then(() => {
                 const loaderData = this._parse(data);
@@ -286,6 +406,14 @@ module BABYLON {
             });
         }
 
+        /**
+         * 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
+         */
         public loadAssetContainerAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<AssetContainer> {
             return Promise.resolve().then(() => {
                 const loaderData = this._parse(data);
@@ -302,12 +430,24 @@ module BABYLON {
             });
         }
 
+        /**
+         * If the data string can be loaded directly
+         * @param data string contianing the file data
+         * @returns if the data can be loaded directly
+         */
         public canDirectLoad(data: string): boolean {
             return ((data.indexOf("scene") !== -1) && (data.indexOf("node") !== -1));
         }
 
+        /**
+         * Rewrites a url by combining a root url and response url
+         */
         public rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
 
+        /**
+         * Instantiates a gltf file loader plugin
+         * @returns the created plugin
+         */
         public createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync {
             return new GLTFFileLoader();
         }