I want to build a configurator with the viewer-API where a user can toggle different colors / materials on the model through buttons. So I went through your experiments https://github.com/sketchfab/experiments. There are two relevant examples: The “watch-configurator” and the “material-showcase”.
If I understand correctly, the watch-configurator works by having multiple nodes with different materials in the same position that you can toggle on and off. This approach is not suitable for me as I do not want to upload all possible combinations (too many configuration options) into one model.
The “material-showcase” is quite hard to understand for me. I see from the code that when clicking a button the iframe url is changed in place with different query params that relate to materials.  Is this documented anywhere? I cant find the connection between the query params and the viewer-API.
I have a test-model uploaded with 5 different material versions of the model (so it is like the watch-configurator). I can log the nodes and different materials, but I cannot find any relation between the nodes and the materials from the JSON-Objects.
 How are materials and nodes related in the API?
 How do I assign a material to a specific node?
 Is it possible to upload just one object and different materials into one model and then just assign the materials to the object (without adjusting opacity on the materials)?
Thanks in advance,