javascript - Rotating light source with camera + OrbitControls.js -
i've set scene in three.js orbitcontrols.js allow rotation , panning. lighting set-up follow camera, ensuring object in scene illuminated. (right can rotate "dark side" of object).
i've tried solve problem making each lite kid of camera:
scene.add(light); camera.add(light); however, produce desired effect. other way can think of solving problem keeping track of camera's alter in spherical coordinates , making lights match changes (but undesirable myriad of reasons).
i'm relatively new three.js i'm hoping there easy solution i'm unfamiliar with. thanks!
if want lite follow camera, can utilize pointlight next pattern:
scene.add( photographic camera ); camera.add( lite ); three.js r.67
javascript 3d three.js
No comments:
Post a Comment