astro-viewer 3.7.0 β 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +325 -222
- package/dist/astroviewer.cjs +654 -108
- package/dist/astroviewer.cjs.map +1 -1
- package/dist/astroviewer.js +655 -108
- package/dist/astroviewer.js.map +1 -1
- package/dist/astroviewer.min.js +1 -1
- package/dist/astroviewer.min.js.map +1 -1
- package/lib-esm/AstroSphere.d.ts +13 -1
- package/lib-esm/AstroSphere.d.ts.map +1 -1
- package/lib-esm/AstroSphere.js +94 -5
- package/lib-esm/AstroSphere.js.map +1 -1
- package/lib-esm/AstroViewer.d.ts +11 -0
- package/lib-esm/AstroViewer.d.ts.map +1 -1
- package/lib-esm/AstroViewer.js +37 -2
- package/lib-esm/AstroViewer.js.map +1 -1
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.d.ts.map +1 -1
- package/lib-esm/index.js +0 -1
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/model/grid/HealpixGrid.d.ts.map +1 -1
- package/lib-esm/model/grid/HealpixGrid.js +7 -1
- package/lib-esm/model/grid/HealpixGrid.js.map +1 -1
- package/lib-esm/model/hips/AllSky.d.ts +0 -1
- package/lib-esm/model/hips/AllSky.d.ts.map +1 -1
- package/lib-esm/model/hips/AllSky.js +11 -32
- package/lib-esm/model/hips/AllSky.js.map +1 -1
- package/lib-esm/model/hips/AncestorTile.d.ts.map +1 -1
- package/lib-esm/model/hips/AncestorTile.js +10 -27
- package/lib-esm/model/hips/AncestorTile.js.map +1 -1
- package/lib-esm/model/hips/FitsTileLoader.d.ts +4 -0
- package/lib-esm/model/hips/FitsTileLoader.d.ts.map +1 -1
- package/lib-esm/model/hips/FitsTileLoader.js +39 -1
- package/lib-esm/model/hips/FitsTileLoader.js.map +1 -1
- package/lib-esm/model/hips/HiPS.d.ts +31 -0
- package/lib-esm/model/hips/HiPS.d.ts.map +1 -1
- package/lib-esm/model/hips/HiPS.js +193 -0
- package/lib-esm/model/hips/HiPS.js.map +1 -1
- package/lib-esm/model/hips/HiPSCoverage.d.ts +6 -1
- package/lib-esm/model/hips/HiPSCoverage.d.ts.map +1 -1
- package/lib-esm/model/hips/HiPSCoverage.js +20 -2
- package/lib-esm/model/hips/HiPSCoverage.js.map +1 -1
- package/lib-esm/model/hips/Tile.d.ts +0 -1
- package/lib-esm/model/hips/Tile.d.ts.map +1 -1
- package/lib-esm/model/hips/Tile.js +9 -27
- package/lib-esm/model/hips/Tile.js.map +1 -1
- package/lib-esm/model/hips/TileBuffer.d.ts.map +1 -1
- package/lib-esm/model/hips/TileBuffer.js +6 -0
- package/lib-esm/model/hips/TileBuffer.js.map +1 -1
- package/lib-esm/shader/HiPSShaderProgram.d.ts +7 -1
- package/lib-esm/shader/HiPSShaderProgram.d.ts.map +1 -1
- package/lib-esm/shader/HiPSShaderProgram.js +23 -1
- package/lib-esm/shader/HiPSShaderProgram.js.map +1 -1
- package/lib-esm/shader/ShaderManager.d.ts.map +1 -1
- package/lib-esm/shader/ShaderManager.js +46 -10
- package/lib-esm/shader/ShaderManager.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,357 +1,460 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AstroViewer
|
|
2
|
+
|
|
3
|
+
**AstroViewer** is a lightweight, framework-independent JavaScript/TypeScript library for interactive 3D visualization and analysis of astronomical and Earth observation data.
|
|
4
|
+
|
|
5
|
+
It provides a WebGL2-based rendering engine and a set of reusable APIs for building scientific visualization applications directly in the browser.
|
|
6
|
+
|
|
7
|
+
AstroViewer is developed from scratch without depending on visualization frameworks. It integrates astronomical standards and geospatial/Earth observation technologies within the same rendering environment.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
### Astronomy
|
|
12
|
+
|
|
13
|
+
- Interactive celestial sphere visualization
|
|
14
|
+
- HiPS (Hierarchical Progressive Surveys)
|
|
15
|
+
- Multiple simultaneous HiPS layers
|
|
16
|
+
- Independent HiPS layer opacity
|
|
17
|
+
- HiPS layer activation and removal
|
|
18
|
+
- Runtime HiPS format switching
|
|
19
|
+
- HiPS JPEG/PNG image tiles
|
|
20
|
+
- HiPS FITS tiles
|
|
21
|
+
- HiPS coverage handling
|
|
22
|
+
- HEALPix hierarchical sky tessellation
|
|
23
|
+
- FITS astronomical data support
|
|
24
|
+
- Astronomical coordinate systems and transformations
|
|
25
|
+
- Field-of-view calculations
|
|
26
|
+
- Grid and coordinate visualization
|
|
27
|
+
- TAP-based astronomical data access
|
|
28
|
+
|
|
29
|
+
### Earth Observation
|
|
30
|
+
|
|
31
|
+
- Interactive 3D Earth visualization
|
|
32
|
+
- XYZ tiled maps
|
|
33
|
+
- WMTS map services
|
|
34
|
+
- GeoJSON geometries and overlays
|
|
35
|
+
- Satellite tracks and observation geometry
|
|
36
|
+
- Sensor footprints and cones
|
|
37
|
+
- Earth-oriented coordinate and picking utilities
|
|
38
|
+
|
|
39
|
+
### 3D and Scientific Visualization
|
|
40
|
+
|
|
41
|
+
- WebGL2 rendering
|
|
42
|
+
- Inside/outside sphere visualization
|
|
43
|
+
- MeshHiPS OBJ tiled meshes
|
|
44
|
+
- Runtime color maps
|
|
45
|
+
- Interactive camera and navigation
|
|
46
|
+
- Ray picking
|
|
47
|
+
- Scientific overlays and geometries
|
|
48
|
+
- Framework-independent architecture
|
|
2
49
|
|
|
3
|
-
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
5
|
-
[](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API)
|
|
50
|
+
---
|
|
6
51
|
|
|
7
|
-
|
|
52
|
+
## Installation
|
|
8
53
|
|
|
9
|
-
|
|
54
|
+
Install AstroViewer from npm:
|
|
10
55
|
|
|
11
|
-
|
|
56
|
+
```bash
|
|
57
|
+
npm install astro-viewer
|
|
58
|
+
```
|
|
12
59
|
|
|
13
|
-
|
|
14
|
-
- **FITS** and astronomical coordinate transformations
|
|
15
|
-
- **TAP**-based catalogue access and astronomical metadata
|
|
16
|
-
- catalogue overlays and spatial footprints
|
|
17
|
-
- **STC-S** geometry parsing
|
|
18
|
-
- Earth visualization using tiled **XYZ** and **WMTS** imagery
|
|
19
|
-
- satellite trajectories, observation tracks, footprints, and sensor geometry
|
|
20
|
-
- WebGL-based 3D rendering, picking, camera navigation, and scientific overlays
|
|
60
|
+
AstroViewer requires Node.js 22 or later for development and package tooling.
|
|
21
61
|
|
|
22
|
-
|
|
62
|
+
The rendering engine itself runs in a browser-compatible environment with WebGL2 support.
|
|
23
63
|
|
|
24
|
-
|
|
64
|
+
---
|
|
25
65
|
|
|
26
|
-
|
|
66
|
+
## Quick Start
|
|
27
67
|
|
|
28
|
-
|
|
29
|
-
- a separate **commercial license**.
|
|
68
|
+
### ES Modules
|
|
30
69
|
|
|
31
|
-
|
|
70
|
+
```js
|
|
71
|
+
import { AstroViewer } from "astro-viewer";
|
|
32
72
|
|
|
33
|
-
|
|
73
|
+
const canvas = document.getElementById("astrocanvas");
|
|
34
74
|
|
|
35
|
-
|
|
75
|
+
const viewer = new AstroViewer(canvas);
|
|
76
|
+
```
|
|
36
77
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
78
|
+
Example HTML:
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<canvas id="astrocanvas"></canvas>
|
|
82
|
+
|
|
83
|
+
<script type="module">
|
|
84
|
+
import { AstroViewer } from "astro-viewer";
|
|
85
|
+
|
|
86
|
+
const canvas = document.getElementById("astrocanvas");
|
|
87
|
+
const viewer = new AstroViewer(canvas);
|
|
88
|
+
</script>
|
|
89
|
+
```
|
|
41
90
|
|
|
42
91
|
---
|
|
43
92
|
|
|
44
|
-
##
|
|
93
|
+
## HiPS
|
|
45
94
|
|
|
46
|
-
AstroViewer
|
|
95
|
+
AstroViewer supports HiPS (Hierarchical Progressive Surveys) as native astronomical map layers.
|
|
47
96
|
|
|
48
|
-
|
|
49
|
-
|------|--------------|
|
|
50
|
-
| `astroviewer.js` | UMD bundle for browser environments |
|
|
51
|
-
| `astroviewer.min.js` | Minified UMD bundle |
|
|
52
|
-
| `astroviewer.cjs` | CommonJS build for Node.js |
|
|
53
|
-
| `*.map` | Source maps for debugging |
|
|
97
|
+
A HiPS survey can be activated using a `HiPSDescriptor`:
|
|
54
98
|
|
|
55
|
-
|
|
99
|
+
```js
|
|
100
|
+
import { AstroViewer, HiPSDescriptor } from "astro-viewer";
|
|
56
101
|
|
|
57
|
-
|
|
102
|
+
const canvas = document.getElementById("astrocanvas");
|
|
103
|
+
const viewer = new AstroViewer(canvas);
|
|
58
104
|
|
|
59
|
-
|
|
105
|
+
const hipsUrl = "https://alasky.cds.unistra.fr/DSS/DSSColor/";
|
|
60
106
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```
|
|
107
|
+
const response = await fetch(`${hipsUrl}properties`);
|
|
108
|
+
const properties = await response.text();
|
|
64
109
|
|
|
65
|
-
|
|
66
|
-
Here is a minimal example that loads a HiPS survey and starts the viewer.
|
|
110
|
+
const descriptor = new HiPSDescriptor(properties, new URL(hipsUrl));
|
|
67
111
|
|
|
68
|
-
|
|
69
|
-
<!DOCTYPE html>
|
|
70
|
-
<html>
|
|
71
|
-
<head>
|
|
72
|
-
<meta charset="utf-8">
|
|
73
|
-
<title>AstroViewer Demo</title>
|
|
74
|
-
<script src="./javascripts/astroviewer.js"></script>
|
|
75
|
-
</head>
|
|
76
|
-
<body onload="run();">
|
|
77
|
-
<canvas id="astrocanvas"></canvas>
|
|
78
|
-
<script>
|
|
79
|
-
let window.AstroAPI = undefined;
|
|
80
|
-
|
|
81
|
-
async function run() {
|
|
82
|
-
const AC = new astroviewer.AstroViewer();
|
|
83
|
-
window.AstroAPI = AC;
|
|
84
|
-
|
|
85
|
-
const hipsUrl = "https://alasky.cds.unistra.fr/DSS/DSSColor/";
|
|
86
|
-
const resp = await fetch(hipsUrl + "properties");
|
|
87
|
-
const propsText = await resp.text();
|
|
88
|
-
|
|
89
|
-
const desc = new astroviewer.HiPSDescriptor(propsText, hipsUrl);
|
|
90
|
-
window.AstroAPI.activateHiPS(desc);
|
|
91
|
-
window.AstroAPI.run();
|
|
92
|
-
}
|
|
93
|
-
</script>
|
|
94
|
-
</body>
|
|
95
|
-
</html>
|
|
112
|
+
viewer.activateHiPS(descriptor, false);
|
|
96
113
|
```
|
|
97
114
|
|
|
115
|
+
AstroViewer supports standard HiPS image tiles as well as FITS-based HiPS datasets.
|
|
116
|
+
|
|
117
|
+
When a survey exposes multiple supported tile formats, the active format can be changed at runtime.
|
|
118
|
+
|
|
98
119
|
---
|
|
99
120
|
|
|
100
|
-
##
|
|
121
|
+
## Multiple HiPS Layers
|
|
101
122
|
|
|
102
|
-
|
|
123
|
+
Multiple HiPS surveys can coexist within the same AstroViewer instance.
|
|
103
124
|
|
|
104
|
-
```
|
|
105
|
-
|
|
125
|
+
```js
|
|
126
|
+
const hips1 = await viewer.addHiPSFromUrl(
|
|
127
|
+
"https://alasky.cds.unistra.fr/DSS/DSSColor/",
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const hips2 = await viewer.addHiPSFromUrl("https://example.org/another-hips/");
|
|
106
131
|
```
|
|
107
132
|
|
|
108
|
-
|
|
133
|
+
The currently loaded layers can be retrieved with:
|
|
109
134
|
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
|
|
135
|
+
```js
|
|
136
|
+
const layers = viewer.getActiveHiPSLayers();
|
|
137
|
+
```
|
|
113
138
|
|
|
114
|
-
|
|
115
|
-
|
|
139
|
+
The active HiPS layer can be changed without altering layer order:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
viewer.setActiveHiPS(hips1);
|
|
116
143
|
```
|
|
117
144
|
|
|
118
|
-
|
|
145
|
+
Individual layers can be removed:
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
viewer.removeHiPS(hips2);
|
|
149
|
+
```
|
|
119
150
|
|
|
120
|
-
|
|
151
|
+
or all HiPS layers can be removed:
|
|
121
152
|
|
|
122
|
-
|
|
123
|
-
|
|
153
|
+
```js
|
|
154
|
+
viewer.removeAllHiPS();
|
|
155
|
+
```
|
|
124
156
|
|
|
125
|
-
|
|
157
|
+
### Layer Opacity
|
|
126
158
|
|
|
127
|
-
|
|
128
|
-
|
|
159
|
+
Each HiPS layer has independent opacity:
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
viewer.setHiPSOpacity(hips1, 0.4);
|
|
163
|
+
viewer.setHiPSOpacity(hips2, 1.0);
|
|
129
164
|
```
|
|
130
165
|
|
|
131
|
-
|
|
132
|
-
- Compile the TypeScript source
|
|
133
|
-
- Build the bundles
|
|
134
|
-
- Prepare the web testing interface
|
|
135
|
-
- Start a local web server
|
|
166
|
+
Opacity values range from `0` (transparent) to `1` (fully opaque).
|
|
136
167
|
|
|
137
|
-
|
|
168
|
+
This allows multiple astronomical surveys to be visually combined and compared.
|
|
169
|
+
|
|
170
|
+
---
|
|
138
171
|
|
|
172
|
+
## HiPS Formats
|
|
173
|
+
|
|
174
|
+
The formats available for the active HiPS survey can be queried with:
|
|
175
|
+
|
|
176
|
+
```js
|
|
177
|
+
const formats = viewer.getActiveHiPSFormats();
|
|
139
178
|
```
|
|
140
|
-
|
|
179
|
+
|
|
180
|
+
The active format can then be changed at runtime:
|
|
181
|
+
|
|
182
|
+
```js
|
|
183
|
+
viewer.changeHiPSFormat("fits");
|
|
141
184
|
```
|
|
142
185
|
|
|
143
|
-
|
|
186
|
+
Supported formats depend on the HiPS dataset metadata.
|
|
187
|
+
|
|
188
|
+
AstroViewer supports conventional image-based HiPS tiles and FITS HiPS tiles.
|
|
144
189
|
|
|
145
190
|
---
|
|
146
191
|
|
|
147
|
-
##
|
|
192
|
+
## HiPS Coverage
|
|
193
|
+
|
|
194
|
+
AstroViewer supports survey coverage information associated with HiPS datasets.
|
|
148
195
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
| `npm run dev` | Build in development mode and watch for changes |
|
|
153
|
-
| `npm run prod` | Production build (minified and with source maps) |
|
|
154
|
-
| `npm run web` | Copy bundles and assets into the public folder |
|
|
155
|
-
| `npm run all` | Full build + launch development web UI |
|
|
196
|
+
Coverage information is used by the tile rendering pipeline to avoid requesting and rendering HEALPix tiles outside the available survey region.
|
|
197
|
+
|
|
198
|
+
This is particularly useful for partial-sky surveys.
|
|
156
199
|
|
|
157
200
|
---
|
|
158
201
|
|
|
159
|
-
##
|
|
202
|
+
## Earth Maps
|
|
203
|
+
|
|
204
|
+
AstroViewer also supports tiled Earth observation maps.
|
|
205
|
+
|
|
206
|
+
### XYZ
|
|
207
|
+
|
|
208
|
+
XYZ tile services can be used as Earth map layers.
|
|
209
|
+
|
|
210
|
+
Typical services use URL templates such as:
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
https://tile.openstreetmap.org/{z}/{x}/{y}.png
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
AstroViewer automatically determines the appropriate tile level according to the current camera position and field of view.
|
|
160
217
|
|
|
161
|
-
|
|
218
|
+
### WMTS
|
|
162
219
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- `CatalogueGL` β renders astronomical catalogues
|
|
167
|
-
- `FoV` and related geometry/color-map utilities β camera and rendering helpers
|
|
220
|
+
WMTS services can also be integrated through the AstroViewer WMTS support.
|
|
221
|
+
|
|
222
|
+
This allows standards-based Earth observation imagery to coexist with astronomical visualization functionality within the same rendering architecture.
|
|
168
223
|
|
|
169
224
|
---
|
|
170
225
|
|
|
226
|
+
## MeshHiPS
|
|
227
|
+
|
|
228
|
+
AstroViewer includes support for hierarchical tiled 3D meshes through MeshHiPS.
|
|
229
|
+
|
|
230
|
+
MeshHiPS can be used for progressively loading OBJ-based surface geometry according to the current field of view and camera distance.
|
|
231
|
+
|
|
232
|
+
Typical use cases include planetary surfaces and other large hierarchical 3D datasets.
|
|
171
233
|
|
|
172
234
|
---
|
|
173
235
|
|
|
174
|
-
##
|
|
236
|
+
## Satellite and Observation Geometry
|
|
175
237
|
|
|
176
|
-
|
|
177
|
-
> **Note:** The bundles only include what is exported from `src/index.ts`. If your build exposes additional methods, follow the same patterns shown here.
|
|
238
|
+
AstroViewer provides primitives for representing Earth observation and satellite-related geometry, including:
|
|
178
239
|
|
|
179
|
-
|
|
240
|
+
- satellite positions;
|
|
241
|
+
- observation tracks;
|
|
242
|
+
- ground footprints;
|
|
243
|
+
- sensor cones;
|
|
244
|
+
- GeoJSON regions and geometries.
|
|
180
245
|
|
|
181
|
-
|
|
182
|
-
Create the viewer controller.
|
|
246
|
+
These components can be combined to build interactive Earth observation analysis workflows.
|
|
183
247
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
});
|
|
190
|
-
```
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## API Overview
|
|
251
|
+
|
|
252
|
+
The main entry point is:
|
|
191
253
|
|
|
192
254
|
```ts
|
|
193
|
-
|
|
194
|
-
import { AstroViewer } from 'astro-viewer';
|
|
195
|
-
const AC = new AstroViewer();
|
|
255
|
+
AstroViewer;
|
|
196
256
|
```
|
|
197
257
|
|
|
198
|
-
|
|
199
|
-
Start the render loop and event handling.
|
|
258
|
+
Important APIs include:
|
|
200
259
|
|
|
201
|
-
|
|
202
|
-
AC.run();
|
|
203
|
-
```
|
|
260
|
+
### HiPS
|
|
204
261
|
|
|
205
|
-
|
|
262
|
+
```ts
|
|
263
|
+
activateHiPS(...)
|
|
264
|
+
addHiPS(...)
|
|
265
|
+
addHiPSFromUrl(...)
|
|
266
|
+
removeHiPS(...)
|
|
267
|
+
removeAllHiPS()
|
|
206
268
|
|
|
207
|
-
|
|
208
|
-
|
|
269
|
+
getActiveHiPS()
|
|
270
|
+
getActiveHiPSLayers()
|
|
271
|
+
setActiveHiPS(...)
|
|
209
272
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const props = await (await fetch(hipsUrl + "properties")).text();
|
|
213
|
-
const desc = new astroviewer.HiPSDescriptor(props, hipsUrl);
|
|
273
|
+
getActiveHiPSFormats()
|
|
274
|
+
changeHiPSFormat(...)
|
|
214
275
|
|
|
215
|
-
|
|
276
|
+
setHiPSOpacity(...)
|
|
216
277
|
```
|
|
217
278
|
|
|
218
|
-
|
|
219
|
-
Toggle the point-of-view (outside vs inside the HiPS sphere).
|
|
279
|
+
### Maps and visualization
|
|
220
280
|
|
|
221
|
-
|
|
222
|
-
|
|
281
|
+
AstroViewer also exposes functionality around:
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
HiPS
|
|
285
|
+
HiPSDescriptor
|
|
286
|
+
XYZMap
|
|
287
|
+
WMTSAdapter
|
|
288
|
+
MeshHiPS
|
|
289
|
+
GeoJSON
|
|
290
|
+
ObservationTrack
|
|
291
|
+
satellite and sensor geometry
|
|
292
|
+
coordinate and picking utilities
|
|
223
293
|
```
|
|
224
294
|
|
|
295
|
+
See the TypeScript declarations distributed with the package for the complete public API.
|
|
296
|
+
|
|
225
297
|
---
|
|
226
298
|
|
|
227
|
-
|
|
299
|
+
## Package Formats
|
|
228
300
|
|
|
229
|
-
|
|
230
|
-
Move the camera to a sky coordinate (ICRS).
|
|
301
|
+
AstroViewer is distributed through npm with both ES Module and CommonJS entry points.
|
|
231
302
|
|
|
232
|
-
|
|
233
|
-
|
|
303
|
+
The package exposes:
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
ESM β lib-esm/index.js
|
|
307
|
+
Types β lib-esm/index.d.ts
|
|
308
|
+
CJS β dist/astroviewer.cjs
|
|
309
|
+
Browser β dist/astroviewer.js
|
|
234
310
|
```
|
|
235
311
|
|
|
312
|
+
The package can therefore be consumed by modern JavaScript/TypeScript applications and bundlers.
|
|
313
|
+
|
|
314
|
+
The AstroViewer rendering engine requires a browser-compatible DOM and WebGL2 environment. Importing the package from Node.js does not imply that the WebGL viewer itself can run in a headless Node environment.
|
|
236
315
|
|
|
237
316
|
---
|
|
238
317
|
|
|
239
|
-
|
|
318
|
+
## Development
|
|
240
319
|
|
|
241
|
-
|
|
242
|
-
Show/hide the HEALPix grid overlay.
|
|
320
|
+
Clone the repository and install the dependencies:
|
|
243
321
|
|
|
244
|
-
```
|
|
245
|
-
|
|
322
|
+
```bash
|
|
323
|
+
npm ci
|
|
246
324
|
```
|
|
247
325
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
### Catalogues
|
|
251
|
-
|
|
252
|
-
#### `showCatalogue(catalogue: CatalogueGL)`
|
|
253
|
-
Render a catalogue layer.
|
|
326
|
+
Run the test suite:
|
|
254
327
|
|
|
255
|
-
```
|
|
256
|
-
|
|
328
|
+
```bash
|
|
329
|
+
npm test
|
|
257
330
|
```
|
|
258
331
|
|
|
259
|
-
|
|
260
|
-
Toggle visibility without removing it.
|
|
332
|
+
Build the package:
|
|
261
333
|
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
AC.hideCatalogue(cat, true); // show
|
|
334
|
+
```bash
|
|
335
|
+
npm run build
|
|
265
336
|
```
|
|
266
337
|
|
|
267
|
-
|
|
268
|
-
Remove a catalogue layer completely.
|
|
338
|
+
Run the development server:
|
|
269
339
|
|
|
270
|
-
```
|
|
271
|
-
|
|
340
|
+
```bash
|
|
341
|
+
npm start
|
|
272
342
|
```
|
|
273
343
|
|
|
274
|
-
|
|
275
|
-
Change the colour of rendered catalogue points/sources.
|
|
344
|
+
Before publishing or merging a release, the package contents can be inspected with:
|
|
276
345
|
|
|
277
|
-
```
|
|
278
|
-
|
|
346
|
+
```bash
|
|
347
|
+
npm pack --dry-run
|
|
279
348
|
```
|
|
280
349
|
|
|
281
350
|
---
|
|
282
351
|
|
|
283
|
-
|
|
352
|
+
## Continuous Integration
|
|
284
353
|
|
|
285
|
-
The
|
|
354
|
+
The CI pipeline validates:
|
|
286
355
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
356
|
+
```text
|
|
357
|
+
npm ci
|
|
358
|
+
npm test
|
|
359
|
+
npm run build
|
|
360
|
+
npm pack --dry-run
|
|
291
361
|
```
|
|
292
362
|
|
|
293
|
-
|
|
294
|
-
```js
|
|
295
|
-
AC.hideFootprintSet(footprints, false); // hide
|
|
296
|
-
AC.hideFootprintSet(footprints, true); // show
|
|
297
|
-
```
|
|
363
|
+
Release publishing is performed through GitHub Actions using npm Trusted Publishing and OpenID Connect (OIDC).
|
|
298
364
|
|
|
299
|
-
|
|
300
|
-
```js
|
|
301
|
-
AC.deleteFootprintSet(footprints);
|
|
302
|
-
```
|
|
365
|
+
No long-lived npm publishing token is required by the release workflow.
|
|
303
366
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
367
|
+
See:
|
|
368
|
+
|
|
369
|
+
```text
|
|
370
|
+
ci-cd.md
|
|
307
371
|
```
|
|
308
372
|
|
|
373
|
+
for the complete development and release workflow.
|
|
374
|
+
|
|
309
375
|
---
|
|
310
376
|
|
|
311
|
-
|
|
377
|
+
## Browser Requirements
|
|
312
378
|
|
|
313
|
-
|
|
379
|
+
AstroViewer relies on WebGL2 and modern browser APIs.
|
|
314
380
|
|
|
315
|
-
|
|
316
|
-
Return the current ICRS center of the viewport.
|
|
381
|
+
A recent version of one of the major browsers is recommended:
|
|
317
382
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
383
|
+
- Chrome / Chromium
|
|
384
|
+
- Firefox
|
|
385
|
+
- Safari
|
|
386
|
+
- Edge
|
|
321
387
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
388
|
+
WebGL2 must be available and enabled.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Architecture
|
|
393
|
+
|
|
394
|
+
AstroViewer follows a framework-independent architecture.
|
|
395
|
+
|
|
396
|
+
The rendering and scientific functionality are implemented as reusable JavaScript/TypeScript components rather than being coupled to React, Angular, Vue, or another UI framework.
|
|
397
|
+
|
|
398
|
+
This allows AstroViewer to be embedded in different applications and user-interface architectures while keeping the scientific visualization layer independent.
|
|
399
|
+
|
|
400
|
+
The project integrates several lower-level scientific libraries developed within the AstroBrowser ecosystem, including functionality for FITS, WCS and HEALPix processing.
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Licensing
|
|
405
|
+
|
|
406
|
+
AstroViewer is dual-licensed.
|
|
407
|
+
|
|
408
|
+
### Open-source use
|
|
409
|
+
|
|
410
|
+
AstroViewer is available under the:
|
|
411
|
+
|
|
412
|
+
**GNU Affero General Public License v3.0 (AGPL-3.0)**
|
|
413
|
+
|
|
414
|
+
See:
|
|
415
|
+
|
|
416
|
+
```text
|
|
417
|
+
LICENSE-AGPL.md
|
|
325
418
|
```
|
|
326
419
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
420
|
+
### Commercial use
|
|
421
|
+
|
|
422
|
+
A separate commercial license is available for organizations and applications that do not wish to comply with the AGPL requirements.
|
|
423
|
+
|
|
424
|
+
See:
|
|
425
|
+
|
|
426
|
+
```text
|
|
427
|
+
LICENSE-COMMERCIAL.md
|
|
428
|
+
```
|
|
334
429
|
|
|
430
|
+
The overall licensing terms are described in:
|
|
335
431
|
|
|
432
|
+
```text
|
|
433
|
+
LICENSE.md
|
|
434
|
+
```
|
|
336
435
|
|
|
337
|
-
|
|
436
|
+
Third-party dependency licensing information is documented in:
|
|
338
437
|
|
|
339
|
-
|
|
438
|
+
```text
|
|
439
|
+
DEPENDENCY-LICENSING.md
|
|
440
|
+
```
|
|
340
441
|
|
|
341
|
-
|
|
342
|
-
- **Commercial License**
|
|
442
|
+
---
|
|
343
443
|
|
|
344
|
-
|
|
444
|
+
## Project
|
|
345
445
|
|
|
346
|
-
|
|
446
|
+
AstroViewer is part of the **AstroBrowser** ecosystem, a set of scientific visualization and data-analysis technologies designed to support both astronomical and Earth observation applications.
|
|
347
447
|
|
|
348
|
-
|
|
448
|
+
The project focuses on browser-native scientific visualization, interoperability with established scientific standards, and reusable components for building interactive data-analysis environments.
|
|
349
449
|
|
|
350
450
|
---
|
|
351
451
|
|
|
352
|
-
##
|
|
452
|
+
## Author
|
|
453
|
+
|
|
454
|
+
Copyright Β© Fabrizio Giordano.
|
|
353
455
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
-
|
|
456
|
+
AstroViewer is released under:
|
|
457
|
+
|
|
458
|
+
```text
|
|
459
|
+
AGPL-3.0-only OR LicenseRef-AstroViewer-Commercial
|
|
460
|
+
```
|