Browse Source

Fixed small typo

Gary Hsu 8 years ago
parent
commit
0a983cf727
2 changed files with 2 additions and 2 deletions
  1. 1 1
      loaders/glTF/babylon.glTFFileLoader.js
  2. 1 1
      loaders/glTF/babylon.glTFFileLoader.ts

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

@@ -1151,7 +1151,7 @@ var BABYLON;
             }
             var source = gltfRuntime.images[texture.source];
             if (BABYLON.GLTFUtils.IsBase64(source.uri)) {
-                setTimeout(onSuccess(new Uint8Array(BABYLON.GLTFUtils.DecodeBase64(source.uri))));
+                setTimeout(function () { return onSuccess(new Uint8Array(BABYLON.GLTFUtils.DecodeBase64(source.uri))); });
             }
             else {
                 BABYLON.Tools.LoadFile(gltfRuntime.rootUrl + source.uri, function (data) { return onSuccess(new Uint8Array(data)); }, null, null, true, onError);

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

@@ -1297,7 +1297,7 @@
             var source: IGLTFImage = gltfRuntime.images[texture.source];
 
             if (GLTFUtils.IsBase64(source.uri)) {
-                setTimeout(onSuccess(new Uint8Array(GLTFUtils.DecodeBase64(source.uri))));
+                setTimeout(() => onSuccess(new Uint8Array(GLTFUtils.DecodeBase64(source.uri))));
             }
             else {
                 Tools.LoadFile(gltfRuntime.rootUrl + source.uri, data => onSuccess(new Uint8Array(data)), null, null, true, onError);