浏览代码

Fix .dds file loading

noalak 7 年之前
父节点
当前提交
4380925620
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sandbox/index.js

+ 1 - 1
sandbox/index.js

@@ -155,9 +155,9 @@ if (BABYLON.Engine.isSupported()) {
     filesInput = new BABYLON.FilesInput(engine, null, sceneLoaded, null, null, null, function () { BABYLON.Tools.ClearLogCache() }, null, sceneError);
     filesInput.onProcessFileCallback = (function (file, name, extension) {
         if (extension === "dds") {
+            BABYLON.FilesInput.FilesToLoad[name] = file;
             var loadTexture = () => {
                 if (currentPluginName === "gltf") { // currentPluginName is updated only once scene is loaded
-                    BABYLON.FilesInput.FilesToLoad[name] = file;
                     var newHdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("file:" + file.correctName, currentScene);
                     if (currentSkybox) {
                         currentSkybox.dispose();