MCPcopy Index your code
hub / github.com/microsoft/SandDance / checkUniformValues

Function checkUniformValues

docs/app/js/sanddance-app.js:64869–64880  ·  view source on GitHub ↗
(uniforms, source, uniformMap)

Source from the content-addressed store, hash-verified

64867 return setter().bind(null, gl, location);
64868}
64869function checkUniformValues(uniforms, source, uniformMap) {
64870 for(var uniformName in uniforms){
64871 var value = uniforms[uniformName];
64872 var shouldCheck = !uniformMap || Boolean(uniformMap[uniformName]);
64873 if (shouldCheck && !checkUniformValue(value)) {
64874 source = source ? "".concat(source, " ") : "";
64875 console.error("".concat(source, " Bad uniform ").concat(uniformName), value);
64876 throw new Error("".concat(source, " Bad uniform ").concat(uniformName));
64877 }
64878 }
64879 return true;
64880}
64881function checkUniformValue(value) {
64882 if (Array.isArray(value) || ArrayBuffer.isView(value)) return checkUniformArray(value);
64883 if (isFinite(value)) return true;

Callers

nothing calls this directly

Calls 2

checkUniformValueFunction · 0.70
errorMethod · 0.45

Tested by

no test coverage detected