Demo
When you click on the scene’s model and use setGeometry, nothing happens. Is there something wrong with the way I use it?
- To use the geometry’s
colors
attribute you need to set the material’svertexColors
property:
const material = new MeshBasicMaterial({ vertexColors: true });
- The initial geometry has no
color
attribute, you need initiate it then update it:
// const box = new BoxGeometry(3, 3, 3);
// To
const box = updateGeometryColor(new BoxGeometry(3, 3, 3), 0x00ff00);
Here is the jsfiddle
Thanks for your reply, the example works fine