Good morning everyone,
I created a scene with three.js. I inserted the scene in an html site to keep it simple. I don’t know if it’s the best solution.
However, I would like to create a menu to change the color of the objects with a simple click. The same principle as changing the color of a shoe in a configurator.
Example, I have a blue object (obj) in the scene => if I click in the menu on the blue button, the object changes color to be displayed in blue (like another object, I created the same objects with 6 different colors)
Objects are exported by blender: obj and mtl.
My question, would it be better to create this menu in html or javascript? I don’t find any proposal or creation on the three.js website.
I don’t find any example or reference either with our friend google.
Here is an example of my three.js code:
var mtlLoader = new THREE.MTLLoader();
mtlLoader.setPath('../blender-files/');
mtlLoader.load('object1.mtl', function (materials) {
materials.preload();
var objLoader = new THREE.OBJLoader();
objLoader.setMaterials(materials);
objLoader.setPath('../blender-files/');
objLoader.load('object1.obj', function(object){
console.log(object);
scene.add(object);
RearLeft = object;
Thanks to you.