Typerscript - Can't apply postprocessing

I using this libary : https://github.com/vanruesc/postprocessing
And using typerscript for create Bloom effect but It’s not effect.
I found this solution another theads in our forum http://jsfiddle.net/br9s142o/

 initPostprocesing() {
    this.camera.layers.enable(1);
    const obj = new Mesh(
      new BoxGeometry(50, 50, 10),
      new MeshLambertMaterial({ color: 0x150505, wireframe: false }),
    );
    obj.position.z = 30;
    this.scene.add(obj);

    const objBack = new Mesh(
      new BoxGeometry(50, 50, 40),
      new MeshBasicMaterial({ color: 'blue', wireframe: false }),
    );
    objBack.position.z = 0;
    objBack.layers.enable(1);
    this.scene.add(objBack);

    const bloomEffect = new BloomEffect({
      resolutionScale: 0.5,
      distinction: 1,
    });
    bloomEffect.blendMode.opacity.value = 2.1;
    const pass = new EffectPass(this.camera, bloomEffect);

    pass.renderToScreen = true;
  
    this.composer = new EffectComposer(this.renderer);
    this.composer.setSize(window.innerWidth, window.innerHeight);
     this.composer.addPass(new RenderPass(this.scene, this.camera));
    this.composer.addPass(pass);
  }

  animate() {

    TWEEN.update();

    this.renderer.autoClear = false;
    this.renderer.clear();
    this.camera.layers.set(1);
    this.composer.render(delta);

    this.renderer.clearDepth();

    this.renderer.render(this.scene, this.camera);

    window.requestAnimationFrame(() => {
      this.animate();

  
    });
  }

Have you considered to ask a question at the project’s repository at github? If there is an issue within the mentioned post processing library, I’m not sure you will get any useful feedback in this forum…

1 Like