How to use the EffectComposer function from three
Find comprehensive JavaScript three.EffectComposer code examples handpicked from public code repositorys.
GitHub: kentywang/Agamari
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
47
10
+ 15 other calls in file
GitHub: bengler/terrafab
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 ); } }
9
36
16
+ 35 other calls in file
GitHub: zya/apophenia
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);
2
28
3
+ 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 );
3
7
1
+ 17 other calls in file
GitHub: avocadojesus/hackaholics
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 ); }
0
3
5
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;
0
0
1
+ 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);
0
0
0
+ 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 );
0
0
0
+ 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;
0
0
2
+ 8 other calls in file
GitHub: tosh823/vl16
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 = [];
0
0
2
three.Vector3 is the most popular function in three (22341 examples)