UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

27 lines (24 loc) 902 B
'use strict'; "use strict"; function removeStructAndGroupDuplicates(vertexStructsAndGroups, fragmentStructsAndGroups) { const structNameSet = /* @__PURE__ */ new Set(); const dupeGroupKeySet = /* @__PURE__ */ new Set(); const structs = [...vertexStructsAndGroups.structs, ...fragmentStructsAndGroups.structs].filter((struct) => { if (structNameSet.has(struct.name)) { return false; } structNameSet.add(struct.name); return true; }); const groups = [...vertexStructsAndGroups.groups, ...fragmentStructsAndGroups.groups].filter((group) => { const key = `${group.name}-${group.binding}`; if (dupeGroupKeySet.has(key)) { return false; } dupeGroupKeySet.add(key); return true; }); return { structs, groups }; } exports.removeStructAndGroupDuplicates = removeStructAndGroupDuplicates; //# sourceMappingURL=removeStructAndGroupDuplicates.js.map