I have obj loader with orbitcontrol , I do not need static lighting, so that the figure is lit as it is scrolled, and the other sides are darkened a little.
I tried this:

var ambient = new THREE.AmbientLight( 0x006400); scene.add( ambient ); var directionalLight = new THREE.DirectionalLight( 0xffeedd ); directionalLight.position.set( 5, 5, 5); scene.add( directionalLight ); 

here is one side like this the second

1 answer 1

add camera to scene scene.add(camera); , screw the light to the camera, not to the scene camera.add(directionalLight)'

jsfiddle example

  • thank! everything earned something I missed it like that - Michael
  • @MichaelBocharov please) - prisoner849
  • I have another question: I accidentally changed the encoding in the browser, everything stopped working, tried to return the encoding anyway, the figure does not display. I downloaded another browser, the problem remains How to be? - Michael
  • This question is better to ask in the section with the label browser ) Does the browser console write anything about errors or warnings? - prisoner849
  • corrected everything) and maybe you know how to make it possible to take figures from the database to take / load? - Michael