New THREE.PointLight( 0xffee88, 1, 100, 2 ), i am trying to create 10 lights , each light should have random color

Please, How to add random color to pointLight ?

for(let i=0; i<10; i++){
 const color = (Math.random()*0xFFFFFF)|0;
 const light=new THREE.PointLight(color,1,100,2);

 light.position.set(Math.random()*100, Math.random()*100, Math.random()*100);
 scene.add(light);
}
1 Like