MCPcopy Create free account
hub / github.com/microsoft/SandDance / normalizeHookFunctions

Function normalizeHookFunctions

docs/app/js/sanddance-app.js:68104–68123  ·  view source on GitHub ↗
(hookFunctions)

Source from the content-addressed store, hash-verified

68102 return result;
68103}
68104function normalizeHookFunctions(hookFunctions) {
68105 var result = {
68106 vs: {},
68107 fs: {}
68108 };
68109 hookFunctions.forEach(function(hook) {
68110 var opts;
68111 if (typeof hook !== "string") {
68112 opts = hook;
68113 hook = opts.hook;
68114 } else opts = {};
68115 hook = hook.trim();
68116 var _hook$split = hook.split(":"), _hook$split2 = (0, _slicedToArrayDefault.default)(_hook$split, 2), stage = _hook$split2[0], signature = _hook$split2[1];
68117 var name = hook.replace(/\(.+/, "");
68118 result[stage][name] = Object.assign(opts, {
68119 signature: signature
68120 });
68121 });
68122 return result;
68123}
68124
68125},{"@babel/runtime/helpers/esm/slicedToArray":"cLnqM","@babel/runtime/helpers/esm/defineProperty":"5Xk1p","./constants":"6S5Zn","./resolve-modules":"9go4t","./platform-defines":"gww34","./inject-shader":"flvCl","./transpile-shader":"5VETd","../utils":"lnuIG","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"6S5Zn":[function(require,module,exports) {
68126var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers 1

assembleShaderFunction · 0.70

Calls 2

replaceMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected