mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 21:28:27 +02:00
Optimize Clarity Boost shader
This commit is contained in:
6
build.ts
6
build.ts
@@ -76,6 +76,12 @@ const postProcess = (str: string): string => {
|
||||
// Remove blank lines
|
||||
str = str.replaceAll(/\n([\s]*)\n/g, "\n");
|
||||
|
||||
// Minify WebGL shaders & JS strings
|
||||
// Replace "\n " with "\n"
|
||||
str = str.replaceAll(/\\n+\s*/g, '\\n');
|
||||
// Remove comment line
|
||||
str = str.replaceAll(/\\n\/\/.*?(?=\\n)/g, '');
|
||||
|
||||
assert(str.includes('/* ADDITIONAL CODE */'));
|
||||
assert(str.includes('window.BX_EXPOSED = BxExposed'));
|
||||
assert(str.includes('window.BxEvent = BxEvent'));
|
||||
|
Reference in New Issue
Block a user