0

Why are the lights not showing up in this code?

In this code, I have tried to create a scene with 45 lights and one sphere. I am seeing the sphere but not the lights. The console shows no errors but still, it isn't working. Any ideas on how can I make it work? https://code.sololearn.com/WY82yf2QA8u4/#html

13th Apr 2020, 9:49 AM
Jalaj Kumar
Jalaj Kumar - avatar
2 odpowiedzi
+ 1
This as follows works. Thus the point definition has to be examined. for(var i = 0; i< 45; i++){ var light = new THREE.Mesh( new THREE.SphereBufferGeometry( 1, 1, 1 ) , new THREE.MeshBasicMaterial( { color: 0xff00ff } ) ) ; light.position.set(i*8, 50, 50); this.scene.add( light ); }
13th Apr 2020, 10:22 AM
JaScript
JaScript - avatar
+ 1
Ja Play Yeah, thats what I was saying. Why are the point lights not showing up, when the spheres do?
13th Apr 2020, 5:18 PM
Jalaj Kumar
Jalaj Kumar - avatar