UNPKG

@thi.ng/shader-ast

Version:

DSL to define shader code in TypeScript and cross-compile to GLSL, JS and other targets

8 lines (7 loc) 165 B
let symID = 0; const resetSymID = (id = 0) => symID = id; const gensym = (prefix = "_s") => `${prefix}${(symID++).toString(36)}`; export { gensym, resetSymID };