@cocorof/graphier 1.3.2 → 1.3.3

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.
package/dist/index.cjs CHANGED
@@ -2002,7 +2002,9 @@ function createOrbitUpdate(camera, controls, keys) {
2002
2002
  radius = Math.max(controls.minDistance, Math.min(controls.maxDistance, radius));
2003
2003
  }
2004
2004
  if (azimuth !== 0) {
2005
- _q.setFromAxisAngle(camera.up, -azimuth);
2005
+ const upDot = camera.up.dot(_worldUp);
2006
+ const azSign = upDot < 0 ? -1 : 1;
2007
+ _q.setFromAxisAngle(camera.up, -azimuth * azSign);
2006
2008
  _offset.applyQuaternion(_q);
2007
2009
  }
2008
2010
  if (polar !== 0) {