three.js assigning different colors (gradients) to each vertex in a geometry
问题 I am trying to modify the following lines of code so when the button is clicked the neighborhood vertex of the selected mesh gets colored in a gradient effect. function addSphere() { var position = new Array(); var notAboveGround = true; while(notAboveGround){ position[0]=Math.random()*floorSide-floorSide/2; position[1]=Math.random()*floorSide-floorSide/2; position[2]=Math.random()*floorSide/5; var sphereSide = Math.random()*floorSide/12+floorSide/50; //alert("cubeSide="+cubeSide); if