I've been struggling to accomplish this task. My goal is to change the color of a ConvexGeometry mesh when hovered over. So far, I can successfully change the mesh's color without any issues.
The problem arises when I attempt to create a smooth transition/interpolation effect from color A to color B. Currently, I am using tween.js but it doesn't seem to work. I'm not sure if the mesh supports material color transitions, or if there is another issue at play...any help would be greatly appreciated.
I have searched for examples of achieving this but could only find this similar approach.
Regardless, here is what I have implemented when hovering over the object:
var tween = new TWEEN.Tween(INTERSECTED.material.materials[0].color)
.to({r: 0, g: 25, b: 155}, 5000)
.easing(TWEEN.Easing.Quartic.In)
.onUpdate(function() {
INTERSECTED.material.materials[0].color.r = this.r;
INTERSECTED.material.materials[0].color.g = this.g;
INTERSECTED.material.materials[0].color.b = this.b;
}).start()