shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$shader$utils$createUboSyncFunction = function(global, require, module, exports) {
  var uniformParsers = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$shader$utils$uniformParsers");
  "use strict";
  exports.createUboSyncFunction = function(uboElements, parserCode, arrayGenerationFunction, singleSettersMap) {
    const funcFragments = ["\n        var v \x3d null;\n        var v2 \x3d null;\n        var t \x3d 0;\n        var index \x3d 0;\n        var name \x3d null;\n        var arrayOffset \x3d null;\n    "];
    let prev = 0;
    for (let i = 0; i < uboElements.length; i++) {
      const uboElement = uboElements[i], name = uboElement.data.name;
      var parsed = !1;
      let offset = 0;
      for (let j = 0; j < uniformParsers.uniformParsers.length; j++) {
        if (uniformParsers.uniformParsers[j].test(uboElement.data)) {
          offset = uboElement.offset / 4;
          funcFragments.push(`name = "${name}";`, `offset += ${offset - prev};`, uniformParsers.uniformParsers[j][parserCode] || uniformParsers.uniformParsers[j].ubo);
          parsed = !0;
          break;
        }
      }
      parsed || (1 < uboElement.data.size ? (offset = uboElement.offset / 4, funcFragments.push(arrayGenerationFunction(uboElement, offset - prev))) : (parsed = singleSettersMap[uboElement.data.type], offset = uboElement.offset / 4, funcFragments.push(`
                    v = uv.${name};
                    offset += ${offset - prev};
                    ${parsed};
                `)));
      prev = offset;
    }
    uboElements = funcFragments.join("\n");
    return new Function("uv", "data", "dataInt32", "offset", uboElements);
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$shader$utils$createUboSyncFunction.js.map
