@galacean/engine-shader-compiler 2.0.0-alpha.44 → 2.0.0-alpha.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundler/cli.js CHANGED
@@ -216,10 +216,9 @@ function emitIndex(outputDir) {
216
216
  importPath: `./${rel}`
217
217
  };
218
218
  }).sort((a, b)=>a.varName.localeCompare(b.varName));
219
- const imports = entries.map((e)=>`import ${e.varName} from "${e.importPath}";`).join("\n");
220
- const exportBlock = `export {\n${entries.map((e)=>` ${e.varName}`).join(",\n")}\n};`;
221
- // prettier-ignore the export block: consumer's prettier config is unknown.
222
- const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\n${imports}\n\n// prettier-ignore\n${exportBlock}\n`;
219
+ const imports = entries.map((e)=>`import ${e.varName}Data from "${e.importPath}";`).join("\n");
220
+ const exports = entries.map((e)=>`export const ${e.varName}: IPrecompiledShader = ${e.varName}Data;`).join("\n");
221
+ const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\nimport type { IPrecompiledShader } from "@galacean/engine-design";\n${imports}\n\n${exports}\n`;
223
222
  const indexPath = path.join(outputDir, "index.ts");
224
223
  const existing = fs.existsSync(indexPath) ? fs.readFileSync(indexPath, "utf-8") : "";
225
224
  if (content !== existing) {
@@ -241,10 +241,9 @@ function emitIndex(outputDir) {
241
241
  importPath: `./${rel}`
242
242
  };
243
243
  }).sort((a, b)=>a.varName.localeCompare(b.varName));
244
- const imports = entries.map((e)=>`import ${e.varName} from "${e.importPath}";`).join("\n");
245
- const exportBlock = `export {\n${entries.map((e)=>` ${e.varName}`).join(",\n")}\n};`;
246
- // prettier-ignore the export block: consumer's prettier config is unknown.
247
- const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\n${imports}\n\n// prettier-ignore\n${exportBlock}\n`;
244
+ const imports = entries.map((e)=>`import ${e.varName}Data from "${e.importPath}";`).join("\n");
245
+ const exports = entries.map((e)=>`export const ${e.varName}: IPrecompiledShader = ${e.varName}Data;`).join("\n");
246
+ const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\nimport type { IPrecompiledShader } from "@galacean/engine-design";\n${imports}\n\n${exports}\n`;
248
247
  const indexPath = path__default["default"].join(outputDir, "index.ts");
249
248
  const existing = fs__default["default"].existsSync(indexPath) ? fs__default["default"].readFileSync(indexPath, "utf-8") : "";
250
249
  if (content !== existing) {
@@ -214,10 +214,9 @@ function emitIndex(outputDir) {
214
214
  importPath: `./${rel}`
215
215
  };
216
216
  }).sort((a, b)=>a.varName.localeCompare(b.varName));
217
- const imports = entries.map((e)=>`import ${e.varName} from "${e.importPath}";`).join("\n");
218
- const exportBlock = `export {\n${entries.map((e)=>` ${e.varName}`).join(",\n")}\n};`;
219
- // prettier-ignore the export block: consumer's prettier config is unknown.
220
- const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\n${imports}\n\n// prettier-ignore\n${exportBlock}\n`;
217
+ const imports = entries.map((e)=>`import ${e.varName}Data from "${e.importPath}";`).join("\n");
218
+ const exports = entries.map((e)=>`export const ${e.varName}: IPrecompiledShader = ${e.varName}Data;`).join("\n");
219
+ const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\nimport type { IPrecompiledShader } from "@galacean/engine-design";\n${imports}\n\n${exports}\n`;
221
220
  const indexPath = path.join(outputDir, "index.ts");
222
221
  const existing = fs.existsSync(indexPath) ? fs.readFileSync(indexPath, "utf-8") : "";
223
222
  if (content !== existing) {
@@ -229,10 +229,9 @@ function emitIndex(outputDir) {
229
229
  importPath: `./${rel}`
230
230
  };
231
231
  }).sort((a, b)=>a.varName.localeCompare(b.varName));
232
- const imports = entries.map((e)=>`import ${e.varName} from "${e.importPath}";`).join("\n");
233
- const exportBlock = `export {\n${entries.map((e)=>` ${e.varName}`).join(",\n")}\n};`;
234
- // prettier-ignore the export block: consumer's prettier config is unknown.
235
- const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\n${imports}\n\n// prettier-ignore\n${exportBlock}\n`;
232
+ const imports = entries.map((e)=>`import ${e.varName}Data from "${e.importPath}";`).join("\n");
233
+ const exports = entries.map((e)=>`export const ${e.varName}: IPrecompiledShader = ${e.varName}Data;`).join("\n");
234
+ const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\nimport type { IPrecompiledShader } from "@galacean/engine-design";\n${imports}\n\n${exports}\n`;
236
235
  const indexPath = path__default["default"].join(outputDir, "index.ts");
237
236
  const existing = fs__default["default"].existsSync(indexPath) ? fs__default["default"].readFileSync(indexPath, "utf-8") : "";
238
237
  if (content !== existing) {
package/bundler/rollup.js CHANGED
@@ -202,10 +202,9 @@ function emitIndex(outputDir) {
202
202
  importPath: `./${rel}`
203
203
  };
204
204
  }).sort((a, b)=>a.varName.localeCompare(b.varName));
205
- const imports = entries.map((e)=>`import ${e.varName} from "${e.importPath}";`).join("\n");
206
- const exportBlock = `export {\n${entries.map((e)=>` ${e.varName}`).join(",\n")}\n};`;
207
- // prettier-ignore the export block: consumer's prettier config is unknown.
208
- const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\n${imports}\n\n// prettier-ignore\n${exportBlock}\n`;
205
+ const imports = entries.map((e)=>`import ${e.varName}Data from "${e.importPath}";`).join("\n");
206
+ const exports = entries.map((e)=>`export const ${e.varName}: IPrecompiledShader = ${e.varName}Data;`).join("\n");
207
+ const content = `// Auto-generated by shader-compiler-precompile --emit-index — do not edit.\nimport type { IPrecompiledShader } from "@galacean/engine-design";\n${imports}\n\n${exports}\n`;
209
208
  const indexPath = path.join(outputDir, "index.ts");
210
209
  const existing = fs.existsSync(indexPath) ? fs.readFileSync(indexPath, "utf-8") : "";
211
210
  if (content !== existing) {
package/dist/browser.js CHANGED
@@ -8923,7 +8923,7 @@
8923
8923
  ShaderCompiler._shaderRangePool = ShaderCompilerUtils.createObjectPool(ShaderRange);
8924
8924
 
8925
8925
  //@ts-ignore
8926
- var version = "2.0.0-alpha.44";
8926
+ var version = "2.0.0-alpha.45";
8927
8927
  var mode = "Release";
8928
8928
  console.log("Galacean Engine Shader Compiler Version: " + version + " | Mode: " + mode);
8929
8929