title: Update position of shadow camera in render loop
body: <p>I'm trying to set the position of my directional light shadow camera to be the same as my main perspective camera in the render loop:</p>
  
  <pre><code>sunlight = new THREE.DirectionalLight(0xffffff, 1);
  sunlight.position.x = camera.position.x ;
  sunlight.position.y = 300;
  sunlight.position.z = camera.position.z ;from top
  sunlight.castShadow = true;
  
  sunlight.shadow.mapSize.width = 2048 ;
  sunlight.shadow.mapSize.height = 2048 ;
  sunlight.shadow.bias = -0.0027;
  
  sunlight.shadow.camera.left = -75;
  sunlight.shadow.camera.right = 75;
  sunlight.shadow.camera.top = 75;
  sunlight.shadow.camera.bottom = -75;
  sunlight.shadow.camera.position = camera.position;
  
  sunlight.shadow.camera.far = sunlight.position.distanceTo(scene.position) + 20;
  sunlight.shadow.camera.near = sunlight.position.distanceTo(scene.position) - (camera.position.y * 2);
  
  sunlight.shadow.camera.updateProjectionMatrix();
  
  
  function render() {
      renderer.render(scene, camera);
  
      sunlight.shadow.camera.position = camera.position;
      sunlight.shadow.camera.updateProjectionMatrix();
  }
  </code></pre>
  
  <p>However the shadow camera does not move at all. Is it possible to update the position of a shadow camera during run-time?</p>