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

Function addUniformToTable

docs/app/js/sanddance-app.js:66548–66558  ·  view source on GitHub ↗
(_ref2)

Source from the content-addressed store, hash-verified

66546 };
66547}
66548function addUniformToTable(_ref2) {
66549 var table = _ref2.table, header = _ref2.header, uniforms = _ref2.uniforms, uniformName = _ref2.uniformName, undefinedOnly = _ref2.undefinedOnly;
66550 var value = uniforms[uniformName];
66551 var isDefined = isUniformDefined(value);
66552 if (!undefinedOnly || !isDefined) {
66553 var _table$uniformName;
66554 table[uniformName] = (_table$uniformName = {}, (0, _definePropertyDefault.default)(_table$uniformName, header, isDefined ? (0, _utils.formatValue)(value) : "N/A"), (0, _definePropertyDefault.default)(_table$uniformName, "Uniform Type", isDefined ? value : "NOT PROVIDED"), _table$uniformName);
66555 return true;
66556 }
66557 return false;
66558}
66559function isUniformDefined(value) {
66560 return value !== undefined && value !== null;
66561}

Callers 1

getDebugTableForUniformsFunction · 0.70

Calls 1

isUniformDefinedFunction · 0.70

Tested by

no test coverage detected