If you want to explore ThreeJs path tracing there are plenty of options to search for,
Recently I've worked with the https://github.com/gkjohnson/three-gpu-pathtracer library which provide a great coding experience but also has some what less documentation for you needs ( personal experience )