0

I'm having a hard time using the R3F -postprocessing library so I decided to use raw threejs classes: By diving into the R3F extending third party library tutorials I managed to setup the renderPass and the outlinePass with typescript https://docs.pmnd.rs/react-three-fiber/tutorials/typescript

The code is in the following sandbox: https://codesandbox.io/p/sandbox/r3f-outlinepass-vdvhm8

Now I wish to add a mesh to the scene and trigger the outlinePass effect on it. I tried pushing the mesh to the selectedObjects but the Outline is not working:

const outlinePass = ViewerModel.effectComposer!
  .passes[1] as unknown as OutlinePass;
outlinePass.selectedObjects = [];
outlinePass.selectedObjects.push(mesh);

0