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

Method constructor

src/passes/EffectPass.js:252–321  ·  view source on GitHub ↗

* Constructs a new effect pass. * * @param {Camera} camera - The main camera. * @param {...Effect} effects - The effects that will be rendered by this pass.

(camera, ...effects)

Source from the content-addressed store, hash-verified

250 */
251
252 constructor(camera, ...effects) {
253
254 super("EffectPass");
255
256 this.fullscreenMaterial = new EffectMaterial(null, null, null, camera);
257
258 /**
259 * An event listener that forwards events to {@link handleEvent}.
260 *
261 * @type {EventListener}
262 * @private
263 */
264
265 this.listener = (event) => this.handleEvent(event);
266
267 /**
268 * The effects.
269 *
270 * Use `updateMaterial` or `recompile` after changing the effects and consider calling `dispose` to free resources
271 * of unused effects.
272 *
273 * @type {Effect[]}
274 * @private
275 */
276
277 this.effects = [];
278 this.setEffects(effects);
279
280 /**
281 * Indicates whether this pass should skip rendering.
282 *
283 * Effects will still be updated, even if this flag is true.
284 *
285 * @type {Boolean}
286 * @private
287 */
288
289 this.skipRendering = false;
290
291 /**
292 * A time offset.
293 *
294 * Elapsed time will start at this value.
295 *
296 * @type {Number}
297 * @deprecated
298 */
299
300 this.minTime = 1.0;
301
302 /**
303 * The maximum time.
304 *
305 * If the elapsed time exceeds this value, it will be reset.
306 *
307 * @type {Number}
308 * @deprecated
309 */

Callers

nothing calls this directly

Calls 2

handleEventMethod · 0.95
setEffectsMethod · 0.95

Tested by

no test coverage detected