update method

dynamic update()

Implementation

update() {
  _v1.setFromMatrixPosition(light.matrixWorld);
  _v2.setFromMatrixPosition(light.target!.matrixWorld);
  _v3.subVectors(_v2, _v1);

  lightPlane.lookAt(_v2);

  if (color != null) {
    lightPlane.material.color.set(color);
    targetLine.material.color.set(color);
  } else {
    lightPlane.material.color.copy(light.color);
    targetLine.material.color.copy(light.color);
  }

  targetLine.lookAt(_v2);
  targetLine.scale.z = _v3.length();
}