optimisations

This commit is contained in:
2025-07-15 00:52:00 +02:00
parent 3eeafc1277
commit 2cee4084c0
11 changed files with 2067 additions and 722 deletions

View File

@ -3,6 +3,7 @@ import {
STORAGE_KEYS,
PERFORMANCE,
DEFAULTS,
FORMAT,
ValueMode,
} from './utils/constants';
@ -146,12 +147,12 @@ export class Storage {
}
private static generateId(): string {
return Date.now().toString(36) + Math.random().toString(36).substr(2);
return Date.now().toString(FORMAT.ID_RADIX) + Math.random().toString(FORMAT.ID_RADIX).substr(FORMAT.ID_SUBSTRING_START);
}
static exportShaders(): string {
const shaders = this.getShaders();
return JSON.stringify(shaders, null, 2);
return JSON.stringify(shaders, null, FORMAT.JSON_INDENT);
}
static importShaders(jsonData: string): boolean {