| 31190 | |
| 31191 | ShaderGraph = (function() { |
| 31192 | function ShaderGraph(snippets, config) { |
| 31193 | var defaults; |
| 31194 | if (!(this instanceof ShaderGraph)) { |
| 31195 | return new ShaderGraph(snippets, config); |
| 31196 | } |
| 31197 | defaults = { |
| 31198 | globalUniforms: false, |
| 31199 | globalVaryings: true, |
| 31200 | globalAttributes: true, |
| 31201 | globals: [], |
| 31202 | autoInspect: false |
| 31203 | }; |
| 31204 | this.config = merge(defaults, config); |
| 31205 | this.fetch = cache(library(GLSL, snippets, Snippet.load)); |
| 31206 | } |
| 31207 | |
| 31208 | ShaderGraph.prototype.shader = function(config) { |
| 31209 | var _config; |