Skip to content

Commit 9069795

Browse files
Update 3d-color_adjust.js
Update the material index for color adjustment in 3D model viewer for refactored 3D models
1 parent a40a864 commit 9069795

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/javascript/3d-color_adjust.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ for (const iteration of modelViewer) {
66
iteration.addEventListener('load', () => {
77
const material = iteration.model.materials;
88
// material[material.length-1].pbrMetallicRoughness.setBaseColorFactor([224/255, 49/255, 29/255]); //SparkFun Red: #E0311D
9-
material[material.length-1].pbrMetallicRoughness.setBaseColorFactor([224/255, 0, 0]); // #E00000
10-
material[material.length-1].pbrMetallicRoughness.setMetallicFactor(.8);
11-
material[material.length-1].pbrMetallicRoughness.setRoughnessFactor(.7);
9+
material[material.length-2].pbrMetallicRoughness.setBaseColorFactor([224/255, 0, 0]); // #E00000
10+
material[material.length-2].pbrMetallicRoughness.setMetallicFactor(.8);
11+
material[material.length-2].pbrMetallicRoughness.setRoughnessFactor(.7);
1212
});
1313
};

0 commit comments

Comments
 (0)