浏览代码

Fixed small typo

Gary Hsu 8 年之前
父节点
当前提交
0a983cf727
共有 2 个文件被更改,包括 2 次插入2 次删除
  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);