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

Function getHookFunctions

docs/app/js/sanddance-app.js:68069–68103  ·  view source on GitHub ↗
(hookFunctions, hookInjections)

Source from the content-addressed store, hash-verified

68067 return sourceText;
68068}
68069function getHookFunctions(hookFunctions, hookInjections) {
68070 var result = "";
68071 for(var hookName in hookFunctions){
68072 var hookFunction = hookFunctions[hookName];
68073 result += "void ".concat(hookFunction.signature, " {\n");
68074 if (hookFunction.header) result += " ".concat(hookFunction.header);
68075 if (hookInjections[hookName]) {
68076 var injections = hookInjections[hookName];
68077 injections.sort(function(a, b) {
68078 return a.order - b.order;
68079 });
68080 var _iteratorNormalCompletion3 = true;
68081 var _didIteratorError3 = false;
68082 var _iteratorError3 = undefined;
68083 try {
68084 for(var _iterator3 = injections[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true){
68085 var injection = _step3.value;
68086 result += " ".concat(injection.injection, "\n");
68087 }
68088 } catch (err) {
68089 _didIteratorError3 = true;
68090 _iteratorError3 = err;
68091 } finally{
68092 try {
68093 if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) _iterator3["return"]();
68094 } finally{
68095 if (_didIteratorError3) throw _iteratorError3;
68096 }
68097 }
68098 }
68099 if (hookFunction.footer) result += " ".concat(hookFunction.footer);
68100 result += "}\n";
68101 }
68102 return result;
68103}
68104function normalizeHookFunctions(hookFunctions) {
68105 var result = {
68106 vs: {},

Callers 1

assembleShaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected