浏览代码

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",
         "intellisenseFile": "babylon.d.txt",
         "intellisenseSources": [
         "intellisenseSources": [
             "../../dist/preview release/babylon.d.ts",
             "../../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",
         "outputCustomConfigurationsDirectory": "../../dist/preview release/customConfigurations",
         "srcOutputDirectory": "../../src/",
         "srcOutputDirectory": "../../src/",

+ 1 - 1
Tools/Gulp/gulpfile.js

@@ -884,7 +884,7 @@ gulp.task("modules", ["prepare-dependency-tree"], function () {
  */
  */
 gulp.task("typedoc-generate", function () {
 gulp.task("typedoc-generate", function () {
     return gulp
     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({
         .pipe(typedoc({
             // TypeScript options (see typescript docs)
             // TypeScript options (see typescript docs)
             mode: "modules",
             mode: "modules",

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

@@ -1,3 +1,7 @@
+/**
+ * @ignoreChildren
+ * @ignore
+ */
 declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     const enum AccessorComponentType {
     const enum AccessorComponentType {
         BYTE = 5120,
         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 onCompleteObservable = new Observable<IGLTFLoader>();
         public onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
         public onExtensionLoadedObservable = new Observable<IGLTFLoaderExtension>();
 
 
+        /**
+        * State of the loader
+        */
         public state: Nullable<GLTFLoaderState> = null;
         public state: Nullable<GLTFLoaderState> = null;
 
 
         public dispose(): void {}
         public dispose(): void {}
@@ -1644,6 +1647,15 @@ module BABYLON.GLTF1 {
             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
+        */
         public importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
         public importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<{ meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[] }> {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
                 this._importMeshAsync(meshesNames, scene, data, rootUrl, (meshes, skeletons) => {
                 this._importMeshAsync(meshesNames, scene, data, rootUrl, (meshes, skeletons) => {
@@ -1687,6 +1699,14 @@ module BABYLON.GLTF1 {
             }, 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
+        */
         public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
         public loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: SceneLoaderProgressEvent) => void): Promise<void> {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
                 this._loadAsync(scene, data, rootUrl, () => {
                 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"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
+/** Module defining extensions to gltf */
 module BABYLON.GLTF2.Extensions {
 module BABYLON.GLTF2.Extensions {
     // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression
     // 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 {
     export class GLTFLoader implements IGLTFLoader {
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _gltf: ILoaderGLTF;
         public _gltf: ILoaderGLTF;
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _babylonScene: Scene;
         public _babylonScene: Scene;
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _completePromises = new Array<Promise<void>>();
         public _completePromises = new Array<Promise<void>>();
 
 
@@ -56,7 +56,7 @@ module BABYLON.GLTF2 {
         private static _Names = new Array<string>();
         private static _Names = new Array<string>();
         private static _Factories: { [name: string]: (loader: GLTFLoader) => GLTFLoaderExtension } = {};
         private static _Factories: { [name: string]: (loader: GLTFLoader) => GLTFLoaderExtension } = {};
         /**
         /**
-        * Internal, registers the loader
+        * @ignore, registers the loader
         * @param name name of the loader
         * @param name name of the loader
         * @param factory function that converts a loader to a loader extension
         * @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 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 scene the scene the meshes should be added to
         * @param data gltf data containing information of the meshes in a loaded file
         * @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
         * @param onProgress event that fires when loading progress has occured
         * @returns a promise containg the loaded meshes, particles, skeletons and animations
         * @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
         * 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 scene the scene the objects should be added to
         * @param data gltf data containing information of the meshes in a loaded file
         * @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
         * @param onProgress event that fires when loading progress has occured
         * @returns a promise which completes when objects have been loaded to the scene
         * @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> {
         public _loadSceneAsync(context: string, scene: ILoaderScene): Promise<void> {
             const promise = GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
             const promise = GLTFLoaderExtension._LoadSceneAsync(this, context, scene);
@@ -485,7 +487,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _loadNodeAsync(context: string, node: ILoaderNode): Promise<void> {
         public _loadNodeAsync(context: string, node: ILoaderNode): Promise<void> {
             const promise = GLTFLoaderExtension._LoadNodeAsync(this, context, node);
             const promise = GLTFLoaderExtension._LoadNodeAsync(this, context, node);
@@ -1093,7 +1095,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView> {
         public _loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView> {
             if (bufferView._data) {
             if (bufferView._data) {
@@ -1162,7 +1164,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer> {
         public _loadVertexBufferViewAsync(context: string, bufferView: ILoaderBufferView, kind: string): Promise<Buffer> {
             if (bufferView._babylonBuffer) {
             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> {
         public _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Promise<void> {
             const promise = GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
             const promise = GLTFLoaderExtension._LoadMaterialAsync(this, context, material, babylonMesh, babylonDrawMode, assign);
@@ -1288,7 +1290,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T {
         public _createMaterial<T extends Material>(type: MaterialConstructor<T>, name: string, drawMode: number): T {
             const babylonMaterial = new type(name, this._babylonScene);
             const babylonMaterial = new type(name, this._babylonScene);
@@ -1298,7 +1300,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
         public _loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): Promise<void> {
             const promises = new Array<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 {
         public _loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: PBRMaterial): void {
             const alphaMode = material.alphaMode || MaterialAlphaMode.OPAQUE;
             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> {
         public _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void> {
             const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index);
             const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index);
@@ -1448,7 +1450,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView> {
         public _loadUriAsync(context: string, uri: string): Promise<ArrayBufferView> {
             const promise = GLTFLoaderExtension._LoadUriAsync(this, context, uri);
             const promise = GLTFLoaderExtension._LoadUriAsync(this, context, uri);
@@ -1515,7 +1517,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T {
         public static _GetProperty<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T {
             if (!array || index == undefined || !array[index]) {
             if (!array || index == undefined || !array[index]) {
@@ -1690,7 +1692,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /**
         /**
-        * Internal
+        * @ignore
         */
         */
         public _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>) {
         public _applyExtensions<T>(actionAsync: (extension: GLTFLoaderExtension) => Nullable<Promise<T>>) {
             for (const name of GLTFLoader._Names) {
             for (const name of GLTFLoader._Names) {

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

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

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

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

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

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