MCPcopy Create free account
hub / github.com/pmndrs/postprocessing / Effect

Class Effect

types/index.d.ts:4026–4306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4024 * @implements {Disposable}
4025 */
4026export class Effect
4027 extends EventDispatcher<BaseEventMap>
4028 implements Initializable, Resizable, Disposable {
4029
4030 /**
4031 * Constructs a new effect.
4032 *
4033 * @param {String} name - The name of this effect. Doesn't have to be unique.
4034 * @param {String} fragmentShader - The fragment shader. This shader is required.
4035 * @param {Object} [options] - Additional options.
4036 * @param {EffectAttribute} [options.attributes=EffectAttribute.NONE] - The effect attributes that determine the execution priority and resource requirements.
4037 * @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect.
4038 * @param {Map<String, String>} [options.defines] - Custom preprocessor macro definitions. Keys are names and values are code.
4039 * @param {Map<String, Uniform>} [options.uniforms] - Custom shader uniforms. Keys are names and values are uniforms.
4040 * @param {Set<WebGLExtension>} [options.extensions] - WebGL extensions.
4041 * @param {String} [options.vertexShader=null] - The vertex shader. Most effects don't need one.
4042 */
4043 constructor(
4044 name: string,
4045 fragmentShader: string,
4046 {
4047 attributes,
4048 blendFunction,
4049 defines,
4050 uniforms,
4051 extensions,
4052 vertexShader
4053 }?: {
4054 attributes?: EffectAttribute;
4055 blendFunction?: BlendFunction;
4056 defines?: Map<string, string>;
4057 uniforms?: Map<string, Uniform>;
4058 extensions?: Set<WebGLExtension>;
4059 vertexShader?: string;
4060 }
4061 );
4062
4063 /**
4064 * The name of this effect.
4065 *
4066 * @type {String}
4067 */
4068 name: string;
4069 /**
4070 * The renderer.
4071 *
4072 * @type {WebGLRenderer}
4073 * @protected
4074 * @deprecated
4075 */
4076 protected renderer: WebGLRenderer;
4077 /**
4078 * Preprocessor macro definitions.
4079 *
4080 * Call {@link Effect.setChanged} after changing macro definitions.
4081 *
4082 * @type {Map<String, String>}
4083 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…