I am attempting to modify the fill of an SVG path that is located within a fabric.js canvas.
https://i.sstatic.net/047kl.png
Here is the function I am using:
function changeColor(material) {
console.log(svgGroup[0].fill)
console.log(material);
if (material == 'base') {
svgGroup[0].fill = '#000000';
console.log(svgGroup[0].fill)
}
texture.needsUpdate = true;
object.children[0].material = textureMaterial;
canvas.renderAll();
}
However, the changes are not being applied automatically.
https://i.sstatic.net/WNdE1.png
Does anyone have any insights on why this might be happening? Any input would be appreciated.