Files
il/resources/public/js/cljs-runtime/module$node_modules$pixi_DOT_js$lib$rendering$high_shader$compiler$utils$compileInputs.js
2026-07-01 22:38:29 -06:00

25 lines
958 B
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$high_shader$compiler$utils$compileInputs = function(global, require, module, exports) {
function extractInputs(fragmentSource, out) {
let match;
const regex = /@in\s+([^;]+);/g;
for (; null !== (match = regex.exec(fragmentSource));) {
out.push(match[1]);
}
}
exports.compileInputs = function(fragments, template, sort = !1) {
const results = [];
extractInputs(template, results);
fragments.forEach(fragment => {
fragment.header && extractInputs(fragment.header, results);
});
sort && results.sort();
fragments = results.map((inValue, i) => ` @location(${i}) ${inValue},`).join("\n");
template = template.replace(/@in\s+[^;]+;\s*/g, "");
return template = template.replace("{{in}}", `
${fragments}
`);
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$high_shader$compiler$utils$compileInputs.js.map