@openglobus/og 0.11.8 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,14 +112,14 @@ class Sun extends Control {
112
112
  var n = cam.eye.normal(),
113
113
  u = cam.getForward();
114
114
 
115
- u.scale(Math.sign(cam._v.dot(n))); // up
115
+ u.scale(Math.sign(cam._u.dot(n))); // up
116
116
 
117
117
  if (cam.slope > 0.99) {
118
- u = cam._v;
118
+ u = cam._u;
119
119
  }
120
120
 
121
121
  var tu = Vec3.proj_b_to_plane(u, n, u).normalize().scale(this.offsetVertical);
122
- var tr = Vec3.proj_b_to_plane(cam._u, n, cam._u)
122
+ var tr = Vec3.proj_b_to_plane(cam._r, n, cam._r)
123
123
  .normalize()
124
124
  .scale(this.offsetHorizontal); // right
125
125
  var d = tu.add(tr);