set rotation + tan change

This commit is contained in:
Matthieu BAUMANN
2022-10-29 01:42:12 +02:00
committed by Matthieu Baumann
parent 18ceda57c8
commit 4e33ea1b6b
5 changed files with 18 additions and 11 deletions

View File

@@ -4,8 +4,8 @@ DATEUPLOAD="$(date '+%Y-%m-%d')"
ssh $USER_ALADIN@aladin 'sg hips -c "mkdir -p $HOME/al-tmp && rm -rf $HOME/al-tmp/*"'
scp dist/* $USER_ALADIN@aladin:~/al-tmp
ssh $USER_ALADIN@aladin 'sg hips -c "rm -rf /home/thomas.boch/AladinLite/www/api/v3/27-10-2022 &&
mkdir -p /home/thomas.boch/AladinLite/www/api/v3/27-10-2022 &&
cp $HOME/al-tmp/* /home/thomas.boch/AladinLite/www/api/v3/27-10-2022 &&
ssh $USER_ALADIN@aladin 'sg hips -c "rm -rf /home/thomas.boch/AladinLite/www/api/v3/28-10-2022 &&
mkdir -p /home/thomas.boch/AladinLite/www/api/v3/28-10-2022 &&
cp $HOME/al-tmp/* /home/thomas.boch/AladinLite/www/api/v3/28-10-2022 &&
rm -rf /home/thomas.boch/AladinLite/www/api/v3/latest &&
ln -s /home/thomas.boch/AladinLite/www/api/v3/27-10-2022 /home/thomas.boch/AladinLite/www/api/v3/latest"'
ln -s /home/thomas.boch/AladinLite/www/api/v3/28-10-2022 /home/thomas.boch/AladinLite/www/api/v3/latest"'

View File

@@ -60,7 +60,7 @@ pub fn project_along_longitudes_and_latitudes(
}
use crate::ArcDeg;
use crate::LonLatT;
const MAX_ANGLE_BEFORE_SUBDIVISION: Angle<f64> = Angle(0.20943951023); // 12 degrees
const MAX_ANGLE_BEFORE_SUBDIVISION: Angle<f64> = Angle(0.10943951023); // 12 degrees
const MAX_ITERATION: usize = 3;
pub fn subdivide_along_longitude_and_latitudes(
vertices: &mut Vec<Vector2<f64>>,

View File

@@ -817,8 +817,8 @@ impl Projection for Gnomonic {
//if pos_clip_space.x * pos_clip_space.x + pos_clip_space.y * pos_clip_space.y >= 1.0 {
// None
//} else {
let x_2d = pos_clip_space.x * PI;
let y_2d = pos_clip_space.y * PI;
let x_2d = pos_clip_space.x;
let y_2d = pos_clip_space.y;
let r = x_2d * x_2d + y_2d * y_2d;
let z = 1.0 / (1.0 + r).sqrt();
@@ -850,8 +850,8 @@ impl Projection for Gnomonic {
fn world_to_clip_space_unchecked(&self, pos_world_space: &Vector4<f64>) -> Vector2<f64> {
let z = pos_world_space.z.abs();
Vector2::new(
(-pos_world_space.x / z) / std::f64::consts::PI,
(pos_world_space.y / z) / std::f64::consts::PI,
-pos_world_space.x / z,
pos_world_space.y / z,
)
}
}

View File

@@ -1051,6 +1051,10 @@ export let Aladin = (function () {
this.view.decreaseZoom(0.01);
};
Aladin.prototype.setRotation = function(rotation) {
this.view.setRotation(rotation);
}
// @api
// Set the current layer that is targeted
// Rightclicking for changing the cuts is done the targeted layer

View File

@@ -787,6 +787,7 @@ export let View = (function () {
var scrolling = false;
var oldTime = 0;
var newTime = 0;
var scrolling;
$(view.catalogCanvas).on('wheel', function (event) {
event.preventDefault();
event.stopPropagation();
@@ -863,8 +864,6 @@ export let View = (function () {
}, 300);
}
view.debounceProgCatOnZoom();
//view.setZoomLevel(level);
//view.refreshProgressiveCats();
return false;
});
@@ -1384,6 +1383,10 @@ export let View = (function () {
this.setZoom(new_fov);
}
View.prototype.setRotation = function(rotation) {
this.aladin.webglAPI.setRotationAroundCenter(rotation);
}
View.prototype.setGridConfig = function (gridCfg) {
this.aladin.webglAPI.setGridConfig(gridCfg);