Compare commits
23 Commits
3.6.2
...
flip-longi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
945672a846 | ||
|
|
645bab7cd9 | ||
|
|
62f9e61978 | ||
|
|
addbd555c1 | ||
|
|
db70a6b9cd | ||
|
|
258781d078 | ||
|
|
7418ed822d | ||
|
|
ba728c23c7 | ||
|
|
89f760c1db | ||
|
|
c5d0875265 | ||
|
|
4a8d3bfa65 | ||
|
|
bde5a37b51 | ||
|
|
fbdc7e2e76 | ||
|
|
312b9844d1 | ||
|
|
0e740454bd | ||
|
|
18e98e9f5f | ||
|
|
c938a58cbc | ||
|
|
4a5d66768c | ||
|
|
239ae2ce74 | ||
|
|
9bf898c104 | ||
|
|
6f085429f5 | ||
|
|
b49c763e07 | ||
|
|
fcacda0c19 |
191
CHANGELOG.md
@@ -1,38 +1,113 @@
|
||||
# Changelogs
|
||||
|
||||
## unreleased
|
||||
## Unreleased
|
||||
|
||||
* [fix] request a redraw after adding an array of footprints [PR #218]
|
||||
### What's Changed
|
||||
|
||||
## 3.5.1-beta
|
||||
* [perf] perform CPU computations with Vec3 and Matrix3 and not 4 dimensions matrices/vectors
|
||||
* [feat] lockNorthUp Aladin object new option locking the north pole up to the view center
|
||||
|
||||
## Released
|
||||
|
||||
### 3.6.3
|
||||
|
||||
#### What's Changed
|
||||
|
||||
* [maint] remove Shift shorcut for triggering rectangular source selection. Shortcuts will be implemented later. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
* [fix] decide to show the contextual menu only if user has not right click while moving more than 10px. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
* [fix] CSS selector took the whole div in smartphone usage. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
* [fix] smartphone 2 fingers zoom pinching around the 180deg meridian. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
* [fix] use copy2Clipboard utils functions from contextual menu. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
* [fix] improved ID/HiPS url detection (retry if a relative path to a local HiPS is given as it is considered as an ID). by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
|
||||
|
||||
### 3.6.1
|
||||
|
||||
#### What's Changed
|
||||
* [feat] AVM tags support found in jpeg headers by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/178>
|
||||
* [feat] Merge remove overlay by name to Develop by [@Xen0Xys][Xen0Xys] in <https://github.com/cds-astro/aladin-lite/pull/182>
|
||||
* [fix] Restore A.footprint function by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/183>
|
||||
* [testing] Merge playwright tests to Develop by [@Xen0Xys][Xen0Xys] in <https://github.com/cds-astro/aladin-lite/pull/176>
|
||||
* [fix] Version 3.5.1 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/180>
|
||||
* [fix] Also add style sheet in shadow dom context by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/194>
|
||||
* [feat] Add selectionColor, onClick to catalog parameters handled by updateShape by [@simontorres][simontorres] in <https://github.com/cds-astro/aladin-lite/pull/198>
|
||||
* [feat] HiPS cube support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/204>
|
||||
* [feat] PolySelect implementation and miscellaneous selection improvements by [@pmatsson][pmatsson] in <https://github.com/cds-astro/aladin-lite/pull/195>
|
||||
* [fix] Request a redraw after adding an array of footprints by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/218>
|
||||
* [fix] Circle opacity not working by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/222>
|
||||
* [fix] Bug introduced in #218 by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/223>
|
||||
* [fix] CSS style for canvas element is more selective by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/224>
|
||||
* [maint] Add zenodo.json file by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/226>
|
||||
* [maint] Remove old files using jquery by [@cquiroz][cquiroz] in <https://github.com/cds-astro/aladin-lite/pull/231>
|
||||
* [fix] Display of HiPS with maxOrder = 0 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/236>
|
||||
* [fix] Combine requestedOptions and Aladin.DEFAULT_OPTIONS with spread operator by [@pcuste1][pcuste1] in <https://github.com/cds-astro/aladin-lite/pull/237>
|
||||
* [fix] Add back cmap reverse checkbox by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/238>
|
||||
* [fix] JPEG draw black screen when tiles are missing by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/246>
|
||||
* [fix] Filled moc drawing reverse longitude by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/250>
|
||||
* [doc] Deprecate longitudeReversed HiPS options property by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/251>
|
||||
* [fix] Stop contextmenu event propagation only if context menu enabled by [@alexgoff][alexgoff] in <https://github.com/cds-astro/aladin-lite/pull/259>
|
||||
* [ui] Minor fixes and enhancements by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/256>
|
||||
* [fix] Handle NaNs by the GPU (fix for windows) by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/254>
|
||||
* [fix] Grid labels formatting by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/261>
|
||||
* [feat] Shape function given to a catalog by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/262>
|
||||
* [fix] Tooltip pos out of fov by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/263>
|
||||
* [fix] MOC settings after its creation by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/265>
|
||||
* [fix] ICRS to FK5J2000 cooframe renaming by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/264>
|
||||
* [fix] Revert #264 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/268>
|
||||
|
||||
#### New Contributors
|
||||
* [@cquiroz][cquiroz] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/231>
|
||||
* [@pcuste1][pcuste1] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/237>
|
||||
* [@alexgoff][alexgoff] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/259>
|
||||
|
||||
**Full Changelog**: <https://github.com/cds-astro/aladin-lite/compare/3.4.5...3.6.1>
|
||||
|
||||
### 3.6.1-beta
|
||||
|
||||
#### What's Changed
|
||||
* [feat] Add selectionColor, onClick to catalog parameters handled by updateShape by [@simontorres][simontorres] in <https://github.com/cds-astro/aladin-lite/pull/198>
|
||||
* [feat] HiPS cube support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/204>
|
||||
* [feat] PolySelect implementation and miscellaneous selection improvements by [@pmatsson][pmatsson] in <https://github.com/cds-astro/aladin-lite/pull/195>
|
||||
* [fix] Request a redraw after adding an array of footprints by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/218>
|
||||
* [fix] Circle opacity not working by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/222>
|
||||
* [fix] Bug introduced in #218 by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/223>
|
||||
* [fix] CSS style for canvas element is more selective by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/224>
|
||||
* [maint] add zenodo.json file by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/226>
|
||||
* [maint] Remove old files using jquery by [@cquiroz][cquiroz] in <https://github.com/cds-astro/aladin-lite/pull/231>
|
||||
|
||||
#### New Contributors
|
||||
* [@cquiroz][cquiroz] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/231>
|
||||
|
||||
**Full Changelog**: <https://github.com/cds-astro/aladin-lite/compare/3.5.1-beta...3.6.1-beta>
|
||||
|
||||
### 3.5.1-beta
|
||||
|
||||
* [feat] Add support for name removing in `removeOverlay` method
|
||||
* [test] Add support of playwright. Instructions in the readme for running the test matching snapshots [PR #176]
|
||||
* [fix] Order of overlays in the stack now matches the addMOC/addCatalog/addOverlay calls ordering
|
||||
* [doc] Expose the API of Coo class
|
||||
* [fix] Insert aladin css inside the aladin lite so that it should be compliant with the use of shadow DOMs [cds-astro/ipyaladin#113], [marimo-team/marimo#2106]
|
||||
* [feat] Add possibility of giving a local JS FileList to load a locally-stored HiPS without starting an HTTP server [cds-astro/aladin-lite#103]
|
||||
* [feat] Add possibility of giving a local JS FileList to load a locally-stored HiPS without starting an HTTP server <https://github.com/cds-astro/aladin-lite/pull/103>
|
||||
* [fix] removeOverlayByName
|
||||
|
||||
## 3.5.0-beta
|
||||
### 3.5.0-beta
|
||||
|
||||
* [enhancement] add `options.colnames` to A.catalogFromVizieR to tell VizieR we want absolutely want to retrieve specific columns
|
||||
* [feat] provide a new drawAxes option to A.ellipse. This is useful for plotting error ellipsis.
|
||||
|
||||
## 3.4.5-beta
|
||||
### 3.4.5-beta
|
||||
|
||||
* [feat] add `layerChanged` event when a layer is added or removed
|
||||
* [deprecate] of `select` event, use `objectsSelected` event instead
|
||||
* [ui] add the ability to switch the tile format to download
|
||||
|
||||
## 3.4.3-beta
|
||||
### 3.4.3-beta
|
||||
|
||||
* [bugfix] zoom control buttons
|
||||
* [feat] save a MOC as a JSON file from the UI <https://github.com/cds-astro/aladin-lite/issues/154>
|
||||
* [feat] save a source selection from the measurement table as a CSV file
|
||||
* [feat] allow to display jpeg/jpg images with a wcs passed as a JS dictionary: <https://github.com/cds-astro/aladin-lite/issues/173>
|
||||
|
||||
## 3.4.2-beta
|
||||
### 3.4.2-beta
|
||||
|
||||
* [impr] Improve smartphone support by setting media queries + a better logic for deploying the contextual menu sub options.
|
||||
* [impr] Improve `WCS` view export with 3rd euler rotation encoding: <https://github.com/cds-astro/aladin-lite/issues/170>. Still some cases are to be handled like: crval on the equator or cylindrical with a galactic frame rotation.
|
||||
@@ -40,21 +115,21 @@
|
||||
* [feat] Add new method `Aladin#getViewImageBuffer` to get the current view as a PNG buffer
|
||||
* [feat] New line rasterizer using GL instancing. This enhances the rendering speed of MOCs.
|
||||
|
||||
## 3.3.3
|
||||
### 3.3.3
|
||||
|
||||
* [feat] UI: add HiPS basic filter that filters the `hipsList` given
|
||||
* [feat] New `hipsList` option parameter when instancing a new Aladin object.
|
||||
* [feat] Zoom smoothing using hermite cubic interpolation functions
|
||||
* [feat] shape option of Catalog and ProgressiveCat accepts a function returning a Footprint. This allow user to
|
||||
associate a footprint to a specific source
|
||||
* [feat] Hover color support by @pmatsson and @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/145>
|
||||
* [feat] Hover color support by [@pmatsson][pmatsson] and [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/145>
|
||||
|
||||
## 3.3.2
|
||||
### 3.3.2
|
||||
|
||||
* [fixed] do not allow to query the properties several times for an imageHiPS
|
||||
* [fixed] Detecting raytracing rendering mode. Adapt the rendering mode in function of the fov value and the projection used. Some projections do have more distortions with wide FoVs so it is better to use the raytracing rendering mode when fov >= smaller FoV threshold.
|
||||
|
||||
## 3.3.0
|
||||
### 3.3.0
|
||||
|
||||
* [fixed] multiple calls to setImageSurvey with the same survey object led to strange behaviour.
|
||||
* [perf] Display the first tile received instantly with no blending. Should enhance the slow reported in issue #88.
|
||||
@@ -75,61 +150,61 @@
|
||||
* [fixed] The parameters `gridColor` and `gridOpacity`, `gridOptions.showLabels` now work as expected
|
||||
* New documentation API (W.I.P) here: <https://cds-astro.github.io/aladin-lite/>
|
||||
* New release page here: <https://aladin.cds.unistra.fr/AladinLite/doc/release/>
|
||||
* A major UI update by @bmatthieu3
|
||||
* A major UI update by [@bmatthieu3][bmatthieu3]
|
||||
1. Some API new classes A.box, A.button
|
||||
2. A status bar where the user can enque messages for a specific amount of time (Aladin.addStatusBarMessage)
|
||||
* Remove of JQuery and autocompletejs dependencies by @bmatthieu3
|
||||
* Fix some performances issues, i.e. a bug when resizing the aladin lite view and which launched several parallel requestAnimationFrame by @bmatthieu3
|
||||
* Remove of JQuery and autocompletejs dependencies by [@bmatthieu3][bmatthieu3]
|
||||
* Fix some performances issues, i.e. a bug when resizing the aladin lite view and which launched several parallel requestAnimationFrame by [@bmatthieu3][bmatthieu3]
|
||||
* Polygon and circular selection (see Aladin class API documentation for how to use it)
|
||||
* ObsCore and Datalink votable parsing and interpretation. This work is still in progress and made in the frame of the SKA radio mission by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/116>
|
||||
* SODA service query window formular by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/116>
|
||||
* read only catalog option by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/117>
|
||||
* Small changed regarding drawing a footprint by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/118>
|
||||
* Object and footprint click/hover events expose mouse coordinates by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/121>
|
||||
* A proposal of a new feature - fill the polygon with a color by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/122>
|
||||
* update getViewWCS to adapt to projection by @ManonMarchand in <https://github.com/cds-astro/aladin-lite/pull/119>
|
||||
* New SAMP support by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/128>
|
||||
* A possibility to create Coo and Footprint objects by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/130>
|
||||
* ObsCore and Datalink votable parsing and interpretation. This work is still in progress and made in the frame of the SKA radio mission by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/116>
|
||||
* SODA service query window formular by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/116>
|
||||
* read only catalog option by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/117>
|
||||
* Small changed regarding drawing a footprint by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/118>
|
||||
* Object and footprint click/hover events expose mouse coordinates by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/121>
|
||||
* A proposal of a new feature - fill the polygon with a color by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/122>
|
||||
* update getViewWCS to adapt to projection by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/119>
|
||||
* New SAMP support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/128>
|
||||
* A possibility to create Coo and Footprint objects by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/130>
|
||||
* new method aladin.getFrame() that returns the name of the current coordinate system
|
||||
* `getViewWCS` now adapts to the `cooFrame` and the `projection`
|
||||
* `getFov` is no longer capped at 180°
|
||||
* bugfix `setProjection` now also updates for 'PAR' and 'SFL' projections
|
||||
|
||||
## 3.2.0
|
||||
### 3.2.0
|
||||
|
||||
* MOC rendering perf enhanced. Possibility to draw only the perimeter of a MOC object (perimeter set to True)
|
||||
* Many fixes e.g. footprint rendering for all sky projections
|
||||
* A line/shape webgl rasterizer thanks to the use of the `lyon`crate. MOCs and grid lines are rendered that way. Therefore, it is possible to change the grid lines thickness
|
||||
* Use of vite for the project management and deployment
|
||||
|
||||
## 3.1.0
|
||||
### 3.1.0
|
||||
|
||||
* Add message for safari users to enable WebGL2 feature and reload the page by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/54>
|
||||
* Starting fits support by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/70>
|
||||
* display fits images with the drag and drop by @bmatthieu3
|
||||
* Add message for safari users to enable WebGL2 feature and reload the page by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/54>
|
||||
* Starting fits support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/70>
|
||||
* display fits images with the drag and drop by [@bmatthieu3][bmatthieu3]
|
||||

|
||||
* support `webp` tile format by @bmatthieu3 and @tboch
|
||||
* planetary name resolver by @tboch
|
||||
* small ui changes and bug fixes by @bmatthieu3
|
||||
* add codemeta and its validatior action by @ManonMarchand in <https://github.com/cds-astro/aladin-lite/pull/66>
|
||||
* support `webp` tile format by [@bmatthieu3][bmatthieu3] and [@tboch][tboch]
|
||||
* planetary name resolver by [@tboch][tboch]
|
||||
* small ui changes and bug fixes by [@bmatthieu3][bmatthieu3]
|
||||
* add codemeta and its validatior action by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/66>
|
||||
|
||||
## 3.0.0
|
||||
### 3.0.0
|
||||
|
||||
Official release of Aladin Lite v3, [as announced in CDS news](https://cds.unistra.fr/news.php?fn_mode=fullnews&fn_incl=0&fn_id=958).
|
||||
|
||||
* Fix missing tiles issue by @tboch in <https://github.com/cds-astro/aladin-lite/pull/18>
|
||||
* Hips catalogue filtering by @tboch in <https://github.com/cds-astro/aladin-lite/pull/28>
|
||||
* Make footprint selection easier by @tboch in <https://github.com/cds-astro/aladin-lite/pull/19>
|
||||
* Bug fix: enable different colors for multiple polylines in same layer by @tboch in <https://github.com/cds-astro/aladin-lite/pull/30>
|
||||
* Method remove to delete individual source from a catalogue layer by @tboch in <https://github.com/cds-astro/aladin-lite/pull/37>
|
||||
* Stop animation by @tboch in <https://github.com/cds-astro/aladin-lite/pull/40>
|
||||
* Add message for safari users to enable WebGL2 feature and reload the page by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/54>
|
||||
* Fix missing tiles issue by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/18>
|
||||
* Hips catalogue filtering by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/28>
|
||||
* Make footprint selection easier by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/19>
|
||||
* Bug fix: enable different colors for multiple polylines in same layer by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/30>
|
||||
* Method remove to delete individual source from a catalogue layer by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/37>
|
||||
* Stop animation by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/40>
|
||||
* Add message for safari users to enable WebGL2 feature and reload the page by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/54>
|
||||
|
||||
## 2.x.x
|
||||
## Version: 2.x.x
|
||||
|
||||
### 2020-08
|
||||
|
||||
* polyline improvements (by @imbasimba)
|
||||
* polyline improvements (by [@imbasimba][imbasimba])
|
||||
|
||||
### 2020-07
|
||||
|
||||
@@ -394,3 +469,33 @@ New in the API:
|
||||
|
||||
* ajout catalogue progressif
|
||||
* ajout on select, objectClicked, objectHovered
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
Aladin Lite is made possible thanks to those people:
|
||||
|
||||
* [@alexgoff][alexgoff]
|
||||
* [@bmatthieu3][bmatthieu3]
|
||||
* [@cquiroz][cquiroz]
|
||||
* [@imbasimba][imbasimba]
|
||||
* [@ManonMarchand][ManonMarchand]
|
||||
* [@pcuste1][pcuste1]
|
||||
* [@pmatsson][pmatsson]
|
||||
* [@simontorres][simontorres]
|
||||
* [@szpetny][szpetny]
|
||||
* [@tboch][tboch]
|
||||
* [@Xen0Xys][Xen0Xys]
|
||||
|
||||
[alexgoff]: https://github.com/alexgoff
|
||||
[bmatthieu3]: https://github.com/bmatthieu3
|
||||
[cquiroz]: https://github.com/cquiroz
|
||||
[imbasimba]: https://github.com/imbasimba
|
||||
[ManonMarchand]: https://github.com/ManonMarchand
|
||||
[pcuste1]: https://github.com/pcuste1
|
||||
[pmatsson]: https://github.com/pmatsson
|
||||
[simontorres]: https://github.com/simontorres
|
||||
[szpetny]: https://github.com/szpetny
|
||||
[tboch]: https://github.com/tboch
|
||||
[Xen0Xys]: https://github.com/Xen0Xys
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ A new [API technical documentation](https://cds-astro.github.io/aladin-lite/) is
|
||||
|
||||
[](https://github.com/cds-astro/aladin-lite/actions/workflows/test.yml)
|
||||
[](https://cds-astro.github.io/aladin-lite)
|
||||
[](https://aladin.cds.unistra.fr/AladinLite/doc/release/)
|
||||
[](https://aladin.cds.unistra.fr/AladinLite/doc/release/)
|
||||
|
||||
Aladin Lite is available [at this link](https://aladin.u-strasbg.fr/AladinLite).
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"dateModified": "2023-01-31",
|
||||
"issueTracker": "https://github.com/cds-astro/aladin-lite/issues",
|
||||
"name": "Aladin Lite",
|
||||
"version": "3.6.1",
|
||||
"softwareVersion": "3.6.1",
|
||||
"version": "3.6.5",
|
||||
"softwareVersion": "3.6.5",
|
||||
"description": "An astronomical HiPS visualizer in the browser.",
|
||||
"identifier": "10.5281/zenodo.7638833",
|
||||
"applicationCategory": "Astronomy, Visualization",
|
||||
|
||||
@@ -10,6 +10,8 @@ import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {projection: "TAN", survey: "P/HSC/DR2/deep/g", target: '02 21 36.529 -05 31 20.16', fov: 0.1});
|
||||
|
||||
aladin.reverseLongitude(true)
|
||||
|
||||
let hscGreenSurvey = aladin.getBaseImageLayer();
|
||||
hscGreenSurvey.setImageFormat("fits");
|
||||
hscGreenSurvey.setColormap("green", { stretch: "asinh" });
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
let stephansNIRCamMIRI
|
||||
async function s11() {
|
||||
stephansNIRCamMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', "stephansMIRI", null, null, null)
|
||||
stephansNIRCamMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/NIRCam-MIRI', "stephansNircamMIRI", null, null, null)
|
||||
stephansNIRCamMIRI.setOpacity(0.0)
|
||||
aladin.setOverlayImageLayer(stephansNIRCamMIRI, 'stephansNIRCamMIRI')
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 256px;"></div>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px;"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
@@ -13,12 +13,14 @@
|
||||
var aladin = A.aladin(
|
||||
'#aladin-lite-div',
|
||||
{
|
||||
survey: 'https://alasky.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g/', // set initial image survey
|
||||
survey: 'data/hips/wcs', // set initial image survey
|
||||
projection: 'SIN', // set a projection
|
||||
fov: 114.19, // initial field of view in degrees
|
||||
target: '19 24 51.556 +45 16 44.36', // initial target
|
||||
cooFrame: 'equatorial', // set galactic frame
|
||||
showCooGrid: true, // set the grid
|
||||
fov: 80.0, // initial field of view in degrees
|
||||
target: '96.5279427 -88.0037230', // initial target
|
||||
cooFrame: 'galactic', // set galactic frame
|
||||
showCooGrid: true, // set the grid,
|
||||
fullScreen: true,
|
||||
showSettingsControl: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
let aladin;
|
||||
let longitudeReversed = false;
|
||||
</script>
|
||||
<div id="aladin-lite-div" style="width:100vw;height:100vh;">
|
||||
<div id="calibCircle" style="display: none;"></div>
|
||||
@@ -37,8 +38,8 @@
|
||||
<!-- fin temporaire gestion cercle -->
|
||||
|
||||
<b>Orientation</b><br>
|
||||
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('Coronelli')">Normal</button><br>
|
||||
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('illenoroC')">Inversé</button>
|
||||
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="longitudeReversed = false; aladin.reverseLongitude(longitudeReversed)">Normal</button><br>
|
||||
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="longitudeReversed = true; aladin.reverseLongitude(longitudeReversed)">Inversé</button>
|
||||
<br><br>
|
||||
|
||||
<b>Constellations</b>
|
||||
@@ -232,8 +233,7 @@
|
||||
A.init.then(() => {
|
||||
var hipsDir="http://alasky.u-strasbg.fr/CDS_P_Coronelli";
|
||||
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, expandLayersControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
|
||||
aladin.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false});
|
||||
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true});
|
||||
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg'});
|
||||
aladin.setImageSurvey('Coronelli');
|
||||
|
||||
$('#layersControlLeft').show();
|
||||
|
||||
23
examples/al-flip-longitude-axis.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {longitudeReversed: true, showCooGrid: true, cooFrame: 'galactic', target: '0 0', fov: 100});
|
||||
//aladin.reverseLongitude(true)
|
||||
|
||||
setTimeout(
|
||||
() => {
|
||||
aladin.reverseLongitude(false)
|
||||
},
|
||||
5000
|
||||
)
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,9 +11,9 @@
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'M 1', fov: 0.2, showContextMenu: true, fullScreen: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M 1', fov: 0.2, showContextMenu: true, fullScreen: true});
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3, lineDash: [2, 2]});
|
||||
/*aladin.addOverlay(overlay);
|
||||
aladin.addOverlay(overlay);
|
||||
overlay.addFootprints([
|
||||
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]], {hoverColor: 'green'}),
|
||||
A.polygon([[83.62807, 22.06330], [83.58397, 22.02280], [83.62792, 22.02258]]),
|
||||
@@ -21,7 +21,7 @@
|
||||
]);
|
||||
overlay.add(A.circle(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
|
||||
overlay.add(A.vector(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
|
||||
*/
|
||||
|
||||
aladin.on("footprintClicked", (footprint, xyMouseCoords) => {
|
||||
console.log("footprint clicked catched: ", footprint, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
|
||||
})
|
||||
@@ -35,8 +35,8 @@
|
||||
console.log("Object hovered stopped: ", object, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
|
||||
})
|
||||
|
||||
const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', selectionColor: "orange", hoverColor: 'red', limit: 10000});
|
||||
aladin.addCatalog(cat);
|
||||
//const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', selectionColor: "orange", hoverColor: 'red', limit: 10000});
|
||||
//aladin.addCatalog(cat);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
<body>
|
||||
<div>
|
||||
<div id="offset" style="display: inline-block; width: 200px; height: 100px"></div>
|
||||
<div id="aladin-lite-div" style="display: inline-block; width: 50%"></div>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 500px"></div>
|
||||
</div>
|
||||
<!--<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>-->
|
||||
|
||||
|
||||
<script>let aladin, hips</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'TAN', cooFrame: 'galactic', showSettingsControl: true, showSimbadPointerControl: true, showContextMenu: true, target: 'galactic center', survey: 'P/Finkbeiner'});
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'TAN', cooFrame: 'galactic', showSettingsControl: true, showSimbadPointerControl: true, showContextMenu: true, target: 'galactic center'});
|
||||
// possible values are 'blues', 'cividis', 'cubehelix', 'eosb', 'grayscale', 'inferno', 'magma', 'native', 'parula', 'plasma', 'rainbow',
|
||||
// 'rdbu', 'rdylbu', 'redtemperature', 'sinebow', 'spectral', 'summer', 'viridis', 'ylgnbu' and 'ylorbr'
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'http://alasky.cds.unistra.fr/ancillary/GaiaDR2/hips-density-map/', showProjectionControl: true, showContextMenu: true, showStatusBar: true, fullScreen: true, target: 'galactic center'});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'http://alasky.cds.unistra.fr/ancillary/GaiaDR2/hips-density-map/', showProjectionControl: true, showContextMenu: true, showStatusBar: true, fullScreen: true, target: 'galactic center', expandLayersControl: true});
|
||||
|
||||
const fluxMap = aladin.createImageSurvey('gdr3-color-flux-map', 'Gaia DR3 flux map', 'https://alasky.u-strasbg.fr/ancillary/GaiaEDR3/color-Rp-G-Bp-flux-map', 'equatorial', 7);
|
||||
const densityMap = aladin.createImageSurvey('gdr3-density-map', 'Gaia DR3 density map', 'sdfsg', 'equatorial', 7, {formats: ['fits']});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 30, survey: "CDS/P/DSS2/color", target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 30, target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
|
||||
|
||||
aladin.setOverlayImageLayer(A.image(
|
||||
"https://www.virtualastronomy.org/images/sig05-013.jpg",
|
||||
|
||||
@@ -29,17 +29,10 @@
|
||||
showCooGrid: true,
|
||||
fullScreen: true,
|
||||
samp: true,
|
||||
realFullscreen: true,
|
||||
lockNorthUp: true,
|
||||
}
|
||||
);
|
||||
|
||||
/*let id;
|
||||
aladin.on("zoomChanged", () => {
|
||||
if (id)
|
||||
clearTimeout(id);
|
||||
id = setTimeout(() => {
|
||||
console.log("wheel stopped, new cone search here")
|
||||
}, 500);
|
||||
})*/
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'MOL', fullScreen: true, fov: 360, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showProjectionControl: false, showSettingsControl: false, showLayersControl: false, showCooGrid: false, showFrame: false, showCooLocation: false});
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'MOL', fullScreen: true, fov: 360, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showProjectionControl: false, showSettingsControl: false, showLayersControl: true, showCooGrid: false, showFrame: false, showCooLocation: false});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 70,projection: "AIT"});
|
||||
|
||||
aladin.setOverlayImageLayer(A.imageHiPS(
|
||||
'Fermi',
|
||||
"https://alasky.cds.unistra.fr/Fermi/Color",
|
||||
{
|
||||
name: "Fermi color",
|
||||
|
||||
@@ -15,16 +15,17 @@
|
||||
let survey1 = aladin.getBaseImageLayer();
|
||||
survey1.setColormap('magma', {stretch: 'linear'});
|
||||
|
||||
let survey2 = aladin.newImageSurvey("CSIRO/P/RACS/low/I");
|
||||
aladin.setImageLayer(survey2)
|
||||
let survey2 = aladin.newImageSurvey("CSIRO/P/RACS/low/I", {name: 'racs low'});
|
||||
survey2.setColormap('rdbu', {stretch: 'linear'});
|
||||
|
||||
aladin.setImageLayer(survey2)
|
||||
|
||||
|
||||
let survey3 = aladin.newImageSurvey("CSIRO/P/RACS/mid/I");
|
||||
aladin.setImageLayer(survey3)
|
||||
survey3.setColormap('cubehelix', {stretch: 'asinh'});
|
||||
|
||||
aladin.setImageLayer(survey2);
|
||||
|
||||
setTimeout(() => {
|
||||
aladin.removeHiPSFromFavorites(survey3)
|
||||
}, 5000);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
|
||||
<div id='aladin-statsDiv'></div>
|
||||
<script>let aladin, hips</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
BIN
examples/data/hips/wcs/Norder0/Dir0/Npix10.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/data/hips/wcs/Norder0/Dir0/Npix11.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/data/hips/wcs/Norder0/Dir0/Npix4.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
examples/data/hips/wcs/Norder0/Dir0/Npix8.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
examples/data/hips/wcs/Norder0/Dir0/Npix9.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix16.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix32.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix34.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix36.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix40.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
examples/data/hips/wcs/Norder1/Dir0/Npix44.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix128.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix139.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix144.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix160.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix176.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix64.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
examples/data/hips/wcs/Norder2/Dir0/Npix65.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
examples/data/hips/wcs/Norder3/Allsky.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix257.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix260.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix512.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix513.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix558.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix576.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix578.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix640.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
examples/data/hips/wcs/Norder3/Dir0/Npix704.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix1029.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix1031.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix1040.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix1041.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2048.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2049.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2050.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2052.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2234.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2235.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2304.png
Normal file
|
After Width: | Height: | Size: 195 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2305.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2306.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2312.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2560.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
examples/data/hips/wcs/Norder4/Dir0/Npix2816.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4119.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4125.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4160.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4161.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4162.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4163.png
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix4164.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8192.png
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8193.png
Normal file
|
After Width: | Height: | Size: 236 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8194.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8195.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8196.png
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8197.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8198.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8200.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8208.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8939.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix8942.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9216.png
Normal file
|
After Width: | Height: | Size: 236 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9217.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9218.png
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9219.png
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9222.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9224.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9225.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9226.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir0/Npix9248.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir10000/Npix10240.png
Normal file
|
After Width: | Height: | Size: 121 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir10000/Npix10242.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
examples/data/hips/wcs/Norder5/Dir10000/Npix11264.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
33
examples/data/hips/wcs/properties
Normal file
@@ -0,0 +1,33 @@
|
||||
creator_did = ivo://UNK.AUTH/P/474-2244-wcs
|
||||
obs_title = 474-2244-wcs.fits
|
||||
hips_builder = Aladin/HipsGen v12.135
|
||||
hips_version = 1.4
|
||||
hips_frame = galactic
|
||||
hips_order = 10
|
||||
hips_order_min = 0
|
||||
hips_tile_width = 512
|
||||
hips_status = public master clonableOnce
|
||||
hips_tile_format = png
|
||||
hips_pixel_bitpix = -32
|
||||
hips_pixel_cut = -670.2 64044
|
||||
hips_data_range = -38085 98627
|
||||
hips_initial_ra = 11.66767
|
||||
hips_initial_dec = -24.86479
|
||||
hips_initial_fov = 5.90651
|
||||
hips_pixel_scale = 1.118E-4
|
||||
s_pixel_scale = 1.222E-4
|
||||
dataproduct_type = image
|
||||
hipsgen_date = 2024-11-13T17:07Z
|
||||
hipsgen_params = in=NAROO/474-2244-wcs.fits out=/var/www/tmp/HiPS/474-2244-wcs id=474-2244-wcs maxThread=20
|
||||
data_pixel_bitpix = -32
|
||||
hips_sampling = bilinear
|
||||
hips_overlay = overlayMean mergeOverwrite treeMean
|
||||
hips_release_date = 2024-11-13T18:33Z
|
||||
hips_data_minmax = -21385 73221
|
||||
moc_sky_fraction = 0.001074
|
||||
hipsgen_date_1 = 2024-11-13T18:25Z
|
||||
hipsgen_params_1 = in=NAROO/474-2244-wcs.fits out=/var/www/tmp/HiPS/474-2244-wcs id=474-2244-wcs maxThread=20
|
||||
hips_creation_date = 2024-11-13T18:25Z
|
||||
hips_estsize = 24116525
|
||||
hips_nb_tiles = 36636
|
||||
hips_check_code = png:735272809
|
||||
@@ -2,7 +2,7 @@
|
||||
"homepage": "https://aladin.u-strasbg.fr/",
|
||||
"name": "aladin-lite",
|
||||
"type": "module",
|
||||
"version": "3.6.2",
|
||||
"version": "3.7.0-beta",
|
||||
"description": "An astronomical HiPS visualizer in the browser",
|
||||
"author": "Thomas Boch and Matthieu Baumann",
|
||||
"license": "GPL-3",
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "aladin-lite"
|
||||
description = "Aladin Lite v3 introduces a new graphical engine written in Rust with the use of WebGL"
|
||||
license = "BSD-3-Clause"
|
||||
repository = "https://github.com/cds-astro/aladin-lite"
|
||||
version = "3.6.2"
|
||||
version = "3.7.0"
|
||||
authors = [ "baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr",]
|
||||
edition = "2018"
|
||||
|
||||
@@ -22,7 +22,7 @@ url-lite = "0.1.0"
|
||||
serde_json = "1.0.104"
|
||||
serde-wasm-bindgen = "0.5"
|
||||
enum_dispatch = "0.3.8"
|
||||
wasm-bindgen = "0.2.100"
|
||||
wasm-bindgen = "=0.2.92"
|
||||
wasm-streams = "0.3.0"
|
||||
async-channel = "1.8.0"
|
||||
mapproj = "0.3.0"
|
||||
@@ -64,7 +64,7 @@ path = "./al-core"
|
||||
path = "./al-api"
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "*"
|
||||
version = "0.3.56"
|
||||
features = [ "console", "CssStyleDeclaration", "Document", "Element", "HtmlCollection", "HtmlElement", "HtmlImageElement", "HtmlCanvasElement", "Blob", "ImageBitmap", "ImageData", "CanvasRenderingContext2d", "WebGlBuffer", "WebGlContextAttributes", "WebGlFramebuffer", "WebGlProgram", "WebGlShader", "WebGlUniformLocation", "WebGlTexture", "WebGlActiveInfo", "Headers", "Window", "Request", "RequestInit", "RequestMode", "Response", "XmlHttpRequest", "XmlHttpRequestResponseType", "PerformanceTiming", "Performance", "Url", "ReadableStream", "File", "FileList",]
|
||||
|
||||
[dev-dependencies.image-decoder]
|
||||
@@ -88,4 +88,4 @@ codegen-units = 16
|
||||
rpath = false
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = true
|
||||
wasm-opt = false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "al-api"
|
||||
version = "0.1.0"
|
||||
version = "3.6.5"
|
||||
authors = ["baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -1,45 +1,37 @@
|
||||
use cgmath::Matrix4;
|
||||
use cgmath::Matrix3;
|
||||
|
||||
const GAL2ICRS: &'static Matrix4<f64> = &Matrix4::new(
|
||||
const GAL2ICRS: &'static Matrix3<f64> = &Matrix3::new(
|
||||
-0.44482972122205372312012370920248,
|
||||
0.74698218398450941835110635824212,
|
||||
0.49410943719710765017955928850141,
|
||||
0.0,
|
||||
|
||||
-0.19807633727507056817237662907031,
|
||||
0.45598381369115237931077906137440,
|
||||
-0.86766613755716255824577781583414,
|
||||
0.0,
|
||||
|
||||
-0.87343705195577915249273984034980,
|
||||
-0.48383507361641838378786914298189,
|
||||
-0.05487565771261968232908806948676,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0,
|
||||
);
|
||||
|
||||
const ICRS2GAL: &'static Matrix4<f64> = &Matrix4::new(
|
||||
const ICRS2GAL: &'static Matrix3<f64> = &Matrix3::new(
|
||||
-0.44482972122205372312012370920248,
|
||||
-0.19807633727507056817237662907031,
|
||||
-0.87343705195577915249273984034980,
|
||||
0.0,
|
||||
|
||||
0.74698218398450941835110635824212,
|
||||
0.45598381369115237931077906137440,
|
||||
-0.48383507361641838378786914298189,
|
||||
0.0,
|
||||
|
||||
0.49410943719710765017955928850141,
|
||||
-0.86766613755716255824577781583414,
|
||||
-0.05487565771261968232908806948676,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0,
|
||||
);
|
||||
|
||||
const ID: &'static Matrix4<f64> = &Matrix4::new(
|
||||
1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
|
||||
const ID: &'static Matrix3<f64> = &Matrix3::new(
|
||||
1.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 1.0,
|
||||
);
|
||||
|
||||
|
||||
@@ -56,7 +48,7 @@ pub const NUM_COOSYSTEM: usize = 2;
|
||||
|
||||
impl CooSystem {
|
||||
#[inline]
|
||||
pub fn to(&self, coo_system: Self) -> &Matrix4<f64> {
|
||||
pub fn to(&self, coo_system: Self) -> &Matrix3<f64> {
|
||||
match (self, coo_system) {
|
||||
(CooSystem::GAL, CooSystem::ICRS) => GAL2ICRS,
|
||||
(CooSystem::ICRS, CooSystem::GAL) => ICRS2GAL,
|
||||
|
||||
@@ -223,16 +223,10 @@ pub struct ImageMetadata {
|
||||
pub blend_cfg: BlendCfg,
|
||||
#[serde(default = "default_opacity")]
|
||||
pub opacity: f32,
|
||||
#[serde(default = "default_longitude_reversed")]
|
||||
pub longitude_reversed: bool,
|
||||
/// the current format chosen
|
||||
pub img_format: ImageExt,
|
||||
}
|
||||
|
||||
fn default_longitude_reversed() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn default_opacity() -> f32 {
|
||||
1.0
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "al-core"
|
||||
version = "0.1.0"
|
||||
version = "3.6.5"
|
||||
authors = ["baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -17,9 +17,7 @@ serde-wasm-bindgen = "0.4"
|
||||
wasm-streams = "0.3.0"
|
||||
futures = "0.3.25"
|
||||
colorgrad = "0.6.2"
|
||||
|
||||
[dependencies.wasm-bindgen]
|
||||
version = "0.2.92"
|
||||
wasm-bindgen = "0.2.92"
|
||||
|
||||
[dev-dependencies]
|
||||
fontdue = "0.7.2"
|
||||
@@ -38,7 +36,7 @@ webgl2 = [
|
||||
]
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.77"
|
||||
version = "0.3.56"
|
||||
features = [
|
||||
'console',
|
||||
'CssStyleDeclaration',
|
||||
|
||||
@@ -218,19 +218,19 @@ impl UniformType for Matrix2<f32> {
|
||||
}
|
||||
}
|
||||
|
||||
use cgmath::Matrix4;
|
||||
impl UniformType for Matrix4<f32> {
|
||||
use cgmath::Matrix3;
|
||||
impl UniformType for Matrix3<f32> {
|
||||
fn uniform(gl: &WebGlContext, location: Option<&WebGlUniformLocation>, value: &Self) {
|
||||
gl.uniform_matrix4fv_with_f32_array(location, false, value.as_ref() as &[f32; 16]);
|
||||
gl.uniform_matrix3fv_with_f32_array(location, false, value.as_ref() as &[f32; 9]);
|
||||
}
|
||||
}
|
||||
use crate::Abort;
|
||||
|
||||
impl UniformType for Matrix4<f64> {
|
||||
impl UniformType for Matrix3<f64> {
|
||||
fn uniform(gl: &WebGlContext, location: Option<&WebGlUniformLocation>, value: &Self) {
|
||||
// Cast the matrix
|
||||
let mat_f32 = value.cast::<f32>().unwrap_abort();
|
||||
gl.uniform_matrix4fv_with_f32_array(location, false, mat_f32.as_ref() as &[f32; 16]);
|
||||
gl.uniform_matrix3fv_with_f32_array(location, false, mat_f32.as_ref() as &[f32; 9]);
|
||||
}
|
||||
}
|
||||
use super::texture::Texture2D;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::renderable::ImageLayer;
|
||||
use crate::tile_fetcher::HiPSLocalFiles;
|
||||
|
||||
use crate::math::angle::ToAngle;
|
||||
use crate::renderable::hips::HiPS;
|
||||
use crate::{
|
||||
//async_task::{BuildCatalogIndex, ParseTableTask, TaskExecutor, TaskResult, TaskType},
|
||||
@@ -21,7 +22,6 @@ use crate::{
|
||||
time::DeltaTime,
|
||||
};
|
||||
use al_api::moc::MOCOptions;
|
||||
use crate::math::angle::ToAngle;
|
||||
use wcs::WCS;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
@@ -35,7 +35,6 @@ use al_api::{
|
||||
grid::GridCfg,
|
||||
hips::{HiPSCfg, ImageMetadata},
|
||||
};
|
||||
use cgmath::Vector4;
|
||||
use fitsrs::{fits::AsyncFits, hdu::extension::AsyncXtensionHDU};
|
||||
|
||||
use web_sys::{HtmlElement, WebGl2RenderingContext};
|
||||
@@ -75,6 +74,7 @@ pub struct App {
|
||||
// Task executor
|
||||
//exec: Rc<RefCell<TaskExecutor>>,
|
||||
inertia: Option<Inertia>,
|
||||
north_up: bool,
|
||||
disable_inertia: Rc<RefCell<bool>>,
|
||||
dist_dragging: f32,
|
||||
time_start_dragging: Time,
|
||||
@@ -172,7 +172,7 @@ impl App {
|
||||
//let tasks_finished = false;
|
||||
let request_redraw = false;
|
||||
let rendering = true;
|
||||
let prev_cam_position = camera.get_center().truncate();
|
||||
let prev_cam_position = *camera.get_center();
|
||||
//let prev_center = Vector3::new(0.0, 1.0, 0.0);
|
||||
let out_of_fov = false;
|
||||
let catalog_loaded = false;
|
||||
@@ -188,7 +188,7 @@ impl App {
|
||||
let request_for_new_tiles = true;
|
||||
|
||||
let moc = MOCRenderer::new(&gl)?;
|
||||
gl.clear_color(0.0, 0.0, 0.0, 1.0);
|
||||
gl.clear_color(0.1, 0.1, 0.1, 1.0);
|
||||
|
||||
let (img_send, img_recv) = async_channel::unbounded::<ImageLayer>();
|
||||
let (ack_img_send, ack_img_recv) = async_channel::unbounded::<ImageParams>();
|
||||
@@ -244,7 +244,7 @@ impl App {
|
||||
catalog_loaded,
|
||||
|
||||
tile_fetcher,
|
||||
|
||||
north_up: false,
|
||||
colormaps,
|
||||
projection,
|
||||
|
||||
@@ -421,17 +421,17 @@ impl App {
|
||||
|
||||
let v = cell.vertices();
|
||||
let proj2screen = |(lon, lat): &(f64, f64)| -> Option<[f64; 2]> {
|
||||
// 1. convert to xyzw
|
||||
let xyzw = crate::math::lonlat::radec_to_xyzw(lon.to_angle(), lat.to_angle());
|
||||
// 1. convert to xyz
|
||||
let xyz = crate::math::lonlat::radec_to_xyz(lon.to_angle(), lat.to_angle());
|
||||
// 2. get it back to the camera frame system
|
||||
let xyzw = crate::coosys::apply_coo_system(
|
||||
let xyz = crate::coosys::apply_coo_system(
|
||||
CooSystem::ICRS,
|
||||
self.camera.get_coo_system(),
|
||||
&xyzw,
|
||||
&xyz,
|
||||
);
|
||||
|
||||
// 3. project on screen
|
||||
if let Some(p) = self.projection.model_to_clip_space(&xyzw, &self.camera) {
|
||||
if let Some(p) = self.projection.model_to_clip_space(&xyz, &self.camera) {
|
||||
Some([p.x, p.y])
|
||||
} else {
|
||||
None
|
||||
@@ -714,8 +714,8 @@ impl App {
|
||||
)?,
|
||||
}
|
||||
self.time_start_blending = Time::now();
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1277,8 +1277,7 @@ impl App {
|
||||
// Set the new meta
|
||||
// keep the old meta data
|
||||
let new_img_ext = meta.img_format;
|
||||
self.layers
|
||||
.set_layer_cfg(layer.clone(), meta)?;
|
||||
self.layers.set_layer_cfg(layer.clone(), meta)?;
|
||||
|
||||
if old_meta.img_format != new_img_ext {
|
||||
// The image format has been changed
|
||||
@@ -1324,6 +1323,10 @@ impl App {
|
||||
self.camera.get_longitude_reversed()
|
||||
}
|
||||
|
||||
pub(crate) fn set_longitude_reversed(&mut self, longitude_reversed: bool) {
|
||||
self.camera.set_longitude_reversed(longitude_reversed, &self.projection);
|
||||
}
|
||||
|
||||
pub(crate) fn add_catalog(&mut self, _name: String, table: JsValue, _colormap: String) {
|
||||
//let mut exec_ref = self.exec.borrow_mut();
|
||||
let _table = table;
|
||||
@@ -1354,11 +1357,12 @@ impl App {
|
||||
pub(crate) fn resize(&mut self, width: f32, height: f32) {
|
||||
self.camera.set_screen_size(width, height, &self.projection);
|
||||
self.camera
|
||||
.set_aperture(self.camera.get_aperture(), &self.projection);
|
||||
.set_zoom_factor(self.camera.get_zoom_factor(), &self.projection);
|
||||
|
||||
// resize the view fbo
|
||||
let screen_size = self.camera.get_screen_size();
|
||||
self._fbo_view
|
||||
.resize(screen_size.x as usize, screen_size.y as usize);
|
||||
//let screen_size = self.camera.get_screen_size();
|
||||
//self._fbo_view
|
||||
// .resize(screen_size.x as usize, screen_size.y as usize);
|
||||
// resize the ui fbo
|
||||
//self.fbo_ui.resize(w as usize, h as usize);
|
||||
|
||||
@@ -1444,9 +1448,9 @@ impl App {
|
||||
}
|
||||
|
||||
pub(crate) fn view_to_icrs_coosys(&self, lonlat: &LonLatT<f64>) -> LonLatT<f64> {
|
||||
let celestial_pos: Vector4<_> = lonlat.vector();
|
||||
let celestial_pos = lonlat.vector();
|
||||
let view_system = self.camera.get_coo_system();
|
||||
let (ra, dec) = math::lonlat::xyzw_to_radec(&coosys::apply_coo_system(
|
||||
let (ra, dec) = math::lonlat::xyz_to_radec(&coosys::apply_coo_system(
|
||||
view_system,
|
||||
CooSystem::ICRS,
|
||||
&celestial_pos,
|
||||
@@ -1457,7 +1461,7 @@ impl App {
|
||||
|
||||
/// lonlat must be given in icrs frame
|
||||
pub(crate) fn set_center(&mut self, lonlat: &LonLatT<f64>) {
|
||||
self.prev_cam_position = self.camera.get_center().truncate();
|
||||
self.prev_cam_position = *self.camera.get_center();
|
||||
|
||||
self.camera.set_center(lonlat, &self.projection);
|
||||
self.request_for_new_tiles = true;
|
||||
@@ -1521,11 +1525,11 @@ impl App {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let now = Time::now();
|
||||
let dragging_duration = (now - self.time_start_dragging).as_secs();
|
||||
let dragging_vel = self.dist_dragging / dragging_duration;
|
||||
|
||||
let _dist_dragging = self.dist_dragging;
|
||||
// Detect if there has been a recent acceleration
|
||||
// It is also possible that the dragging time is too short and if it is the case, trigger the inertia
|
||||
let recent_acceleration = (Time::now() - self.time_mouse_high_vel).as_secs() < 0.1
|
||||
@@ -1538,31 +1542,31 @@ impl App {
|
||||
// Start inertia here
|
||||
// Angular distance between the previous and current
|
||||
// center position
|
||||
let center = self.camera.get_center().truncate();
|
||||
let axis = self.prev_cam_position.cross(center).normalize();
|
||||
let center = self.camera.get_center();
|
||||
let axis = self.prev_cam_position.cross(*center).normalize();
|
||||
|
||||
//let delta_time = ((now - time_of_last_move).0 as f64).max(1.0);
|
||||
let delta_angle = math::vector::angle3(&self.prev_cam_position, ¢er).to_radians();
|
||||
let ampl = delta_angle * (dragging_vel as f64) * 5e-3;
|
||||
//let ampl = (dragging_vel * 0.01) as f64;
|
||||
|
||||
self.inertia = Some(Inertia::new(ampl.to_radians(), axis))
|
||||
self.inertia = Some(Inertia::new(ampl.to_radians(), axis, self.north_up))
|
||||
}
|
||||
|
||||
pub(crate) fn set_view_center_pos_angle(&mut self, theta: ArcDeg<f64>) {
|
||||
pub(crate) fn set_position_angle(&mut self, theta: ArcDeg<f64>) {
|
||||
self.camera
|
||||
.set_center_pos_angle(theta.into(), &self.projection);
|
||||
.set_position_angle(theta.into(), &self.projection);
|
||||
// New tiles can be needed and some tiles can be removed
|
||||
self.request_for_new_tiles = true;
|
||||
|
||||
self.request_redraw = true;
|
||||
}
|
||||
|
||||
pub(crate) fn get_north_shift_angle(&self) -> Angle<f64> {
|
||||
self.camera.get_center_pos_angle()
|
||||
pub(crate) fn get_position_angle(&self) -> Angle<f64> {
|
||||
self.camera.get_position_angle()
|
||||
}
|
||||
|
||||
pub(crate) fn set_fov(&mut self, fov: Angle<f64>) {
|
||||
pub(crate) fn set_fov(&mut self, fov: f64) {
|
||||
// For the moment, no animation is triggered.
|
||||
// The fov is directly set
|
||||
self.camera.set_aperture(fov, &self.projection);
|
||||
@@ -1570,17 +1574,20 @@ impl App {
|
||||
self.request_redraw = true;
|
||||
}
|
||||
|
||||
pub(crate) fn set_fov_range(&mut self, min_fov: Option<f64>, max_fov: Option<f64>) {
|
||||
self.camera.set_fov_range(
|
||||
min_fov.map(|v| v.to_radians()),
|
||||
max_fov.map(|v| v.to_radians()),
|
||||
&self.projection,
|
||||
);
|
||||
self.request_for_new_tiles = true;
|
||||
self.request_redraw = true;
|
||||
}
|
||||
|
||||
pub(crate) fn set_inertia(&mut self, inertia: bool) {
|
||||
*self.disable_inertia.borrow_mut() = !inertia;
|
||||
}
|
||||
|
||||
/*pub(crate) fn project_line(&self, lon1: f64, lat1: f64, lon2: f64, lat2: f64) -> Vec<Vector2<f64>> {
|
||||
let v1: Vector3<f64> = LonLatT::new(ArcDeg(lon1).into(), ArcDeg(lat1).into()).vector();
|
||||
let v2: Vector3<f64> = LonLatT::new(ArcDeg(lon2).into(), ArcDeg(lat2).into()).vector();
|
||||
|
||||
line::project_along_great_circles(&v1, &v2, &self.camera, self.projection)
|
||||
}*/
|
||||
|
||||
pub(crate) fn go_from_to(&mut self, s1x: f64, s1y: f64, s2x: f64, s2y: f64) {
|
||||
// Select the HiPS layer rendered lastly
|
||||
if let (Some(w1), Some(w2)) = (
|
||||
@@ -1589,22 +1596,65 @@ impl App {
|
||||
self.projection
|
||||
.screen_to_model_space(&Vector2::new(s2x, s2y), &self.camera),
|
||||
) {
|
||||
let prev_pos = w1.truncate();
|
||||
//let cur_pos = w1.truncate();
|
||||
let cur_pos = w2.truncate();
|
||||
//let next_pos = w2.truncate();
|
||||
let prev_pos = w1;
|
||||
let cur_pos = w2;
|
||||
if prev_pos != cur_pos {
|
||||
/* 1. Rotate by computing the angle between the last and current position */
|
||||
let prev_cam_position = self.camera.get_center().clone();
|
||||
|
||||
// Apply the rotation to the camera to
|
||||
// go from the current pos to the next position
|
||||
let axis = prev_pos.cross(cur_pos).normalize();
|
||||
if self.north_up {
|
||||
let lonlat1 = prev_pos.lonlat();
|
||||
let lonlat2 = cur_pos.lonlat();
|
||||
|
||||
let d = math::vector::angle3(&prev_pos, &cur_pos);
|
||||
let dlon = lonlat2.lon() - lonlat1.lon();
|
||||
let dlat = lonlat2.lat() - lonlat1.lat();
|
||||
|
||||
self.camera.apply_lonlat_rotation(dlon, dlat, &self.projection);
|
||||
|
||||
self.prev_cam_position = self.camera.get_center().truncate();
|
||||
self.camera.apply_rotation(&(-axis), d, &self.projection);
|
||||
// Detect if a pole has been crossed
|
||||
|
||||
let north_pole = Vector3::new(0.0, 1.0, 0.0);
|
||||
let south_pole = Vector3::new(0.0, -1.0, 0.0);
|
||||
let cross_north_pole = crate::math::lonlat::is_in(&prev_cam_position, &self.camera.get_center(), &north_pole);
|
||||
let cross_south_pole = crate::math::lonlat::is_in(&prev_cam_position, &self.camera.get_center(), &south_pole);
|
||||
|
||||
let cross_pole = cross_north_pole | cross_south_pole;
|
||||
|
||||
// Detect if a pole has been crossed
|
||||
let center = if cross_pole {
|
||||
&prev_cam_position
|
||||
} else {
|
||||
self.camera.get_center()
|
||||
};
|
||||
|
||||
let fov = self.camera.get_aperture();
|
||||
|
||||
let pole = if center.y >= 0.0 {
|
||||
north_pole
|
||||
} else {
|
||||
south_pole
|
||||
};
|
||||
|
||||
let c2p = crate::math::vector::angle3(center, &pole).to_radians();
|
||||
let near_pole = c2p.abs() < 5e-3 * fov;
|
||||
if near_pole || cross_pole {
|
||||
// too near to the pole
|
||||
let axis = center.cross(pole).normalize();
|
||||
use crate::math::rotation::Rotation;
|
||||
let new_center = Rotation::from_axis_angle(&axis, (-5e-3 * fov).to_angle()).rotate(&pole);
|
||||
|
||||
self.camera.set_center_xyz(&new_center, &self.projection);
|
||||
self.camera.set_position_angle(0.0.to_angle(), &self.projection);
|
||||
}
|
||||
} else {
|
||||
/* 1. Rotate by computing the angle between the last and current position */
|
||||
|
||||
let d = math::vector::angle3(&prev_pos, &cur_pos);
|
||||
let axis = prev_pos.cross(cur_pos).normalize();
|
||||
|
||||
self.camera.apply_axis_rotation(&(-axis), d, &self.projection);
|
||||
}
|
||||
|
||||
self.prev_cam_position = prev_cam_position;
|
||||
self.request_for_new_tiles = true;
|
||||
}
|
||||
} else {
|
||||
@@ -1612,6 +1662,10 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn lock_north_up(&mut self) {
|
||||
self.north_up = true;
|
||||
}
|
||||
|
||||
pub(crate) fn add_cmap(&mut self, label: String, cmap: Colormap) -> Result<(), JsValue> {
|
||||
self.colormaps.add_cmap(label, cmap)
|
||||
}
|
||||
@@ -1625,13 +1679,19 @@ impl App {
|
||||
self.camera.get_texture_depth() as i32
|
||||
}
|
||||
|
||||
pub(crate) fn get_clip_zoom_factor(&self) -> f64 {
|
||||
self.camera.get_clip_zoom_factor()
|
||||
pub(crate) fn get_zoom_factor(&self) -> f64 {
|
||||
self.camera.get_zoom_factor()
|
||||
}
|
||||
|
||||
pub(crate) fn set_zoom_factor(&mut self, zoom_factor: f64) {
|
||||
self.camera.set_zoom_factor(zoom_factor, &self.projection);
|
||||
|
||||
self.request_for_new_tiles = true;
|
||||
self.request_redraw = true;
|
||||
}
|
||||
|
||||
pub(crate) fn get_fov(&self) -> f64 {
|
||||
let deg: ArcDeg<f64> = self.camera.get_aperture().into();
|
||||
deg.0
|
||||
self.camera.get_aperture().to_degrees()
|
||||
}
|
||||
|
||||
pub(crate) fn get_colormaps(&self) -> &Colormaps {
|
||||
|
||||