multimodalart HF Staff commited on
Commit
ce45334
·
verified ·
1 Parent(s): 6010572

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -400,7 +400,7 @@ class CameraControl3D(gr.HTML):
400
  cameraGroup.lookAt(CENTER);
401
 
402
  azimuthHandle.position.set(AZIMUTH_RADIUS * Math.sin(azRad), 0.05, AZIMUTH_RADIUS * Math.cos(azRad));
403
- elevationHandle.position.set(0, ELEVATION_RADIUS * Math.sin(elRad) + CENTER.y, ELEVATION_RADIUS * Math.cos(elRad));
404
 
405
  const orangeDist = distance + 0.5;
406
  distanceHandle.position.set(
@@ -473,7 +473,7 @@ class CameraControl3D(gr.HTML):
473
  if (azimuthAngle < 0) azimuthAngle += 360;
474
  }
475
  } else if (dragTarget.userData.type === 'elevation') {
476
- const plane = new THREE.Plane(new THREE.Vector3(1, 0, 0), 0);
477
  if (raycaster.ray.intersectPlane(plane, intersection)) {
478
  const relY = intersection.y - CENTER.y;
479
  const relZ = intersection.z;
 
400
  cameraGroup.lookAt(CENTER);
401
 
402
  azimuthHandle.position.set(AZIMUTH_RADIUS * Math.sin(azRad), 0.05, AZIMUTH_RADIUS * Math.cos(azRad));
403
+ elevationHandle.position.set(-0.8, ELEVATION_RADIUS * Math.sin(elRad) + CENTER.y, ELEVATION_RADIUS * Math.cos(elRad));
404
 
405
  const orangeDist = distance + 0.5;
406
  distanceHandle.position.set(
 
473
  if (azimuthAngle < 0) azimuthAngle += 360;
474
  }
475
  } else if (dragTarget.userData.type === 'elevation') {
476
+ const plane = new THREE.Plane(new THREE.Vector3(1, 0, 0), -0.8);
477
  if (raycaster.ray.intersectPlane(plane, intersection)) {
478
  const relY = intersection.y - CENTER.y;
479
  const relZ = intersection.z;