Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcriet0727 authored Jul 31, 2024
1 parent b2c7529 commit d8e9a8c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,7 @@ function addOrbitControls() {
controls.dampingFactor = 0.05;

controls.enablePan = false;
controls.enableZoom = true;
//setInfo('相机拖动启用');
controls.enableZoom = true;

// allowing control of the distance can result in the view being no longer
// centred on the origin, so don't allow it
Expand Down Expand Up @@ -906,14 +905,14 @@ function changePosition() {
controlRadiusStart = controlradius;//new
sizeRadiusStart = sizeradius;
if (cameraPosition === 'outside lookalike sphere') {
controlRadiusTarget = 2.0; // 设置为外部值
sizeRadiusTarget = 0.07; // 设置为外部值
controlRadiusTarget = 2.0;
sizeRadiusTarget = 0.07;
} else {
controlRadiusTarget = 0.2; // 设置为内部值
sizeRadiusTarget = 0.005; // 设置为内部值
controlRadiusTarget = 0.2;
sizeRadiusTarget = 0.005;
}
radiusAnimationStartTime = Date.now();
radiusAnimationTargetTime = radiusAnimationStartTime + 2000; // 2秒动画时间
radiusAnimationTargetTime = radiusAnimationStartTime + 2000;
radiusAnimation = true;
}

Expand Down

0 comments on commit d8e9a8c

Please sign in to comment.