Преглед на файлове

Minor tweak to naming and comments

Gary Hsu преди 9 години
родител
ревизия
c89b2d65b3
променени са 2 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 4 4
      loaders/glTF/babylon.glTFFileLoader.js
  2. 4 4
      loaders/glTF/babylon.glTFFileLoader.ts

+ 4 - 4
loaders/glTF/babylon.glTFFileLoader.js

@@ -896,9 +896,9 @@ var BABYLON;
         }
     };
     /**
-    * Buffers loaded, create nodes
+    * do stuff after buffers, shaders are loaded (e.g. hook up materials, load animations, etc.)
     */
-    var onBuffersLoaded = function (gltfRuntime) {
+    var postLoad = function (gltfRuntime) {
         // Nodes
         var currentScene = gltfRuntime.currentScene;
         for (var i = 0; i < currentScene.nodes.length; i++) {
@@ -1381,7 +1381,7 @@ var BABYLON;
                 _this._loadBuffersAsync(gltfRuntime, function () {
                     _this._loadShadersAsync(gltfRuntime, function () {
                         importMaterials(gltfRuntime);
-                        onBuffersLoaded(gltfRuntime);
+                        postLoad(gltfRuntime);
                     });
                 });
                 if (onSuccess) {
@@ -1403,7 +1403,7 @@ var BABYLON;
                 _this._loadBuffersAsync(gltfRuntime, function () {
                     _this._loadShadersAsync(gltfRuntime, function () {
                         importMaterials(gltfRuntime);
-                        onBuffersLoaded(gltfRuntime);
+                        postLoad(gltfRuntime);
                     });
                 });
                 onSuccess();

+ 4 - 4
loaders/glTF/babylon.glTFFileLoader.ts

@@ -987,9 +987,9 @@
     };
 
     /**
-    * Buffers loaded, create nodes
+    * do stuff after buffers, shaders are loaded (e.g. hook up materials, load animations, etc.)
     */
-    var onBuffersLoaded = (gltfRuntime: IGLTFRuntime) => {
+    var postLoad = (gltfRuntime: IGLTFRuntime) => {
         // Nodes
         var currentScene: IGLTFScene = <IGLTFScene>gltfRuntime.currentScene;
 
@@ -1584,7 +1584,7 @@
                 this._loadBuffersAsync(gltfRuntime, () => {
                     this._loadShadersAsync(gltfRuntime, () => {
                         importMaterials(gltfRuntime);
-                        onBuffersLoaded(gltfRuntime);
+                        postLoad(gltfRuntime);
                     });
                 });
 
@@ -1610,7 +1610,7 @@
                 this._loadBuffersAsync(gltfRuntime, () => {
                     this._loadShadersAsync(gltfRuntime, () => {
                         importMaterials(gltfRuntime);
-                        onBuffersLoaded(gltfRuntime);
+                        postLoad(gltfRuntime);
                     });
                 });