Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure and documentation #19

Open
wants to merge 143 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
707165c
Refactoring to avoid needing php in live site
ajmas Nov 15, 2017
93c33c9
Updated readme, including old TLE.json
ajmas Nov 15, 2017
8830994
Ensure we use https for external resources
ajmas Nov 15, 2017
b33ad54
Updated Satellite data and readme
ajmas Apr 28, 2019
74e2c7d
Updated data
ajmas Apr 28, 2019
48d2c50
library update and unhandled error
ajmas Apr 28, 2019
0e813b8
Added license info
ajmas Sep 14, 2023
ee4724d
First phase of 'modernisation' of project
ajmas Sep 26, 2023
ae0fe2d
Updated TLE data, updated ReadMe
ajmas Sep 26, 2023
d22da73
updated TLE data file
ajmas Sep 26, 2023
0c967b0
update about
ajmas Sep 26, 2023
b672067
add initial workflow
ajmas Sep 26, 2023
258e46c
tweaking initial workflow
ajmas Sep 26, 2023
78f80b9
tweaking initial workflow
ajmas Sep 26, 2023
316fbd1
tweaking initial workflow
ajmas Sep 26, 2023
cc3ae5c
adjust base path
ajmas Sep 26, 2023
46052d0
Support for adjusting base URL
ajmas Sep 26, 2023
bd3c1e6
UI texts adjustment
ajmas Sep 26, 2023
1c7f523
dynamic title update
ajmas Sep 26, 2023
191ec18
more refacting and fixes
ajmas Oct 2, 2023
fcf742a
Merge branch 'modernisation'
ajmas Oct 2, 2023
e09dd24
text tweaks
ajmas Oct 2, 2023
0320d31
Issue #2 More refactoring
ajmas Oct 14, 2023
a7929a0
Merge pull request #5 from ajmas/issue-2-more-refactoring
ajmas Oct 14, 2023
0db4c7b
Issue #8 fix altitude display info
ajmas Oct 14, 2023
f067694
Merge pull request #10 from ajmas/issue-8-movement-info
ajmas Oct 14, 2023
d7f2771
Issue #9 Fix search groups
ajmas Oct 14, 2023
e28c906
Merge pull request #11 from ajmas/issue-9-search-groups
ajmas Oct 14, 2023
caa3d8d
Issue #14 First pass conversion to TS
ajmas Nov 12, 2023
0612e66
Merge pull request #14 from ajmas/issue-14-typescript
ajmas Nov 12, 2023
6eb8e8f
Issue #1 Converting to use threejs
ajmas Nov 14, 2023
f928153
using 4k textures for the earth
ajmas Nov 14, 2023
9985741
more work, now with orbits
ajmas Nov 14, 2023
bbb39bf
first phase HUD re-integration
ajmas Nov 15, 2023
3318e29
update node version
ajmas Nov 15, 2023
13ee399
more integration work
ajmas Nov 15, 2023
4da59d1
exploring shaders and vite tweak
ajmas Nov 17, 2023
134d39b
added vite.config.js to ignore
ajmas Nov 17, 2023
ab1d818
removing lower case earth.ts
ajmas Nov 17, 2023
5b014b3
adding capitalised Earth.ts
ajmas Nov 17, 2023
d240471
removed vite-tsconfig-paths as dependency
ajmas Nov 17, 2023
01bb37f
removing lower case sun.ts
ajmas Nov 17, 2023
0a2659a
adding captialised Sun.ts
ajmas Nov 17, 2023
e6248ba
changed ThreeJs version and more tweaking
ajmas Nov 18, 2023
e40571e
shader and click detection
ajmas Nov 20, 2023
e17bf6b
more work
ajmas Nov 25, 2023
2d0dce1
improved download script and updated TLE data
ajmas Nov 25, 2023
f97e7ac
exploring raycaster issue
ajmas Nov 30, 2023
245ea91
exploring raycaster issue
ajmas Nov 30, 2023
c5b9fc7
exploring raycaster issue
ajmas Nov 30, 2023
493ec5c
logger, config and selection handling
ajmas Dec 1, 2023
25bc199
Merge pull request #15 from ajmas/issue-1-threejs
ajmas Dec 1, 2023
63f42ee
adjusting CI deploy config
ajmas Dec 1, 2023
099cbcc
group colour scheme and updated TLE
ajmas Dec 2, 2023
16e968c
Disable conditional build
ajmas Dec 2, 2023
c272360
Ensure build runs on mastr
ajmas Dec 2, 2023
5096b6c
removing testing code, causing issues
ajmas Dec 2, 2023
605f1c6
Merge branch 'master' of github.com:ajmas/StuffInSpace
ajmas Dec 2, 2023
1c9e502
TLE data update and tweaks
ajmas Dec 2, 2023
987d591
tweak transparency
ajmas Dec 2, 2023
911abe8
fix: :bug: add missing default config values
thkruz Dec 18, 2023
5cfe87f
feat: :sparkles: vscode shortcut to launch the dev server
thkruz Dec 18, 2023
978108e
fix: :bug: fix dot shader making black squares
thkruz Dec 18, 2023
996d360
fix: :adhesive_bandage: enable antialias on webgl context
thkruz Dec 18, 2023
04e20c0
issue #28 make propergateInterval configurable
ajmas Dec 19, 2023
662b419
Merge pull request #29 from ajmas/issue-28-satcruncher-frequency
ajmas Dec 19, 2023
1551d93
refactor: :recycle: split complex function
thkruz Dec 19, 2023
cb1c4db
Merge branch 'master' of https://github.com/ajmas/StuffInSpace
thkruz Dec 19, 2023
51d90e0
fix: :rotating_light: fix lint error with undefined check
thkruz Dec 19, 2023
b7e013e
Merge pull request #23 from thkruz/master
ajmas Dec 19, 2023
71cf2b8
Merge pull request #23 from thkruz/master
ajmas Dec 19, 2023
4c851a7
issue #27 Limit sat selection to active group
ajmas Dec 20, 2023
d69a509
Merge pull request #33 from ajmas/issue-27-group-sat-picking
ajmas Dec 20, 2023
4e28b96
Merge branch 'master' of github.com:ajmas/StuffInSpace
ajmas Dec 20, 2023
fc1c38d
fix: :bug: fix zoom functionality
thkruz Dec 21, 2023
5b7fc93
refactor: :rotating_light: fix linter error
thkruz Dec 21, 2023
e149cf4
refactor: :rotating_light: switch to for of loops when possible
thkruz Dec 21, 2023
9534b6d
refactor: :recycle: change methods to private by default
thkruz Dec 21, 2023
b244de4
refactor: :recycle: organize and document SatelliteGroup
thkruz Dec 21, 2023
d940ddf
fix: :adhesive_bandage: fix type error in loadSatelliteData
thkruz Dec 21, 2023
559482e
refactor: :label: add type support for SatelliteStore.satData
thkruz Dec 21, 2023
c7d5691
feat: :sparkles: extend search to norad id and add type support
thkruz Dec 21, 2023
c7d168d
issue #37 resolve orbit hover bug
ajmas Dec 21, 2023
8187295
Merge pull request #40 from ajmas/issue-37-orbit-hover
ajmas Dec 21, 2023
e257523
Issue #41 Dragging should not change selection
ajmas Dec 21, 2023
e0f547b
Merge pull request #42 from ajmas/issue-41-click-drag
ajmas Dec 21, 2023
0f26295
tweak github workflow config
ajmas Dec 21, 2023
f832a71
fix: :bug: fix windows opening off screen
thkruz Dec 21, 2023
6c570ee
Issue #34 Raycast line targetting
ajmas Dec 21, 2023
e3c355a
Merge pull request #43 from ajmas/issue-34-line-targetting
ajmas Dec 21, 2023
d9296a3
tweak github workflow config
ajmas Dec 21, 2023
d3476ff
Merge branch 'master' into fix-zoom-functions
ajmas Dec 21, 2023
318b7b9
Merge pull request #38 from thkruz/fix-zoom-functions
ajmas Dec 21, 2023
dd89223
reintroduce variable lost in merge
ajmas Dec 21, 2023
1b8549f
fix: :bug: fix find all satellites link
thkruz Dec 21, 2023
2a784b8
refactor: :recycle: rename onMouseMove handler
thkruz Dec 21, 2023
461a682
lint tweak and code tidy
ajmas Dec 21, 2023
c9f15f2
Merge branch 'master' of https://github.com/ajmas/StuffInSpace into f…
thkruz Dec 21, 2023
6975679
Merge branch 'master' of https://github.com/ajmas/StuffInSpace into m…
thkruz Dec 21, 2023
7131729
refactor: :truck: move interface to standalone file
thkruz Dec 21, 2023
bed9742
refactor: :truck: move SatelliteObject interface to own file
thkruz Dec 21, 2023
48eb5ca
Merge pull request #44 from thkruz/fix-find-all-satellites-from-launch
ajmas Dec 21, 2023
063b917
Merge pull request #39 from thkruz/minor-fixes-and-linter
ajmas Dec 21, 2023
ffc7a10
adjust config for baseUrl
ajmas Dec 21, 2023
6b3ac89
tweak config
ajmas Dec 21, 2023
e1c09f5
chore: :see_no_evil: add vscode settings to gitignore
thkruz Dec 29, 2023
28de224
fix: :bug: fix camera controls using threejs solution
thkruz Dec 29, 2023
98e4179
refactor: :coffin: remove unused listener
thkruz Dec 29, 2023
67261ac
fix: :bug: fix searchbox looking for dataset on span
thkruz Dec 29, 2023
527d63c
Merge pull request #54 from thkruz/fix-camera-controls
ajmas Jan 5, 2024
991da68
Merge pull request #57 from thkruz/searchbox-fix
ajmas Jan 5, 2024
6376eb8
Bug Fix: unexpected error if onHover event was undefined
ajmas Jan 5, 2024
7b4e440
Issue #60 Update dependencies and also path issue
ajmas Jan 5, 2024
444b396
Merge pull request #62 from ajmas/issue-60-dependency-updates
ajmas Jan 5, 2024
6764a2c
tweak deployment base url
ajmas Jan 8, 2024
80cb13d
Roll back ThreeJS version and other tweaks
ajmas Jan 8, 2024
9c8be19
generate app info
ajmas Jan 8, 2024
21e477c
Merge branch 'master' of github.com:ajmas/StuffInSpace
ajmas Jan 8, 2024
28e46c3
generate app info
ajmas Jan 8, 2024
96cb93a
generate app info
ajmas Jan 8, 2024
3076640
Issue #51 Keep group on search close
ajmas Jan 8, 2024
46d7f6d
Merge pull request #52 from thkruz/hide-vscode-settings
ajmas Jan 8, 2024
9f6152a
Merge pull request #64 from ajmas/issue-51-virtual-window
ajmas Jan 8, 2024
a501757
Isseu #6 Add app version to UI (#65)
ajmas Jan 8, 2024
d45e155
Issue #26 Adjust raycast interval
ajmas Jan 8, 2024
3ce3e18
include short hash as default version
ajmas Jan 8, 2024
fa5afd0
fix: :bug: fix url mismatch between code and config
thkruz Jan 9, 2024
f20acc3
fix: :bug: fix undefined error when attribution not available
thkruz Jan 9, 2024
dad6d3d
refactor: :rotating_light: use for of loop when possible
thkruz Jan 9, 2024
e24e865
refactor: :rotating_light: use for of loop when possible
thkruz Jan 9, 2024
1d12c6a
refactor: :recycle: avoid Record<string, any> when possible
thkruz Jan 9, 2024
9d1347d
fix: :adhesive_bandage: async functions should have catch blocks
thkruz Jan 9, 2024
6d5cff3
refactor: :recycle: use SatelliteObject interface when possible
thkruz Jan 9, 2024
de3a0c7
refactor: :recycle: use ViewerContext in lieu of Record<string, any>
thkruz Jan 9, 2024
126c9b1
refactor: :recycle: use SatelliteGroup interface
thkruz Jan 9, 2024
bcc93bc
refactor: :rotating_light: use for of loop when possible
thkruz Jan 9, 2024
c2b7224
refactor: :recycle: use defined interface when possible
thkruz Jan 9, 2024
065116b
refactor: :truck: move interface to interface folder
thkruz Jan 9, 2024
f420d32
Merge pull request #69 from thkruz/more-interfaces
ajmas Jan 9, 2024
78e5023
Merge pull request #68 from thkruz/fix-url-issues
ajmas Jan 9, 2024
8195ed9
changes following review
ajmas Jan 9, 2024
52a2b39
changes following review
ajmas Jan 9, 2024
20e9d90
Merge pull request #66 from ajmas/issue-26-raycast-interval
ajmas Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
const { resolve } = require('path');
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,

// https://eslint.vuejs.org/user-guide/#how-to-use-custom-parser
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
parserOptions: {
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint
// Needed to make the parser take into account 'vue' files
extraFileExtensions: ['.vue'],
parser: '@typescript-eslint/parser',
project: resolve(__dirname, './tsconfig.json'),
tsconfigRootDir: __dirname,
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
},

env: {
browser: true
},

ignorePatterns: [
'vite.config.js'
],

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',
// consider disabling this class of rules if linting takes too long
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',
'import'
],

// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow paren-less arrow functions
'arrow-parens': 'off',
'one-var': 'off',
'no-void': 'off',
'multiline-ternary': 'off',
'curly': 'error',
'import/first': 'off',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'prefer-promise-reject-errors': 'off',
'space-before-function-paren': 'error',
semi: [2, 'always'],
indent: ['error', 2],
// causes issues in Typescript when enabled
'no-unused-vars': 'off',

// TypeScript
quotes: ['warn', 'single', { avoidEscape: true }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
};
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy

on:
push:
# branches:
# - master

env:
BASE_URL: /StuffInSpace/

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build project
run: |
bin/generate-appinfo.sh public/appinfo.json
cp public/appinfo.json src/appinfo.json
npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
*.ini
TLE.json
node_modules
.DS_Store
logs/
*.env
.cookiejar

# Devenv
.direnv
.devenv*
devenv.local.nix

.devenv
old
dist
tmp

# VSCode Local Settings
.vscode/settings.json
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/tmp/
*.cjs
*.json
*.txt
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"problemMatcher": [],
"label": "npm: dev",
"detail": "vite --host",
"isBackground": true,
"icon": {
"id": "symbol-method",
"color": "terminal.ansiBlue"
}
}
]
}
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Stuff in Space

Original author: James Yoder (https://github.com/jeyoder)

A real-time interactive WebGL visualisation of objects in Earth orbit.

## Running for Development

1. Install dependencies: `npm run install`
2. Run the project `npm run dev`

Connect to it at http://localhost:5173

## Building for Deployment

1. Install dependencies: `npm run install`
2. Build the project `npm run build`

The resulting assets will be in the `dist` folder, which you can
then make available on your website.

Note, the current setup assumes the project will be run at the root
of the website.

## Getting TLE data

While TLE data (Two-Line Elements) is included in the project, it won't be up to date.

If you wish to get current TLE data, then head over to [Space Track](https://www.space-track.org/),
login and then you can use the following URL:

https://www.space-track.org/basicspacedata/query/class/tle_latest/ORDINAL/1/EPOCH/%3Enow-30/orderby/NORAD_CAT_ID/format/json

Once you have the latest data, then update `public/data/TLE.json`, if running in
development or `data/TLE.json` if deployed.

## License

MIT license
41 changes: 41 additions & 0 deletions bin/fetch-tle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

basepath=`dirname "$0"`
cd "$basepath"

identity=$SPACETRACK_IDENTITY
password=$SPACETRACK_PASSWORD

if [ -z "$SPACETRACK_IDENTITY" ] || [ -z "$SPACETRACK_PASSWORD" ]
then
echo 'ensure both "SPACETRACK_IDENTITY" and "SPACETRACK_PASSWORD" are set'
exit
fi

auth_url="https://www.space-track.org/ajaxauth/login"
source_url="https://www.space-track.org/basicspacedata/query/class/tle_latest/ORDINAL/1/EPOCH/%3Enow-30/orderby/NORAD_CAT_ID/format/json"
tle_file="../public/data/TLE.json"
output_file="../public/data/attributed-TLE.json"
current_date=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
cookie_jar="/tmp/$USER-cookiejar"

echo "Authenticating"
curl -c $cookie_jar -b $cookie_jar "$auth_url" \
-d "identity=$identity&password=$password"

echo "Downloading TLE data"

curl --limit-rate 200K -cookie $cookie_jar -b $cookie_jar "${source_url}" > $tle_file

echo "Generating Attributed TLE file"
echo "{
\"source\": {
\"name\": \"Space-Track.org\",
\"url\": \"https://www.space-track.org/\"
},
\"date\": \"$current_date\",
\"data\":
" > $output_file

cat $tle_file >> $output_file
echo "\n}\n" >> $output_file
61 changes: 61 additions & 0 deletions bin/generate-appinfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash

build_date=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
mode="unknown"
method="unknown"

if [ "$GITHUB_REF_TYPE" == "tag" ]; then
## GitHub Tag
version="$GITHUB_REF"
git_hash="$GITHUB_SHA"
git_branch="$GITHUB_REF"
mode="tag"
method="github-tag"
elif [ -n "GITHUB_SHA"]; then
## GitHub Ref
version="$GITHUB_SHA"
git_hash="$GITHUB_SHA"
git_branch="$GITHUB_REF"
mode="ref"
method="github-ref"
elif [ -n "$CI_COMMIT_TAG" ]; then
## GitLab Tag
version="$CI_COMMIT_TAG"
git_hash="$CI_COMMIT_SHA"
git_branch="$CI_COMMIT_BRANCH"
mode="tag"
method="gitlab-ref"
elif [ -n "$CI_COMMIT_REF_NAME" ]; then
## GitLab Ref
version="$CI_COMMIT_SHA"
git_hash="$CI_COMMIT_SHA"
git_branch="$CI_COMMIT_BRANCH"
mode="ref"
method="gitlab-ref"
elif command -v git &> /dev/null; then
#version=`git describe --tags --abbrev=0`
version=`git rev-parse --short HEAD`
git_hash=`git rev-parse HEAD`
git_branch=`git branch --show-current`
mode="cmd"
method="default"
fi

echo "APPINFO buildDate ..... $build_date"
echo "APPINFO version ....... $version"
echo "APPINFO gitHash ....... $git_hash"
echo "APPINFO gitBranch ..... $git_branch"
echo "APPINFO method ........ $method"
json=$(cat <<EOF
{
"buildDate": "$build_date",
"version": "$version",
"gitHash": "$git_hash",
"gitBranch": "$git_branch",
"mode": "$mode"
}
EOF
)

echo "$json" > "$1"

Loading