How to use the EffectComposer function from three
Find comprehensive JavaScript three.EffectComposer code examples handpicked from public code repositorys.
GitHub: kentywang/Agamari
![kentywang profile picture](/kentywang.png?size=40)
131 132 133 134 135 136 137 138 139 140
// effect composer for post-processing (renderer goes thru this) var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat, stencilBuffer: false }; var renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, parameters ); composer = new THREE.EffectComposer( renderer, renderTarget ); composer.addPass( new THREE.RenderPass( scene, camera ) ); var vignetteShader = new THREE.ShaderPass( THREE.VignetteShader ); vignetteShader.renderToScreen = true;
+ 15 other calls in file
GitHub: bengler/terrafab
![bengler profile picture](/bengler.png?size=40)
44 45 46 47 48 49 50 51 52 53
renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera ); } else { renderer.render( THREE.EffectComposer.scene, THREE.EffectComposer.camera, writeBuffer, this.clear ); } }
+ 35 other calls in file
GitHub: zya/apophenia
![zya profile picture](/zya.png?size=40)
52 53 54 55 56 57 58 59 60
// stencilBuffer: false // }; // var renderTarget = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, parameters); var composer = new THREE.EffectComposer(renderer); composer.renderTarget1.texture.format = THREE.RGBAFormat; composer.renderTarget2.texture.format = THREE.RGBAFormat; composer.setSize(window.innerWidth * dpr, window.innerHeight * dpr);
+ 9 other calls in file
3141 3142 3143 3144 3145 3146 3147 3148 3149
//this.animate(); const renderPass = new THREE.RenderPass( this.scene, this.camera ); const composer = new THREE.EffectComposer( this.renderer ); composer.addPass( renderPass );
+ 17 other calls in file
GitHub: avocadojesus/hackaholics
![avocadojesus profile picture](/avocadojesus.png?size=40)
179 180 181 182 183 184 185 186 187 188
var renderModel = new THREE.RenderPass( scene, camera ); var effectFilm = new THREE.FilmPass( 0.35, 0.75, 2048, false ); effectFilm.renderToScreen = true; composer = new THREE.EffectComposer( renderer ); composer.addPass( renderModel ); composer.addPass( effectFilm ); }
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
} }); exports.CopyShader = THREE.CopyShader; exports.EffectComposer = THREE.EffectComposer; exports.RenderPass = THREE.RenderPass; exports.OutlinePass = THREE.OutlinePass; exports.ShaderPass = THREE.ShaderPass; exports.MaskPass = THREE.MaskPass;
+ 17 other calls in file
84 85 86 87 88 89 90 91 92 93
options.bloomStrength, options.bloomRadius, options.bloomThreshold ); const composer = new THREE.EffectComposer(renderer); composer.addPass(renderPass); composer.addPass(bloomPass); const controls = new THREE.OrbitControls(camera, canvas);
+ 2 other calls in file
671 672 673 674 675 676 677 678 679
TweenLite.to(myView.controls.object.view,0.6, {offsetX:-450,ease:Power2.easeOut,onUpdate:update }); } */ /* ------------ postprocessing -------------- */ composer = new THREE.EffectComposer( myView.renderer ); var renderPass = new THREE.RenderPass( myScene.scene, myView.camera ); composer.addPass( renderPass );
+ 2 other calls in file
32 33 34 35 36 37 38 39 40 41
this.copyPass = new THREE.ShaderPass( THREE.CopyShader ); }; Object.assign( THREE.EffectComposer.prototype, { swapBuffers: function() { var tmp = this.readBuffer;
+ 8 other calls in file
GitHub: tosh823/vl16
![tosh823 profile picture](/tosh823.png?size=40)
51 52 53 54 55 56 57 58 59 60
this.renderer = new THREE.WebGLRenderer({ canvas: this.canvas.domElement, alpha: true }); this.renderer.setSize(window.innerWidth, window.innerHeight); this.composer = new THREE.EffectComposer(this.renderer); this.viewMode = VIEW_MODE.ORBIT; // Empty all arrays this.grounds = []; this.obstacles = [];
three.Vector3 is the most popular function in three (22341 examples)