Importing a Collada model with multiple materials

The scene has multiple objects and each object has multiple materials.

However, Three.js only renders each object with only one of its materials for the entire object.

I’m using three-collada-loader from npm. How could I import scenes with objects that have multiple materials please?

I was having this trouble today. I experimented a bit, exporting the Collada from Blender different ways.

Here is an example … I included screenshots of the Collada export options in Blender, next to the results. https://hgility.com/viewer2/pill.htm I hope this helps?

I did not do anything special in Three.js. I only used the simple example at https://threejs.org/examples/webgl_loader_collada.html I only modified it to load two models instead of one.

@Hyacinth thank you. It turns out that the ColladaLoader on npm is out of date. When I included the file that you linked to it worked.