Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6bf46e843 | ||
|
|
31ab79d1a4 | ||
|
|
fb60fc73ba | ||
|
|
b5b502d752 | ||
|
|
60f1b42343 | ||
|
|
4657e06f67 | ||
|
|
9e01394fd1 | ||
|
|
92884091c9 | ||
|
|
2ff993aaa6 | ||
|
|
9f9585269b | ||
|
|
012867ce7d | ||
|
|
36f1083fd1 | ||
|
|
daca03ee35 | ||
|
|
107eedaffe | ||
|
|
03601d9025 | ||
|
|
e4930c2ac7 | ||
|
|
4510398590 | ||
|
|
8933089bf3 | ||
|
|
26a809e397 | ||
|
|
a23edf5d6d | ||
|
|
871168ee75 | ||
|
|
d5101acd91 | ||
|
|
3214ca3d67 | ||
|
|
17f54ad354 | ||
|
|
a5760204c7 | ||
|
|
05c322865d | ||
|
|
b6d26c94fa | ||
|
|
9148be9708 | ||
|
|
070b4882c4 | ||
|
|
373f8b9975 | ||
|
|
552b8cf899 | ||
|
|
2a60319ceb | ||
|
|
6a07a2560d | ||
|
|
cff74cbff1 | ||
|
|
ede4822fa9 | ||
|
|
c4756691b1 | ||
|
|
965373e770 | ||
|
|
02a23ea955 | ||
|
|
6f6024fbdd | ||
|
|
60d15674e2 | ||
|
|
c9b64410fd | ||
|
|
3b59abb36e | ||
|
|
1ae4114360 | ||
|
|
371f81e538 | ||
|
|
9a03f8e452 | ||
|
|
c2dc476321 | ||
|
|
d2b444250e | ||
|
|
8141d50393 | ||
|
|
5f29eac996 | ||
|
|
43c9d7f124 | ||
|
|
f9954325dd | ||
|
|
73da429ce0 |
1
.github/workflows/npm-publish.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source "$HOME/.cargo/env"
|
||||
rustup default nightly
|
||||
- name: "Install wasm-pack"
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
|
||||
|
||||
1
.github/workflows/test.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source "$HOME/.cargo/env"
|
||||
rustup default nightly
|
||||
- name: "Install wasm-pack"
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
|
||||
|
||||
16
.gitignore
vendored
@@ -1,16 +0,0 @@
|
||||
node_modules
|
||||
|
||||
dist
|
||||
examples/.DS_Store
|
||||
examples/fits
|
||||
.DS_Store
|
||||
package-lock.json
|
||||
src/core/target/
|
||||
src/core/Cargo.lock
|
||||
|
||||
aladin-lite*.tgz
|
||||
|
||||
.vscode
|
||||
|
||||
deploy.sh
|
||||
deploy-beta.sh
|
||||
@@ -14,6 +14,11 @@ More details on [Aladin Lite documentation page](http://aladin.u-strasbg.fr/Alad
|
||||
|
||||
Aladin Lite v3 is out! Please play with [Aladin Lite v3 at this link](https://aladin.u-strasbg.fr/AladinLite).
|
||||
|
||||
## Releases
|
||||
|
||||
For integrating Aladin Lite into your personal website, please refer to this [release page](https://aladin.cds.unistra.fr/AladinLite/doc/release/#download).
|
||||
Always prefer using the latest version. If you want the new features without minding about the bugs coming with it, then the beta is the good way to go.
|
||||
|
||||
## Embed it into your projects
|
||||
|
||||
You can embed Aladin Lite it into your webpages in two ways
|
||||
@@ -160,4 +165,4 @@ To generate the Rust backend API documentation
|
||||
```bash
|
||||
cd src/core
|
||||
cargo doc --no-deps --open
|
||||
```
|
||||
```
|
||||
|
||||
55
assets/icons/brightness.svg
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 512 512" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M256,145.455c-60.955,0-110.545,49.591-110.545,110.545S195.045,366.545,256,366.545S366.545,316.955,366.545,256
|
||||
S316.955,145.455,256,145.455z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect x="238.545" width="34.909" height="110.545"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<rect x="96.617" y="58.787" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -47.2416 114.068)" width="34.909" height="110.544"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect y="238.545" width="110.545" height="34.909"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<rect x="58.792" y="380.491" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -247.9811 197.2111)" width="110.544" height="34.909"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect x="238.545" y="401.455" width="34.909" height="110.545"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<rect x="380.474" y="342.659" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -164.829 397.9294)" width="34.909" height="110.544"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect x="401.455" y="238.545" width="110.545" height="34.909"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<rect x="342.664" y="96.61" transform="matrix(0.7071 -0.7071 0.7071 0.7071 35.8969 314.7917)" width="110.544" height="34.909"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
5
assets/icons/camera.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
2
assets/icons/color.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 10.5c.002 2.762-2.237 5-5 5s-5.002-2.238-5-5c-.002-2.76 2.237-5 5-5s5.002 2.24 5 5z" color="#000000" fill="#ff15a1" stroke="#373737" stroke-width=".49999682600000006"/><path d="M8 1.401a4.998 4.998 0 0 0-2.488 9.334c-.004-.078-.012-.155-.012-.234a4.998 4.998 0 0 1 7.488-4.334A4.994 4.994 0 0 0 8 1.4z" fill="#1583ff"/><path d="M10.5 5.5a4.998 4.998 0 0 0-5 5c0 .08.008.157.012.235A4.998 4.998 0 0 0 13 6.401c0-.079-.008-.156-.012-.234A4.975 4.975 0 0 0 10.5 5.5z" fill="#00cf2d"/><path d="M12.988 6.167c.004.078.012.155.012.234a4.998 4.998 0 0 1-7.489 4.334 4.994 4.994 0 0 0 4.989 4.766 4.998 4.998 0 0 0 2.488-9.334z" fill="#f8ff15"/><path d="M5.512 10.735a4.996 4.996 0 0 0 2.486 4.093 4.987 4.987 0 0 0 2.49-4.091A4.978 4.978 0 0 1 8 11.4a4.975 4.975 0 0 1-2.488-.666z" fill="#ef0000"/><path d="M7.998 6.173A4.991 4.991 0 0 0 5.5 10.5c0 .079.008.156.012.234a4.978 4.978 0 0 0 4.977.002c.003-.079.011-.157.011-.236a4.99 4.99 0 0 0-2.502-4.328z" fill="#383027"/><path d="M5.5 5.5c-.91 0-1.76.247-2.494.67a4.99 4.99 0 0 0 2.506 4.564c-.004-.077-.012-.154-.012-.233a4.991 4.991 0 0 1 2.498-4.328A4.975 4.975 0 0 0 5.5 5.5z" fill="#5100cc"/><path d="M8 1.401a4.998 4.998 0 0 0-4.994 4.77 4.998 4.998 0 1 0 4.992 8.658 4.998 4.998 0 1 0 4.99-8.662A4.994 4.994 0 0 0 8 1.4z" fill="none" stroke="#373737" stroke-width=".9999936520000001"/></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
7
assets/icons/copy.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Edit / Copy">
|
||||
<path id="Vector" d="M9 9V6.2002C9 5.08009 9 4.51962 9.21799 4.0918C9.40973 3.71547 9.71547 3.40973 10.0918 3.21799C10.5196 3 11.0801 3 12.2002 3H17.8002C18.9203 3 19.4801 3 19.9079 3.21799C20.2842 3.40973 20.5905 3.71547 20.7822 4.0918C21.0002 4.51962 21.0002 5.07967 21.0002 6.19978V11.7998C21.0002 12.9199 21.0002 13.48 20.7822 13.9078C20.5905 14.2841 20.2839 14.5905 19.9076 14.7822C19.4802 15 18.921 15 17.8031 15H15M9 9H6.2002C5.08009 9 4.51962 9 4.0918 9.21799C3.71547 9.40973 3.40973 9.71547 3.21799 10.0918C3 10.5196 3 11.0801 3 12.2002V17.8002C3 18.9203 3 19.4801 3.21799 19.9079C3.40973 20.2842 3.71547 20.5905 4.0918 20.7822C4.5192 21 5.07899 21 6.19691 21H11.8036C12.9215 21 13.4805 21 13.9079 20.7822C14.2842 20.5905 14.5905 20.2839 14.7822 19.9076C15 19.4802 15 18.921 15 17.8031V15M9 9H11.8002C12.9203 9 13.4801 9 13.9079 9.21799C14.2842 9.40973 14.5905 9.71547 14.7822 10.0918C15 10.5192 15 11.079 15 12.1969L15 15" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
24
assets/icons/edit.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<title/>
|
||||
|
||||
<g id="Complete">
|
||||
|
||||
<g id="edit">
|
||||
|
||||
<g>
|
||||
|
||||
<path d="M20,16v4a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4H8" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
|
||||
<polygon fill="none" points="12.5 15.8 22 6.2 17.8 2 8.3 11.5 8 16 12.5 15.8" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
|
||||
</g>
|
||||
|
||||
</g>
|
||||
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 617 B |
19
assets/icons/finish.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 32 32" xml:space="preserve">
|
||||
<polyline style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;" points="6,28 6,5 26,5 26,19 6,19 "/>
|
||||
<rect x="22" y="5" width="4" height="4"/>
|
||||
<rect x="19" y="15" width="3" height="4"/>
|
||||
<rect x="19" y="9" width="3" height="3"/>
|
||||
<rect x="13" y="15" width="3" height="4"/>
|
||||
<rect x="13" y="9" width="3" height="3"/>
|
||||
<rect x="6" y="15" width="4" height="4"/>
|
||||
<rect x="6" y="9" width="4" height="3"/>
|
||||
<rect x="22" y="12" width="4" height="3"/>
|
||||
<rect x="16" y="12" width="3" height="3"/>
|
||||
<rect x="10" y="12" width="3" height="3"/>
|
||||
<rect x="16" y="5" width="3" height="4"/>
|
||||
<rect x="10" y="5" width="3" height="4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 929 B |
2
assets/icons/font-size.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m22 6-3-4-3 4h2v4h-2l3 4 3-4h-2V6zM9.307 4l-6 16h2.137l1.875-5h6.363l1.875 5h2.137l-6-16H9.307zm-1.239 9L10.5 6.515 12.932 13H8.068z"/></svg>
|
||||
|
After Width: | Height: | Size: 373 B |
5
assets/icons/function.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.1873 4.14049C11.2229 3.41714 9.84236 4.0695 9.78883 5.27389L9.71211 7H12C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9H9.62322L9.22988 17.8501C9.0996 20.7815 5.63681 22.261 3.42857 20.3287L3.34151 20.2526C2.92587 19.8889 2.88375 19.2571 3.24743 18.8415C3.61112 18.4259 4.24288 18.3837 4.65852 18.7474L4.74558 18.8236C5.69197 19.6517 7.17602 19.0176 7.23186 17.7613L7.62125 9H6C5.44772 9 5 8.55228 5 8C5 7.44772 5.44772 7 6 7H7.71014L7.7908 5.18509C7.9157 2.37483 11.1369 0.852675 13.3873 2.54049L13.6 2.69999C14.0418 3.03136 14.1314 3.65817 13.8 4.09999C13.4686 4.54182 12.8418 4.63136 12.4 4.29999L12.1873 4.14049Z" fill="#212121"/>
|
||||
<path d="M13.082 13.0462C13.3348 12.9071 13.6525 13.0103 13.7754 13.2714L14.5879 14.9979L11.2928 18.2929C10.9023 18.6834 10.9023 19.3166 11.2928 19.7071C11.6834 20.0977 12.3165 20.0977 12.707 19.7071L15.493 16.9212L16.2729 18.5786C16.9676 20.0548 18.8673 20.4808 20.1259 19.4425L20.6363 19.0214C21.0623 18.6699 21.1228 18.0397 20.7713 17.6136C20.4198 17.1876 19.7896 17.1272 19.3636 17.4787L18.8531 17.8998C18.6014 18.1074 18.2215 18.0222 18.0825 17.727L16.996 15.4182L19.707 12.7071C20.0976 12.3166 20.0976 11.6834 19.707 11.2929C19.3165 10.9024 18.6834 10.9024 18.2928 11.2929L16.0909 13.4948L15.585 12.4198C14.9708 11.1144 13.3822 10.5985 12.1182 11.2937L11.518 11.6238C11.0341 11.89 10.8576 12.498 11.1237 12.982C11.3899 13.4659 11.998 13.6424 12.4819 13.3762L13.082 13.0462Z" fill="#212121"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
39
assets/icons/grid.svg
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 512 512" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#000000;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M454.111,193.473c-3.617,3.21-7.4,6.252-11.391,9.095c-9.236,6.546-14.26,10.143-17.404,12.866
|
||||
c9.216,20.58,14.875,43.094,15.996,66.857h-66.418h-17.61h-92.449V170.384h-17.671h-70.307c2.769-6.606,5.732-12.886,8.915-18.731
|
||||
c9.522-17.564,20.753-31.484,32.724-40.786c0.901-0.7,1.802-1.321,2.703-1.975c5.479-1.028,11.064-1.749,16.696-2.296
|
||||
c-0.327-3.737-0.554-7.487-0.554-11.257c0-8.348,0.814-16.503,2.322-24.417c-54.439,3.977-103.533,27.693-139.848,64.022
|
||||
c-39.939,39.919-64.702,95.252-64.689,156.184c-0.014,60.932,24.75,116.265,64.689,156.184
|
||||
c39.912,39.939,95.245,64.703,156.184,64.689c60.939,0.014,116.266-24.75,156.184-64.689
|
||||
c39.938-39.918,64.695-95.251,64.689-156.184C476.879,256.1,468.658,222.935,454.111,193.473z M124.813,159.941
|
||||
c17.27-17.264,37.903-31.09,60.812-40.492c-10.918,14.133-20.213,31.404-27.76,50.936h-42.661
|
||||
C118.287,166.794,121.463,163.284,124.813,159.941z M101.731,188.054h49.955c-8.708,28.134-13.86,60.165-14.634,94.238H70.688
|
||||
C72.322,247.478,83.52,215.248,101.731,188.054z M94.504,382.422c-13.92-24.55-22.408-52.538-23.816-82.46h66.424
|
||||
c0.674,29.435,4.624,57.275,11.317,82.46H94.504z M124.813,422.314c-6.886-6.887-13.2-14.334-18.938-22.221h47.833
|
||||
c4.691,14.053,10.17,27.193,16.529,38.931c4.711,8.675,9.876,16.616,15.422,23.803
|
||||
C162.737,453.424,142.097,439.584,124.813,422.314z M247.164,476.433c-8.835-0.414-17.496-1.475-25.958-3.07
|
||||
c-0.908-0.654-1.808-1.274-2.71-1.968c-17.971-13.948-34.206-38.357-45.664-69.701c-0.186-0.52-0.353-1.081-0.547-1.602h74.879
|
||||
V476.433z M247.164,382.422H166.68c-7-24.758-11.251-52.725-11.965-82.46h92.449V382.422z M247.164,282.292h-92.509
|
||||
c0.814-34.54,6.453-66.744,15.568-94.238h76.94V282.292z M264.835,299.963h92.509c-0.701,29.729-4.985,57.702-11.985,82.46h-80.524
|
||||
V299.963z M293.503,471.395c-0.894,0.694-1.802,1.314-2.71,1.968c-8.462,1.595-17.123,2.656-25.958,3.07v-76.34h74.898
|
||||
c-3.964,11.044-8.488,21.28-13.506,30.509C316.705,448.165,305.474,462.079,293.503,471.395z M387.193,422.314
|
||||
c-17.283,17.264-37.91,31.097-60.825,40.506c11.691-15.135,21.574-33.792,29.388-55.04c0.921-2.496,1.749-5.112,2.603-7.688h47.766
|
||||
C400.385,407.98,394.073,415.427,387.193,422.314z M417.495,382.422H363.69c6.673-25.165,10.584-53.051,11.257-82.46h66.365
|
||||
C439.904,329.885,431.409,357.872,417.495,382.422z"/>
|
||||
<path class="st0" d="M313.762,173.741c22.468,15.949,27.434,19.746,35.341,34.833c6.253,11.945,16.39,32.885,16.39,32.885
|
||||
c0.48,0.954,1.448,1.562,2.522,1.562c1.061,0,2.049-0.608,2.522-1.562c0,0,10.143-20.94,16.396-32.885
|
||||
c7.894-15.088,12.866-18.884,35.341-34.833c24.63-17.47,41.086-45.911,41.086-78.402C463.359,42.688,420.665,0,368.014,0
|
||||
c-52.658,0-95.332,42.688-95.332,95.339C272.682,127.83,289.125,156.27,313.762,173.741z M368.014,55.013
|
||||
c22.275,0,40.332,18.058,40.332,40.326c0,22.274-18.057,40.332-40.332,40.332c-22.275,0-40.326-18.058-40.326-40.332
|
||||
C327.689,73.071,345.739,55.013,368.014,55.013z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
2
assets/icons/help.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zM7.92 9.234v.102a.5.5 0 0 0 .5.5h.997a.499.499 0 0 0 .499-.499c0-1.29.998-1.979 2.34-1.979 1.308 0 2.168.689 2.168 1.67 0 .928-.482 1.359-1.686 1.91l-.344.154C11.379 11.54 11 12.21 11 13.381v.119a.5.5 0 0 0 .5.5h.997a.499.499 0 0 0 .499-.499c0-.516.138-.723.55-.912l.345-.155c1.445-.654 2.529-1.514 2.529-3.39v-.103c0-1.978-1.72-3.441-4.164-3.441-2.478 0-4.336 1.428-4.336 3.734zm2.58 7.757c0 .867.659 1.509 1.491 1.509.85 0 1.509-.642 1.509-1.509 0-.867-.659-1.491-1.509-1.491-.832 0-1.491.624-1.491 1.491z" fill="#000000"/></svg>
|
||||
|
After Width: | Height: | Size: 834 B |
13
assets/icons/hide.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" >
|
||||
|
||||
<path d="M0 0h48v48H0z" fill="none"/>
|
||||
<g id="Shopicon">
|
||||
<path d="M11.957,33.214L7.171,38L10,40.828l5.305-5.305C17.867,36.992,20.788,38,24,38c12,0,20-14,20-14s-2.953-5.159-7.957-9.214
|
||||
L40.829,10L38,7.172l-5.305,5.305C30.133,11.008,27.212,10,24,10C12,10,4,24,4,24S6.953,29.159,11.957,33.214z M16,24
|
||||
c0-4.418,3.582-8,8-8c1.483,0,2.867,0.411,4.058,1.114l-3.035,3.035C24.694,20.062,24.356,20,24,20c-2.206,0-4,1.794-4,4
|
||||
c0,0.356,0.062,0.694,0.149,1.023l-3.035,3.035C16.411,26.867,16,25.483,16,24z M32,24c0,4.418-3.582,8-8,8
|
||||
c-1.483,0-2.867-0.411-4.058-1.114l3.035-3.035C23.306,27.938,23.644,28,24,28c2.206,0,4-1.794,4-4
|
||||
c0-0.356-0.062-0.694-0.149-1.023l3.035-3.035C31.589,21.133,32,22.517,32,24z"/>
|
||||
|
After Width: | Height: | Size: 937 B |
4
assets/icons/info.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M960 0c530.193 0 960 429.807 960 960s-429.807 960-960 960S0 1490.193 0 960 429.807 0 960 0Zm0 101.053c-474.384 0-858.947 384.563-858.947 858.947S485.616 1818.947 960 1818.947 1818.947 1434.384 1818.947 960 1434.384 101.053 960 101.053Zm-42.074 626.795c-85.075 39.632-157.432 107.975-229.844 207.898-10.327 14.249-10.744 22.907-.135 30.565 7.458 5.384 11.792 3.662 22.656-7.928 1.453-1.562 1.453-1.562 2.94-3.174 9.391-10.17 16.956-18.8 33.115-37.565 53.392-62.005 79.472-87.526 120.003-110.867 35.075-20.198 65.9 9.485 60.03 47.471-1.647 10.664-4.483 18.534-11.791 35.432-2.907 6.722-4.133 9.646-5.496 13.23-13.173 34.63-24.269 63.518-47.519 123.85l-1.112 2.886c-7.03 18.242-7.03 18.242-14.053 36.48-30.45 79.138-48.927 127.666-67.991 178.988l-1.118 3.008a10180.575 10180.575 0 0 0-10.189 27.469c-21.844 59.238-34.337 97.729-43.838 138.668-1.484 6.37-1.484 6.37-2.988 12.845-5.353 23.158-8.218 38.081-9.82 53.42-2.77 26.522-.543 48.24 7.792 66.493 9.432 20.655 29.697 35.43 52.819 38.786 38.518 5.592 75.683 5.194 107.515-2.048 17.914-4.073 35.638-9.405 53.03-15.942 50.352-18.932 98.861-48.472 145.846-87.52 41.11-34.26 80.008-76 120.788-127.872 3.555-4.492 3.555-4.492 7.098-8.976 12.318-15.707 18.352-25.908 20.605-36.683 2.45-11.698-7.439-23.554-15.343-19.587-3.907 1.96-7.993 6.018-14.22 13.872-4.454 5.715-6.875 8.77-9.298 11.514-9.671 10.95-19.883 22.157-30.947 33.998-18.241 19.513-36.775 38.608-63.656 65.789-13.69 13.844-30.908 25.947-49.42 35.046-29.63 14.559-56.358-3.792-53.148-36.635 2.118-21.681 7.37-44.096 15.224-65.767 17.156-47.367 31.183-85.659 62.216-170.048 13.459-36.6 19.27-52.41 26.528-72.201 21.518-58.652 38.696-105.868 55.04-151.425 20.19-56.275 31.596-98.224 36.877-141.543 3.987-32.673-5.103-63.922-25.834-85.405-22.986-23.816-55.68-34.787-96.399-34.305-45.053.535-97.607 15.256-145.963 37.783Zm308.381-388.422c-80.963-31.5-178.114 22.616-194.382 108.33-11.795 62.124 11.412 115.76 58.78 138.225 93.898 44.531 206.587-26.823 206.592-130.826.005-57.855-24.705-97.718-70.99-115.729Z" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
5
assets/icons/loading.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1014 B |
4
assets/icons/map.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6H12.01M9 20L3 17V4L5 5M9 20L15 17M9 20V14M15 17L21 20V7L19 6M15 17V14M15 6.2C15 7.96731 13.5 9.4 12 11C10.5 9.4 9 7.96731 9 6.2C9 4.43269 10.3431 3 12 3C13.6569 3 15 4.43269 15 6.2Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 510 B |
8
assets/icons/maximize.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<rect x="0" fill="none" width="20" height="20"/>
|
||||
|
||||
<g>
|
||||
|
After Width: | Height: | Size: 477 B |
4
assets/icons/minus.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 335 B |
50
assets/icons/move.svg
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 330 330" xml:space="preserve">
|
||||
<path id="XMLID_225_" d="M326.602,174.506c0.139-0.17,0.26-0.349,0.392-0.524c0.162-0.216,0.33-0.428,0.48-0.654
|
||||
c0.144-0.213,0.267-0.435,0.397-0.654c0.12-0.2,0.246-0.396,0.356-0.603c0.12-0.225,0.223-0.457,0.331-0.687
|
||||
c0.101-0.214,0.207-0.424,0.299-0.643c0.093-0.225,0.168-0.455,0.25-0.683c0.083-0.233,0.173-0.463,0.245-0.702
|
||||
c0.069-0.231,0.121-0.465,0.18-0.699c0.061-0.241,0.128-0.479,0.177-0.725c0.054-0.272,0.086-0.547,0.125-0.822
|
||||
c0.03-0.21,0.07-0.416,0.091-0.629c0.098-0.986,0.098-1.979,0-2.965c-0.021-0.213-0.061-0.419-0.091-0.629
|
||||
c-0.039-0.274-0.071-0.55-0.125-0.822c-0.049-0.246-0.116-0.483-0.177-0.725c-0.059-0.233-0.11-0.468-0.18-0.699
|
||||
c-0.072-0.238-0.162-0.468-0.245-0.702c-0.082-0.228-0.157-0.458-0.25-0.683c-0.092-0.219-0.198-0.429-0.299-0.643
|
||||
c-0.108-0.23-0.211-0.461-0.331-0.687c-0.11-0.206-0.236-0.403-0.356-0.603c-0.131-0.219-0.254-0.441-0.397-0.654
|
||||
c-0.15-0.226-0.318-0.438-0.48-0.654c-0.132-0.175-0.253-0.354-0.392-0.524c-0.315-0.384-0.646-0.753-0.998-1.103l-54.995-54.997
|
||||
c-5.856-5.857-15.354-5.858-21.213-0.001c-5.858,5.858-5.858,15.355,0,21.213L278.788,150H180V51.213l29.394,29.393
|
||||
c2.929,2.929,6.768,4.393,10.606,4.393s7.678-1.464,10.606-4.393c5.858-5.858,5.858-15.355,0-21.213L175.609,4.396
|
||||
c-0.347-0.346-0.711-0.675-1.089-0.987c-0.1-0.082-0.207-0.151-0.308-0.23c-0.285-0.223-0.571-0.444-0.872-0.646
|
||||
c-0.094-0.063-0.194-0.115-0.289-0.175c-0.318-0.203-0.639-0.403-0.973-0.582c-0.07-0.038-0.145-0.067-0.216-0.104
|
||||
c-0.363-0.188-0.731-0.368-1.112-0.526c-0.05-0.02-0.103-0.036-0.153-0.056c-0.401-0.162-0.809-0.311-1.226-0.439
|
||||
c-0.056-0.017-0.112-0.026-0.167-0.043c-0.411-0.12-0.827-0.23-1.252-0.315c-0.128-0.025-0.259-0.037-0.388-0.059
|
||||
c-0.354-0.061-0.706-0.124-1.067-0.159C166.002,0.026,165.503,0,165,0c-0.502,0-1.002,0.026-1.497,0.076
|
||||
c-0.368,0.037-0.727,0.1-1.087,0.162c-0.122,0.021-0.247,0.032-0.368,0.056c-0.433,0.086-0.854,0.197-1.272,0.32
|
||||
c-0.049,0.014-0.098,0.023-0.146,0.038c-0.425,0.129-0.84,0.282-1.249,0.447c-0.042,0.018-0.087,0.03-0.129,0.047
|
||||
c-0.388,0.161-0.764,0.344-1.135,0.536c-0.063,0.033-0.131,0.06-0.194,0.093c-0.341,0.184-0.669,0.387-0.994,0.595
|
||||
c-0.088,0.056-0.18,0.105-0.268,0.163c-0.31,0.207-0.605,0.435-0.898,0.665c-0.093,0.072-0.19,0.136-0.282,0.211
|
||||
c-0.379,0.312-0.743,0.641-1.09,0.987L99.396,59.393c-5.858,5.858-5.858,15.355,0,21.213c5.857,5.857,15.355,5.858,21.213,0
|
||||
L150,51.214V150H51.213l29.394-29.394c5.858-5.858,5.858-15.355,0-21.213c-5.857-5.858-15.355-5.858-21.213,0L4.397,154.391
|
||||
c-0.351,0.35-0.683,0.719-0.998,1.103c-0.139,0.17-0.261,0.349-0.392,0.524c-0.162,0.216-0.33,0.428-0.48,0.654
|
||||
c-0.144,0.213-0.267,0.435-0.398,0.654c-0.12,0.2-0.246,0.396-0.356,0.603c-0.121,0.225-0.223,0.457-0.331,0.687
|
||||
c-0.101,0.214-0.207,0.424-0.299,0.643c-0.093,0.225-0.168,0.455-0.25,0.683c-0.083,0.233-0.173,0.463-0.245,0.702
|
||||
c-0.069,0.231-0.121,0.465-0.18,0.699c-0.061,0.241-0.128,0.479-0.177,0.725c-0.054,0.272-0.087,0.547-0.125,0.822
|
||||
c-0.03,0.21-0.07,0.416-0.091,0.629c-0.098,0.986-0.098,1.979,0,2.965c0.021,0.213,0.061,0.419,0.091,0.629
|
||||
c0.038,0.274,0.071,0.55,0.125,0.822c0.049,0.246,0.116,0.483,0.177,0.725c0.059,0.233,0.11,0.468,0.18,0.699
|
||||
c0.072,0.238,0.162,0.468,0.245,0.702c0.082,0.228,0.157,0.458,0.25,0.683c0.092,0.219,0.198,0.429,0.299,0.643
|
||||
c0.108,0.23,0.21,0.461,0.331,0.687c0.11,0.206,0.236,0.403,0.356,0.603c0.131,0.219,0.254,0.441,0.398,0.654
|
||||
c0.15,0.226,0.318,0.438,0.48,0.654c0.131,0.175,0.253,0.354,0.392,0.524c0.316,0.384,0.647,0.753,0.998,1.103l54.997,54.997
|
||||
C62.322,233.536,66.161,235,70,235s7.678-1.464,10.606-4.394c5.858-5.858,5.858-15.355,0-21.213L51.213,180H150v98.786
|
||||
l-29.392-29.392c-5.857-5.858-15.355-5.857-21.213,0c-5.858,5.858-5.858,15.355,0,21.213l54.995,54.997
|
||||
c0.347,0.347,0.711,0.676,1.09,0.987c0.092,0.075,0.189,0.138,0.282,0.21c0.293,0.23,0.588,0.458,0.898,0.665
|
||||
c0.088,0.058,0.18,0.106,0.268,0.163c0.325,0.208,0.653,0.412,0.994,0.595c0.063,0.034,0.131,0.06,0.194,0.093
|
||||
c0.371,0.192,0.747,0.375,1.135,0.536c0.042,0.018,0.087,0.03,0.129,0.047c0.409,0.165,0.824,0.318,1.249,0.447
|
||||
c0.049,0.015,0.098,0.023,0.146,0.038c0.418,0.123,0.84,0.233,1.272,0.32c0.121,0.024,0.246,0.035,0.368,0.056
|
||||
c0.359,0.063,0.719,0.125,1.087,0.162c0.495,0.05,0.995,0.076,1.497,0.076s1.002-0.026,1.497-0.076
|
||||
c0.368-0.037,0.727-0.1,1.087-0.162c0.122-0.022,0.247-0.032,0.368-0.056c0.433-0.086,0.854-0.197,1.272-0.32
|
||||
c0.049-0.014,0.098-0.023,0.146-0.038c0.425-0.129,0.84-0.282,1.249-0.447c0.042-0.018,0.087-0.03,0.129-0.047
|
||||
c0.388-0.161,0.764-0.344,1.135-0.536c0.063-0.033,0.131-0.06,0.194-0.093c0.341-0.184,0.669-0.387,0.994-0.595
|
||||
c0.088-0.056,0.18-0.104,0.268-0.163c0.31-0.207,0.605-0.435,0.898-0.665c0.093-0.072,0.19-0.136,0.282-0.21
|
||||
c0.379-0.312,0.743-0.641,1.09-0.987l54.997-54.997c5.858-5.857,5.858-15.355,0-21.213c-5.856-5.857-15.354-5.858-21.213,0
|
||||
L180,278.787V180h98.788l-29.393,29.394c-5.858,5.858-5.858,15.355,0,21.213c2.929,2.929,6.768,4.393,10.607,4.393
|
||||
c3.839,0,7.678-1.465,10.606-4.394l54.995-54.997C325.955,175.259,326.286,174.89,326.602,174.506z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
19
assets/icons/opacity.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.1" id="Icons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 32 32" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
|
||||
.st2{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:6,6;}
|
||||
.st3{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4,4;}
|
||||
.st4{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;}
|
||||
.st5{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-dasharray:3.1081,3.1081;}
|
||||
|
||||
.st6{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:4,3;}
|
||||
</style>
|
||||
<circle class="st0" cx="13" cy="13" r="10"/>
|
||||
<path class="st0" d="M22.4,9.6c1.3,0.5,2.6,1.3,3.7,2.3c3.9,3.9,3.9,10.2,0,14.1s-10.2,3.9-14.1,0"/>
|
||||
<path class="st6" d="M9.6,22.4c-1.3-3.5-0.5-7.6,2.3-10.5c2.8-2.8,6.9-3.6,10.5-2.3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
4
assets/icons/pixel_histogram.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 6C12 5.44772 11.5523 5 11 5C10.4477 5 10 5.44772 10 6V16C10 16.5523 10.4477 17 11 17C11.5523 17 12 16.5523 12 16V6ZM9 9C9 8.44772 8.55228 8 8 8C7.44772 8 7 8.44772 7 9V16C7 16.5523 7.44772 17 8 17C8.55228 17 9 16.5523 9 16V9ZM15 9C15 8.44772 14.5523 8 14 8C13.4477 8 13 8.44772 13 9V16C13 16.5523 13.4477 17 14 17C14.5523 17 15 16.5523 15 16V9ZM18 13C18 12.4477 17.5523 12 17 12C16.4477 12 16 12.4477 16 13V16C16 16.5523 16.4477 17 17 17C17.5523 17 18 16.5523 18 16V13ZM6 15C6 14.4477 5.55228 14 5 14C4.44772 14 4 14.4477 4 15V16C4 16.5523 4.44772 17 5 17C5.55228 17 6 16.5523 6 16V15ZM21 15C21 14.4477 20.5523 14 20 14C19.4477 14 19 14.4477 19 15V16C19 16.5523 19.4477 17 20 17C20.5523 17 21 16.5523 21 16V15ZM4 18C3.44772 18 3 18.4477 3 19C3 19.5523 3.44772 20 4 20H21C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18H4Z" fill="#000000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
4
assets/icons/plus.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 340 B |
21
assets/icons/projection.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.1" id="Icons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 32 32" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
|
||||
.st2{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:6,6;}
|
||||
.st3{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:4,4;}
|
||||
.st4{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;}
|
||||
.st5{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-dasharray:3.1081,3.1081;}
|
||||
|
||||
.st6{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:4,3;}
|
||||
</style>
|
||||
<rect x="4" y="4" class="st0" width="24" height="24"/>
|
||||
<path class="st0" d="M4,25l4.9-4c3.1-2.5,7.3-3,11-1.4l0,0c2,0.9,4.2,1.1,6.4,0.7L28,20"/>
|
||||
<path class="st0" d="M4,13l7-3.2c2.6-1.2,5.5-1.3,8.1-0.3l2.1,0.8c1.2,0.4,2.5,0.7,3.7,0.7H28"/>
|
||||
<path class="st0" d="M24,4l-0.8,1.2C18.7,11.9,17.9,20.5,21,28l0,0"/>
|
||||
<path class="st0" d="M14,4L14,4c-4.8,7.3-4.8,16.7,0,24l0,0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
19
assets/icons/remove.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 -0.5 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<title>delete [#1487]</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Dribbble-Light-Preview" transform="translate(-179.000000, -360.000000)" fill="#000000">
|
||||
<g id="icons" transform="translate(56.000000, 160.000000)">
|
||||
<path d="M130.35,216 L132.45,216 L132.45,208 L130.35,208 L130.35,216 Z M134.55,216 L136.65,216 L136.65,208 L134.55,208 L134.55,216 Z M128.25,218 L138.75,218 L138.75,206 L128.25,206 L128.25,218 Z M130.35,204 L136.65,204 L136.65,202 L130.35,202 L130.35,204 Z M138.75,204 L138.75,200 L128.25,200 L128.25,204 L123,204 L123,206 L126.15,206 L126.15,220 L140.85,220 L140.85,206 L144,206 L144,204 L138.75,204 Z" id="delete-[#1487]">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
8
assets/icons/restore.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<rect x="0" fill="none" width="20" height="20"/>
|
||||
|
||||
<g>
|
||||
|
After Width: | Height: | Size: 487 B |
7
assets/icons/reticle.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg id="reticle" viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 0 7 L 5 7 L 5 9 L 0 9 L 0 7 Z" fill-rule="evenodd"/>
|
||||
<path d="M 11 7 L 16 7 L 16 9 L 11 9 L 11 7 Z" fill-rule="evenodd"/>
|
||||
<path d="M 7 11 L 9 11 L 9 16 L 7 16 L 7 11 Z" fill-rule="evenodd" />
|
||||
<path d="M 7 0 L 9 0 L 9 5 L 7 5 L 7 0 Z" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 423 B |
4
assets/icons/search-white.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.7955 15.8111L21 21M18 10.5C18 14.6421 14.6421 18 10.5 18C6.35786 18 3 14.6421 3 10.5C3 6.35786 6.35786 3 10.5 3C14.6421 3 18 6.35786 18 10.5Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 455 B |
4
assets/icons/search.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.7955 15.8111L21 21M18 10.5C18 14.6421 14.6421 18 10.5 18C6.35786 18 3 14.6421 3 10.5C3 6.35786 6.35786 3 10.5 3C14.6421 3 18 6.35786 18 10.5Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 469 B |
1
assets/icons/select.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 121.65 122.88" style="enable-background:new 0 0 121.65 122.88" xml:space="preserve"><g><path d="M1.96,0.28L1.91,0.3L1.88,0.32c-0.07,0.03-0.13,0.06-0.19,0.1L1.67,0.43L1.61,0.46L1.58,0.48C1.55,0.5,1.52,0.52,1.49,0.54 l0,0L1.45,0.57L1.44,0.57L1.41,0.59L1.38,0.61L1.34,0.64L1.29,0.68l-0.01,0C0.73,1.11,0.33,1.69,0.14,2.36 C0.03,2.7-0.01,3.07,0,3.43v2.05c0.02,2.55,2.78,4.12,4.98,2.8c0.67-0.41,1.15-1.02,1.4-1.73h3.46c2.55-0.02,4.12-2.78,2.8-4.98 C12.03,0.59,11,0.01,9.84,0H3.42C2.94-0.02,2.44,0.07,1.96,0.28L1.96,0.28z M101.11,122.86c0.09,0.02,0.19,0.02,0.29,0 c0.03-0.02,0.07-0.04,0.1-0.05l9.76-5.63c0.09-0.06,0.15-0.16,0.18-0.26c0.02-0.08,0.02-0.16-0.01-0.21l-10.7-18.65l0,0 c-0.09-0.16-0.15-0.33-0.19-0.51c-0.19-0.94,0.41-1.85,1.35-2.04l15.7-3.25c0.02-0.01,0.04-0.01,0.06-0.01 c1.35-0.28,2.5-0.76,3.26-1.36c0.37-0.29,0.62-0.59,0.72-0.87c0.06-0.18,0.03-0.39-0.09-0.63c-0.22-0.41-0.66-0.87-1.39-1.36 L66.79,51.49l4.95,64.46c0.07,0.88,0.24,1.49,0.48,1.88c0.14,0.23,0.31,0.35,0.5,0.39c0.29,0.06,0.67-0.01,1.11-0.18 c0.9-0.36,1.88-1.12,2.81-2.15l10.71-12.02l0,0c0.12-0.13,0.26-0.25,0.43-0.35c0.83-0.48,1.89-0.2,2.37,0.63l10.8,18.59 C100.97,122.8,101.03,122.84,101.11,122.86L101.11,122.86L101.11,122.86z M1.61,0.46C1.57,0.49,1.53,0.51,1.49,0.54L1.61,0.46 L1.61,0.46z M6.56,18.59c-0.02-2.55-2.78-4.12-4.98-2.8C0.59,16.4,0.01,17.43,0,18.59v6.55c0.02,2.55,2.78,4.12,4.98,2.8 c0.99-0.61,1.57-1.64,1.58-2.8V18.59L6.56,18.59z M6.56,38.26c-0.02-2.55-2.78-4.12-4.98-2.8C0.59,36.06,0.01,37.1,0,38.26v6.55 c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8V38.26L6.56,38.26z M6.56,57.92c-0.02-2.55-2.78-4.12-4.98-2.8 c-0.99,0.61-1.57,1.64-1.58,2.8v6.56c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8V57.92L6.56,57.92z M6.56,77.59 c-0.02-2.55-2.78-4.12-4.98-2.8c-0.99,0.61-1.57,1.64-1.58,2.8v6.55c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8 V77.59L6.56,77.59z M6.56,97.25c-0.02-2.55-2.78-4.12-4.98-2.8c-0.99,0.61-1.57,1.64-1.58,2.8v6.56c0.02,2.55,2.78,4.12,4.98,2.8 c0.99-0.61,1.57-1.64,1.58-2.8V97.25L6.56,97.25z M13.13,103.79c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58h6.55 c2.55-0.02,4.12-2.78,2.8-4.98c-0.61-0.99-1.64-1.57-2.8-1.58H13.13L13.13,103.79z M32.79,103.79c-2.55,0.02-4.12,2.78-2.8,4.98 c0.61,0.99,1.64,1.57,2.8,1.58h6.56c2.55-0.02,4.12-2.78,2.8-4.98c-0.61-0.99-1.64-1.57-2.8-1.58H32.79L32.79,103.79z M52.46,103.79c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58h6.56c2.55-0.02,4.12-2.78,2.8-4.98 c-0.61-0.99-1.64-1.57-2.8-1.58H52.46L52.46,103.79z M103.79,63.36c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8 v-6.56c-0.02-2.55-2.78-4.12-4.98-2.8c-0.99,0.61-1.57,1.64-1.58,2.8V63.36L103.79,63.36z M103.79,43.7 c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8v-6.56c-0.02-2.55-2.78-4.12-4.98-2.8c-0.99,0.61-1.57,1.64-1.58,2.8 V43.7L103.79,43.7z M103.79,24.03c0.02,2.55,2.78,4.12,4.98,2.8c0.99-0.61,1.57-1.64,1.58-2.8v-6.55c-0.02-2.55-2.78-4.12-4.98-2.8 c-0.99,0.61-1.57,1.64-1.58,2.8V24.03L103.79,24.03z M104.63,6.56c0.99,1.1,2.69,1.49,4.14,0.61c0.99-0.61,1.57-1.64,1.58-2.8V3.42 c0.03-0.61-0.12-1.25-0.47-1.84c-0.61-0.99-1.64-1.57-2.8-1.58h-5.47c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58 H104.63L104.63,6.56z M88.5,6.56c2.55-0.02,4.12-2.78,2.8-4.98C90.69,0.59,89.66,0.01,88.5,0h-6.55c-2.55,0.02-4.12,2.78-2.8,4.98 c0.61,0.99,1.64,1.57,2.8,1.58H88.5L88.5,6.56z M68.83,6.56c2.55-0.02,4.12-2.78,2.8-4.98c-0.61-0.99-1.64-1.57-2.8-1.58h-6.56 c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58H68.83L68.83,6.56z M49.17,6.56c2.55-0.02,4.12-2.78,2.8-4.98 c-0.61-0.99-1.64-1.57-2.8-1.58h-6.56c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58H49.17L49.17,6.56z M29.5,6.56 c2.55-0.02,4.12-2.78,2.8-4.98C31.7,0.59,30.66,0.01,29.5,0h-6.55c-2.55,0.02-4.12,2.78-2.8,4.98c0.61,0.99,1.64,1.57,2.8,1.58 H29.5L29.5,6.56z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
4
assets/icons/settings.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1703.534 960c0-41.788-3.84-84.48-11.633-127.172l210.184-182.174-199.454-340.856-265.186 88.433c-66.974-55.567-143.323-99.389-223.85-128.415L1158.932 0h-397.78L706.49 269.704c-81.43 29.138-156.423 72.282-223.962 128.414l-265.073-88.32L18 650.654l210.184 182.174C220.39 875.52 216.55 918.212 216.55 960s3.84 84.48 11.633 127.172L18 1269.346l199.454 340.856 265.186-88.433c66.974 55.567 143.322 99.389 223.85 128.415L761.152 1920h397.779l54.663-269.704c81.318-29.138 156.424-72.282 223.963-128.414l265.073 88.433 199.454-340.856-210.184-182.174c7.793-42.805 11.633-85.497 11.633-127.285m-743.492 395.294c-217.976 0-395.294-177.318-395.294-395.294 0-217.976 177.318-395.294 395.294-395.294 217.977 0 395.294 177.318 395.294 395.294 0 217.976-177.317 395.294-395.294 395.294" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
21
assets/icons/share.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px"
|
||||
height="800px" viewBox="0 0 512 512" xml:space="preserve">
|
||||
|
||||
<g id="7935ec95c421cee6d86eb22ecd12b5bb">
|
||||
|
||||
<path style="display: inline;" d="M505.705,421.851c0,49.528-40.146,89.649-89.637,89.649c-49.527,0-89.662-40.121-89.662-89.649
|
||||
c0-1.622,0.148-3.206,0.236-4.815l-177.464-90.474c-14.883,11.028-33.272,17.641-53.221,17.641
|
||||
c-49.528,0-89.662-40.134-89.662-89.649s40.134-89.649,89.662-89.649c22.169,0,42.429,8.097,58.086,21.433l172.774-88.09
|
||||
c-0.25-2.682-0.412-5.364-0.412-8.097c0-49.503,40.135-89.649,89.662-89.649c49.49,0,89.637,40.146,89.637,89.649
|
||||
c0,49.516-40.146,89.65-89.637,89.65c-22.082,0-42.242-8.009-57.861-21.221l-172.999,88.215c0.224,2.558,0.387,5.14,0.387,7.76
|
||||
c0,4.653-0.474,9.182-1.148,13.648l171.389,87.379c15.92-14.472,37.004-23.379,60.232-23.379
|
||||
C465.559,332.201,505.705,372.348,505.705,421.851z">
|
||||
|
||||
</path>
|
||||
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
10
assets/icons/show.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" >
|
||||
|
||||
<path d="M0 0h48v48H0z" fill="none"/>
|
||||
<g id="Shopicon">
|
||||
<circle cx="24" cy="24" r="4"/>
|
||||
<path d="M24,38c12,0,20-14,20-14s-8-14-20-14S4,24,4,24S12,38,24,38z M24,16c4.418,0,8,3.582,8,8s-3.582,8-8,8s-8-3.582-8-8
|
||||
S19.582,16,24,16z"/>
|
||||
|
After Width: | Height: | Size: 464 B |
6
assets/icons/stack.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1546 3.36026C12.4835 3.00999 11.5741 3.00459 10.8976 3.35396C8.30466 4.6931 5.95279 6.22853 3.89182 7.93154C3.57311 8.19489 3.34693 8.57758 3.35079 9.02802C3.35463 9.47662 3.58541 9.85419 3.90218 10.1132C5.94604 11.7844 8.29985 13.3212 10.8453 14.6497C11.5165 15 12.4258 15.0054 13.1023 14.656C15.6953 13.3169 18.0472 11.7815 20.1081 10.0785C20.4268 9.8151 20.653 9.43242 20.6492 8.98197C20.6453 8.53338 20.4145 8.1558 20.0978 7.89679C18.0539 6.22562 15.7001 4.6888 13.1546 3.36026ZM11.5859 4.68671C11.8256 4.56294 12.2193 4.56411 12.4606 4.69004C14.8899 5.95796 17.1283 7.41666 19.0675 8.99223C17.1167 10.5932 14.885 12.0471 12.414 13.3233C12.1744 13.4471 11.7807 13.4459 11.5394 13.32C9.11004 12.052 6.87163 10.5933 4.9324 9.01777C6.88321 7.41684 9.11496 5.96285 11.5859 4.68671Z" fill="#000000"/>
|
||||
<path d="M21.197 12.698C21.4164 13.0494 21.3094 13.512 20.958 13.7314L14.8508 17.5443C14.022 18.0617 12.9938 18.3009 11.9999 18.301C11.006 18.301 9.9777 18.0619 9.14884 17.5446L3.10851 13.7749C2.75711 13.5556 2.65003 13.093 2.86934 12.7416C3.08864 12.3902 3.55128 12.2831 3.90268 12.5024L9.94301 16.2721C10.4872 16.6117 11.2264 16.801 11.9998 16.801C12.7732 16.8009 13.5124 16.6116 14.0564 16.2719L20.1636 12.459C20.515 12.2397 20.9776 12.3467 21.197 12.698Z" fill="#000000"/>
|
||||
<path d="M21.197 16.4527C21.4164 16.804 21.3094 17.2667 20.9581 17.4861L15.6692 20.7889C14.6115 21.4494 13.2886 21.7602 11.9998 21.7602C10.7111 21.7603 9.38808 21.4497 8.3303 20.7894L3.10843 17.5296C2.75706 17.3102 2.65004 16.8476 2.86938 16.4962C3.08873 16.1448 3.55139 16.0378 3.90276 16.2572L9.12462 19.517C9.89764 19.9995 10.9316 20.2603 11.9998 20.2602C13.068 20.2602 14.1018 19.9993 14.8746 19.5167L20.1635 16.2138C20.5149 15.9944 20.9776 16.1013 21.197 16.4527Z" fill="#000000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
1
assets/icons/target.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="m27.95 15a12 12 0 0 0 -10.95-10.95v-4.05h-2v4.05a12 12 0 0 0 -10.95 10.95h-4.05v2h4.05a12 12 0 0 0 10.95 10.95v4.05h2v-4.05a12 12 0 0 0 10.95-10.95h4.05v-2zm-2 2a10 10 0 0 1 -8.95 8.95v-3.95h-2v3.95a10 10 0 0 1 -8.95-8.95h3.95v-2h-3.95a10 10 0 0 1 8.95-8.95v3.95h2v-3.95a10 10 0 0 1 8.95 8.95h-3.95v2z"/><circle cx="16" cy="16" r="2"/></svg>
|
||||
|
After Width: | Height: | Size: 410 B |
12
assets/icons/telescope.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 122.88 122.88" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="enable-background:new 0 0 122.88 122.88" xml:space="preserve">
|
||||
|
||||
<g>
|
||||
|
||||
<path d="M5.49,79.09l37.86,37.86C66.37,99.1,36.69,54.35,5.49,79.09L5.49,79.09z M42.39,62.21l18.29,18.29 c1.18,1.18,3.12,1.18,4.3,0l24.2-24.2c6.21-6.21,6.21-16.38,0-22.59v0c-6.21-6.21-16.38-6.21-22.59,0l-24.2,24.2 C41.2,59.09,41.2,61.02,42.39,62.21L42.39,62.21z M24.5,104.83L20.33,109c-1.48,1.48-3.89,1.48-5.38,0c-1.48-1.49-1.48-3.89,0-5.38 l4.17-4.17l-17-17l0.01-0.01c-0.13-0.13-0.25-0.26-0.36-0.4C0.15,80,0.49,77.01,2.54,75.38c13.15-10.43,26.24-10.1,36.28-4.46 c1.85,1.04,3.59,2.26,5.2,3.64l1.99-1.99l-6.99-6.99c-1.52-1.52-2.28-3.52-2.28-5.51c0-1.99,0.76-3.99,2.28-5.51l5.92-5.92 l-5.11-5.11l-3.76,3.76h0c-1.22,1.22-2.83,1.84-4.44,1.84c-1.59,0-3.19-0.61-4.42-1.84l-0.01-0.01l-0.01,0.01h0L3.53,23.62 c-1.22-1.22-1.84-2.83-1.84-4.44c0-1.59,0.62-3.19,1.85-4.43l-0.01-0.01L16.44,1.84l0,0c0.16-0.16,0.33-0.31,0.51-0.44 C18.09,0.47,19.48,0,20.87,0c1.59,0,3.19,0.61,4.42,1.84l0.01,0.01l0.01-0.01l0,0L48.97,25.5v0c1.22,1.22,1.84,2.83,1.84,4.44 c0,1.6-0.61,3.21-1.84,4.44v0l-3.77,3.77l5.11,5.11l12.91-12.91c4.03-4.03,9.35-6.05,14.66-6.05c5.31,0,10.62,2.02,14.66,6.05v0 c4.03,4.03,6.05,9.35,6.05,14.66c0,5.31-2.02,10.62-6.05,14.66L79.63,72.56l5.11,5.11l3.77-3.76c1.22-1.22,2.83-1.84,4.44-1.84 c1.6,0,3.21,0.61,4.44,1.84l23.66,23.66l0,0c1.22,1.22,1.84,2.83,1.84,4.44c0,1.6-0.61,3.21-1.84,4.44l0,0l-12.91,12.91 c-1.22,1.22-2.83,1.84-4.44,1.84c-1.6,0-3.21-0.61-4.44-1.84L75.6,95.69c-1.22-1.22-1.84-2.83-1.84-4.44 c0-1.59,0.61-3.19,1.84-4.42l0.01-0.01l-0.01-0.01l3.76-3.77l-5.11-5.11l-5.92,5.92c-1.52,1.52-3.52,2.28-5.51,2.28 c-1.99,0-3.99-0.76-5.51-2.28l-5.92-5.92l-2.15,2.15c2.47,3.26,4.37,6.93,5.57,10.75c3.27,10.41,1.4,21.91-8.23,29.61 c-1.86,1.73-4.78,1.68-6.59-0.13L24.5,104.83L24.5,104.83z M0.13,106.96c-0.53-1.89,0.57-3.86,2.47-4.39 c1.89-0.53,3.86,0.57,4.39,2.47c1,3.53,2.38,6.2,4.16,7.99c1.6,1.61,3.6,2.53,6.03,2.73c1.96,0.16,3.42,1.88,3.26,3.85 c-0.16,1.96-1.88,3.42-3.85,3.26c-4.17-0.36-7.65-1.98-10.48-4.83C3.45,115.38,1.47,111.67,0.13,106.96L0.13,106.96z"/>
|
||||
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
16
assets/icons/thickness.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>line-thickness</title>
|
||||
<g id="Layer_2" data-name="Layer 2">
|
||||
<g id="invisible_box" data-name="invisible box">
|
||||
<rect width="48" height="48" fill="none"/>
|
||||
</g>
|
||||
<g id="icons_Q2" data-name="icons Q2">
|
||||
<rect x="4" y="40" width="40" height="2" rx="1" ry="1"/>
|
||||
<rect x="4" y="31" width="40" height="4" rx="1" ry="1"/>
|
||||
<rect x="4" y="20" width="40" height="6" rx="1" ry="1"/>
|
||||
<rect x="4" y="7" width="40" height="8" rx="1" ry="1"/>
|
||||
</g>
|
||||
</g>
|
||||
|
After Width: | Height: | Size: 722 B |
2
assets/icons/tooltip.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 8H17M7 11H17M7 14H11M12.7071 20.2929L14.4142 18.5858C14.7893 18.2107 15.298 18 15.8284 18H19C20.1046 18 21 17.1046 21 16V6C21 4.89543 20.1046 4 19 4H5C3.89543 4 3 4.89543 3 6V16C3 17.1046 3.89543 18 5 18H8.17157C8.70201 18 9.21071 18.2107 9.58579 18.5858L11.2929 20.2929C11.6834 20.6834 12.3166 20.6834 12.7071 20.2929Z" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
|
||||
|
After Width: | Height: | Size: 625 B |
5
assets/icons/upload.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.5 3H12H8C6.34315 3 5 4.34315 5 6V18C5 19.6569 6.34315 21 8 21H12M13.5 3L19 8.625M13.5 3V7.625C13.5 8.17728 13.9477 8.625 14.5 8.625H19M19 8.625V11.8125" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17.5 21L17.5 15M17.5 15L20 17.5M17.5 15L15 17.5" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 622 B |
12
assets/icons/wave-off.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>radio-waves-off</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="drop" fill="#000000" transform="translate(42.666667, 59.581722)">
|
||||
<path d="M47.0849493,-1.42108547e-14 L409.751616,362.666662 L379.581717,392.836561 L224.385032,237.639687 C220.860185,238.582362 217.155464,239.084945 213.333333,239.084945 C189.768533,239.084945 170.666667,219.980945 170.666667,196.418278 C170.666667,192.596131 171.169289,188.891304 172.112051,185.366306 L139.826431,153.082007 C132.313635,165.779668 128,180.591824 128,196.418278 C128,225.705382 142.771649,251.517443 165.252619,266.884869 L165.936213,267.347345 L142.22272,302.835345 C107.92576,279.872145 85.3333333,240.793745 85.3333333,196.418278 C85.3333333,168.771392 94.1027249,143.181092 109.008491,122.262804 L78.5260125,91.7807903 C56.0534502,120.674052 42.6666667,156.978203 42.6666667,196.418278 C42.6666667,254.990374 72.1909377,306.645839 117.152291,337.383388 L118.519467,338.308411 L94.8164267,373.777211 C37.65632,335.507345 7.10542736e-15,270.376678 7.10542736e-15,196.418278 C7.10542736e-15,145.187604 18.0687461,98.1928701 48.1726947,61.4272737 L16.9150553,30.169894 L47.0849493,-1.42108547e-14 Z M331.850667,19.0593447 C389.0112,57.330278 426.666667,122.463078 426.666667,196.418278 C426.666667,232.022459 417.938869,265.581649 402.50917,295.083044 L370.487171,263.062096 C379.186559,242.589607 384,220.067743 384,196.418278 C384,137.846393 354.474684,86.1907213 309.514345,55.4556523 L308.1472,54.5307047 L331.850667,19.0593447 Z M284.443733,90.0020647 C318.741333,112.965478 341.333333,152.042811 341.333333,196.418278 C341.333333,207.884983 339.824831,218.997995 336.995658,229.570658 L298.502013,191.07712 C296.828044,164.007976 282.517524,140.376058 261.413207,125.948946 L260.7296,125.486438 L284.443733,90.0020647 Z" id="Combined-Shape">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
12
assets/icons/wave-on.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>radio-waves</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="drop" fill="#000000" transform="translate(42.666667, 78.641067)">
|
||||
<path d="M256,177.358933 C256,200.9216 236.898133,220.0256 213.333333,220.0256 C189.768533,220.0256 170.666667,200.9216 170.666667,177.358933 C170.666667,153.796267 189.768533,134.692267 213.333333,134.692267 C236.898133,134.692267 256,153.796267 256,177.358933 Z M128,177.358933 C128,147.776 143.071573,121.73696 165.936213,106.427093 L142.22272,70.94272 C107.92576,93.9063467 85.3333333,132.983467 85.3333333,177.358933 C85.3333333,221.7344 107.92576,260.8128 142.22272,283.776 L165.936213,248.288 C143.071573,232.9792 128,206.941867 128,177.358933 Z M298.666667,177.358933 C298.666667,206.941867 283.594667,232.9792 260.7296,248.288 L284.443733,283.776 C318.741333,260.8128 341.333333,221.7344 341.333333,177.358933 C341.333333,132.983467 318.741333,93.9061333 284.443733,70.94272 L260.7296,106.427093 C283.594667,121.73696 298.666667,147.776 298.666667,177.358933 Z M331.850667,1.42108547e-14 L308.1472,35.47136 C353.8752,66.0885333 384,118.195413 384,177.358933 C384,236.522667 353.8752,288.629333 308.1472,319.246933 L331.850667,354.717867 C389.009067,316.448 426.666667,251.3152 426.666667,177.358933 C426.666667,103.403733 389.0112,38.2709333 331.850667,1.42108547e-14 Z M94.8164267,354.717867 L118.519467,319.249067 C72.7904,288.629333 42.6666667,236.522667 42.6666667,177.358933 C42.6666667,118.195413 72.7904,66.0885333 118.519467,35.4688 L94.8164267,1.42108547e-14 C37.65632,38.2709333 7.10542736e-15,103.40096 7.10542736e-15,177.358933 C7.10542736e-15,251.317333 37.65632,316.448 94.8164267,354.717867 Z" id="Shape">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="5.4163427mm"
|
||||
height="5.4163427mm"
|
||||
viewBox="0 0 5.4163429 5.4163429"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
xml:space="preserve"
|
||||
inkscape:export-filename="target.png"
|
||||
inkscape:export-xdpi="500"
|
||||
inkscape:export-ydpi="500"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="target.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="20.70196"
|
||||
inkscape:cx="3.7919116"
|
||||
inkscape:cy="9.8541396"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1367"
|
||||
inkscape:window-x="2560"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" /><defs
|
||||
id="defs2"><inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4310"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." /><inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4302"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." /></defs><g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-140.08642,-154.46187)"><circle
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.33835;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path2746"
|
||||
cx="142.79459"
|
||||
cy="157.17004"
|
||||
r="2.0865982" /><circle
|
||||
style="display:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.164818;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="circle4300"
|
||||
cx="142.79459"
|
||||
cy="157.17004"
|
||||
r="0.50933534" /><circle
|
||||
style="display:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.164818;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="circle4308"
|
||||
cx="142.79459"
|
||||
cy="157.17004"
|
||||
r="0.50933534" /><circle
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4262"
|
||||
cx="142.79459"
|
||||
cy="157.17004"
|
||||
r="0.95304745" /><path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.365001;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 143.43355,154.60018 v 2.66686"
|
||||
id="path308"
|
||||
clip-path="none"
|
||||
transform="matrix(0.84492788,0,0,0.84492788,21.603582,23.835872)"
|
||||
sodipodi:nodetypes="cc" /><path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 145.50276,157.17004 h -2.2533"
|
||||
id="path406"
|
||||
clip-path="none"
|
||||
sodipodi:nodetypes="cc" /><path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 142.33972,157.17004 h -2.2533"
|
||||
id="path408"
|
||||
clip-path="none"
|
||||
sodipodi:nodetypes="cc" /><path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 142.79459,157.62491 v 2.2533"
|
||||
id="path410"
|
||||
clip-path="none"
|
||||
sodipodi:nodetypes="cc" /></g></svg>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
@@ -10,7 +10,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, gridOptions: {opacity: 0.5}, projection: "AIT", cooFrame: 'galactic', target: "93.2721132 -20.9942421", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: false, showCooGridControl: false});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, gridOptions: {opacity: 0.5, color: 'rgba(255, 0, 0)'}, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false});
|
||||
|
||||
const chft = aladin.createImageSurvey('CFHT', "CFHT deep view of NGC7331 and Stephan's quintet u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", null, null, {imgFormat: 'png'});
|
||||
const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI/", null, null, {imgFormat: 'png', colormap: "viridis"});
|
||||
@@ -21,7 +21,7 @@
|
||||
aladin.getOverlayImageLayer("CFHT").toggle();
|
||||
aladin.getOverlayImageLayer("Nircam").toggle();
|
||||
|
||||
let fov = 1000;
|
||||
let fov = 360;
|
||||
let rotation = 0;
|
||||
|
||||
setInterval(function zoom() {
|
||||
@@ -30,7 +30,7 @@
|
||||
rotation += 0.07;
|
||||
|
||||
aladin.setRotation(rotation)
|
||||
aladin.setFov(fov);
|
||||
aladin.setFoV(fov);
|
||||
|
||||
if (fov < 3 && fov > 0.5) {
|
||||
let opacity = 1.0 - (fov - 0.5)/(3 - 0.5);
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
aladin.setFoV(400)
|
||||
await delay(2000)
|
||||
|
||||
aladin.setProjection('HPX')
|
||||
aladin.setFoV(400)
|
||||
await delay(2000)
|
||||
//aladin.setProjection('HPX')
|
||||
//aladin.setFoV(400)
|
||||
//await delay(2000)
|
||||
|
||||
aladin.setProjection('AIT')
|
||||
aladin.setFoV(400)
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
await delay(1000)
|
||||
|
||||
notify('Projection support:', 'Orthographic, Mercator, HEALPix, Aitoff', 6500)
|
||||
notify('Projection support:', 'Orthographic, Mercator, Aitoff', 6500)
|
||||
|
||||
await delay(1000)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'LMC', fov: 55, showContextMenu: true});
|
||||
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showTable', name: 'Simbad'});
|
||||
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showPopup', name: 'Simbad'});
|
||||
aladin.addCatalog(hips);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
deleteOverlayTimeout = undefined;
|
||||
}
|
||||
isDrawing = true;
|
||||
points.push([Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e)]);
|
||||
points.push([Utils.relMouseCoords(e)]);
|
||||
});
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@
|
||||
e.preventDefault();
|
||||
|
||||
drawOverlayCtx.clearRect(0, 0, drawOverlayCtx.canvas.width, drawOverlayCtx.canvas.height);
|
||||
points[points.length-1].push(Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e));
|
||||
points[points.length-1].push(Utils.relMouseCoords(e));
|
||||
|
||||
drawOverlayCtx.beginPath();
|
||||
|
||||
|
||||
80
examples/al-customize-button.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!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';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
var aladin = A.aladin(
|
||||
'#aladin-lite-div',
|
||||
{
|
||||
survey: 'P/allWISE/color', // set initial image survey
|
||||
projection: 'AIT', // set a projection
|
||||
fov: 1.5, // initial field of view in degrees
|
||||
target: 'NGC 2175', // initial target
|
||||
cooFrame: 'icrs', // set galactic frame
|
||||
reticleColor: '#ff89ff', // change reticle color
|
||||
reticleSize: 64, // change reticle size
|
||||
showContextMenu: true,
|
||||
}
|
||||
);
|
||||
|
||||
let toolbar = A.toolbar({
|
||||
cssStyle: {
|
||||
backgroundColor: 'white',
|
||||
border: '2px solid green',
|
||||
},
|
||||
position: {
|
||||
anchor: 'left bottom'
|
||||
}
|
||||
});
|
||||
|
||||
let btn = A.button({
|
||||
content: 'Draw your coverage',
|
||||
cssStyle: {
|
||||
backgroundColor: 'pink',
|
||||
},
|
||||
tooltip: {cssStyle: {color: 'red'}, content: 'Create a moc in pink!', position: {direction: 'top'}},
|
||||
action(o) {
|
||||
aladin.select('poly', p => {
|
||||
try {
|
||||
let ra = []
|
||||
let dec = []
|
||||
for (const v of p.vertices) {
|
||||
let [lon, lat] = aladin.pix2world(v.x, v.y);
|
||||
ra.push(lon)
|
||||
dec.push(lat)
|
||||
}
|
||||
|
||||
let moc = A.MOCFromPolygon(
|
||||
{ra, dec},
|
||||
{name: 'poly', lineWidth: 3.0, color: 'pink'},
|
||||
);
|
||||
aladin.addMOC(moc)
|
||||
} catch(_) {
|
||||
alert('Selection covers a region out of the projection definition domain.');
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
let btn2 = A.button({
|
||||
content: 'I do nothing',
|
||||
cssStyle: {
|
||||
backgroundColor: 'pink',
|
||||
},
|
||||
tooltip: {cssStyle: {color: 'red'}, content: 'Create a moc in pink!', position: {direction: 'top'}},
|
||||
});
|
||||
toolbar.add([btn, btn2])
|
||||
|
||||
aladin.addUI(toolbar)
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
25
examples/al-cuts-fits-hips.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!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';
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'AIT', cooFrame: 'galactic', fov: 200, target: 'galactic center'});
|
||||
let dss = aladin.createImageSurvey("DSS blue band", "Color DSS blue HiPS", "http://alasky.cds.unistra.fr/DSS/DSS2-blue-XJ-S/", "equatorial", 9, {imgFormat: 'fits'})
|
||||
aladin.setBaseImageLayer(dss);
|
||||
|
||||
aladin.getBaseImageLayer().setCuts(2, 10000);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
{
|
||||
minCut: 5000,
|
||||
maxCut: 17000,
|
||||
colormap: 'viridis'
|
||||
}, // no optional params
|
||||
(ra, dec, fov, image) => {
|
||||
// ra, dec and fov are centered around the fits image
|
||||
|
||||
@@ -23,7 +23,9 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
|
||||
aladin = A.aladin('#aladin-lite-div', {target: "0 0", cooFrame: "gal"});
|
||||
|
||||
var callback = function(ra, dec, fov) {
|
||||
aladin.addCatalog(A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'}));
|
||||
A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat)
|
||||
});
|
||||
// we must return true, so that the default action (set view to center of image) is performed
|
||||
return true;
|
||||
}
|
||||
@@ -39,7 +41,9 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
|
||||
// the JPG to transform to HiPS
|
||||
'https://noirlab.edu/public/media/archives/images/large/noirlab1912a.jpg',
|
||||
// no options
|
||||
{},
|
||||
{
|
||||
transparency: 0.6,
|
||||
},
|
||||
// A callback fn once the overlay is set
|
||||
callback
|
||||
);
|
||||
|
||||
@@ -5,15 +5,33 @@
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
|
||||
<script>let aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M 82', fov: 0.25, showContextMenu: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
target: '09 55 52.4 +69 40 47',
|
||||
fov: 0.25,
|
||||
showContextMenu: true,
|
||||
fullScreen: true,
|
||||
showSimbadPointerControl: true,
|
||||
showLayersControl: false,
|
||||
showSimbadPointerControl: false,
|
||||
showShareControl: true,
|
||||
showStatusBar: {
|
||||
position: {
|
||||
bottom: 0,
|
||||
left: '3rem'
|
||||
},
|
||||
},
|
||||
showStackLayerControl: true,
|
||||
samp: true,
|
||||
});
|
||||
|
||||
aladin.addCatalog(A.catalogFromSimbad('M 82', 0.1, {onClick: 'showTable'}));
|
||||
A.catalogFromSimbad('09 55 52.4 +69 40 47', 0.1, {onClick: 'showTable', limit: 1000}, (cat) => {
|
||||
aladin.addCatalog(cat)
|
||||
});
|
||||
aladin.addCatalog(A.catalogFromNED('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -9,12 +9,34 @@
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5, showContextMenu: true});
|
||||
const cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'});
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
var aladin;
|
||||
|
||||
|
||||
|
||||
var vmc_cepheids = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAXREC=401&FORMAT=votable&QUERY=SELECT%20*%20from%20vmc_er4_yjks_cepheidCatMetaData_fits_V3%20where%20%20CONTAINS(POINT(%27%27,RA2000,DEC2000),%20CIRCLE(%27%27,80.894167,-69.756111,2.7))=1';
|
||||
|
||||
var pessto = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAXREC=3&FORMAT=votable&QUERY=SELECT%20*%20from%20safcat.PESSTO_TRAN_CAT_V3%20where%20CONTAINS(POINT(%27%27,TRANSIENT_RAJ2000,TRANSIENT_DECJ2000),%20CIRCLE(%27%27,80.894167,-69.756111,2.7))=1';
|
||||
|
||||
|
||||
|
||||
A.init.then(() => {
|
||||
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'LMC', fov: 5, showContextMenu: true});
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('https://vizier.u-strasbg.fr/viz-bin/votable?-source=HIP2&-c=LMC&-out.add=_RAJ,_DEJ&-oc.form=dm&-out.meta=DhuL&-out.max=9999&-c.rm=180', {sourceSize:12, color: '#f08080'}));
|
||||
|
||||
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL(vmc_cepheids, {onClick: 'showTable', sourceSize:14, color: '#fff080'}));
|
||||
|
||||
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL(pessto, {onClick: 'showPopup', sourceSize:14, color: '#00f080'}));
|
||||
aladin.on('select', (objs) => {
|
||||
console.log(objs, "are selected");
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'M 31', fov: 3});
|
||||
|
||||
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
|
||||
aladin.addOverlay(overlay);
|
||||
overlay.addFootprints([
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script> var aladin;
|
||||
</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
//let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: "TAN", target: '15 16 57.636 -60 55 7.49', samp: true, showCooGrid: true, fov: 90, fullScreen: true});
|
||||
|
||||
var moc_0_99 = A.MOCFromURL("./gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.7, lineWidth: 5, perimeter: true});
|
||||
var moc_0_95 = A.MOCFromURL("./gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.8, lineWidth: 5, perimeter: true});
|
||||
var moc_0_5 = A.MOCFromURL("./gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 1.0, lineWidth: 5, perimeter: true});
|
||||
var moc_0_2 = A.MOCFromURL("./gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 1.0, lineWidth: 5, perimeter: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {showReticle: true, showSurveyStackControl: true, showOverlayStackControl: false, projection: "TAN", target: '15 16 57.636 -60 55 7.49', showProjectionControl: true, realFullscreen: true, showZoomControl: true, showSimbadPointerControl: true, showShareControl: true, showContextMenu: true, showCooGridControl: true, fullScreen: true, showCooGrid: true, fov: 90});
|
||||
|
||||
var moc_0_99 = A.MOCFromURL("./gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.0, lineWidth: 3, fill: false, perimeter: true});
|
||||
var moc_0_95 = A.MOCFromURL("./gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
var moc_0_5 = A.MOCFromURL("./gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
var moc_0_2 = A.MOCFromURL("./gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
|
||||
aladin.addMOC(moc_0_99);
|
||||
aladin.addMOC(moc_0_95);
|
||||
|
||||
@@ -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/', 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'});
|
||||
|
||||
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, {imgFormat: 'fits'});
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
reticleSize: 64, // change reticle size
|
||||
showCooGrid: true, // set the grid
|
||||
fullScreen: true,
|
||||
showShareControl: true,
|
||||
showContextMenu: true,
|
||||
showFullscreenControl: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
let a = A.aladin('#aladin-lite-div', {target: '03 47 00.00 +24 07 00.0', survey: 'P/DSS2/color', zoom: 2, showReticle: false});
|
||||
var cat = A.catalog({name: 'Some markers', sourceSize: 18});
|
||||
a.addCatalog(cat);
|
||||
|
||||
cat.addSources([A.marker(56.87115, 24.10514, {popupTitle: 'Alcyone', popupDesc: '<em>Bmag:</em> 2.806<br/><em>Spectral type:</em> B7III<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME%20ALCYONE&submit=submit">in Simbad</a>'})]);
|
||||
cat.addSources([A.marker(57.29673, 24.13671, {popupTitle: 'Pleione', popupDesc: '<em>Bmag:</em> 4.97<br/><em>Spectral type:</em> B8vne<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+PLEIONE&NbIdent=1">in Simbad</a>'})]);
|
||||
cat.addSources([A.marker(56.58156, 23.94836, {popupTitle: 'Merope', popupDesc: '<em>Bmag:</em> 4.113<br/><em>Spectral type:</em> BVI4e<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=V*+V971+Tau&NbIdent=1">in Simbad</a>'})]);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 180, fullScreen: true, cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: false, survey: 'CDS/P/Mars/THEMIS-Day-100m-v12'});
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 180, fullScreen: true, cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showContextMenu: true, showCooGrid: false, survey: 'CDS/P/Mars/THEMIS-Day-100m-v12'});
|
||||
aladin.setProjection('SIN');
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
canvasCtx.fillStyle = '#eee';
|
||||
canvasCtx.strokeStyle = '#222';
|
||||
canvasCtx.lineWidth = 1;
|
||||
canvasCtx.fillText(source.data['Feature Name'], source.x + xShift, source.y -4);
|
||||
|
||||
canvasCtx.fillText(source.data['Feature_Name'], source.x + xShift, source.y -4);
|
||||
//canvasCtx.strokeText(source.data['Feature Name'], source.x + xShift, source.y -4);
|
||||
|
||||
// object type is displayed only if fov<5°
|
||||
@@ -48,11 +49,11 @@
|
||||
canvasCtx.fillStyle = '#abc';
|
||||
canvasCtx.strokeStyle = '#222';
|
||||
canvasCtx.lineWidth = 1;
|
||||
canvasCtx.fillText(source.data['Feature Type'], source.x + 2 + xShift, source.y + 10);
|
||||
canvasCtx.fillText(source.data['Feature_Type'], source.x + 2 + xShift, source.y + 10);
|
||||
//canvasCtx.strokeText(source.data['Feature Type'], source.x + 2 + xShift, source.y + 10);
|
||||
};
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/mars-features.xml', {raField: 'Longitude', decField: 'Latitude', shape: drawFunction, onClick: 'showTable'}));
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/mars-features.xml', {name: "Mars features", raField: 'Longitude', decField: 'Latitude', shape: drawFunction, onClick: 'showTable'}));
|
||||
|
||||
aladin.getBaseImageLayer().setColormap('yiorbr')
|
||||
aladin.gotoRaDec(226.1433542, 18.6308694);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
// moc is ready
|
||||
console.log(moc.contains(205.9019247, +2.4492764));
|
||||
console.log(moc.contains(-205.9019247, +2.4492764));
|
||||
|
||||
});
|
||||
var moc10 = A.MOCFromURL('https://alasky.unistra.fr/MocServer/query?ivorn=ivo%3A%2F%2FCDS%2FV%2F139%2Fsdss9&get=moc&order=11&fmt=fits', {color: '#ffffff', perimeter: true, fillColor: '#aabbcc', opacity: 0.1, lineWidth: 3});
|
||||
var moc9 = A.MOCFromURL('https://alasky.unistra.fr/MocServer/query?ivorn=ivo%3A%2F%2FCDS%2FV%2F139%2Fsdss9&get=moc&order=4&fmt=fits', {color: '#00ff00', opacity: 0.5, lineWidth: 3, perimeter: true});
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
|
||||
|
||||
<script>
|
||||
var aladin;
|
||||
</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5, showContextMenu: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5, showContextMenu: true, samp: true});
|
||||
|
||||
const cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'});
|
||||
const cat2 = A.catalogFromVizieR('I/312/sample', 'M 45', 0.5, {onClick: 'showTable'});
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
let al2;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
al1 = A.aladin('#al1', {target: 'M51', fov: 0.3, survey: 'P/DSS2/color', fullScreen: false});
|
||||
al2 = A.aladin('#al2', {target: 'M51', fov: 180, survey: 'P/PanSTARRS/DR1/z', fullScreen: false});
|
||||
al1 = A.aladin('#al1', {target: 'M51', fov: 0.3, survey: 'P/DSS2/color', fullScreen: false, showContextMenu: true, showShareControl: true});
|
||||
al2 = A.aladin('#al2', {target: 'M51', fov: 180, survey: 'P/PanSTARRS/DR1/z', fullScreen: false, showContextMenu: true, showShareControl: true});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showCooGrid: true, fov: 180});
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showProjectionControl: true, showCooGrid: true, fov: 180});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: '14 18 16.868 +56 44 29.37', fov: 360, projection: 'AIT', showContextMenu: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'NGC 1367', fov: 360, samp: false, projection: 'AIT', fullScreen: true, showContextMenu: true});
|
||||
|
||||
const c1 = A.catalogFromURL('https://raw.githubusercontent.com/VisIVOLab/SKA-Discovery-Service-Mockup/main/ObsCore/ObsCore_003.xml', {onClick: 'showTable'});
|
||||
aladin.addCatalog(c1);
|
||||
A.catalogFromURL('https://raw.githubusercontent.com/VisIVOLab/SKA-Discovery-Service-Mockup/main/ObsCore/ObsCore_003.xml', {onClick: 'showTable'}, (catalog) => {
|
||||
aladin.addCatalog(catalog)
|
||||
});
|
||||
|
||||
const c2 = A.catalogFromVizieR('B/assocdata/obscore', '14 18 16.868 +56 44 29.37', 100, {onClick: 'showTable', limit: 1000});
|
||||
aladin.addCatalog(c2);
|
||||
aladin.addCatalog(A.catalogFromVizieR("B/assocdata/obscore", "0 +0", 20, {limit: 1000}))
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
32
examples/al-panstarrs-id.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!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';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
var aladin = A.aladin(
|
||||
'#aladin-lite-div',
|
||||
{
|
||||
survey: 'P/PanSTARRS/DR1/color-i-r-g', // set initial image survey
|
||||
projection: 'SIN', // set a projection
|
||||
fov: 1.5, // initial field of view in degrees
|
||||
target: 'orion', // initial target
|
||||
cooFrame: 'galactic', // set galactic frame
|
||||
reticleColor: '#ff89ff', // change reticle color
|
||||
reticleSize: 64, // change reticle size
|
||||
showCooGrid: true, // set the grid
|
||||
fullScreen: true,
|
||||
showShareControl: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +0,0 @@
|
||||
<!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';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'M81', fov: 1});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -9,7 +9,7 @@
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 180.0, fullScreen: true, survey: "CDS/P/DM/simbad-biblio/allObjects", target: '12 25 41.512 +12 48 47.2', showCooGrid: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 180.0, fullScreen: true, survey: "https://alaskybis.cds.unistra.fr/ancillary/simbad-biblio/allObjects", target: '12 25 41.512 +12 48 47.2', showCooGrid: true});
|
||||
aladin.setProjection("TAN");
|
||||
aladin.getBaseImageLayer().setColormap("redtemperature")
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.umd.cjs" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
let aladin;
|
||||
|
||||
20
examples/al-soda-eso.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, target: "orion", fov: 10, projection: 'SIN', showContextMenu: true});
|
||||
|
||||
const c1 = A.catalogFromURL('./eso.xml', {onClick: 'showTable'});
|
||||
aladin.addCatalog(c1);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
examples/al-soda-ska.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, target: "Abell 194", fov: 180, projection: 'SIN', showContextMenu: true});
|
||||
|
||||
A.catalogFromSKAORucio("m51", 90, {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
/*A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/ska/obscoreRucio.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
A.catalogFromURL('votable/CDS-B-jcmt-obscore.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});*/
|
||||
A.catalogFromURL('https://aladin.cds.unistra.fr/ObsCoreRucioScs.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
let aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'Sgr a*', fov: 0.5});
|
||||
let aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'Sgr a*', fov: 0.5, showContextMenu: true});
|
||||
// This table contains a s_region column containing stcs expressed regions
|
||||
// that are automatically parsed
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/alma-footprints.xml', {onClick: 'showTable'}));
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/alma-footprints.xml', {name: 'ALMA footprints', onClick: 'showTable'}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
25
examples/al-vertices.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!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';
|
||||
import {AladinUtils} from '../src/js/AladinUtils.js';
|
||||
|
||||
A.init.then(() => {
|
||||
let vertices = AladinUtils.HEALPix.vertices(8, 0n)
|
||||
|
||||
let lonlat = AladinUtils.HEALPix.pix2ang(8, 0n)
|
||||
|
||||
let ipix = AladinUtils.HEALPix.ang2pix(8, 0.1, 0.4)
|
||||
console.log(vertices, lonlat, ipix)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,17 +12,17 @@
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: ["P/Mellinger"], cooFrame: 'galactic', fov: 1000, fullScreen: true, showCooGrid: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: ["P/Mellinger"], cooFrame: 'galactic', fov: 1000, fullScreen: true});
|
||||
const meerkat = aladin.newImageSurvey('P/MeerKAT/Galactic-Centre-1284MHz-StokesI', {imgFormat: 'fits'});
|
||||
meerkat.setColormap('magma', {stretch: "asinh"})
|
||||
aladin.setOverlayImageLayer(meerkat)
|
||||
aladin.setProjection("MOL")
|
||||
aladin.setProjection("AIT")
|
||||
|
||||
let fov = 1000;
|
||||
setInterval(function zoom() {
|
||||
if (fov > 1) {
|
||||
fov *= 0.995;
|
||||
aladin.setFov(fov);
|
||||
aladin.setFoV(fov);
|
||||
}
|
||||
}, 10);
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 360, fullScreen: true, cooFrame: 'galactic', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {target: "30 0", fov: 360, fullScreen: true, cooFrame: 'galactic', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
aladin.setProjection('AIT');
|
||||
|
||||
|
||||
aladin.on("zoomChanged", () => {
|
||||
console.log("zoomChanged")
|
||||
})
|
||||
@@ -21,6 +22,9 @@
|
||||
console.log("positionChanged", ra, dec)
|
||||
})
|
||||
|
||||
aladin.gotoRaDec(0, 20);
|
||||
|
||||
|
||||
aladin.on('rightClickMove', (x, y) => {
|
||||
console.log("right click move", x, y)
|
||||
})
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 500px"></div>
|
||||
|
||||
<script type="text/javascript" src="./../dist/aladin.umd.cjs" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fov: 360, projection: "AIT", fullScreen: true, expandLayersControl: true, cooFrame: 'equatorial', showProjectionControl: true, showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: false, showContextMenu: true});
|
||||
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, cooFrame: "ICRSd", showSimbadPointerControl: true, showShareControl: true, showShareControl: true, survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', fov: 180, showContextMenu: true});
|
||||
// manage URL parameters
|
||||
const searchParams = new URL(document.location).searchParams;
|
||||
if (searchParams.has('baseImageLayer')) {
|
||||
|
||||
8326
examples/votable/CDS-B-jcmt-obscore.xml
Normal file
298
examples/votable/IMCCE.with_namespace.vot
Normal file
@@ -0,0 +1,298 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<vot:VOTABLE version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vot="http://www.ivoa.net/xml/VOTable/v1.3" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.3.xsd" xmlns:stc="http://www.ivoa.net/xml/STC">
|
||||
<vot:COOSYS ID="J2000" equinox="J2000" epoch="J2000" system="eq_FK5"/>
|
||||
<vot:INFO ID="status" name="QUERY_STATUS" value="OK"/>
|
||||
<vot:INFO ID="ticket" name="Ticket" value="175907900401799334"/>
|
||||
<vot:INFO ID="reqTarget" name="-c" value="195.35884258333337+27.886008055555557,rs=5091.1688245431415"/>
|
||||
<vot:INFO ID="reqEpoch" name="Epoch" value="now"/>
|
||||
<vot:INFO ID="supplier" name="Supplier" value="Provided by IMCCE/OBSPM/CNRS"/>
|
||||
<vot:GROUP utype="stc:AstroCoordSystem" ID="IMCCE-INPOP-GEO"><vot:GROUP utype="stc:AstroCoordSystem.TimeFrame"><vot:PARAM name="TimeScale" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.TimeFrame.TimeScale" value="UTC"/>
|
||||
<vot:PARAM name="RefPosition" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.TimeFrame.ReferencePosition" value="GEOCENTER"/>
|
||||
</vot:GROUP>
|
||||
<vot:GROUP utype="stc:AstroCoordSystem.SpaceFrame"><vot:PARAM name="CooFrame" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.SpaceFrame.CoordRefFrame" value="ICRS"/>
|
||||
<vot:PARAM name="CooFrameOrigin" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.SpaceFrame.ReferencePosition" value="GEOCENTER"/>
|
||||
<vot:PARAM name="Ephemeris" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.SpaceFrame.ReferencePosition.PlanetaryEphem" value="IMCCE-INPOP"><vot:DESCRIPTION>Planetary theory used to compute the ephemeris</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM name="CooType" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.SpaceFrame.CoordFlavor" value="SPHERICAL"/>
|
||||
<vot:PARAM name="Naxes" datatype="char" arraysize="*" utype="stc:AstroCoordSystem.SpaceFrame.coord_naxes" value="3"/>
|
||||
</vot:GROUP>
|
||||
</vot:GROUP>
|
||||
<vot:RESOURCE name="Skybot.ConeSearch"><vot:DESCRIPTION>SkyBoT - List of the targets located in the FOV</vot:DESCRIPTION>
|
||||
<vot:INFO name="QUERY_STATUS" value="OK"/>
|
||||
<vot:PARAM ID="epoch" name="Epoch" datatype="char" arraysize="*" ucd="time.epoch" unit="d" value="2023-02-28 12:47:46.00"><vot:DESCRIPTION>Requested epoch</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM ID="fovRA" name="RA" datatype="double" ucd="pos.eq.ra" unit="deg" value="195.35884258333337"><vot:DESCRIPTION>Right ascension of the FOV center</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM ID="fovDEC" name="DEC" datatype="double" ucd="pos.eq.dec" unit="deg" value="27.886008055555557"><vot:DESCRIPTION>Declination of the FOV center</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM ID="fovSR" name="FOV" datatype="char" ucd="instr.fov" unit="arcsec" value="7200x7200"><vot:DESCRIPTION>Size of the FOV</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM ID="filter" name="Filter" datatype="double" ucd="pos.angDistance;stat.max" unit="arcsec" value="120"/>
|
||||
<vot:PARAM ID="observer" name="Observer" datatype="char" arraysize="*" ucd="meta.code;obs.observer" value="500"><vot:DESCRIPTION>Observer location code</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:PARAM ID="refsys" name="RefSys" datatype="char" ucd="meta.code;obs.observer" value="EQJ2000"><vot:DESCRIPTION>Reference system (EQJ2000|ECJ2000)</vot:DESCRIPTION>
|
||||
</vot:PARAM>
|
||||
<vot:TABLE ID="SkybotConeSearch_results" name="SkybotConeSearch" nrows="14"><vot:GROUP ID="Ephemeris" utype="stc:AstroCoords" ref="IMCCE-INPOP-GEO"><vot:PARAM name="GeoCoordinates" datatype="char" arraysize="*" utype="stc:AstroCoords.coord_sys_id" value="UTC-ICRS-GEO"/>
|
||||
</vot:GROUP>
|
||||
<vot:FIELD ID="num" name="Num" ucd="meta.id;meta.number" datatype="char" arraysize="6"><vot:DESCRIPTION>Solar system object number</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="name" name="Name" ucd="meta.id;meta.main" datatype="char" arraysize="32"><vot:DESCRIPTION>Solar system object name</vot:DESCRIPTION>
|
||||
<vot:LINK href="${ExternalLink}"/>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="ra" name="RA" ucd="pos.eq.ra;meta.main" ref="Ephemeris" utype="stc:AstroCoords.Position3D.Value3.C1" datatype="char" arraysize="13" unit="h:m:s"><vot:DESCRIPTION>Astrometric J2000 right ascension</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="de" name="DEC" ucd="pos.eq.dec;meta.main" ref="Ephemeris" utype="stc:AstroCoords.Position3D.Value3.C2" datatype="char" arraysize="13" unit="d:m:s"><vot:DESCRIPTION>Astrometric J2000 declination</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="class" name="Class" ucd="meta.code.class;src.class" datatype="char" arraysize="24"><vot:DESCRIPTION>Object classification</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="magV" name="Mv" ucd="phot.mag;em.opt.V" datatype="float" width="13" precision="2"><vot:DESCRIPTION>Visual magnitude</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="errpos" name="ErrPos" ucd="stat.error.sys" datatype="float" width="10" precision="3" unit="arcsec"><vot:DESCRIPTION>Uncertainty on the (RA,DEC) coordinates</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="angdist" name="d" ucd="pos.ang" datatype="float" width="8" precision="3" unit="arcsec"><vot:DESCRIPTION>Body-to-center angular distance</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="dracosdec" name="dRAcosDec" ucd="pos.pm;pos.eq.ra" datatype="double" width="12" unit="arcsec/h"><vot:DESCRIPTION>Motion in right ascension d(RA)cos(DEC)</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="ddec" name="dDEC" ucd="pos.pm;pos.eq.dec" datatype="double" width="12" unit="arcsec/h"><vot:DESCRIPTION>Motion in declination d(DEC)</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="dgeo" name="Dgeo" ucd="phys.distance" ref="Ephemeris" utype="stc:AstroCoords.Position3D.Value3.C3" datatype="double" width="15" unit="AU"><vot:DESCRIPTION>Distance from observer</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="dhelio" name="Dhelio" ucd="phys.distance" datatype="double" width="15" unit="AU"><vot:DESCRIPTION>Distance from the Sun</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="_raj2000" name="_RAJ2000" ucd="pos.eq.ra" ref="Ephemeris" utype="stc:AstroCoords.Position3D.Value3.C1" datatype="double" precision="9" width="13" unit="deg" type="hidden"><vot:DESCRIPTION>Astrometric J2000 right ascension</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="_decj2000" name="_DECJ2000" ucd="pos.eq.dec" ref="Ephemeris" utype="stc:AstroCoords.Position3D.Value3.C2" datatype="double" precision="9" width="13" unit="deg" type="hidden"><vot:DESCRIPTION>Astrometric J2000 declination</vot:DESCRIPTION>
|
||||
</vot:FIELD>
|
||||
<vot:FIELD ID="externallink" name="ExternalLink" ucd="meta.ref.url" datatype="char" arraysize="*" type="hidden"><vot:DESCRIPTION>External link to hint the target</vot:DESCRIPTION>
|
||||
<vot:LINK href="${ExternalLink}"/>
|
||||
</vot:FIELD>
|
||||
<vot:DATA><vot:TABLEDATA><vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2014 WV397</vot:TD>
|
||||
<vot:TD>13 01 2.0637</vot:TD>
|
||||
<vot:TD>+27 55 1.276</vot:TD>
|
||||
<vot:TD>MB>Outer</vot:TD>
|
||||
<vot:TD>23.2</vot:TD>
|
||||
<vot:TD>0.140</vot:TD>
|
||||
<vot:TD>337.905</vot:TD>
|
||||
<vot:TD>-18.2939</vot:TD>
|
||||
<vot:TD>15.523</vot:TD>
|
||||
<vot:TD>3.375183185</vot:TD>
|
||||
<vot:TD>4.208495815</vot:TD>
|
||||
<vot:TD>195.25859878793071</vot:TD>
|
||||
<vot:TD>27.91702112270465</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2014+WV397</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2014 WS180</vot:TD>
|
||||
<vot:TD>13 00 53.8731</vot:TD>
|
||||
<vot:TD>+28 01 42.808</vot:TD>
|
||||
<vot:TD>MB>Inner</vot:TD>
|
||||
<vot:TD>23.0</vot:TD>
|
||||
<vot:TD>0.359</vot:TD>
|
||||
<vot:TD>667.778</vot:TD>
|
||||
<vot:TD>-27.4081</vot:TD>
|
||||
<vot:TD>17.760</vot:TD>
|
||||
<vot:TD>1.866206685</vot:TD>
|
||||
<vot:TD>2.724357270</vot:TD>
|
||||
<vot:TD>195.22447108283899</vot:TD>
|
||||
<vot:TD>28.02855773551142</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2014+WS180</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>291146</vot:TD>
|
||||
<vot:TD>2005 YB246</vot:TD>
|
||||
<vot:TD>13 02 41.3276</vot:TD>
|
||||
<vot:TD>+27 46 19.098</vot:TD>
|
||||
<vot:TD>MB>Middle</vot:TD>
|
||||
<vot:TD>20.8</vot:TD>
|
||||
<vot:TD>0.100</vot:TD>
|
||||
<vot:TD>1078.789</vot:TD>
|
||||
<vot:TD>-14.1907</vot:TD>
|
||||
<vot:TD>36.017</vot:TD>
|
||||
<vot:TD>1.995135821</vot:TD>
|
||||
<vot:TD>2.848239127</vot:TD>
|
||||
<vot:TD>195.67219822607407</vot:TD>
|
||||
<vot:TD>27.771971696809388</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2005+YB246</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2019 GJ63</vot:TD>
|
||||
<vot:TD>13 01 53.2657</vot:TD>
|
||||
<vot:TD>+27 25 17.998</vot:TD>
|
||||
<vot:TD>MB>Middle</vot:TD>
|
||||
<vot:TD>22.2</vot:TD>
|
||||
<vot:TD>2.196</vot:TD>
|
||||
<vot:TD>1710.130</vot:TD>
|
||||
<vot:TD>-22.1227</vot:TD>
|
||||
<vot:TD>16.297</vot:TD>
|
||||
<vot:TD>2.324385013</vot:TD>
|
||||
<vot:TD>3.172886461</vot:TD>
|
||||
<vot:TD>195.47194051618888</vot:TD>
|
||||
<vot:TD>27.421666221036613</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2019+GJ63</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>134371</vot:TD>
|
||||
<vot:TD>1995 RH</vot:TD>
|
||||
<vot:TD>13 02 17.2541</vot:TD>
|
||||
<vot:TD>+28 35 54.881</vot:TD>
|
||||
<vot:TD>Mars-Crosser</vot:TD>
|
||||
<vot:TD>20.8</vot:TD>
|
||||
<vot:TD>0.036</vot:TD>
|
||||
<vot:TD>2652.888</vot:TD>
|
||||
<vot:TD>-20.2356</vot:TD>
|
||||
<vot:TD>26.388</vot:TD>
|
||||
<vot:TD>2.283440411</vot:TD>
|
||||
<vot:TD>3.128191302</vot:TD>
|
||||
<vot:TD>195.57189197623612</vot:TD>
|
||||
<vot:TD>28.59857812786041</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===1995+RH</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>69933</vot:TD>
|
||||
<vot:TD>1998 UA7</vot:TD>
|
||||
<vot:TD>13 01 7.7148</vot:TD>
|
||||
<vot:TD>+27 08 47.150</vot:TD>
|
||||
<vot:TD>MB>Outer</vot:TD>
|
||||
<vot:TD>18.8</vot:TD>
|
||||
<vot:TD>0.025</vot:TD>
|
||||
<vot:TD>2673.866</vot:TD>
|
||||
<vot:TD>-15.7572</vot:TD>
|
||||
<vot:TD>21.076</vot:TD>
|
||||
<vot:TD>2.508485549</vot:TD>
|
||||
<vot:TD>3.355838595</vot:TD>
|
||||
<vot:TD>195.28214492683432</vot:TD>
|
||||
<vot:TD>27.146430555072108</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===1998+UA7</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2002 GV9</vot:TD>
|
||||
<vot:TD>13 04 48.2319</vot:TD>
|
||||
<vot:TD>+27 42 53.623</vot:TD>
|
||||
<vot:TD>MB>Middle</vot:TD>
|
||||
<vot:TD>20.8</vot:TD>
|
||||
<vot:TD>0.419</vot:TD>
|
||||
<vot:TD>2751.721</vot:TD>
|
||||
<vot:TD>-36.1422</vot:TD>
|
||||
<vot:TD>2.350</vot:TD>
|
||||
<vot:TD>1.454758304</vot:TD>
|
||||
<vot:TD>2.320906711</vot:TD>
|
||||
<vot:TD>196.200966290292</vot:TD>
|
||||
<vot:TD>27.714895377320573</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2002+GV9</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2014 WW1</vot:TD>
|
||||
<vot:TD>13 05 2.6044</vot:TD>
|
||||
<vot:TD>+27 47 9.452</vot:TD>
|
||||
<vot:TD>Mars-Crosser</vot:TD>
|
||||
<vot:TD>24.3</vot:TD>
|
||||
<vot:TD>3.990</vot:TD>
|
||||
<vot:TD>2894.172</vot:TD>
|
||||
<vot:TD>-25.0326</vot:TD>
|
||||
<vot:TD>20.050</vot:TD>
|
||||
<vot:TD>2.090335593</vot:TD>
|
||||
<vot:TD>2.937553833</vot:TD>
|
||||
<vot:TD>196.26085171413428</vot:TD>
|
||||
<vot:TD>27.785958766568335</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2014+WW1</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>324047</vot:TD>
|
||||
<vot:TD>2005 VZ</vot:TD>
|
||||
<vot:TD>13 03 30.0218</vot:TD>
|
||||
<vot:TD>+28 36 2.994</vot:TD>
|
||||
<vot:TD>Hungaria</vot:TD>
|
||||
<vot:TD>20.4</vot:TD>
|
||||
<vot:TD>0.068</vot:TD>
|
||||
<vot:TD>3050.249</vot:TD>
|
||||
<vot:TD>-30.4989</vot:TD>
|
||||
<vot:TD>17.829</vot:TD>
|
||||
<vot:TD>1.207804461</vot:TD>
|
||||
<vot:TD>2.083364638</vot:TD>
|
||||
<vot:TD>195.87509102386301</vot:TD>
|
||||
<vot:TD>28.600831574306405</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2005+VZ</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2015 BJ4</vot:TD>
|
||||
<vot:TD>13 05 18.6328</vot:TD>
|
||||
<vot:TD>+27 43 11.726</vot:TD>
|
||||
<vot:TD>Hungaria</vot:TD>
|
||||
<vot:TD>21.2</vot:TD>
|
||||
<vot:TD>0.075</vot:TD>
|
||||
<vot:TD>3142.671</vot:TD>
|
||||
<vot:TD>-12.7048</vot:TD>
|
||||
<vot:TD>51.061</vot:TD>
|
||||
<vot:TD>1.151543765</vot:TD>
|
||||
<vot:TD>2.029782260</vot:TD>
|
||||
<vot:TD>196.32763674673879</vot:TD>
|
||||
<vot:TD>27.719923755198238</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2015+BJ4</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2015 AT281</vot:TD>
|
||||
<vot:TD>12 57 32.7042</vot:TD>
|
||||
<vot:TD>+28 19 2.537</vot:TD>
|
||||
<vot:TD>Hungaria</vot:TD>
|
||||
<vot:TD>22.0</vot:TD>
|
||||
<vot:TD>0.538</vot:TD>
|
||||
<vot:TD>3457.247</vot:TD>
|
||||
<vot:TD>-10.4264</vot:TD>
|
||||
<vot:TD>65.186</vot:TD>
|
||||
<vot:TD>0.972225859</vot:TD>
|
||||
<vot:TD>1.867221497</vot:TD>
|
||||
<vot:TD>194.3862675654635</vot:TD>
|
||||
<vot:TD>28.317371373066628</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2015+AT281</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2002 GO3</vot:TD>
|
||||
<vot:TD>13 01 13.5309</vot:TD>
|
||||
<vot:TD>+28 50 50.968</vot:TD>
|
||||
<vot:TD>MB>Middle</vot:TD>
|
||||
<vot:TD>20.4</vot:TD>
|
||||
<vot:TD>0.180</vot:TD>
|
||||
<vot:TD>3465.652</vot:TD>
|
||||
<vot:TD>-34.1287</vot:TD>
|
||||
<vot:TD>6.108</vot:TD>
|
||||
<vot:TD>1.575816966</vot:TD>
|
||||
<vot:TD>2.439380655</vot:TD>
|
||||
<vot:TD>195.30637868785774</vot:TD>
|
||||
<vot:TD>28.847491061912006</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2002+GO3</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>245249</vot:TD>
|
||||
<vot:TD>2004 YT1</vot:TD>
|
||||
<vot:TD>12 57 48.5780</vot:TD>
|
||||
<vot:TD>+28 30 49.884</vot:TD>
|
||||
<vot:TD>MB>Inner</vot:TD>
|
||||
<vot:TD>20.4</vot:TD>
|
||||
<vot:TD>0.048</vot:TD>
|
||||
<vot:TD>3658.116</vot:TD>
|
||||
<vot:TD>-20.9517</vot:TD>
|
||||
<vot:TD>31.599</vot:TD>
|
||||
<vot:TD>1.799299187</vot:TD>
|
||||
<vot:TD>2.662086707</vot:TD>
|
||||
<vot:TD>194.45240837922003</vot:TD>
|
||||
<vot:TD>28.513856577567804</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2004+YT1</vot:TD>
|
||||
</vot:TR>
|
||||
<vot:TR><vot:TD>-</vot:TD>
|
||||
<vot:TD>2012 JQ67</vot:TD>
|
||||
<vot:TD>12 58 23.7431</vot:TD>
|
||||
<vot:TD>+28 43 25.438</vot:TD>
|
||||
<vot:TD>MB>Outer</vot:TD>
|
||||
<vot:TD>20.7</vot:TD>
|
||||
<vot:TD>15.958</vot:TD>
|
||||
<vot:TD>3860.016</vot:TD>
|
||||
<vot:TD>-20.4462</vot:TD>
|
||||
<vot:TD>11.558</vot:TD>
|
||||
<vot:TD>1.504652705</vot:TD>
|
||||
<vot:TD>2.374770373</vot:TD>
|
||||
<vot:TD>194.59892967238451</vot:TD>
|
||||
<vot:TD>28.723732837638178</vot:TD>
|
||||
<vot:TD>http://vizier.u-strasbg.fr/cgi-bin/VizieR-5?-source=B/astorb/astorb&Name===2012+JQ67</vot:TD>
|
||||
</vot:TR>
|
||||
</vot:TABLEDATA>
|
||||
</vot:DATA>
|
||||
</vot:TABLE>
|
||||
</vot:RESOURCE>
|
||||
</vot:VOTABLE>
|
||||
|
||||
18
package.json
@@ -2,7 +2,7 @@
|
||||
"homepage": "https://aladin.u-strasbg.fr/",
|
||||
"name": "aladin-lite",
|
||||
"type": "module",
|
||||
"version": "3.2.1",
|
||||
"version": "3.3.0",
|
||||
"description": "An astronomical HiPS visualizer in the browser",
|
||||
"author": "Thomas Boch and Matthieu Baumann",
|
||||
"license": "GPL-3",
|
||||
@@ -32,21 +32,19 @@
|
||||
"HiPS"
|
||||
],
|
||||
"scripts": {
|
||||
"wasm": "wasm-pack build ./src/core --target web --release --out-name core -- --features webgl2",
|
||||
"wasm": "wasm-pack build ./src/core --target web --release --out-name core -- --features webgl2 -Z build-std=panic_abort,std -Z build-std-features=panic_immediate_abort ",
|
||||
"predeploy": "npm run build && rm -rf aladin-lite.tgz && npm pack",
|
||||
"deploy": "./deploy.sh",
|
||||
"deploy:beta": "npm run predeploy && ./deploy-beta.sh",
|
||||
"deploy": "python3 version.py",
|
||||
"build": "npm run wasm && vite build && cp examples/index.html dist/index.html",
|
||||
"dev": "npm run build && vite",
|
||||
"serve": "npm run dev",
|
||||
"preview": "vite preview",
|
||||
"test:build": "cd src/core && cargo test --release --features webgl2",
|
||||
"test:unit": "vitest run"
|
||||
"test:unit": "vitest run",
|
||||
"doc": "jsdoc src/js && open out/index.html"
|
||||
},
|
||||
"devDependencies": {
|
||||
"happy-dom": "^8.9.0",
|
||||
"npm": "^9.8.1",
|
||||
"typescript": "^5.0.4",
|
||||
"happy-dom": "^10.11.0",
|
||||
"vite": "^4.3.8",
|
||||
"vite-plugin-css-injected-by-js": "^3.1.1",
|
||||
"vite-plugin-glsl": "^1.1.2",
|
||||
@@ -54,9 +52,5 @@
|
||||
"vite-plugin-wasm": "^3.2.2",
|
||||
"vite-plugin-wasm-pack": "^0.1.12",
|
||||
"vitest": "^0.32.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"autocompleter": "^6.1.3",
|
||||
"jquery": "^3.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
unreleased
|
||||
- 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 `setProjecion` now also updates for 'PAR' and 'SFL' projections
|
||||
|
||||
2020-08
|
||||
- polyline improvements (by @imbasimba)
|
||||
|
||||
|
||||
@@ -3,128 +3,89 @@ 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.2.0"
|
||||
authors = ["baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr"]
|
||||
version = "3.3.0"
|
||||
authors = [ "baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr",]
|
||||
edition = "2018"
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"al-core",
|
||||
"al-api",
|
||||
"al-task-exec",
|
||||
]
|
||||
members = [ "al-core", "al-api",]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
crate-type = [ "cdylib",]
|
||||
|
||||
[dependencies]
|
||||
futures = "0.3.12"
|
||||
js-sys = "0.3.47"
|
||||
wasm-bindgen-futures = "0.4.20"
|
||||
cgmath = "*"
|
||||
healpix = { package = "cdshealpix", git = "https://github.com/bmatthieu3/cds-healpix-rust", branch = "polygonIntersectVertices" }
|
||||
#moclib = { package = "moc", git = "https://github.com/cds-astro/cds-moc-rust", branch = "main" }
|
||||
moclib = { package = "moc", git = "https://github.com/bmatthieu3/cds-moc-rust", branch = "cellsWithUnidirectionalNeigs" }
|
||||
serde = { version = "^1.0.183", features = ["derive"] }
|
||||
url-lite = "0.1.0"
|
||||
serde_json = "1.0.104"
|
||||
serde-wasm-bindgen = "0.5"
|
||||
console_error_panic_hook = "0.1.7"
|
||||
enum_dispatch = "0.3.8"
|
||||
wasm-bindgen = "0.2.79"
|
||||
wasm-streams = "0.3.0"
|
||||
async-channel = "1.8.0"
|
||||
al-core = { path = "./al-core" }
|
||||
al-task-exec = { path = "./al-task-exec" }
|
||||
al-api = { path = "./al-api" }
|
||||
mapproj = "0.3.0"
|
||||
fitsrs = "0.2.9"
|
||||
wcs = "0.2.8"
|
||||
colorgrad = "0.6.2"
|
||||
image-decoder = { package = "image", version = "0.24.2", default-features = false, features = ["jpeg", "png"] }
|
||||
votable = { package = "votable", git = "https://github.com/cds-astro/cds-votable-rust", branch = "main"}
|
||||
lyon = "1.0.1"
|
||||
|
||||
[features]
|
||||
webgl1 = [
|
||||
"al-core/webgl1",
|
||||
#"al-ui/webgl1",
|
||||
"al-api/webgl1",
|
||||
"web-sys/WebGlRenderingContext",
|
||||
"web-sys/AngleInstancedArrays", # Enabling instancing features
|
||||
"web-sys/ExtSRgb", # Enabling SRGB8_ALPHA8 internal format
|
||||
"web-sys/OesTextureFloat"
|
||||
]
|
||||
webgl2 = [
|
||||
"al-core/webgl2",
|
||||
#"al-ui/webgl2",
|
||||
"al-api/webgl2",
|
||||
"web-sys/WebGl2RenderingContext",
|
||||
"web-sys/WebGlVertexArrayObject",
|
||||
"web-sys/ExtColorBufferFloat",
|
||||
]
|
||||
|
||||
[dependencies.web-sys]
|
||||
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',
|
||||
]
|
||||
webgl1 = [ "al-core/webgl1", "al-api/webgl1", "web-sys/WebGlRenderingContext", "web-sys/AngleInstancedArrays", "web-sys/ExtSRgb", "web-sys/OesTextureFloat",]
|
||||
webgl2 = [ "al-core/webgl2", "al-api/webgl2", "web-sys/WebGl2RenderingContext", "web-sys/WebGlVertexArrayObject", "web-sys/ExtColorBufferFloat",]
|
||||
|
||||
[dev-dependencies]
|
||||
image-decoder = { package = "image", version = "0.24.2", default-features = false, features = ["jpeg", "png"] }
|
||||
rand = "0.8"
|
||||
|
||||
[dependencies.healpix]
|
||||
package = "cdshealpix"
|
||||
git = "https://github.com/bmatthieu3/cds-healpix-rust"
|
||||
branch = "polygonIntersectVertices"
|
||||
|
||||
[dependencies.moclib]
|
||||
package = "moc"
|
||||
git = "https://github.com/bmatthieu3/cds-moc-rust"
|
||||
branch = "cellsWithUnidirectionalNeigs"
|
||||
|
||||
[dependencies.serde]
|
||||
version = "^1.0.183"
|
||||
features = [ "derive",]
|
||||
|
||||
[dependencies.al-core]
|
||||
path = "./al-core"
|
||||
|
||||
[dependencies.al-api]
|
||||
path = "./al-api"
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "*"
|
||||
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",]
|
||||
|
||||
[dev-dependencies.image-decoder]
|
||||
package = "image"
|
||||
version = "0.24.2"
|
||||
default-features = false
|
||||
features = [ "jpeg", "png",]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 3
|
||||
opt-level = "z"
|
||||
debug = true
|
||||
debug-assertions = true
|
||||
overflow-checks = true
|
||||
lto = true
|
||||
panic = 'unwind'
|
||||
panic = "unwind"
|
||||
incremental = true
|
||||
codegen-units = 256
|
||||
rpath = false
|
||||
|
||||
[profile.release]
|
||||
opt-level = 'z'
|
||||
opt-level = "z"
|
||||
debug = false
|
||||
debug-assertions = false
|
||||
overflow-checks = false
|
||||
lto = true
|
||||
panic = 'unwind'
|
||||
panic = "abort"
|
||||
incremental = false
|
||||
codegen-units = 16
|
||||
rpath = false
|
||||
|
||||
@@ -75,7 +75,7 @@ codegen-units = 256
|
||||
rpath = false
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
opt-level = 'z'
|
||||
debug = false
|
||||
debug-assertions = false
|
||||
overflow-checks = false
|
||||
|
||||
@@ -3,13 +3,38 @@ use wasm_bindgen::prelude::*;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
#[wasm_bindgen(raw_module = "../../js/libs/astro/coo.js")]
|
||||
extern "C" {
|
||||
#[wasm_bindgen(js_name = Format)]
|
||||
pub type Format;
|
||||
|
||||
/**
|
||||
* Convert a decimal coordinate into sexagesimal string, according to the given precision<br>
|
||||
* 8: 1/1000th sec, 7: 1/100th sec, 6: 1/10th sec, 5: sec, 4: 1/10th min, 3: min, 2: 1/10th deg, 1: deg
|
||||
* @param num number (integer or decimal)
|
||||
* @param prec precision (= number of decimal digit to keep or append)
|
||||
* @param plus if true, the '+' sign is displayed
|
||||
* @return a string with the formatted sexagesimal number
|
||||
*/
|
||||
#[wasm_bindgen(static_method_of = Format)]
|
||||
pub fn toSexagesimal(num: f64, prec: u8, plus: bool) -> String;
|
||||
/**
|
||||
* Convert a decimal coordinate into a decimal string, according to the given precision
|
||||
* @param num number (integer or decimal)
|
||||
* @param prec precision (= number of decimal digit to keep or append)
|
||||
* @return a string with the formatted sexagesimal number
|
||||
*/
|
||||
#[wasm_bindgen(static_method_of = Format)]
|
||||
pub fn toDecimal(num: f64, prec: u8) -> String;
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug, Clone, Copy, PartialEq)]
|
||||
#[wasm_bindgen]
|
||||
pub enum AngleSerializeFmt {
|
||||
DMM,
|
||||
DD,
|
||||
DMS,
|
||||
HMS
|
||||
HMS,
|
||||
}
|
||||
|
||||
impl fmt::Display for AngleSerializeFmt {
|
||||
@@ -27,4 +52,4 @@ impl fmt::Display for AngleSerializeFmt {
|
||||
};
|
||||
write!(f, "{}", str)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
37
src/core/al-api/src/catalog.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::angle_fmt::AngleSerializeFmt;
|
||||
|
||||
use super::color::ColorRGB;
|
||||
|
||||
#[wasm_bindgen]
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Catalog {
|
||||
#[serde(default = "default_color")]
|
||||
pub color: Option<ColorRGB>,
|
||||
#[serde(default = "default_opacity")]
|
||||
pub opacity: Option<f32>,
|
||||
#[serde(default = "default_shape")]
|
||||
pub shape: Option<&'static str>,
|
||||
#[serde(default = "default_size")]
|
||||
pub size: Option<f32>,
|
||||
}
|
||||
|
||||
fn default_color() -> Option<ColorRGB> {
|
||||
None
|
||||
}
|
||||
|
||||
fn default_opacity() -> Option<f32> {
|
||||
None
|
||||
}
|
||||
|
||||
fn default_shape() -> Option<&'static str> {
|
||||
None
|
||||
}
|
||||
|
||||
fn default_size() -> Option<AngleSerializeFmt> {
|
||||
None
|
||||
}
|
||||
@@ -10,6 +10,8 @@ extern "C" {
|
||||
pub fn hexToRgba(hex: String) -> JsValue;
|
||||
#[wasm_bindgen(static_method_of = Color)]
|
||||
pub fn rgbToHex(r: u8, g: u8, b: u8) -> String;
|
||||
#[wasm_bindgen(static_method_of = Color)]
|
||||
pub fn rgbaToHex(r: u8, g: u8, b: u8, a: u8) -> String;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Deserialize, Serialize)]
|
||||
|
||||
@@ -61,6 +61,8 @@ pub struct HiPSProperties {
|
||||
// Parametrable by the user
|
||||
min_cutout: Option<f32>,
|
||||
max_cutout: Option<f32>,
|
||||
|
||||
creator_did: String,
|
||||
}
|
||||
|
||||
impl HiPSProperties {
|
||||
@@ -69,6 +71,11 @@ impl HiPSProperties {
|
||||
&self.url
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn get_creator_did(&self) -> &str {
|
||||
&self.creator_did
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn get_max_order(&self) -> u8 {
|
||||
self.max_order
|
||||
|
||||
@@ -87,7 +87,7 @@ codegen-units = 256
|
||||
rpath = false
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
opt-level = 'z'
|
||||
debug = false
|
||||
debug-assertions = false
|
||||
overflow-checks = false
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
[package]
|
||||
name = "al-ui"
|
||||
version = "0.1.0"
|
||||
authors = ["baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
console_error_panic_hook = "0.1.6"
|
||||
futures = "0.3.12"
|
||||
js-sys = "0.3.47"
|
||||
wasm-bindgen-futures = "0.4.20"
|
||||
cgmath = "*"
|
||||
itertools-num = "0.1.3"
|
||||
#healpix = { package = "cdshealpix", git = 'https://github.com/cds-astro/cds-healpix-rust', branch = 'master' }
|
||||
cdshealpix = { path = "../../../cds-healpix-rust" }
|
||||
|
||||
serde = { version = "^1.0.59", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde-wasm-bindgen = "0.4"
|
||||
num = "*"
|
||||
fitsrs = "0.2.6"
|
||||
num-traits = "0.2.14"
|
||||
image-decoder = { package = "image", version = "0.24.*", default-features = false, features = ["jpeg", "png"] }
|
||||
egui = "0.15.0"
|
||||
epi = "0.15.0"
|
||||
egui_web = "0.15.0"
|
||||
al-core = { path = "../al-core" }
|
||||
al-api = { path = "../al-api" }
|
||||
wasm-bindgen = "0.2.79"
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.56"
|
||||
features = [
|
||||
'console',
|
||||
'CssStyleDeclaration',
|
||||
'Document',
|
||||
'Element',
|
||||
'HtmlCollection',
|
||||
'HtmlElement',
|
||||
'HtmlImageElement',
|
||||
'HtmlCanvasElement',
|
||||
'Blob',
|
||||
'ImageBitmap',
|
||||
'ImageData',
|
||||
|
||||
'CanvasRenderingContext2d',
|
||||
|
||||
'MouseEvent',
|
||||
'WheelEvent',
|
||||
|
||||
'WebGlBuffer',
|
||||
'WebGlContextAttributes',
|
||||
'WebGlFramebuffer',
|
||||
'WebGlProgram',
|
||||
'WebGlShader',
|
||||
'WebGlUniformLocation',
|
||||
'WebGlTexture',
|
||||
'WebGlActiveInfo',
|
||||
|
||||
'Window',
|
||||
'Request',
|
||||
'RequestInit',
|
||||
'RequestMode',
|
||||
'Response',
|
||||
'XmlHttpRequest',
|
||||
'XmlHttpRequestResponseType',
|
||||
'PerformanceTiming',
|
||||
'Performance',
|
||||
'Url',
|
||||
]
|
||||
|
||||
[features]
|
||||
webgl1 = [
|
||||
"web-sys/WebGlRenderingContext",
|
||||
"web-sys/AngleInstancedArrays", # Enabling instancing features
|
||||
"web-sys/ExtSRgb", # Enabling SRGB8_ALPHA8 internal format
|
||||
"web-sys/OesTextureFloat"
|
||||
]
|
||||
webgl2 = [
|
||||
"web-sys/WebGl2RenderingContext",
|
||||
"web-sys/WebGlVertexArrayObject",
|
||||
"web-sys/ExtColorBufferFloat",
|
||||
]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 's'
|
||||
debug = true
|
||||
debug-assertions = true
|
||||
overflow-checks = true
|
||||
lto = false
|
||||
panic = 'unwind'
|
||||
incremental = true
|
||||
codegen-units = 256
|
||||
rpath = false
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
debug = false
|
||||
debug-assertions = false
|
||||
overflow-checks = false
|
||||
lto = false
|
||||
panic = 'unwind'
|
||||
incremental = false
|
||||
codegen-units = 16
|
||||
rpath = false
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = true
|
||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 67 KiB |
@@ -1,13 +0,0 @@
|
||||
precision mediump float;
|
||||
uniform sampler2D u_sampler;
|
||||
varying vec4 v_rgba;
|
||||
varying vec2 v_tc;
|
||||
|
||||
void main() {
|
||||
// The texture is set up with `SRGB8_ALPHA8`, so no need to decode here!
|
||||
vec4 texture_rgba = texture2D(u_sampler, v_tc);
|
||||
|
||||
// Multiply vertex color with texture color (in linear space).
|
||||
// Linear color is written and blended in Framebuffer and converted to sRGB later
|
||||
gl_FragColor = v_rgba * texture_rgba;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
precision mediump float;
|
||||
|
||||
attribute vec2 pos;
|
||||
attribute vec2 tx;
|
||||
attribute vec4 color;
|
||||
|
||||
varying vec4 v_rgba;
|
||||
varying vec2 v_tc;
|
||||
|
||||
uniform vec2 u_screen_size;
|
||||
|
||||
// 0-1 linear from 0-255 sRGB
|
||||
vec3 linear_from_srgb(vec3 srgb) {
|
||||
bvec3 cutoff = lessThan(srgb, vec3(10.31475));
|
||||
vec3 lower = srgb / vec3(3294.6);
|
||||
vec3 higher = pow((srgb + vec3(14.025)) / vec3(269.025), vec3(2.4));
|
||||
return mix(higher, lower, vec3(cutoff));
|
||||
}
|
||||
|
||||
// 0-1 linear from 0-255 sRGBA
|
||||
vec4 linear_from_srgba(vec4 srgba) {
|
||||
return vec4(linear_from_srgb(srgba.rgb), srgba.a / 255.0);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(
|
||||
2.0 * pos.x / u_screen_size.x - 1.0,
|
||||
1.0 - 2.0 * pos.y / u_screen_size.y,
|
||||
0.0,
|
||||
1.0);
|
||||
v_rgba = linear_from_srgba(color);
|
||||
v_tc = tx;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#version 300 es
|
||||
precision highp float;
|
||||
in vec4 v_rgba;
|
||||
in vec2 v_tc;
|
||||
out vec4 color;
|
||||
|
||||
uniform sampler2D u_sampler;
|
||||
|
||||
void main() {
|
||||
// The texture is set up with `SRGB8_ALPHA8`, so no need to decode here!
|
||||
vec4 texture_rgba = texture(u_sampler, v_tc);
|
||||
|
||||
// Multiply vertex color with texture color (in linear space).
|
||||
// Linear color is written and blended in Framebuffer and converted to sRGB later
|
||||
color = v_rgba * texture_rgba;
|
||||
//color = vec4(1.0, 0.0, 0., 1.);
|
||||
//color = v_rgba;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#version 300 es
|
||||
precision highp float;
|
||||
|
||||
layout (location = 0) in vec2 pos;
|
||||
layout (location = 1) in vec2 tx;
|
||||
layout (location = 2) in vec4 color;
|
||||
|
||||
out vec4 v_rgba;
|
||||
out vec2 v_tc;
|
||||
|
||||
uniform vec2 u_screen_size;
|
||||
|
||||
// 0-1 linear from 0-255 sRGB
|
||||
vec3 linear_from_srgb(vec3 srgb) {
|
||||
bvec3 cutoff = lessThan(srgb, vec3(10.31475));
|
||||
vec3 lower = srgb / vec3(3294.6);
|
||||
vec3 higher = pow((srgb + vec3(14.025)) / vec3(269.025), vec3(2.4));
|
||||
return mix(higher, lower, vec3(cutoff));
|
||||
}
|
||||
|
||||
const vec3 gamma_f = vec3(0.45454545454);
|
||||
// 0-1 linear from 0-255 sRGBA
|
||||
vec4 linear_from_srgba(vec4 srgba) {
|
||||
return vec4(pow(linear_from_srgb(srgba.rgb), gamma_f), srgba.a / 255.0);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(
|
||||
2.0 * pos.x / u_screen_size.x - 1.0,
|
||||
1.0 - 2.0 * pos.y / u_screen_size.y,
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
v_rgba = linear_from_srgba(color);
|
||||
//v_rgba = color;
|
||||
v_tc = tx;
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
use crate::painter::WebGl2Painter;
|
||||
use crate::widgets::SurveyWidget;
|
||||
|
||||
/// Shows off one example of each major type of widget.
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
pub struct LayerLayout {
|
||||
survey_name_selected: String,
|
||||
|
||||
surveys: Arc<Mutex<Vec<SurveyWidget>>>,
|
||||
s_select_w: SurveyGrid,
|
||||
}
|
||||
|
||||
use crate::widgets::SurveyGrid;
|
||||
use crate::Event;
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
use wasm_bindgen::prelude::JsValue;
|
||||
impl LayerLayout {
|
||||
pub fn new(ui_backend: &mut WebGl2Painter) -> Result<Self, JsValue> {
|
||||
let survey_grid_widget = SurveyGrid::new(ui_backend)?;
|
||||
Ok(Self {
|
||||
survey_name_selected: String::new(),
|
||||
surveys: Arc::new(Mutex::new(vec![])),
|
||||
s_select_w: survey_grid_widget,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn show(&mut self, ui: &mut egui::Ui, events: Arc<Mutex<Vec<Event>>>) -> egui::Rect {
|
||||
let response = egui::Window::new("Aladin Lite v3")
|
||||
.collapsible(true)
|
||||
.show(ui.ctx(), |ui| {
|
||||
ui.set_max_width(270.0);
|
||||
//use super::View as _;
|
||||
self.ui(ui, events.clone());
|
||||
|
||||
let mut new_survey_added = false;
|
||||
self.s_select_w
|
||||
.show(ui, &mut self.survey_name_selected, &mut new_survey_added);
|
||||
|
||||
if new_survey_added {
|
||||
let s_id_selected = self.survey_name_selected.clone();
|
||||
let s_list = self.surveys.clone();
|
||||
let events = events.clone();
|
||||
let fut = async move {
|
||||
let url = format!("https://alaskybis.u-strasbg.fr/{}", s_id_selected);
|
||||
let new_survey = SurveyWidget::new(url).await;
|
||||
/*let mut can_surveys_be_added = true;
|
||||
// check if the new survey is compatible with the ones already pushed
|
||||
for s in s_list.lock().unwrap().iter() {
|
||||
match s.color() {
|
||||
Color::Color(_) => (),
|
||||
_ => {
|
||||
can_surveys_be_added = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//if can_surveys_be_added {
|
||||
// get the SimpleHiPS from the SurveyWidget
|
||||
let mut image_surveys = vec![];
|
||||
for survey in s_list.lock().unwrap().iter() {
|
||||
image_surveys.push(survey.get_hips_config());
|
||||
}
|
||||
|
||||
// Push to the queue the new image survey
|
||||
image_surveys.push(new_survey.get_hips_config());
|
||||
|
||||
events
|
||||
.lock()
|
||||
.unwrap()
|
||||
.push(Event::ImageSurveys(image_surveys));
|
||||
s_list.lock().unwrap().push(new_survey);
|
||||
//}
|
||||
};
|
||||
|
||||
wasm_bindgen_futures::spawn_local(fut);
|
||||
}
|
||||
});
|
||||
response.unwrap().response.rect
|
||||
}
|
||||
|
||||
fn ui(&mut self, ui: &mut egui::Ui, events: Arc<Mutex<Vec<Event>>>) {
|
||||
ui.label("Layers");
|
||||
ui.separator();
|
||||
let surveys = &mut *self.surveys.lock().unwrap();
|
||||
let mut update_viewed_surveys = false;
|
||||
|
||||
for idx in (0..surveys.len()).rev() {
|
||||
if surveys[idx].update_survey {
|
||||
update_viewed_surveys = true;
|
||||
}
|
||||
|
||||
if surveys[idx].removed() {
|
||||
surveys.remove(idx);
|
||||
update_viewed_surveys = true;
|
||||
}
|
||||
}
|
||||
|
||||
for idx in 0..surveys.len() {
|
||||
surveys[idx].show(ui);
|
||||
}
|
||||
|
||||
// TODO: check if you can add a new survey
|
||||
// it is not possible if:
|
||||
// - a color survey is already selected
|
||||
// - a grayscale survey mapped to a colormap object is selected
|
||||
if ui.add(egui::Button::new("Add survey")).clicked() {
|
||||
self.s_select_w.open();
|
||||
}
|
||||
|
||||
if update_viewed_surveys {
|
||||
let mut image_surveys = vec![];
|
||||
for survey in surveys.iter() {
|
||||
image_surveys.push(survey.get_hips_config());
|
||||
}
|
||||
|
||||
events
|
||||
.lock()
|
||||
.unwrap()
|
||||
.push(Event::ImageSurveys(image_surveys));
|
||||
}
|
||||
|
||||
/*{
|
||||
//let survey = self.survey.clone();
|
||||
//let s = survey.lock().unwrap();
|
||||
if let Some(s) = &*self.survey.clone().lock().unwrap() {
|
||||
ui.group(|ui| {
|
||||
ui.label("Description:");
|
||||
|
||||
ui.group(|ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Title:");
|
||||
ui.label(&s.obs_title);
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Category:");
|
||||
ui.label(&s.client_category);
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Regime:");
|
||||
ui.label(&s.obs_regime);
|
||||
});
|
||||
|
||||
let scroll_area = ScrollArea::vertical()
|
||||
.max_height(200.0)
|
||||
.auto_shrink([false; 2]);
|
||||
|
||||
ui.separator();
|
||||
scroll_area.show(ui, |ui| {
|
||||
ui.label("Description:");
|
||||
ui.label(&s.obs_description);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
fn doc_link_label<'a>(title: &'a str, search_term: &'a str) -> impl egui::Widget + 'a {
|
||||
let label = format!("{}:", title);
|
||||
let url = format!("https://docs.rs/egui?search={}", search_term);
|
||||
move |ui: &mut egui::Ui| {
|
||||
ui.hyperlink_to(label, url).on_hover_ui(|ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.label("Search egui docs for");
|
||||
ui.code(search_term);
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
use al_core;
|
||||
|
||||
mod painter;
|
||||
use al_api::hips::SimpleHiPS;
|
||||
use painter::WebGl2Painter;
|
||||
|
||||
mod input;
|
||||
pub use input::GuiRef;
|
||||
|
||||
mod layout;
|
||||
pub mod widgets;
|
||||
|
||||
use egui;
|
||||
use egui_web::Painter;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use web_sys::WebGl2RenderingContext;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
use std::sync::atomic::Ordering::SeqCst;
|
||||
|
||||
pub struct NeedRepaint(std::sync::atomic::AtomicBool);
|
||||
|
||||
impl Default for NeedRepaint {
|
||||
fn default() -> Self {
|
||||
Self(true.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl NeedRepaint {
|
||||
pub fn fetch_and_clear(&self) -> bool {
|
||||
self.0.swap(false, SeqCst)
|
||||
}
|
||||
|
||||
pub fn set_true(&self) {
|
||||
self.0.store(true, SeqCst);
|
||||
}
|
||||
}
|
||||
|
||||
impl epi::RepaintSignal for NeedRepaint {
|
||||
fn request_repaint(&self) {
|
||||
self.0.store(true, SeqCst);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Event {
|
||||
Grid {
|
||||
color: [f32; 4],
|
||||
line_thickness: f32,
|
||||
enable: bool,
|
||||
},
|
||||
Location {
|
||||
name: String,
|
||||
},
|
||||
ImageSurveys(Vec<SimpleHiPS>),
|
||||
}
|
||||
|
||||
pub struct Gui {
|
||||
pub input: egui_web::WebInput,
|
||||
pub painter: WebGl2Painter,
|
||||
ctx: egui::CtxRef,
|
||||
|
||||
pub needs_repaint: std::sync::Arc<NeedRepaint>,
|
||||
pub last_text_cursor_pos: Option<egui::Pos2>,
|
||||
|
||||
pub aladin_lite_div: String,
|
||||
|
||||
// The layout contains all the ui definition
|
||||
layout: layout::LayerLayout,
|
||||
clipped_meshes: Option<Vec<egui::ClippedMesh>>,
|
||||
|
||||
pub mouse_on_ui: bool,
|
||||
pub mouse_pressed: bool,
|
||||
pub cur_mouse_pos: egui::Pos2,
|
||||
|
||||
events: Arc<Mutex<Vec<Event>>>,
|
||||
}
|
||||
use al_core::WebGlContext;
|
||||
use cgmath::Vector2;
|
||||
use egui::Pos2;
|
||||
use std::sync::{Arc, Mutex};
|
||||
impl Gui {
|
||||
pub fn new(aladin_lite_div: &str, gl: &WebGlContext) -> Result<GuiRef, JsValue> {
|
||||
let ctx = egui::CtxRef::default();
|
||||
let mut painter = WebGl2Painter::new(aladin_lite_div, gl.clone())?;
|
||||
let input: egui_web::backend::WebInput = Default::default();
|
||||
|
||||
let layout = layout::LayerLayout::new(&mut painter)?;
|
||||
let mouse_on_ui = false;
|
||||
let cur_mouse_pos = egui::Pos2::ZERO;
|
||||
let events = Arc::new(Mutex::new(vec![]));
|
||||
|
||||
let gui = Self {
|
||||
ctx,
|
||||
painter,
|
||||
|
||||
input,
|
||||
layout,
|
||||
clipped_meshes: None,
|
||||
|
||||
mouse_on_ui,
|
||||
mouse_pressed: false,
|
||||
cur_mouse_pos,
|
||||
|
||||
needs_repaint: Default::default(),
|
||||
last_text_cursor_pos: None,
|
||||
|
||||
aladin_lite_div: aladin_lite_div.to_string(),
|
||||
|
||||
events,
|
||||
};
|
||||
|
||||
let gui_ref = GuiRef(std::sync::Arc::new(egui::mutex::Mutex::new(gui)));
|
||||
|
||||
input::install_canvas_events(gui_ref.clone())?;
|
||||
input::install_document_events(gui_ref.clone())?;
|
||||
input::install_text_agent(gui_ref.clone())?;
|
||||
|
||||
Ok(gui_ref)
|
||||
}
|
||||
|
||||
pub fn egui_ctx(&self) -> &egui::CtxRef {
|
||||
&self.ctx
|
||||
}
|
||||
|
||||
pub fn pos_over_ui(&self) -> bool {
|
||||
self.mouse_on_ui
|
||||
}
|
||||
|
||||
pub fn update(&mut self) -> Arc<Mutex<Vec<Event>>> {
|
||||
let canvas_size = egui::vec2(
|
||||
self.painter.canvas.width() as f32,
|
||||
self.painter.canvas.height() as f32,
|
||||
);
|
||||
let raw_input = self.input.new_frame(canvas_size);
|
||||
self.ctx.begin_frame(raw_input);
|
||||
|
||||
// Define the central panel containing the ui
|
||||
{
|
||||
let f = egui::Frame {
|
||||
fill: egui::Color32::TRANSPARENT,
|
||||
..Default::default()
|
||||
};
|
||||
let layout = &mut self.layout;
|
||||
let events = self.events.clone();
|
||||
let response = egui::CentralPanel::default()
|
||||
.frame(f)
|
||||
.show(&self.ctx, |ui| {
|
||||
/*egui::containers::panel::SidePanel::left(
|
||||
"Menu"
|
||||
)
|
||||
.resizable(false)
|
||||
.show_inside(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
if ui.add(egui::Button::new("Search")).clicked() {
|
||||
//do_stuff();
|
||||
}
|
||||
if ui.add(egui::Button::new("Layers")).clicked() {
|
||||
//do_stuff();
|
||||
}
|
||||
if ui.add(egui::Button::new("Projections")).clicked() {
|
||||
//do_stuff();
|
||||
}
|
||||
if ui.add(egui::Button::new("Grid")).clicked() {
|
||||
//do_stuff();
|
||||
}
|
||||
if ui.add(egui::Button::new("Pipette")).clicked() {
|
||||
//do_stuff();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
layout.show(ui, events)
|
||||
});
|
||||
|
||||
self.mouse_on_ui = response.inner.contains(self.cur_mouse_pos);
|
||||
}
|
||||
self.painter.upload_egui_texture(&self.ctx.texture());
|
||||
|
||||
let (output, shapes) = self.ctx.end_frame();
|
||||
self.clipped_meshes = Some(self.ctx.tessellate(shapes)); // create triangles to paint
|
||||
|
||||
input::handle_output(&output, self);
|
||||
|
||||
self.events.clone()
|
||||
}
|
||||
|
||||
pub fn draw(&mut self, gl: &WebGlContext, pixels_per_point: f32) -> Result<(), JsValue> {
|
||||
if let Some(meshes) = self.clipped_meshes.take() {
|
||||
gl.enable(WebGl2RenderingContext::BLEND);
|
||||
gl.blend_func(
|
||||
WebGl2RenderingContext::ONE,
|
||||
WebGl2RenderingContext::ONE_MINUS_SRC_ALPHA,
|
||||
); // premultiplied alpha
|
||||
|
||||
self.painter.paint_meshes(meshes, pixels_per_point)?;
|
||||
|
||||
gl.disable(WebGl2RenderingContext::BLEND);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn redraw_needed(&mut self) -> bool {
|
||||
let redraw = self.needs_repaint.fetch_and_clear();
|
||||
redraw
|
||||
}
|
||||
}
|
||||
@@ -1,523 +0,0 @@
|
||||
//! Mostly a carbon-copy of `webgl1.rs`.
|
||||
|
||||
#[cfg(feature = "webgl2")]
|
||||
pub type WebGlRenderingCtx = web_sys::WebGl2RenderingContext;
|
||||
#[cfg(feature = "webgl1")]
|
||||
pub type WebGlRenderingCtx = web_sys::WebGlRenderingContext;
|
||||
|
||||
use {
|
||||
wasm_bindgen::{prelude::*, JsCast},
|
||||
web_sys::{WebGlBuffer, WebGlTexture},
|
||||
};
|
||||
|
||||
use al_core::shader::Shader;
|
||||
use cgmath::Vector2;
|
||||
use egui::{
|
||||
self,
|
||||
emath::vec2,
|
||||
epaint::{Color32, Texture},
|
||||
};
|
||||
|
||||
use al_core::FrameBufferObject;
|
||||
pub struct WebGl2Painter {
|
||||
pub canvas_id: String,
|
||||
pub canvas: web_sys::HtmlCanvasElement,
|
||||
gl: WebGlContext,
|
||||
shader: Shader,
|
||||
|
||||
pos_buffer: WebGlBuffer,
|
||||
tc_buffer: WebGlBuffer,
|
||||
color_buffer: WebGlBuffer,
|
||||
index_buffer: WebGlBuffer,
|
||||
|
||||
egui_texture: Texture2D,
|
||||
egui_texture_version: Option<u64>,
|
||||
|
||||
/// `None` means unallocated (freed) slot.
|
||||
user_textures: Vec<Option<UserTexture>>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct UserTexture {
|
||||
size: (usize, usize),
|
||||
|
||||
/// Pending upload (will be emptied later).
|
||||
pixels: Vec<u8>,
|
||||
|
||||
/// Lazily uploaded
|
||||
gl_texture: Option<Texture2D>,
|
||||
}
|
||||
|
||||
use al_core::Texture2D;
|
||||
use al_core::WebGlContext;
|
||||
impl WebGl2Painter {
|
||||
pub fn new(aladin_lite_div: &str, gl: WebGlContext) -> Result<WebGl2Painter, JsValue> {
|
||||
let window = web_sys::window().unwrap();
|
||||
let document = window.document().unwrap();
|
||||
let canvas = document
|
||||
// Get the aladin div element
|
||||
.get_element_by_id(aladin_lite_div)
|
||||
.unwrap()
|
||||
// Inside it, retrieve the canvas
|
||||
.get_elements_by_class_name("aladin-imageCanvas")
|
||||
.get_with_index(0)
|
||||
.unwrap();
|
||||
let canvas = canvas.dyn_into::<web_sys::HtmlCanvasElement>().unwrap();
|
||||
|
||||
let canvas_id = canvas.id();
|
||||
let egui_texture = Texture2D::create_empty_unsized(
|
||||
&gl,
|
||||
&[
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_MIN_FILTER,
|
||||
WebGlRenderingCtx::LINEAR,
|
||||
),
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_MAG_FILTER,
|
||||
WebGlRenderingCtx::LINEAR,
|
||||
),
|
||||
// Prevents s-coordinate wrapping (repeating)
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_WRAP_S,
|
||||
WebGlRenderingCtx::CLAMP_TO_EDGE,
|
||||
),
|
||||
// Prevents t-coordinate wrapping (repeating)
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_WRAP_T,
|
||||
WebGlRenderingCtx::CLAMP_TO_EDGE,
|
||||
),
|
||||
],
|
||||
)?;
|
||||
|
||||
#[cfg(feature = "webgl1")]
|
||||
let shader = Shader::new(
|
||||
&gl,
|
||||
include_str!("../shaders/webgl1/main_vertex_100es.glsl"),
|
||||
include_str!("../shaders/webgl1/main_fragment_100es.glsl"),
|
||||
)?;
|
||||
#[cfg(feature = "webgl2")]
|
||||
let shader = Shader::new(
|
||||
&gl,
|
||||
include_str!("../shaders/webgl2/main_vertex_100es.glsl"),
|
||||
include_str!("../shaders/webgl2/main_fragment_100es.glsl"),
|
||||
)?;
|
||||
|
||||
let pos_buffer = gl.create_buffer().ok_or("failed to create buffer").unwrap();
|
||||
let tc_buffer = gl.create_buffer().ok_or("failed to create buffer").unwrap();
|
||||
let color_buffer = gl.create_buffer().ok_or("failed to create buffer").unwrap();
|
||||
//gl.bind_buffer(WebGlRenderingCtx::ARRAY_BUFFER, Some(&pos_buffer));
|
||||
|
||||
/*let num_bytes_per_f32 = std::mem::size_of::<f32>() as i32;
|
||||
// layout (location = 0) in vec2 pos;
|
||||
gl.vertex_attrib_pointer_with_i32(
|
||||
0,
|
||||
2,
|
||||
WebGlRenderingCtx::FLOAT,
|
||||
false,
|
||||
8 * num_bytes_per_f32,
|
||||
0,
|
||||
);
|
||||
gl.enable_vertex_attrib_array(0);
|
||||
|
||||
// layout (location = 1) in vec2 tx;
|
||||
gl.vertex_attrib_pointer_with_i32(
|
||||
1,
|
||||
2,
|
||||
WebGlRenderingCtx::FLOAT,
|
||||
false,
|
||||
8 * num_bytes_per_f32,
|
||||
(2 * num_bytes_per_f32) as i32,
|
||||
);
|
||||
gl.enable_vertex_attrib_array(1);
|
||||
|
||||
// layout (location = 2) in vec4 color;
|
||||
gl.vertex_attrib_pointer_with_i32(
|
||||
2,
|
||||
4,
|
||||
WebGlRenderingCtx::FLOAT,
|
||||
false,
|
||||
8 * num_bytes_per_f32,
|
||||
(4 * num_bytes_per_f32) as i32,
|
||||
);
|
||||
gl.enable_vertex_attrib_array(2);*/
|
||||
|
||||
let index_buffer = gl.create_buffer().ok_or("failed to create buffer").unwrap();
|
||||
// Bind the buffer
|
||||
/*gl.bind_buffer(WebGlRenderingCtx::ELEMENT_ARRAY_BUFFER, Some(&index_buffer));
|
||||
let data = vec![0_u16, 1, 2];
|
||||
gl.buffer_data_with_array_buffer_view(
|
||||
WebGlRenderingCtx::ELEMENT_ARRAY_BUFFER,
|
||||
unsafe { &js_sys::Uint16Array::view(&data) },
|
||||
WebGlRenderingCtx::STREAM_DRAW,
|
||||
);
|
||||
//gl.bind_vertex_array(None);
|
||||
|
||||
gl.bind_buffer(WebGlRenderingCtx::ELEMENT_ARRAY_BUFFER, None);
|
||||
gl.bind_buffer(WebGlRenderingCtx::ARRAY_BUFFER, None);
|
||||
*/
|
||||
Ok(WebGl2Painter {
|
||||
canvas_id: canvas_id.to_owned(),
|
||||
canvas,
|
||||
gl,
|
||||
shader,
|
||||
|
||||
//vao,
|
||||
pos_buffer,
|
||||
tc_buffer,
|
||||
color_buffer,
|
||||
|
||||
index_buffer,
|
||||
egui_texture,
|
||||
egui_texture_version: None,
|
||||
user_textures: Default::default(),
|
||||
})
|
||||
}
|
||||
|
||||
fn alloc_user_texture_index(&mut self) -> usize {
|
||||
for (index, tex) in self.user_textures.iter_mut().enumerate() {
|
||||
if tex.is_none() {
|
||||
*tex = Some(Default::default());
|
||||
return index;
|
||||
}
|
||||
}
|
||||
let index = self.user_textures.len();
|
||||
self.user_textures.push(Some(Default::default()));
|
||||
index
|
||||
}
|
||||
|
||||
pub fn alloc_user_texture(
|
||||
&mut self,
|
||||
size: (usize, usize),
|
||||
srgba_pixels: &[Color32],
|
||||
) -> egui::TextureId {
|
||||
let index = self.alloc_user_texture_index();
|
||||
assert_eq!(
|
||||
size.0 * size.1,
|
||||
srgba_pixels.len(),
|
||||
"Mismatch between texture size and texel count"
|
||||
);
|
||||
|
||||
if let Some(Some(user_texture)) = self.user_textures.get_mut(index) {
|
||||
let mut pixels: Vec<u8> = Vec::with_capacity(srgba_pixels.len() * 4);
|
||||
for srgba in srgba_pixels {
|
||||
pixels.push(srgba.r());
|
||||
pixels.push(srgba.g());
|
||||
pixels.push(srgba.b());
|
||||
pixels.push(srgba.a());
|
||||
}
|
||||
|
||||
*user_texture = UserTexture {
|
||||
size,
|
||||
pixels,
|
||||
gl_texture: None,
|
||||
};
|
||||
}
|
||||
|
||||
egui::TextureId::User(index as u64)
|
||||
}
|
||||
|
||||
fn free_user_texture(&mut self, id: egui::TextureId) {
|
||||
if let egui::TextureId::User(id) = id {
|
||||
let index = id as usize;
|
||||
if index < self.user_textures.len() {
|
||||
self.user_textures[index] = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_texture(&self, texture_id: egui::TextureId) -> Option<&Texture2D> {
|
||||
match texture_id {
|
||||
egui::TextureId::Egui => Some(&self.egui_texture),
|
||||
egui::TextureId::User(id) => self
|
||||
.user_textures
|
||||
.get(id as usize)?
|
||||
.as_ref()?
|
||||
.gl_texture
|
||||
.as_ref(),
|
||||
}
|
||||
}
|
||||
|
||||
fn upload_user_textures(&mut self) {
|
||||
let gl = &self.gl;
|
||||
for user_texture in self.user_textures.iter_mut().flatten() {
|
||||
if user_texture.gl_texture.is_none() {
|
||||
let pixels = std::mem::take(&mut user_texture.pixels);
|
||||
|
||||
let gl_texture =
|
||||
Texture2D::create_from_raw_pixels::<al_core::image::format::RGBA8U>(
|
||||
&gl,
|
||||
user_texture.size.0 as i32,
|
||||
user_texture.size.1 as i32,
|
||||
&[
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_MIN_FILTER,
|
||||
WebGlRenderingCtx::LINEAR,
|
||||
),
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_MAG_FILTER,
|
||||
WebGlRenderingCtx::LINEAR,
|
||||
),
|
||||
// Prevents s-coordinate wrapping (repeating)
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_WRAP_S,
|
||||
WebGlRenderingCtx::CLAMP_TO_EDGE,
|
||||
),
|
||||
// Prevents t-coordinate wrapping (repeating)
|
||||
(
|
||||
WebGlRenderingCtx::TEXTURE_WRAP_T,
|
||||
WebGlRenderingCtx::CLAMP_TO_EDGE,
|
||||
),
|
||||
],
|
||||
Some(&pixels),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
user_texture.gl_texture = Some(gl_texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[deprecated = "Use: `NativeTexture::register_native_texture` instead"]
|
||||
pub fn register_webgl_texture(&mut self, texture: WebGlTexture) -> egui::TextureId {
|
||||
let id = self.alloc_user_texture_index();
|
||||
if let Some(Some(user_texture)) = self.user_textures.get_mut(id) {
|
||||
*user_texture = UserTexture {
|
||||
size: (0, 0),
|
||||
pixels: vec![],
|
||||
gl_texture: None,
|
||||
}
|
||||
}
|
||||
egui::TextureId::User(id as u64)
|
||||
}
|
||||
|
||||
fn paint_mesh(
|
||||
&self,
|
||||
mesh: &egui::epaint::Mesh16,
|
||||
screen_size_points: &egui::Vec2,
|
||||
) -> Result<(), JsValue> {
|
||||
//debug_assert!(mesh.is_valid());
|
||||
let mut positions = Vec::with_capacity(2 * mesh.vertices.len());
|
||||
let mut texcoords = Vec::with_capacity(2 * mesh.vertices.len());
|
||||
let mut colors = Vec::with_capacity(4 * mesh.vertices.len());
|
||||
|
||||
//let mut colors: Vec<u8> = Vec::with_capacity(4 * mesh.vertices.len());
|
||||
for v in &mesh.vertices {
|
||||
positions.push(v.pos.x);
|
||||
positions.push(v.pos.y);
|
||||
texcoords.push(v.uv.x);
|
||||
texcoords.push(v.uv.y);
|
||||
colors.push(v.color[0] as f32);
|
||||
colors.push(v.color[1] as f32);
|
||||
colors.push(v.color[2] as f32);
|
||||
colors.push(v.color[3] as f32);
|
||||
}
|
||||
|
||||
let gl = &self.gl;
|
||||
|
||||
//self.gl.bind_vertex_array(Some(&self.vao));
|
||||
|
||||
// Bind the buffer
|
||||
gl.bind_buffer(WebGlRenderingCtx::ARRAY_BUFFER, Some(&self.pos_buffer));
|
||||
gl.buffer_data_with_array_buffer_view(
|
||||
WebGlRenderingCtx::ARRAY_BUFFER,
|
||||
unsafe { &js_sys::Float32Array::view(&positions) },
|
||||
WebGlRenderingCtx::STREAM_DRAW,
|
||||
);
|
||||
|
||||
let num_bytes_per_f32 = std::mem::size_of::<f32>() as i32;
|
||||
// layout (location = 0) in vec2 pos;
|
||||
let pos_loc = self.shader.get_attrib_location(gl, "pos") as u32;
|
||||
gl.vertex_attrib_pointer_with_i32(pos_loc, 2, WebGlRenderingCtx::FLOAT, false, 0, 0);
|
||||
gl.enable_vertex_attrib_array(pos_loc);
|
||||
|
||||
// layout (location = 1) in vec2 tx;
|
||||
gl.bind_buffer(WebGlRenderingCtx::ARRAY_BUFFER, Some(&self.tc_buffer));
|
||||
gl.buffer_data_with_array_buffer_view(
|
||||
WebGlRenderingCtx::ARRAY_BUFFER,
|
||||
unsafe { &js_sys::Float32Array::view(&texcoords) },
|
||||
WebGlRenderingCtx::STREAM_DRAW,
|
||||
);
|
||||
let tx_loc = self.shader.get_attrib_location(gl, "tx") as u32;
|
||||
gl.vertex_attrib_pointer_with_i32(tx_loc, 2, WebGlRenderingCtx::FLOAT, false, 0, 0);
|
||||
gl.enable_vertex_attrib_array(tx_loc);
|
||||
|
||||
// layout (location = 2) in vec4 color;
|
||||
gl.bind_buffer(WebGlRenderingCtx::ARRAY_BUFFER, Some(&self.color_buffer));
|
||||
gl.buffer_data_with_array_buffer_view(
|
||||
WebGlRenderingCtx::ARRAY_BUFFER,
|
||||
unsafe { &js_sys::Float32Array::view(&colors) },
|
||||
WebGlRenderingCtx::STREAM_DRAW,
|
||||
);
|
||||
let color_loc = self.shader.get_attrib_location(gl, "color") as u32;
|
||||
gl.vertex_attrib_pointer_with_i32(color_loc, 4, WebGlRenderingCtx::FLOAT, false, 0, 0);
|
||||
gl.enable_vertex_attrib_array(color_loc);
|
||||
|
||||
gl.bind_buffer(
|
||||
WebGlRenderingCtx::ELEMENT_ARRAY_BUFFER,
|
||||
Some(&self.index_buffer),
|
||||
);
|
||||
gl.buffer_data_with_array_buffer_view(
|
||||
WebGlRenderingCtx::ELEMENT_ARRAY_BUFFER,
|
||||
unsafe { &js_sys::Uint16Array::view(&mesh.indices) },
|
||||
WebGlRenderingCtx::STREAM_DRAW,
|
||||
);
|
||||
|
||||
let shader = self.shader.bind(&self.gl);
|
||||
|
||||
shader
|
||||
.attach_uniform(
|
||||
"u_screen_size",
|
||||
&Vector2::new(screen_size_points.x, screen_size_points.y),
|
||||
)
|
||||
.attach_uniform("u_sampler", self.get_texture(mesh.texture_id).unwrap());
|
||||
|
||||
// The raster vao is bound at the lib.rs level
|
||||
self.gl.draw_elements_with_i32(
|
||||
//WebGlRenderingCtx::LINES,
|
||||
WebGlRenderingCtx::TRIANGLES,
|
||||
mesh.indices.len() as i32,
|
||||
WebGlRenderingCtx::UNSIGNED_SHORT,
|
||||
0,
|
||||
);
|
||||
//self.gl.bind_vertex_array(None);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl epi::TextureAllocator for WebGl2Painter {
|
||||
fn alloc_srgba_premultiplied(
|
||||
&mut self,
|
||||
size: (usize, usize),
|
||||
srgba_pixels: &[egui::Color32],
|
||||
) -> egui::TextureId {
|
||||
self.alloc_user_texture(size, srgba_pixels)
|
||||
}
|
||||
|
||||
fn free(&mut self, id: egui::TextureId) {
|
||||
self.free_user_texture(id)
|
||||
}
|
||||
}
|
||||
|
||||
impl egui_web::Painter for WebGl2Painter {
|
||||
fn as_tex_allocator(&mut self) -> &mut dyn epi::TextureAllocator {
|
||||
self
|
||||
}
|
||||
|
||||
fn debug_info(&self) -> String {
|
||||
format!(
|
||||
"Stored canvas size: {} x {}\n\
|
||||
gl context size: {} x {}",
|
||||
self.canvas.width(),
|
||||
self.canvas.height(),
|
||||
self.gl.drawing_buffer_width(),
|
||||
self.gl.drawing_buffer_height(),
|
||||
)
|
||||
}
|
||||
|
||||
/// id of the canvas html element containing the rendering
|
||||
fn canvas_id(&self) -> &str {
|
||||
&self.canvas_id
|
||||
}
|
||||
|
||||
fn upload_egui_texture(&mut self, texture: &Texture) {
|
||||
if self.egui_texture_version == Some(texture.version) {
|
||||
return; // No change
|
||||
}
|
||||
|
||||
let mut pixels: Vec<u8> = Vec::with_capacity(texture.pixels.len() * 4);
|
||||
for srgba in texture.srgba_pixels(1.0) {
|
||||
pixels.push(srgba.r());
|
||||
pixels.push(srgba.g());
|
||||
pixels.push(srgba.b());
|
||||
pixels.push(srgba.a());
|
||||
}
|
||||
#[cfg(feature = "webgl1")]
|
||||
let (src_format, src_internal_format) = (
|
||||
web_sys::ExtSRgb::SRGB_ALPHA_EXT,
|
||||
web_sys::ExtSRgb::SRGB_ALPHA_EXT,
|
||||
);
|
||||
#[cfg(feature = "webgl2")]
|
||||
let (src_format, src_internal_format) =
|
||||
(WebGlRenderingCtx::RGBA, WebGlRenderingCtx::SRGB8_ALPHA8);
|
||||
|
||||
let src_type = WebGlRenderingCtx::UNSIGNED_BYTE;
|
||||
let gl = &self.gl;
|
||||
self.egui_texture
|
||||
.bind_mut()
|
||||
.tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array(
|
||||
texture.width as i32,
|
||||
texture.height as i32,
|
||||
src_internal_format as i32,
|
||||
src_format,
|
||||
src_type,
|
||||
Some(&pixels),
|
||||
);
|
||||
|
||||
self.egui_texture_version = Some(texture.version);
|
||||
}
|
||||
|
||||
fn clear(&mut self, clear_color: egui::Rgba) {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn paint_meshes(
|
||||
&mut self,
|
||||
clipped_meshes: Vec<egui::ClippedMesh>,
|
||||
pixels_per_point: f32,
|
||||
) -> Result<(), JsValue> {
|
||||
/* Upload user textures */
|
||||
self.upload_user_textures();
|
||||
|
||||
/* Draw the ui */
|
||||
self.gl.enable(WebGlRenderingCtx::SCISSOR_TEST);
|
||||
self.gl.disable(WebGlRenderingCtx::CULL_FACE); // egui is not strict about winding order.
|
||||
|
||||
let canvas_width = self.canvas.width();
|
||||
let canvas_height = self.canvas.height();
|
||||
|
||||
let screen_size_pixels = vec2(canvas_width as f32, canvas_height as f32);
|
||||
let screen_size_points = screen_size_pixels / pixels_per_point;
|
||||
|
||||
for egui::ClippedMesh(clip_rect, mesh) in clipped_meshes {
|
||||
if let Some(_) = self.get_texture(mesh.texture_id) {
|
||||
let clip_min_x = pixels_per_point * clip_rect.min.x;
|
||||
let clip_min_y = pixels_per_point * clip_rect.min.y;
|
||||
let clip_max_x = pixels_per_point * clip_rect.max.x;
|
||||
let clip_max_y = pixels_per_point * clip_rect.max.y;
|
||||
let clip_min_x = clip_min_x.clamp(0.0, screen_size_pixels.x);
|
||||
let clip_min_y = clip_min_y.clamp(0.0, screen_size_pixels.y);
|
||||
let clip_max_x = clip_max_x.clamp(clip_min_x, screen_size_pixels.x);
|
||||
let clip_max_y = clip_max_y.clamp(clip_min_y, screen_size_pixels.y);
|
||||
let clip_min_x = clip_min_x.round() as i32;
|
||||
let clip_min_y = clip_min_y.round() as i32;
|
||||
let clip_max_x = clip_max_x.round() as i32;
|
||||
let clip_max_y = clip_max_y.round() as i32;
|
||||
|
||||
// scissor Y coordinate is from the bottom
|
||||
self.gl.scissor(
|
||||
clip_min_x,
|
||||
canvas_height as i32 - clip_max_y,
|
||||
clip_max_x - clip_min_x,
|
||||
clip_max_y - clip_min_y,
|
||||
);
|
||||
|
||||
for mesh in mesh.split_to_u16() {
|
||||
self.paint_mesh(&mesh, &screen_size_points)?;
|
||||
}
|
||||
} else {
|
||||
egui_web::console_warn(format!(
|
||||
"WebGL: Failed to find texture {:?}",
|
||||
mesh.texture_id
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
self.gl.disable(WebGlRenderingCtx::SCISSOR_TEST);
|
||||
self.gl.enable(WebGlRenderingCtx::CULL_FACE);
|
||||
|
||||
/* End draw the ui */
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
use egui::Color32;
|
||||
|
||||
use crate::painter::WebGl2Painter;
|
||||
|
||||
struct SurveyThumbnailDesc {
|
||||
id: &'static str,
|
||||
regime: &'static str,
|
||||
url: &'static str,
|
||||
}
|
||||
|
||||
struct SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc,
|
||||
// The image
|
||||
index_thumbnail: usize,
|
||||
}
|
||||
|
||||
const SIZE_SURVEY_THUMBNAIL: egui::Vec2 = egui::Vec2 { x: 64.0, y: 64.0 };
|
||||
const SURVEY_THUMBNAILS: &'static [SurveyThumbnail] = &[
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "SDSS9 color",
|
||||
regime: "Optical",
|
||||
url: "SDSS/DR9/color",
|
||||
},
|
||||
index_thumbnail: 0,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "DSS2 NIR",
|
||||
regime: "Optical",
|
||||
url: "DSS/DSS2-NIR/",
|
||||
},
|
||||
index_thumbnail: 1,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "HLA SDSSz",
|
||||
regime: "Optical",
|
||||
url: "HLA-hips/filter_SDSSz_hips",
|
||||
},
|
||||
index_thumbnail: 2,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "PanSTARRS DR1 g",
|
||||
regime: "Optical",
|
||||
url: "Pan-STARRS/DR1/g",
|
||||
},
|
||||
index_thumbnail: 3,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "PanSTARRS DR1 z",
|
||||
regime: "Optical",
|
||||
url: "Pan-STARRS/DR1/z",
|
||||
},
|
||||
index_thumbnail: 4,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "I 345 gaia2",
|
||||
regime: "Optical",
|
||||
url: "ancillary/GaiaDR2/hips-density-map",
|
||||
},
|
||||
index_thumbnail: 5,
|
||||
},
|
||||
SurveyThumbnail {
|
||||
desc: SurveyThumbnailDesc {
|
||||
id: "GALEXGR6 AIS FUV",
|
||||
regime: "UV",
|
||||
url: "GALEX/GR6-03-2014/AIS-FD",
|
||||
},
|
||||
index_thumbnail: 6,
|
||||
},
|
||||
];
|
||||
|
||||
pub struct SurveyGrid {
|
||||
thumbnail_texture: egui::TextureId,
|
||||
thumbnail_texture_size: egui::Vec2,
|
||||
open: bool,
|
||||
}
|
||||
use super::SurveyWidget;
|
||||
use wasm_bindgen::prelude::*;
|
||||
impl SurveyGrid {
|
||||
pub fn new(painter: &mut WebGl2Painter) -> Result<Self, JsValue> {
|
||||
//let thumbnail_img_path = resources.get_filename("ui_thumbnail").unwrap();
|
||||
|
||||
let (user_texture, size_thumbnail_tex) = {
|
||||
let size_thumbnail_img = (320, 192);
|
||||
|
||||
let image_buf = image_decoder::load_from_memory_with_format(
|
||||
include_bytes!("../../img/tileset.png"),
|
||||
image_decoder::ImageFormat::Png,
|
||||
)
|
||||
.map_err(|e| JsValue::from_str(&format!("{:?}", e)))?;
|
||||
//let mut data_rgba = Vec::with_capacity((width_thumbnail_img as usize) * (height_thumbnail_img as usize) * 4);
|
||||
let data = image_buf.into_bytes();
|
||||
|
||||
let srgba_pixels = {
|
||||
unsafe {
|
||||
std::slice::from_raw_parts(data.as_ptr() as *const Color32, data.len() >> 2)
|
||||
}
|
||||
};
|
||||
// register the texture to the ui backend
|
||||
let user_texture = painter.alloc_user_texture(size_thumbnail_img, srgba_pixels);
|
||||
(user_texture, size_thumbnail_img)
|
||||
};
|
||||
|
||||
let open = false;
|
||||
Ok(Self {
|
||||
thumbnail_texture: user_texture,
|
||||
thumbnail_texture_size: egui::Vec2::new(
|
||||
size_thumbnail_tex.0 as f32,
|
||||
size_thumbnail_tex.1 as f32,
|
||||
),
|
||||
open,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn open(&mut self) {
|
||||
self.open = true;
|
||||
}
|
||||
|
||||
pub fn show(&mut self, ui: &mut egui::Ui, s_id_selected: &mut String, add: &mut bool) {
|
||||
if !self.open {
|
||||
return;
|
||||
}
|
||||
|
||||
egui::Frame::popup(ui.style())
|
||||
.stroke(egui::Stroke::none())
|
||||
.show(ui, |ui| {
|
||||
ui.set_max_width(270.0);
|
||||
egui::Grid::new("Surveys browsing").show(ui, |ui| {
|
||||
for (idx, thumbnail) in SURVEY_THUMBNAILS.iter().enumerate() {
|
||||
if idx > 0 && idx % 4 == 0 {
|
||||
ui.end_row();
|
||||
}
|
||||
|
||||
let hover_text =
|
||||
format!("{:?}\nRegime: {}", thumbnail.desc.id, thumbnail.desc.regime);
|
||||
if ui
|
||||
.add(
|
||||
egui::ImageButton::new(
|
||||
self.thumbnail_texture,
|
||||
SIZE_SURVEY_THUMBNAIL,
|
||||
)
|
||||
.uv(egui::Rect {
|
||||
min: egui::Pos2::new(
|
||||
((thumbnail.index_thumbnail % 5) as f32)
|
||||
* SIZE_SURVEY_THUMBNAIL.x
|
||||
/ self.thumbnail_texture_size.x,
|
||||
((thumbnail.index_thumbnail / 5) as f32)
|
||||
* SIZE_SURVEY_THUMBNAIL.y
|
||||
/ self.thumbnail_texture_size.y,
|
||||
),
|
||||
max: egui::Pos2::new(
|
||||
((thumbnail.index_thumbnail % 5) as f32 + 1.0)
|
||||
* SIZE_SURVEY_THUMBNAIL.x
|
||||
/ self.thumbnail_texture_size.x,
|
||||
((thumbnail.index_thumbnail / 5) as f32 + 1.0)
|
||||
* SIZE_SURVEY_THUMBNAIL.y
|
||||
/ self.thumbnail_texture_size.y,
|
||||
),
|
||||
}),
|
||||
)
|
||||
.on_hover_text(hover_text)
|
||||
.clicked()
|
||||
{
|
||||
*s_id_selected = thumbnail.desc.url.to_string();
|
||||
}
|
||||
}
|
||||
});
|
||||
ui.end_row();
|
||||
|
||||
ui.separator();
|
||||
ui.horizontal(|ui| {
|
||||
if ui.add(egui::Button::new("Add")).clicked() {
|
||||
// TODO. You will not be able to add a new survey if there is a color one
|
||||
let selected_survey_compatible = true;
|
||||
*add = true;
|
||||
}
|
||||
|
||||
if ui.add(egui::Button::new("Cancel")).clicked() {
|
||||
self.open = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
mod tests {
|
||||
use image_decoder::{ImageBuffer, RgbaImage};
|
||||
|
||||
#[test]
|
||||
fn test_open_png_image() {
|
||||
let size_thumbnail_img = (64, 64);
|
||||
|
||||
let width_thumbnail_img = size_thumbnail_img.0 as u32;
|
||||
let height_thumbnail_img = size_thumbnail_img.1 as u32;
|
||||
let image_buf: RgbaImage = ImageBuffer::from_raw(
|
||||
width_thumbnail_img,
|
||||
height_thumbnail_img,
|
||||
include_bytes!("../../img/CDS_P_SDSS9_color.png").to_vec(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
image_buf.pixels().len(),
|
||||
size_thumbnail_img.0 * size_thumbnail_img.1
|
||||
);
|
||||
}
|
||||
}
|
||||