MasatoMakino / threejs-postprocess

Collection of post process module for three.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

threejs-postprocess

Collection of post process module for three.js

MIT License

ReadMe Card

Demo

Demo pages

Getting Started

Install

npm install https://github.com/MasatoMakino/threejs-postprocess.git --save-dev

Import

threejs-postprocess is composed of ES6 modules and TypeScript d.ts files.

At first, import classes,

import {
  PostProcessRenderer,
  ChromaticAberrationShaderPass,
} from "threejs-postprocess";

create PostProcessRenderer instance

const postProcessRender = new PostProcessRenderer(scene, camera, renderer);

create Pass instance

const pass = new ChromaticAberrationShaderPass();

add Pass array to PostProcessRenderer

postProcessRender.addComposer([pass]);

addComposer function create PostProcessEffectComposer and add it into effect rendering pass.

render

RAFTicker.on("tick", postProcessRender.render);

API documents

API documents

License

MIT licensed.

About

Collection of post process module for three.js

License:MIT License


Languages

Language:JavaScript 63.6%Language:TypeScript 36.4%