Collection of post process module for three.js
npm i -D @masatomakino/threejs-postprocess
threejs-postprocess is composed of ES6 modules and TypeScript d.ts files.
At first, import classes,
import {
PostProcessRenderer,
ChromaticAberrationShaderPass,
} from "@masatomakino/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);