Przeglądaj źródła

Minor updates to comments for glTF loader

Gary Hsu 7 lat temu
rodzic
commit
1994b90f5f

+ 1 - 1
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -1,7 +1,7 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 module BABYLON.GLTF2.Extensions {
-    // https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod
+    // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod
 
     const NAME = "MSFT_lod";
 

+ 18 - 7
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -48,9 +48,20 @@ module BABYLON {
     }
 
     export enum GLTFLoaderState {
-        Loading,
-        Ready,
-        Complete
+        /**
+         * The asset is loading.
+         */
+        LOADING,
+
+        /**
+         * The asset is ready for rendering.
+         */
+        READY,
+
+        /**
+         * The asset is completely loaded.
+         */
+        COMPLETE
     }
 
     export interface IGLTFLoader extends IDisposable {
@@ -173,7 +184,7 @@ module BABYLON {
         /**
          * Raised when the asset is completely loaded, immediately before the loader is disposed.
          * For assets with LODs, raised when all of the LODs are complete.
-         * For assets without LODs, raised when the model is complete, immediately after onSuccess.
+         * For assets without LODs, raised when the model is complete, immediately after the loader resolves the returned promise.
          */
         public readonly onCompleteObservable = new Observable<GLTFFileLoader>();
 
@@ -186,7 +197,7 @@ module BABYLON {
         }
 
         /**
-        * Raised when the loader is disposed.
+        * Raised after the loader is disposed.
         */
         public readonly onDisposeObservable = new Observable<GLTFFileLoader>();
 
@@ -213,7 +224,7 @@ module BABYLON {
         }
 
         /**
-         * Gets a promise that resolves when the asset is completely loaded.
+         * Returns a promise that resolves when the asset is completely loaded.
          * @returns A promise that resolves when the asset is completely loaded.
          */
         public whenCompleteAsync(): Promise<void> {
@@ -225,7 +236,7 @@ module BABYLON {
         }
 
         /**
-         * The loader state or null if not active.
+         * The loader state (LOADING, READY, COMPLETE) or null if the loader is not active.
          */
         public get loaderState(): Nullable<GLTFLoaderState> {
             return this._loader ? this._loader.state : null;