Collection of post process module for three.js
npm install https://github.com/MasatoMakino/threejs-postprocess.git --save-dev
threejs-postprocess is composed of ES6 modules and TypeScript d.ts files.
At first, import classes,
import {
PostProcessRenderer,
ChromaticAberrationShaderPass,
} from "threejs-postprocess";
const postProcessRender = new PostProcessRenderer(scene, camera, renderer);
const pass = new ChromaticAberrationShaderPass();
postProcessRender.addComposer([pass]);
addComposer
function create PostProcessEffectComposer
and add it into effect rendering pass.
RAFTicker.on("tick", postProcessRender.render);