How to handle hierarchial sublayers in webgl GLB-objects?

Hi, I saved a GBL-file from Blender with layers I’d like to be able to change materials and visibility.

I imported file to blender and it made a hierachial sublayer path (runko, verhoilu). How do you handle the hierarchy in webgl? Layers like legs, supports works fine, which are also presented in the picture.

var activeOption = ‘legs’; // OK
var activeOption = ‘runko’; // Doesn’t work

2020-03-01_21h36_20 2020-03-01_21h36_20

Try loading your model in, and open the JS Console, to see a printout of what the model contains in three.js. Three.js has hierarchies pretty much like Blender. Also see, for the basic methods used to traverse that hierarchy in threejs.