three-effectcomposer-es6
ES6-friendly version of THREE.EffectComposer
, which offers a quick
GLSL post-processing implementation.
Full credit goes to @alteredq for writing this, and to @hughsk for the Browserify-friendly version. The original source can be found here.
Installation
npm install three-effectcomposer-es6
Usage
{const renderer =const scene =const camera = 70 windowinnerWidth / windowinnerHeight 1 1000// When you've made your scene, create your composer and first RenderPassthiscomposer = rendererthiscomposer// Add shaders! Celebrate!// const someShaderPass = new ShaderPass(SomeShader)// this.composer.addPass(someShaderPass)// And draw to the screenconst copyPass = CopyShadercopyPassrenderToScreen = truethiscomposer}{// Instead of calling renderer.render, use// composer.render instead:thiscomposerwindow}const main =main