How to use the BokehPass function from three

Find comprehensive JavaScript three.BokehPass code examples handpicked from public code repositorys.

88
89
90
91
92
93
94
95
96
97

var copyShader = new THREE.ShaderPass(THREE.CopyShader);
copyShader.renderToScreen = true;
composer.addPass(copyShader);

// var bokehPass = new THREE.BokehPass(scene, camera, {
//   focus: 1.0,
//   aperture: 0.1,
//   maxblur: 3.0,
//   width: window.innerWidth,
fork icon2
star icon28
watch icon3

+ 9 other calls in file

3195
3196
3197
3198
3199
3200
3201
3202
3203
    
}

if(this.model.get('dof')){
    console.log("dof active");
    const bokehPass = new THREE.BokehPass( this.scene,this.camera, {
        focus: this.model.get('focus'),
        aperture:this.model.get('aperture') ,
        maxblur: this.model.get('max_blur'),
fork icon3
star icon7
watch icon1

+ 17 other calls in file

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)