JSPM

postprocessing

6.3.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 154623
  • Score
    100M100P100Q156016F
  • License Zlib

A post processing library that provides the means to implement image filter effects for three.js.

Package Exports

  • postprocessing

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postprocessing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Post Processing

Build status npm version Peer dependencies CDN

A post processing library that provides the means to implement image filter effects for three.js.

Extensive Demo · Sandbox · API Reference · Wiki

Installation

This library requires the peer dependency three.

npm install three postprocessing

Usage

Please refer to the usage example of three.js for information about how to setup the renderer, scene and camera.

import { Clock, PerspectiveCamera, Scene, WebGLRenderer } from "three";
import { BloomEffect, EffectComposer, EffectPass, RenderPass } from "postprocessing";

const composer = new EffectComposer(new WebGLRenderer());
const camera = new PerspectiveCamera();
const scene = new Scene();

const effectPass = new EffectPass(camera, new BloomEffect());
effectPass.renderToScreen = true;

composer.addPass(new RenderPass(scene, camera));
composer.addPass(effectPass);

const clock = new Clock();

(function render() {

    requestAnimationFrame(render);
    composer.render(clock.getDelta());

}());

Performance

This library provides an EffectPass which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own blend function.

Performance Test

Included Effects

Custom Effects

If you want to learn how to create custom effects or passes, please check the Wiki.

Contributing

Please refer to the contribution guidelines for details.

License

This library is licensed under the Zlib license.

The original code that this library is based on, was written by mrdoob and the three.js contributors and is licensed under the MIT license.

The noise and scanline effects incorporate code written by Georg Steinrohder and Pat Shearon which was released under the Creative Commons Attribution 3.0 License.