* Constructs a new effect. * * @param {String} name - The name of this effect. Doesn't have to be unique. * @param {String} fragmentShader - The fragment shader. This shader is required. * @param {Object} [options] - Additional options. * @param {EffectAttribute} [options.attributes=Effect
(name, fragmentShader, {
attributes = EffectAttribute.NONE,
blendFunction = BlendFunction.NORMAL,
defines = new Map(),
uniforms = new Map(),
extensions = null,
vertexShader = null
} = {})
| 40 | */ |
| 41 | |
| 42 | constructor(name, fragmentShader, { |
| 43 | attributes = EffectAttribute.NONE, |
| 44 | blendFunction = BlendFunction.NORMAL, |
| 45 | defines = new Map(), |
| 46 | uniforms = new Map(), |
| 47 | extensions = null, |
| 48 | vertexShader = null |
| 49 | } = {}) { |
| 50 | |
| 51 | super(); |
| 52 | |
| 53 | /** |
| 54 | * The name of this effect. |
| 55 | * |
| 56 | * @type {String} |
| 57 | */ |
| 58 | |
| 59 | this.name = name; |
| 60 | |
| 61 | /** |
| 62 | * The renderer. |
| 63 | * |
| 64 | * @type {WebGLRenderer} |
| 65 | * @protected |
| 66 | * @deprecated |
| 67 | */ |
| 68 | |
| 69 | this.renderer = null; |
| 70 | |
| 71 | /** |
| 72 | * The effect attributes. |
| 73 | * |
| 74 | * @type {EffectAttribute} |
| 75 | * @private |
| 76 | */ |
| 77 | |
| 78 | this.attributes = attributes; |
| 79 | |
| 80 | /** |
| 81 | * The fragment shader. |
| 82 | * |
| 83 | * @type {String} |
| 84 | * @private |
| 85 | */ |
| 86 | |
| 87 | this.fragmentShader = fragmentShader; |
| 88 | |
| 89 | /** |
| 90 | * The vertex shader. |
| 91 | * |
| 92 | * @type {String} |
| 93 | * @private |
| 94 | */ |
| 95 | |
| 96 | this.vertexShader = vertexShader; |
| 97 | |
| 98 | /** |
| 99 | * Preprocessor macro definitions. |
nothing calls this directly
no test coverage detected