Hi, my name is Giuliano and this is the first question of my life on this website :)
I have generated in a canvas a CircleBufferGeometry rendered as a #fff wireframe on a #000 black background; the rendering is stable and the scene is without errors.
Now i'm trying to select just one of the rendered wireframe lines and change its color. My final goal is to create a circle with 60 vertex lines (lines that goes from the center to the edge of the object) and every second alternate the color of just 1 line as a simulation of a clock hand.
This is the code i now have visible on my work in progress website:
var material = new THREE.MeshBasicMaterial(
{ color: 0xfefefe, wireframe: true, opacity: 0.5 } );
init();
function addMesh() {
if ( mesh !== undefined ) {
scene.remove( mesh );
geometry.dispose();
}
geometry = geometries[ options.Geometry ];
geometry.computeBoundingSphere();
var scaleFactor = 1160 / geometry.boundingSphere.radius;
geometry.scale( scaleFactor, scaleFactor, scaleFactor );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
}
The ideal solution would be a jQuery selector (or whatever selector) that allows me to target the line i want among an array of lines and use an increasing value to cycle through them.
I thought I could use an inwards vertex normal helper (colored in red) to simulate the effect but i lack in knowledge and really don't know how to apply some ideas yet... I just started experimenting in Three.js :)
Every help is appreciated, sorry for my yet shallow understanding of basic mechanics. Giuliano