Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -359,7 +359,7 @@ class CameraControl3D(gr.HTML):
|
|
| 359 |
const arcPoints = [];
|
| 360 |
for (let i = 0; i <= 32; i++) {
|
| 361 |
const angle = THREE.MathUtils.degToRad(-30 + (90 * i / 32));
|
| 362 |
-
arcPoints.push(new THREE.Vector3(
|
| 363 |
}
|
| 364 |
const arcCurve = new THREE.CatmullRomCurve3(arcPoints);
|
| 365 |
const elevationArc = new THREE.Mesh(
|
|
@@ -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(
|
| 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),
|
| 477 |
if (raycaster.ray.intersectPlane(plane, intersection)) {
|
| 478 |
const relY = intersection.y - CENTER.y;
|
| 479 |
const relZ = intersection.z;
|
|
|
|
| 359 |
const arcPoints = [];
|
| 360 |
for (let i = 0; i <= 32; i++) {
|
| 361 |
const angle = THREE.MathUtils.degToRad(-30 + (90 * i / 32));
|
| 362 |
+
arcPoints.push(new THREE.Vector3(-0.8, ELEVATION_RADIUS * Math.sin(angle) + CENTER.y, ELEVATION_RADIUS * Math.cos(angle)));
|
| 363 |
}
|
| 364 |
const arcCurve = new THREE.CatmullRomCurve3(arcPoints);
|
| 365 |
const elevationArc = new THREE.Mesh(
|
|
|
|
| 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;
|