I successfully loaded a sphere mesh with Lambert material.
Now, I am trying to add a light source to the point where there is an intersection after clicking.
target
= object that was clicked.
to
= vector3 of my click.
When the dblclick event listener is triggered, this code block executes:
var newLight = new THREE.PointLight( 0x808F8F,20 );
newLight.position.set(to.x,to.y,to.z);
scene.add( newLight );
newLight.updateMatrix();
newLight.updateMatrixWorld();
target.material.needsUpdate = true;
However, despite this code, the light source is only visible when another object is added to the scene, not on the targeted object that was clicked.
How can I force the recalculation of light sources on the target object?