Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(name, options = {}) {
const fragmentShader = readFileSync(resolve(__dirname, '../../glsl/' + name + '.glsl')).toString();
options.blendFunction = options.blendFunction || POSTPROCESSING.BlendFunction.NORMAL;
super(name, fragmentShader, options);
}
}
focus: 90.0,
focalLength: 190,
luminanceThreshold: 0.325,
luminanceGain: 2.0,
bias: -0.35,
fringe: 0.7,
maxBlur: 50,
rings: 5,
samples: 5,
showFocus: false,
manualDoF: false,
pentagon: true
});
const bloomEffect = new post_pss.BloomEffect({
blendFunction: post_pss.BlendFunction.ADD,
resolutionScale: 0.5,
distinction: 4.0
});
bloomEffect.blendMode.opacity.value = 2.1;
var bokeh = new post_pss.EffectPass(options.camera, bokehEffect, bloomEffect);
composer.bokeh = bokeh;
composer.addPass(bokeh);
bokeh.renderToScreen = true;
window.bokeh = bokeh;
}
return composer;
}