I'm completely stumped trying to troubleshoot the issue with these two mysterious .js files in my project. Despite the lack of documentation, I have implemented the EffectComposer and BloomPass and attempted to call them like this:
parameters = { bloomStrength: 1.3, bloomFactor: 1.0,}
var renderPass = new THREE.RenderPass(scene, camera);
var copyPass = new THREE.ShaderPass(THREE.CopyShader);
copyPass.renderToScreen = true;
composer = new THREE.EffectComposer ( renderer );
composer.addPass(renderPass);
composer.addPass(copyPass);
var effectBloom = new THREE.BloomPass ( 3, 25, 5, 256);
composer.addPass(effectBloom);
While BloomPass.js is throwing an error on its own (not in my code) stating "Uncaught TypeError: Cannot read property 'prototype' of undefined at BloomPass.js:76". Line 76 of BloomPass.js is as follows:
THREE.BloomPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
I suspect this is causing the error in the EffectComposer at the
composer.addPass(effectBloom);
line:
Uncaught TypeError: pass.setSize is not a function at THREE.EffectComposer.addPass
pass.setSize( size.width, size.height );
Any insight into what I might be doing incorrectly? I've followed examples closely, so any assistance would be greatly appreciated!