@galacean/engine-shader-compiler 2.0.0-alpha.44 → 2.0.0-alpha.46
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 +3 -4
- package/bundler/precompile.cjs.js +3 -4
- package/bundler/precompile.js +3 -4
- package/bundler/rollup.cjs.js +3 -4
- package/bundler/rollup.js +3 -4
- package/dist/browser.js +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.verbose.js +1 -1
- package/dist/browser.verbose.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.verbose.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.verbose.js +1 -1
- package/package.json +4 -4
- package/types/ParserUtils.d.ts +4 -0
- package/types/ShaderCompiler.d.ts +4 -0
- package/types/ShaderInstructionEncoder.d.ts +30 -0
- package/types/codeGen/CodeGenVisitor.d.ts +38 -1
- package/types/codeGen/GLESVisitor.d.ts +33 -1
- package/types/codeGen/VisitorContext.d.ts +47 -0
- package/types/common/BaseLexer.d.ts +49 -0
- package/types/common/SymbolTable.d.ts +4 -0
- package/types/common/SymbolTableStack.d.ts +4 -0
- package/types/parser/SemanticAnalyzer.d.ts +40 -0
- package/types/parser/ShaderTargetParser.d.ts +2 -0
- package/types/sourceParser/ShaderSourceParser.d.ts +30 -1
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
|
|
221
|
-
|
|
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
|
|
246
|
-
|
|
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) {
|
package/bundler/precompile.js
CHANGED
|
@@ -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
|
|
219
|
-
|
|
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) {
|
package/bundler/rollup.cjs.js
CHANGED
|
@@ -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
|
|
234
|
-
|
|
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
|
|
207
|
-
|
|
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.
|
|
8926
|
+
var version = "2.0.0-alpha.46";
|
|
8927
8927
|
var mode = "Release";
|
|
8928
8928
|
console.log("Galacean Engine Shader Compiler Version: " + version + " | Mode: " + mode);
|
|
8929
8929
|
|