Changing color of one material will cause other objects to change

I am new to this library and I am trying to use raycaster to change the hovered cube color, but all other cubes also change their color. I also logged it out and it shows that have different material uuid
index.html (4.1 KB)

Try it like so: Edit fiddle - JSFiddle - Code Playground

The problematic line was:

intersects[i].object.material.color = 0xffffff

It should be:

intersects[i].object.material.color.set( 0xff0000 );