ソースを参照

Process shaders in gulp.

sebavan 6 年 前
コミット
c923cce9bb
1 ファイル変更12 行追加1 行削除
  1. 12 1
      Tools/Gulp/helpers/gulp-processShaders.js

+ 12 - 1
Tools/Gulp/helpers/gulp-processShaders.js

@@ -105,7 +105,18 @@ function main(isCore) {
             // Chose shader store.
             const isInclude = directory.indexOf("ShadersInclude") > -1;
             const shaderStore = isInclude ? "IncludesShadersStore" : "ShadersStore";
-            const effectLocation = isCore ? (isInclude ? "../../Materials/effect" : "../Materials/effect") : "babylonjs";
+            let effectLocation;
+            if (isCore) {
+                if (isInclude) {
+                    effectLocation = "../../Materials/effect";
+                }
+                else {
+                    effectLocation = "../Materials/effect";
+                }
+            }
+            else {
+                effectLocation = "babylonjs/Materials/effect";
+            }
 
             // Fill template in.
             let tsContent = tsShaderTemplate.replace('##EFFECTLOCATION_PLACEHOLDER##', effectLocation);