UNPKG

wgsl-plus

Version:

A WGSL preprocessor, prettifier, minifier, obfuscator, and compiler with C-style macros, conditional compilation, file linking, and multi-format output for WebGPU shaders.

13 lines (11 loc) 271 B
let index = 0; /** * Generates a simple obfuscated name based on an index. * @returns An obfuscated name (e.g., "_0"). */ export default function nextName(): string { return `_${(index++).toString(36)}`; } export function resetNameIndex(){ index = 0; }