* @param {String} src - Shader string * @param {Object} map - Variables/Constants associated with shader
(src, map)
| 1459 | * @param {Object} map - Variables/Constants associated with shader |
| 1460 | */ |
| 1461 | replaceArtifacts(src, map) { |
| 1462 | return src.replace(/[ ]*__([A-Z]+[0-9]*([_]?[A-Z]*[0-9]?)*)__;\n/g, (match, artifact) => { |
| 1463 | if (map.hasOwnProperty(artifact)) { |
| 1464 | return map[artifact]; |
| 1465 | } |
| 1466 | throw `unhandled artifact ${artifact}`; |
| 1467 | }); |
| 1468 | } |
| 1469 | |
| 1470 | /** |
| 1471 | * @desc Get the fragment shader String. |
no outgoing calls
no test coverage detected